Docs updates

Original commit message from CVS:
Docs updates
Added XML load from memory functionality
Undid the videosink patch, something else is wrong now on my machine:
no MMX acceleration :-(
This commit is contained in:
Wim Taymans 2001-01-21 23:20:46 +00:00
parent 0aaa531aaf
commit 75aa948e0c
22 changed files with 336 additions and 257 deletions

View file

@ -14,6 +14,7 @@
<!entity GstPad SYSTEM "sgml/gstpad.sgml">
<!entity GstPipeline SYSTEM "sgml/gstpipeline.sgml">
<!entity GstAutoplug SYSTEM "sgml/gstautoplug.sgml">
<!entity GstParse SYSTEM "sgml/gstparse.sgml">
<!entity GstPlugin SYSTEM "sgml/gstplugin.sgml">
<!entity GstThread SYSTEM "sgml/gstthread.sgml">
<!entity GstTrace SYSTEM "sgml/gsttrace.sgml">
@ -61,27 +62,27 @@ well as the object hiarchy that defines elements and bins, along
with some more specialized elements.</para>
&Gst;
&GstInfo;
&GstObject;
&GstElement;
&GstBin;
&GstPipeline;
&GstAutoplug;
&GstBin;
&GstBuffer;
&GstBufferPool;
&GstPad;
&GstPlugin;
&GstThread;
&GstQueue;
&GstTypeFind;
&GstType;
&GstCaps;
&GstProps;
&GstMeta;
&GstUtils;
&GstCpu;
&GstElement;
&GstInfo;
&GstMeta;
&GstObject;
&GstPad;
&GstParse;
&GstPipeline;
&GstPlugin;
&GstProps;
&GstQueue;
&GstThread;
&GstTrace;
&GstType;
&GstTypeFind;
&GstUtils;
&GstXml;
&cothreads;

View file

@ -105,8 +105,6 @@ GST_IS_BIN
GST_IS_BIN_CLASS
gst_bin_details
gst_bin_use_cothreads
gst_bin_remove_eos_provider
gst_bin_add_eos_provider
_GstBinChain
</SECTION>
@ -189,6 +187,7 @@ GST_STATE_READY_TO_NULL
GstElementFlags
GST_ELEMENT_IS_THREAD_SUGGESTED
GST_ELEMENT_IS_COTHREAD_STOPPING
GST_ELEMENT_IS_EOS
GstElement
GstElementDetails
GstElementFactory
@ -238,7 +237,6 @@ GST_ELEMENT_CLASS
GST_IS_ELEMENT
GST_IS_ELEMENT_CLASS
gst_element_get_type
gst_element_announce_eos
</SECTION>
<SECTION>
@ -356,9 +354,9 @@ gst_pad_set_element_private
gst_pad_get_element_private
gst_pad_set_parent
gst_pad_get_parent
gst_pad_add_ghost_parent
gst_pad_remove_ghost_parent
gst_pad_get_ghost_parents
gst_pad_add_ghost_pad
gst_pad_remove_ghost_pad
gst_pad_get_ghost_pad_list
gst_pad_get_peer
gst_pad_connect
gst_pad_disconnect
@ -368,7 +366,6 @@ gst_pad_pull_region
gst_pad_pullregion
gst_pad_select
gst_pad_set_eos
gst_pad_eos_func
gst_pad_handle_qos
gst_pad_eos
gst_pad_save_thyself
@ -390,6 +387,7 @@ GST_RPAD_EOSFUNC
GST_GPAD_REALPAD
GstGhostPad
gst_ghost_pad_new
GstPadFactoryEntry
GstPadFactory[]
@ -656,6 +654,7 @@ gst_util_dump_mem
<TITLE>GstXml</TITLE>
GstXML
gst_xml_new
gst_xml_new_from_memory
gst_xml_write
gst_xml_get_element
gst_xml_get_topelements

View file

@ -103,6 +103,7 @@ Flags for a bin.
</para>
@bin:
@Returns:
<!-- ##### FUNCTION gst_bin_create_plan ##### -->

View file

@ -131,6 +131,7 @@ This enum defines the standard flags that an element may have.
@GST_ELEMENT_NEW_LOOPFUNC:
@GST_ELEMENT_COTHREAD_STOPPING:
@GST_ELEMENT_USE_COTHREAD:
@GST_ELEMENT_EOS:
@GST_ELEMENT_FLAG_LAST:
<!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
@ -149,6 +150,14 @@ Queries whether the cothread holding this element needs to be stopped.
@obj: The element to query
<!-- ##### MACRO GST_ELEMENT_IS_EOS ##### -->
<para>
</para>
@obj:
<!-- ##### STRUCT GstElement ##### -->
<para>
@ -306,6 +315,7 @@ circumstances.
@element:
@pad:
@name:
<!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->

View file

@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
gstinfo
GstInfo
<!-- ##### SECTION Short_Description ##### -->
info/debugging/error handling

View file

@ -374,25 +374,25 @@ Destroy the pad.
@Returns:
<!-- ##### FUNCTION gst_pad_add_ghost_parent ##### -->
<!-- ##### FUNCTION gst_pad_add_ghost_pad ##### -->
<para>
</para>
@pad:
@parent:
@ghostpad:
<!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
<!-- ##### FUNCTION gst_pad_remove_ghost_pad ##### -->
<para>
</para>
@pad:
@parent:
@ghostpad:
<!-- ##### FUNCTION gst_pad_get_ghost_parents ##### -->
<!-- ##### FUNCTION gst_pad_get_ghost_pad_list ##### -->
<para>
</para>
@ -486,15 +486,6 @@ Destroy the pad.
@Returns:
<!-- ##### FUNCTION gst_pad_eos_func ##### -->
<para>
</para>
@pad:
@Returns:
<!-- ##### FUNCTION gst_pad_handle_qos ##### -->
<para>
@ -506,10 +497,10 @@ Destroy the pad.
<!-- ##### MACRO gst_pad_eos ##### -->
<para>
Call the EOS function of the pad
</para>
@pad:
@pad: the pad to call the eos function of.
<!-- ##### FUNCTION gst_pad_save_thyself ##### -->
@ -551,7 +542,7 @@ Destroy the pad.
@pushfunc:
@pullfunc:
@pullregionfunc:
@ghostparents:
@ghostpads:
<!-- ##### MACRO GST_RPAD_DIRECTION ##### -->
<para>
@ -665,6 +656,16 @@ Get the real pad of this ghost pad.
@pad:
@realpad:
<!-- ##### FUNCTION gst_ghost_pad_new ##### -->
<para>
</para>
@name:
@pad:
@Returns:
<!-- ##### TYPEDEF GstPadFactoryEntry ##### -->
<para>
Defines an entry for a padfactory.

View file

@ -2,11 +2,12 @@
GstParse
<!-- ##### SECTION Short_Description ##### -->
Parses commandline syntax into a pipeline.
<!-- ##### SECTION Long_Description ##### -->
<para>
This method allows you to create a pipeline from a command
line syntax description.
</para>
<!-- ##### SECTION See_Also ##### -->

View file

@ -2,12 +2,13 @@
GstQueue
<!-- ##### SECTION Short_Description ##### -->
Simple data queue. (queue)
Simple asynchronous data queue.
<!-- ##### SECTION Long_Description ##### -->
<para>
Simple data queue. Data is queued till max_level buffers any subsequent buffers
sent to this filter will block until free space becomes available in the buffer.
The queue is typically used in conjunction with a thread.
</para>
<para>
You can query how many buffers are queued with the level argument.
@ -15,6 +16,9 @@ You can query how many buffers are queued with the level argument.
<para>
The default queue length is set to 10.
</para>
<para>
The queue blocks by default.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
@ -34,11 +38,6 @@ blocks.
<!-- ##### ARG GstQueue:block ##### -->
<para>
</para>
<!-- ##### ARG GstQueue:timeout ##### -->
<para>
Specify wether the queue blocks or not.
</para>

View file

@ -400,6 +400,12 @@ GstEsdSink
</para>
<!-- ##### ARG GstQueue:timeout ##### -->
<para>
</para>
<!-- ##### FUNCTION gst_fakesrc_new ##### -->
<para>
@ -809,6 +815,14 @@ audio source. It provides data for the next element in the graph.
@klass:
<!-- ##### FUNCTION gst_pad_add_ghost_parent ##### -->
<para>
</para>
@pad:
@parent:
<!-- ##### MACRO GST_SINK_CLASS ##### -->
<para>
@ -1482,6 +1496,14 @@ Query a GstSrc for the ASYNC flag
</para>
<!-- ##### FUNCTION gst_pad_get_ghost_parents ##### -->
<para>
</para>
@pad:
@Returns:
<!-- ##### STRUCT GstAudioSrc ##### -->
<para>
@ -1647,6 +1669,14 @@ Query the element for the current mime type
@GST_PROPS_FOURCC_ID_NUM:
@GST_PROPS_BOOL_ID_NUM:
<!-- ##### FUNCTION gst_pad_eos_func ##### -->
<para>
</para>
@pad:
@Returns:
<!-- ##### STRUCT GstEsdSinkClass ##### -->
<para>
@ -1992,6 +2022,14 @@ Indicates this pad is active
</para>
<!-- ##### FUNCTION gst_pad_remove_ghost_parent ##### -->
<para>
</para>
@pad:
@parent:
<!-- ##### SECTION ./tmpl/GstElement.sgml:Title ##### -->
GstElement

View file

@ -34,6 +34,17 @@ All GstElements can be serialized to an XML presentation and subsequently loaded
@Returns:
<!-- ##### FUNCTION gst_xml_new_from_memory ##### -->
<para>
</para>
@buffer:
@size:
@root:
@Returns:
<!-- ##### FUNCTION gst_xml_write ##### -->
<para>

View file

@ -28,9 +28,9 @@
static void gst_autoplug_class_init (GstAutoplugClass *klass);
static void gst_autoplug_init (GstAutoplug *autoplug);
static GList* gst_autoplug_func (gpointer src, gpointer sink,
GstAutoplugListFunction list_function,
GstAutoplugCostFunction cost_function,
static GList* gst_autoplug_func (gpointer src, gpointer sink,
GstAutoplugListFunction list_function,
GstAutoplugCostFunction cost_function,
gpointer data);
struct _gst_autoplug_node
@ -164,7 +164,7 @@ gst_autoplug_caps (GstCaps *srccaps, GstCaps *sinkcaps)
GST_INFO (GST_CAT_AUTOPLUG_ATTEMPT,"autoplugging two caps structures");
return gst_autoplug_func (caps.src, caps.sink,
gst_autoplug_elementfactory_get_list,
gst_autoplug_elementfactory_get_list,
gst_autoplug_caps_find_cost,
&caps);
}
@ -190,7 +190,7 @@ gst_autoplug_caps_list (GList *srccaps, GList *sinkcaps)
GST_INFO (GST_CAT_AUTOPLUG_ATTEMPT,"autoplugging two caps list structures");
return gst_autoplug_func (caps.src, caps.sink,
gst_autoplug_elementfactory_get_list,
gst_autoplug_elementfactory_get_list,
gst_autoplug_caps_find_cost,
&caps);
}
@ -210,15 +210,13 @@ gst_autoplug_pads (GstPad *srcpad, GstPad *sinkpad)
{
caps_struct caps;
// caps.src = srcpad->caps;
// caps.sink = sinkpad->caps;
caps.src = gst_pad_get_caps_list(srcpad);
caps.sink = gst_pad_get_caps_list(sinkpad);
GST_INFO (GST_CAT_AUTOPLUG_ATTEMPT,"autoplugging two caps structures");
return gst_autoplug_func (caps.src, caps.sink,
gst_autoplug_elementfactory_get_list,
gst_autoplug_elementfactory_get_list,
gst_autoplug_caps_find_cost,
&caps);
}

View file

@ -510,6 +510,9 @@ gst_bin_use_cothreads (GstBin *bin,
* @bin: #Gstbin to iterate
*
* Iterates over the elements in this bin.
*
* Returns: TRUE if the bin did something usefull. This value
* can be used to determine it the bin is in EOS.
*/
gboolean
gst_bin_iterate (GstBin *bin)

View file

@ -110,7 +110,7 @@ typedef enum {
/* the element has to be scheduled as a cothread for any sanity */
GST_ELEMENT_USE_COTHREAD,
// if this element is in EOS
/* if this element is in EOS */
GST_ELEMENT_EOS,
/* use some padding for future expansion */

View file

@ -29,8 +29,8 @@
/***** Start with the base GstPad class *****/
static void gst_pad_class_init (GstPadClass *klass);
static void gst_pad_init (GstPad *pad);
static void gst_pad_class_init (GstPadClass *klass);
static void gst_pad_init (GstPad *pad);
static GstObject *pad_parent_class = NULL;
@ -96,6 +96,8 @@ static void gst_real_pad_get_arg (GtkObject *object,GtkArg *arg,guint id);
static void gst_real_pad_destroy (GtkObject *object);
static void gst_pad_push_func (GstPad *pad, GstBuffer *buf);
static gboolean gst_pad_eos_func (GstPad *pad);
static GstPad *real_pad_parent_class = NULL;
static guint gst_real_pad_signals[REAL_LAST_SIGNAL] = { 0 };
@ -597,15 +599,15 @@ gst_pad_add_ghost_pad (GstPad *pad,
/**
* gst_pad_remove_ghost_parent:
* gst_pad_remove_ghost_pad:
* @pad: the pad to remove the ghost parent
* @ghostpad: the ghost pad to remove from the pad
*
* Remove a ghost pad from a pad.
*/
void
gst_pad_remove_ghost_parent (GstPad *pad,
GstPad *ghostpad)
gst_pad_remove_ghost_pad (GstPad *pad,
GstPad *ghostpad)
{
GstRealPad *realpad;
@ -645,7 +647,7 @@ gst_pad_get_parent (GstPad *pad)
* Returns: a GList of ghost pads
*/
GList*
gst_pad_get_ghost_parents (GstPad *pad)
gst_pad_get_ghost_pad_list (GstPad *pad)
{
g_return_val_if_fail (pad != NULL, NULL);
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
@ -1122,7 +1124,7 @@ gst_padtemplate_load_thyself (xmlNodePtr parent)
}
gboolean
static gboolean
gst_pad_eos_func(GstPad *pad)
{
GstElement *element;

View file

@ -183,16 +183,16 @@ struct _GstGhostPadClass {
#define GST_PAD_PEER(pad) GST_RPAD_PEER(GST_PAD_REALIZE(pad))
/* Some check functions (unused?) */
#define GST_PAD_CONNECTED(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->peer != NULL)
#define GST_PAD_CAN_PULL(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->pullfunc != NULL)
#define GST_PAD_CONNECTED(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->peer != NULL)
#define GST_PAD_CAN_PULL(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->pullfunc != NULL)
/***** PadTemplate *****/
#define GST_TYPE_PADTEMPLATE (gst_padtemplate_get_type ())
#define GST_PADTEMPLATE(obj) (GTK_CHECK_CAST ((obj), GST_TYPE_PADTEMPLATE,GstPad))
#define GST_PADTEMPLATE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GST_TYPE_PADTEMPLATE,GstPadClass))
#define GST_IS_PADTEMPLATE(obj) (GTK_CHECK_TYPE ((obj), GST_TYPE_PADTEMPLATE))
#define GST_IS_PADTEMPLATE_CLASS(obj) (GTK_CHECK_CLASS_TYPE ((klass), GST_TYPE_PADTEMPLATE))
#define GST_TYPE_PADTEMPLATE (gst_padtemplate_get_type ())
#define GST_PADTEMPLATE(obj) (GTK_CHECK_CAST ((obj), GST_TYPE_PADTEMPLATE,GstPad))
#define GST_PADTEMPLATE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GST_TYPE_PADTEMPLATE,GstPadClass))
#define GST_IS_PADTEMPLATE(obj) (GTK_CHECK_TYPE ((obj), GST_TYPE_PADTEMPLATE))
#define GST_IS_PADTEMPLATE_CLASS(obj) (GTK_CHECK_CLASS_TYPE ((klass), GST_TYPE_PADTEMPLATE))
typedef enum {
GST_PAD_ALWAYS,
@ -201,12 +201,12 @@ typedef enum {
} GstPadPresence;
struct _GstPadTemplate {
GstObject object;
GstObject object;
gchar *name_template;
GstPadDirection direction;
GstPadPresence presence;
GList *caps;
GList *caps;
};
struct _GstPadTemplateClass {
@ -221,19 +221,19 @@ struct _GstPadTemplateClass {
typedef gpointer GstPadFactoryEntry;
typedef GstPadFactoryEntry GstPadFactory[];
#define GST_PAD_FACTORY_ALWAYS GINT_TO_POINTER(GST_PAD_ALWAYS)
#define GST_PAD_FACTORY_SOMETIMES GINT_TO_POINTER(GST_PAD_SOMETIMES)
#define GST_PAD_FACTORY_REQUEST GINT_TO_POINTER(GST_PAD_REQUEST)
#define GST_PAD_FACTORY_ALWAYS GINT_TO_POINTER(GST_PAD_ALWAYS)
#define GST_PAD_FACTORY_SOMETIMES GINT_TO_POINTER(GST_PAD_SOMETIMES)
#define GST_PAD_FACTORY_REQUEST GINT_TO_POINTER(GST_PAD_REQUEST)
#define GST_PAD_FACTORY_SRC GINT_TO_POINTER(GST_PAD_SRC)
#define GST_PAD_FACTORY_SINK GINT_TO_POINTER(GST_PAD_SINK)
#define GST_PAD_FACTORY_SRC GINT_TO_POINTER(GST_PAD_SRC)
#define GST_PAD_FACTORY_SINK GINT_TO_POINTER(GST_PAD_SINK)
#define GST_PAD_FACTORY_CAPS(a...) GINT_TO_POINTER(1),##a,NULL
#define GST_PAD_FACTORY_CAPS(a...) GINT_TO_POINTER(1),##a,NULL
GtkType gst_pad_get_type (void);
GtkType gst_real_pad_get_type (void);
GtkType gst_ghost_pad_get_type (void);
GtkType gst_pad_get_type (void);
GtkType gst_real_pad_get_type (void);
GtkType gst_ghost_pad_get_type (void);
GstPad* gst_pad_new (gchar *name, GstPadDirection direction);
#define gst_pad_destroy(pad) gst_object_destroy (GST_OBJECT (pad))
@ -288,10 +288,9 @@ GstBuffer* gst_pad_pull_region (GstPad *pad, gulong offset, gulong size);
GstPad * gst_pad_select (GstPad *nextpad, ...);
#define gst_pad_eos(pad) (GST_RPAD_EOSFUNC(GST_RPAD_PEER(pad))(GST_PAD(GST_RPAD_PEER(pad))))
#define gst_pad_eos(pad) (GST_RPAD_EOSFUNC(GST_RPAD_PEER(pad))(GST_PAD(GST_RPAD_PEER(pad))))
gboolean gst_pad_set_eos (GstPad *pad);
gboolean gst_pad_eos_func (GstPad *pad);
void gst_pad_handle_qos (GstPad *pad, glong qos_message);
xmlNodePtr gst_pad_save_thyself (GstPad *pad, xmlNodePtr parent);

View file

@ -59,7 +59,7 @@ gst_parse_newpad(GstElement *element,GstPad *pad,launch_delayed_pad *peer)
}
*/
gchar *
static gchar *
gst_parse_unique_name(gchar *type,gst_parse_priv *priv)
{
gint count;
@ -304,7 +304,18 @@ GST_DEBUG_PAD_NAME(srcpad),gst_element_get_name(GST_ELEMENT(parent)),gst_pad_get
return i+1;
}
gint gst_parse_launch(const gchar *cmdline,GstBin *parent) {
/**
* gst_parse_launch:
* @cmdline: the command line describing the pipeline
* @parent: the parent bin for the resulting pipeline
*
* Create a new pipeline based on command line syntax.
*
* Returns: ?
*/
gint
gst_parse_launch(const gchar *cmdline,GstBin *parent)
{
gst_parse_priv priv;
gchar **argvn;
gint newargc;

View file

@ -56,7 +56,6 @@ enum {
ARG_LEVEL,
ARG_MAX_LEVEL,
ARG_BLOCK,
ARG_TIMEOUT,
};
@ -115,8 +114,6 @@ gst_queue_class_init (GstQueueClass *klass)
GTK_ARG_READWRITE, ARG_MAX_LEVEL);
gtk_object_add_arg_type ("GstQueue::block", GTK_TYPE_BOOL,
GTK_ARG_READWRITE, ARG_BLOCK);
gtk_object_add_arg_type ("GstQueue::timeout", GTK_TYPE_INT,
GTK_ARG_READWRITE, ARG_TIMEOUT);
gtkobject_class->set_arg = gst_queue_set_arg;
gtkobject_class->get_arg = gst_queue_get_arg;
@ -351,8 +348,6 @@ gst_queue_set_arg (GtkObject *object, GtkArg *arg, guint id)
case ARG_BLOCK:
queue->block = GTK_VALUE_BOOL (*arg);
break;
case ARG_TIMEOUT:
break;
default:
break;
}
@ -378,8 +373,6 @@ gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id)
case ARG_BLOCK:
GTK_VALUE_BOOL (*arg) = queue->block;
break;
case ARG_TIMEOUT:
break;
default:
arg->type = GTK_TYPE_INVALID;
break;

View file

@ -64,7 +64,6 @@ static void gst_thread_restore_thyself (GstElement *element,xmlNodePtr parent,
static void gst_thread_signal_thread (GstThread *thread);
static void gst_thread_wait_thread (GstThread *thread);
static void gst_thread_create_plan_dummy (GstBin *bin);
static void gst_thread_schedule_dummy (GstBin *bin);
static void* gst_thread_main_loop (void *arg);
@ -114,7 +113,6 @@ gst_thread_class_init (GstThreadClass *klass)
gstelement_class->save_thyself = gst_thread_save_thyself;
gstelement_class->restore_thyself = gst_thread_restore_thyself;
//gstbin_class->create_plan = gst_thread_create_plan_dummy;
gstbin_class->schedule = gst_thread_schedule_dummy;
gtkobject_class->set_arg = gst_thread_set_arg;
@ -147,15 +145,6 @@ gst_thread_schedule_dummy (GstBin *bin)
GST_INFO (GST_CAT_THREAD,"gstthread: scheduling delayed until thread starts");
}
static void
gst_thread_create_plan_dummy (GstBin *bin)
{
g_return_if_fail (GST_IS_THREAD (bin));
if (!GST_FLAG_IS_SET (GST_THREAD (bin), GST_THREAD_STATE_SPINNING))
GST_INFO (GST_CAT_THREAD,"gstthread: create plan delayed until thread starts");
}
static void
gst_thread_set_arg (GtkObject *object,
GtkArg *arg,

View file

@ -26,7 +26,7 @@
#include "gstbin.h"
static void gst_xml_class_init (GstXMLClass *klass);
static void gst_xml_class_init (GstXMLClass *klass);
static void gst_xml_init (GstXML *xml);
static GstObjectClass *parent_class = NULL;
@ -84,38 +84,14 @@ gst_xml_write (GstElement *element)
return doc;
}
/**
* gst_xml_new:
* @fname: The filename with the xml description
* @root: The name of the root object to build
*
* Creates a new GstXML object (and the corresponding elements) from
* the XML file fname. Optionally it will only build the element from
* the element node root (if it is not NULL). This feature is useful
* if you only want to build a specific element from an XML file
* but not the pipeline it is embedded in. Note also that the XML parse
* tree is cached to speed up creating another GstXML object for
* the same file
*
* Returns: a pointer to a new GstElement
*/
GstXML*
gst_xml_new (const guchar *fname, const guchar *root)
static GstXML*
gst_xml_real_parse (xmlDocPtr doc, const guchar *root)
{
xmlDocPtr doc;
xmlNodePtr field;
GstXML *xml;
xmlNodePtr field;
g_return_val_if_fail(fname != NULL, NULL);
doc = xmlParseFile(fname);
if (!doc) {
g_print("gstxml: XML file \"%s\" could not be read\n", fname);
return NULL;
}
if (strcmp(doc->xmlRootNode->name, "GST-Pipeline")) {
g_print("gstxml: XML file \"%s\" is in wrong format\n", fname);
g_warning("gstxml: XML file is in wrong format\n");
return NULL;
}
@ -145,6 +121,61 @@ gst_xml_new (const guchar *fname, const guchar *root)
return xml;
}
/**
* gst_xml_new:
* @fname: The filename with the xml description
* @root: The name of the root object to build
*
* Creates a new GstXML object (and the corresponding elements) from
* the XML file fname. Optionally it will only build the element from
* the element node root (if it is not NULL). This feature is useful
* if you only want to build a specific element from an XML file
* but not the pipeline it is embedded in. Note also that the XML parse
* tree is cached to speed up creating another GstXML object for
* the same file
*
* Returns: a pointer to a new GstXML object
*/
GstXML*
gst_xml_new (const guchar *fname, const guchar *root)
{
xmlDocPtr doc;
g_return_val_if_fail(fname != NULL, NULL);
doc = xmlParseFile(fname);
if (!doc) {
g_warning("gstxml: XML file \"%s\" could not be read\n", fname);
return NULL;
}
return gst_xml_real_parse (doc, root);
}
/**
* gst_xml_new_from_memory:
* @buffer: a pointer to the in memory XML buffer
* @size: the size of the buffer
* @root: the name of the root objects to build
*
* Creates a new GstXML object (and the corresponding elements) from
* an in memory XML buffer.
*
* Returns: a pointer to a new GstXML object
*/
GstXML*
gst_xml_new_from_memory (guchar *buffer, guint size, const gchar *root)
{
xmlDocPtr doc;
g_return_val_if_fail(buffer != NULL, NULL);
doc = xmlParseMemory (buffer, size);
return gst_xml_real_parse (doc, root);
}
/**
* gst_xml_get_topelements:
* @xml: The GstXML to get the elements from

View file

@ -66,16 +66,18 @@ struct _GstXMLClass {
GtkObjectClass parent_class;
};
GtkType gst_xml_get_type (void);
GtkType gst_xml_get_type (void);
/* create an XML document out of a pipeline */
xmlDocPtr gst_xml_write (GstElement *element);
xmlDocPtr gst_xml_write (GstElement *element);
GstXML* gst_xml_new (const guchar *fname, const guchar *root);
GstXML* gst_xml_new_from_memory (guchar *buffer, guint size, const gchar *root);
GstElement* gst_xml_get_element (GstXML *xml, const guchar *name);
GList* gst_xml_get_topelements (GstXML *xml);
GList* gst_xml_get_topelements (GstXML *xml);
#ifdef __cplusplus
}

View file

@ -56,7 +56,6 @@ enum {
ARG_LEVEL,
ARG_MAX_LEVEL,
ARG_BLOCK,
ARG_TIMEOUT,
};
@ -115,8 +114,6 @@ gst_queue_class_init (GstQueueClass *klass)
GTK_ARG_READWRITE, ARG_MAX_LEVEL);
gtk_object_add_arg_type ("GstQueue::block", GTK_TYPE_BOOL,
GTK_ARG_READWRITE, ARG_BLOCK);
gtk_object_add_arg_type ("GstQueue::timeout", GTK_TYPE_INT,
GTK_ARG_READWRITE, ARG_TIMEOUT);
gtkobject_class->set_arg = gst_queue_set_arg;
gtkobject_class->get_arg = gst_queue_get_arg;
@ -351,8 +348,6 @@ gst_queue_set_arg (GtkObject *object, GtkArg *arg, guint id)
case ARG_BLOCK:
queue->block = GTK_VALUE_BOOL (*arg);
break;
case ARG_TIMEOUT:
break;
default:
break;
}
@ -378,8 +373,6 @@ gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id)
case ARG_BLOCK:
GTK_VALUE_BOOL (*arg) = queue->block;
break;
case ARG_TIMEOUT:
break;
default:
arg->type = GTK_TYPE_INVALID;
break;

View file

@ -216,10 +216,7 @@ gint print_element_info(GstElementFactory *factory) {
if (realpad->qosfunc)
printf(" Has qosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->qosfunc));
if (realpad->eosfunc) {
if (realpad->eosfunc == gst_pad_eos_func)
printf(" Has default eosfunc() gst_pad_eos_func()\n");
else
printf(" Has eosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->eosfunc));
printf(" Has eosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->eosfunc));
}
if (pad->padtemplate)