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 GstPad SYSTEM "sgml/gstpad.sgml">
<!entity GstPipeline SYSTEM "sgml/gstpipeline.sgml"> <!entity GstPipeline SYSTEM "sgml/gstpipeline.sgml">
<!entity GstAutoplug SYSTEM "sgml/gstautoplug.sgml"> <!entity GstAutoplug SYSTEM "sgml/gstautoplug.sgml">
<!entity GstParse SYSTEM "sgml/gstparse.sgml">
<!entity GstPlugin SYSTEM "sgml/gstplugin.sgml"> <!entity GstPlugin SYSTEM "sgml/gstplugin.sgml">
<!entity GstThread SYSTEM "sgml/gstthread.sgml"> <!entity GstThread SYSTEM "sgml/gstthread.sgml">
<!entity GstTrace SYSTEM "sgml/gsttrace.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> with some more specialized elements.</para>
&Gst; &Gst;
&GstInfo;
&GstObject;
&GstElement;
&GstBin;
&GstPipeline;
&GstAutoplug; &GstAutoplug;
&GstBin;
&GstBuffer; &GstBuffer;
&GstBufferPool; &GstBufferPool;
&GstPad;
&GstPlugin;
&GstThread;
&GstQueue;
&GstTypeFind;
&GstType;
&GstCaps; &GstCaps;
&GstProps;
&GstMeta;
&GstUtils;
&GstCpu; &GstCpu;
&GstElement;
&GstInfo;
&GstMeta;
&GstObject;
&GstPad;
&GstParse;
&GstPipeline;
&GstPlugin;
&GstProps;
&GstQueue;
&GstThread;
&GstTrace; &GstTrace;
&GstType;
&GstTypeFind;
&GstUtils;
&GstXml; &GstXml;
&cothreads; &cothreads;

View file

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

View file

@ -103,6 +103,7 @@ Flags for a bin.
</para> </para>
@bin: @bin:
@Returns:
<!-- ##### FUNCTION gst_bin_create_plan ##### --> <!-- ##### 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_NEW_LOOPFUNC:
@GST_ELEMENT_COTHREAD_STOPPING: @GST_ELEMENT_COTHREAD_STOPPING:
@GST_ELEMENT_USE_COTHREAD: @GST_ELEMENT_USE_COTHREAD:
@GST_ELEMENT_EOS:
@GST_ELEMENT_FLAG_LAST: @GST_ELEMENT_FLAG_LAST:
<!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### --> <!-- ##### 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 @obj: The element to query
<!-- ##### MACRO GST_ELEMENT_IS_EOS ##### -->
<para>
</para>
@obj:
<!-- ##### STRUCT GstElement ##### --> <!-- ##### STRUCT GstElement ##### -->
<para> <para>
@ -306,6 +315,7 @@ circumstances.
@element: @element:
@pad: @pad:
@name:
<!-- ##### FUNCTION gst_element_remove_ghost_pad ##### --> <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->

View file

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

View file

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

View file

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

View file

@ -2,12 +2,13 @@
GstQueue GstQueue
<!-- ##### SECTION Short_Description ##### --> <!-- ##### SECTION Short_Description ##### -->
Simple data queue. (queue) Simple asynchronous data queue.
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
Simple data queue. Data is queued till max_level buffers any subsequent buffers 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. 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>
<para> <para>
You can query how many buffers are queued with the level argument. 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> <para>
The default queue length is set to 10. The default queue length is set to 10.
</para> </para>
<para>
The queue blocks by default.
</para>
<!-- ##### SECTION See_Also ##### --> <!-- ##### SECTION See_Also ##### -->
<para> <para>
@ -34,11 +38,6 @@ blocks.
<!-- ##### ARG GstQueue:block ##### --> <!-- ##### ARG GstQueue:block ##### -->
<para> <para>
Specify wether the queue blocks or not.
</para>
<!-- ##### ARG GstQueue:timeout ##### -->
<para>
</para> </para>

View file

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

View file

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

View file

@ -210,8 +210,6 @@ gst_autoplug_pads (GstPad *srcpad, GstPad *sinkpad)
{ {
caps_struct caps; caps_struct caps;
// caps.src = srcpad->caps;
// caps.sink = sinkpad->caps;
caps.src = gst_pad_get_caps_list(srcpad); caps.src = gst_pad_get_caps_list(srcpad);
caps.sink = gst_pad_get_caps_list(sinkpad); caps.sink = gst_pad_get_caps_list(sinkpad);

View file

@ -510,6 +510,9 @@ gst_bin_use_cothreads (GstBin *bin,
* @bin: #Gstbin to iterate * @bin: #Gstbin to iterate
* *
* Iterates over the elements in this bin. * 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 gboolean
gst_bin_iterate (GstBin *bin) 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 */ /* the element has to be scheduled as a cothread for any sanity */
GST_ELEMENT_USE_COTHREAD, GST_ELEMENT_USE_COTHREAD,
// if this element is in EOS /* if this element is in EOS */
GST_ELEMENT_EOS, GST_ELEMENT_EOS,
/* use some padding for future expansion */ /* use some padding for future expansion */

View file

@ -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_real_pad_destroy (GtkObject *object);
static void gst_pad_push_func (GstPad *pad, GstBuffer *buf); 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 GstPad *real_pad_parent_class = NULL;
static guint gst_real_pad_signals[REAL_LAST_SIGNAL] = { 0 }; static guint gst_real_pad_signals[REAL_LAST_SIGNAL] = { 0 };
@ -597,14 +599,14 @@ 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 * @pad: the pad to remove the ghost parent
* @ghostpad: the ghost pad to remove from the pad * @ghostpad: the ghost pad to remove from the pad
* *
* Remove a ghost pad from a pad. * Remove a ghost pad from a pad.
*/ */
void void
gst_pad_remove_ghost_parent (GstPad *pad, gst_pad_remove_ghost_pad (GstPad *pad,
GstPad *ghostpad) GstPad *ghostpad)
{ {
GstRealPad *realpad; GstRealPad *realpad;
@ -645,7 +647,7 @@ gst_pad_get_parent (GstPad *pad)
* Returns: a GList of ghost pads * Returns: a GList of ghost pads
*/ */
GList* 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 (pad != NULL, NULL);
g_return_val_if_fail (GST_IS_PAD (pad), 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) gst_pad_eos_func(GstPad *pad)
{ {
GstElement *element; GstElement *element;

View file

@ -291,7 +291,6 @@ 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_set_eos (GstPad *pad);
gboolean gst_pad_eos_func (GstPad *pad);
void gst_pad_handle_qos (GstPad *pad, glong qos_message); void gst_pad_handle_qos (GstPad *pad, glong qos_message);
xmlNodePtr gst_pad_save_thyself (GstPad *pad, xmlNodePtr parent); 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) gst_parse_unique_name(gchar *type,gst_parse_priv *priv)
{ {
gint count; gint count;
@ -304,7 +304,18 @@ GST_DEBUG_PAD_NAME(srcpad),gst_element_get_name(GST_ELEMENT(parent)),gst_pad_get
return i+1; 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; gst_parse_priv priv;
gchar **argvn; gchar **argvn;
gint newargc; gint newargc;

View file

@ -56,7 +56,6 @@ enum {
ARG_LEVEL, ARG_LEVEL,
ARG_MAX_LEVEL, ARG_MAX_LEVEL,
ARG_BLOCK, ARG_BLOCK,
ARG_TIMEOUT,
}; };
@ -115,8 +114,6 @@ gst_queue_class_init (GstQueueClass *klass)
GTK_ARG_READWRITE, ARG_MAX_LEVEL); GTK_ARG_READWRITE, ARG_MAX_LEVEL);
gtk_object_add_arg_type ("GstQueue::block", GTK_TYPE_BOOL, gtk_object_add_arg_type ("GstQueue::block", GTK_TYPE_BOOL,
GTK_ARG_READWRITE, ARG_BLOCK); 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->set_arg = gst_queue_set_arg;
gtkobject_class->get_arg = gst_queue_get_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: case ARG_BLOCK:
queue->block = GTK_VALUE_BOOL (*arg); queue->block = GTK_VALUE_BOOL (*arg);
break; break;
case ARG_TIMEOUT:
break;
default: default:
break; break;
} }
@ -378,8 +373,6 @@ gst_queue_get_arg (GtkObject *object, GtkArg *arg, guint id)
case ARG_BLOCK: case ARG_BLOCK:
GTK_VALUE_BOOL (*arg) = queue->block; GTK_VALUE_BOOL (*arg) = queue->block;
break; break;
case ARG_TIMEOUT:
break;
default: default:
arg->type = GTK_TYPE_INVALID; arg->type = GTK_TYPE_INVALID;
break; 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_signal_thread (GstThread *thread);
static void gst_thread_wait_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_schedule_dummy (GstBin *bin);
static void* gst_thread_main_loop (void *arg); 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->save_thyself = gst_thread_save_thyself;
gstelement_class->restore_thyself = gst_thread_restore_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; gstbin_class->schedule = gst_thread_schedule_dummy;
gtkobject_class->set_arg = gst_thread_set_arg; 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"); 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 static void
gst_thread_set_arg (GtkObject *object, gst_thread_set_arg (GtkObject *object,
GtkArg *arg, GtkArg *arg,

View file

@ -84,38 +84,14 @@ gst_xml_write (GstElement *element)
return doc; return doc;
} }
/** static GstXML*
* gst_xml_new: gst_xml_real_parse (xmlDocPtr doc, const guchar *root)
* @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)
{ {
xmlDocPtr doc;
xmlNodePtr field;
GstXML *xml; 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")) { 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; return NULL;
} }
@ -145,6 +121,61 @@ gst_xml_new (const guchar *fname, const guchar *root)
return xml; 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: * gst_xml_get_topelements:
* @xml: The GstXML to get the elements from * @xml: The GstXML to get the elements from

View file

@ -73,6 +73,8 @@ GtkType gst_xml_get_type (void);
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 (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); GstElement* gst_xml_get_element (GstXML *xml, const guchar *name);
GList* gst_xml_get_topelements (GstXML *xml); GList* gst_xml_get_topelements (GstXML *xml);

View file

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

View file

@ -216,9 +216,6 @@ gint print_element_info(GstElementFactory *factory) {
if (realpad->qosfunc) if (realpad->qosfunc)
printf(" Has qosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->qosfunc)); printf(" Has qosfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->qosfunc));
if (realpad->eosfunc) { 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));
} }