diff --git a/configure.in b/configure.in index 3995af79ad..11f1000c9d 100644 --- a/configure.in +++ b/configure.in @@ -420,6 +420,7 @@ plugins/dvdsrc/Makefile plugins/vcdsrc/Makefile plugins/cobin/Makefile plugins/rtjpeg/Makefile +plugins/vorbis/Makefile plugins/capture/Makefile plugins/capture/v4l/Makefile gstplay/Makefile diff --git a/gst/Makefile.am b/gst/Makefile.am index 25d533f318..00ffc27d53 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -62,7 +62,7 @@ libgstinclude_HEADERS = \ gstxml.h \ cothreads.h -CFLAGS += -g -O2 -Wall +CFLAGS += -O2 -Wall libgst_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(XML_LIBS) libgst_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE) diff --git a/gst/gst.c b/gst/gst.c index 96ff0c76f1..53926b1b42 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -59,12 +59,22 @@ void gst_init(int *argc,char **argv[]) { } } +/** + * gst_main: + * + * Enter the main GStreamer processing loop + */ void gst_main() { gdk_threads_enter(); gtk_main(); gdk_threads_leave(); } +/** + * gst_main_quit: + * + * Exits the main GStreamer processing loop + */ void gst_main_quit() { gtk_main_quit(); } diff --git a/gst/gstbin.c b/gst/gstbin.c index f0b2230465..faca1b4bb8 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -277,7 +277,16 @@ static gboolean gst_bin_change_state_type(GstBin *bin, return TRUE; } - +/** + * gst_bin_set_state_type: + * @bin: #GstBin to set the state + * @state: the new state to set the elements to + * @type: the type of elements to change + * + * Sets the state of only those objects of the given type. + * + * Returns: indication if the state change was successfull + */ gboolean gst_bin_set_state_type(GstBin *bin, GstElementState state, GtkType type) { @@ -398,6 +407,12 @@ void gst_bin_iterate(GstBin *bin) { (oclass->iterate)(bin); } +/** + * gst_bin_create_plan: + * @bin: #Gstbin to create the plan for + * + * let the bin figure out how to handle the plugins in it. + */ void gst_bin_create_plan(GstBin *bin) { GstBinClass *oclass; diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index 309d7dd1d5..6b9b64b81f 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -67,12 +67,19 @@ GstBuffer *gst_buffer_new() { return buffer; } +/** + * gst_buffer_new_from_pool: + * @pool: the buffer pool to use + * + * Create a new buffer using the specified bufferpool. + * + * Returns: new buffer + */ GstBuffer *gst_buffer_new_from_pool(GstBufferPool *pool) { return gst_buffer_pool_new_buffer(pool); } - /** * gst_buffer_create_sub: * @parent: parent buffer @@ -126,12 +133,12 @@ GstBuffer *gst_buffer_create_sub(GstBuffer *parent,guint32 offset,guint32 size) } /** - * gst_buffer_append_: + * gst_buffer_append: * @buffer: a buffer * @append: the buffer to append * - * Creates a new buffer by appending the data of eppend to the - * existing data of buffer. + * Creates a new buffer by appending the data of append to the + * existing data of buffer. * * Returns: new buffer */ diff --git a/gst/gstcpu.c b/gst/gstcpu.c index 22e5abb828..38605f5ebb 100644 --- a/gst/gstcpu.c +++ b/gst/gstcpu.c @@ -37,10 +37,22 @@ void _gst_cpu_initialize(void) gst_cpuid(1, &eax, &ebx, &ecx, &edx); - if (edx & (1<<23)) _gst_cpu_flags |= GST_CPU_FLAG_MMX; - if (edx & (1<<25)) _gst_cpu_flags |= GST_CPU_FLAG_SSE; + g_print("CPU features : "); + + if (edx & (1<<23)) { + _gst_cpu_flags |= GST_CPU_FLAG_MMX; + g_print("MMX "); + } + if (edx & (1<<25)) { + _gst_cpu_flags |= GST_CPU_FLAG_SSE; + g_print("SSE "); + } + + if (!_gst_cpu_flags) { + g_print("NONE"); + } + g_print("\n"); - g_print("CPU features (%08x)\n", _gst_cpu_flags); } guint32 gst_cpu_get_flags(void) diff --git a/gst/gstelement.c b/gst/gstelement.c index 579e951d2b..40c06dbb43 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -277,10 +277,8 @@ void gst_element_error(GstElement *element,gchar *error) { * @element: element to change state of * @state: new element state * - * Sets the state of the element, but more importantly fires off a signal - * indicating the new state. You can clear state by simply prefixing the - * GstElementState value with ~, it will be detected and used to turn off - * that bit. + * Sets the state of the element. This function will only set + * the elements pending state. * * Returns: whether or not the state was successfully set. */ @@ -306,6 +304,14 @@ gint gst_element_set_state(GstElement *element,GstElementState state) { return return_val; } +/** + * gst_element_get_factory: + * @element: element to request the factory + * + * Retrieves the factory that was used to create this element + * + * Returns: the factory used for creating this element + */ GstElementFactory *gst_element_get_factory(GstElement *element) { GstElementClass *oclass; @@ -322,9 +328,8 @@ GstElementFactory *gst_element_get_factory(GstElement *element) { * @element: element to change state of * * Changes the state of the element, but more importantly fires off a signal - * indicating the new state. You can clear state by simply prefixing the - * GstElementState value with ~, it will be detected and used to turn off - * that bit. + * indicating the new state. + * The element will have no pending states anymore. * * Returns: whether or not the state change was successfully set. */ diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index 566a1293fa..88746ded81 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -134,6 +134,17 @@ GstElement *gst_elementfactory_create(GstElementFactory *factory, return element; } +/** + * gst_elementfactory_make: + * @factoryname: a named factory to instantiate + * @name: name of new element + * + * Create a new element of the type defined by the given elementfactory. + * It wll be given the name supplied, since all elements require a name as + * their first argument. + * + * Returns: new #GstElement + */ GstElement *gst_elementfactory_make(gchar *factoryname,gchar *name) { GstElementFactory *factory; GstElement *element; @@ -145,18 +156,43 @@ GstElement *gst_elementfactory_make(gchar *factoryname,gchar *name) { return element; } +/** + * gst_elementfactory_add_src: + * @elementfactory: factory to add the src id to + * @id: the mime id of the src + * + * Use this function to indicate that this factory can src + * the given type id. + */ void gst_elementfactory_add_src(GstElementFactory *elementfactory, guint16 id) { guint type = id; elementfactory->src_types = g_list_prepend(elementfactory->src_types, GUINT_TO_POINTER(type)); } +/** + * gst_elementfactory_add_sink: + * @elementfactory: factory to add the sink id to + * @id: the type id of the sink + * + * Use this function to indicate that this factory can sink + * the given type id. + */ void gst_elementfactory_add_sink(GstElementFactory *elementfactory, guint16 id) { guint type = id; elementfactory->sink_types = g_list_prepend(elementfactory->sink_types, GUINT_TO_POINTER(type)); } +/** + * gst_elementfactory_save_thyself: + * @factory: factory to save + * @parent: the parent xmlNodePtr + * + * Saves the factory into an XML tree + * + * Returns: the new xmlNodePtr + */ xmlNodePtr gst_elementfactory_save_thyself(GstElementFactory *factory, xmlNodePtr parent) { GList *types; xmlNodePtr subtree; @@ -197,6 +233,14 @@ xmlNodePtr gst_elementfactory_save_thyself(GstElementFactory *factory, xmlNodePt return parent; } +/** + * gst_elementfactory_load_thyself: + * @parent: the parent xmlNodePtr + * + * Creates a new factory from an xmlNodePtr + * + * Returns: the new factory + */ GstElementFactory *gst_elementfactory_load_thyself(xmlNodePtr parent) { GstElementFactory *factory = g_new0(GstElementFactory, 1); xmlNodePtr children = parent->childs; diff --git a/gst/gstpad.c b/gst/gstpad.c index e342ecb58b..26a9916752 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -262,8 +262,8 @@ void gst_pad_chain(GstPad *pad) { /** * gst_pad_handle_qos: - * @element: element to change state of - * @state: new element state + * @pad: the pad to handle the QoS message + * @qos_message: the QoS message to handle * */ void gst_pad_handle_qos(GstPad *pad, diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index 100005db6b..f94c7c05e1 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -222,6 +222,15 @@ end: } } +/** + * gst_pipeline_autoplug: + * @pipeline: the pipeline to autoplug + * + * Constructs a complete pipeline by automatically + * detecting the plugins needed. + * + * Returns: a gboolean indicating success or failure. + */ gboolean gst_pipeline_autoplug(GstPipeline *pipeline) { GList *elements; GstElement *element, *srcelement = NULL, *sinkelement= NULL;