From b214d35eedcc17d449c590c85bf68946de67c77d Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 11 Apr 2002 20:35:18 +0000 Subject: [PATCH] commit to make gstreamer follow the gtk function/macro naming conventions: Original commit message from CVS: commit to make gstreamer follow the gtk function/macro naming conventions: GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE and the same for *factory and typefind. --- docs/gst/tmpl/gstautoplug.sgml | 8 +- docs/gst/tmpl/gstautoplugfactory.sgml | 24 ++--- docs/gst/tmpl/gstelement.sgml | 6 +- docs/gst/tmpl/gstelementfactory.sgml | 30 +++--- docs/gst/tmpl/gstpad.sgml | 6 +- docs/gst/tmpl/gstpadtemplate.sgml | 46 ++++---- docs/gst/tmpl/gstreamer-unused.sgml | 34 +++--- docs/gst/tmpl/gstschedulerfactory.sgml | 28 ++--- docs/gst/tmpl/gsttimecache.sgml | 28 ++--- docs/gst/tmpl/gsttypefactory.sgml | 18 ++-- docs/manual/advanced-autoplugging.xml | 4 +- docs/manual/advanced-dparams.xml | 2 +- docs/manual/advanced-threads.xml | 6 +- docs/manual/appendix-checklist.xml | 2 +- docs/manual/appendix-debugging.xml | 2 +- docs/manual/autoplugging.xml | 10 +- docs/manual/basics-bins.xml | 14 +-- docs/manual/basics-elements.xml | 8 +- docs/manual/basics-helloworld.xml | 14 +-- docs/manual/basics-pads.xml | 10 +- docs/manual/bins.xml | 14 +-- docs/manual/debugging.xml | 2 +- docs/manual/dparams-app.xml | 2 +- docs/manual/dynamic.xml | 16 +-- docs/manual/elements.xml | 8 +- docs/manual/factories.xml | 4 +- docs/manual/helloworld.xml | 14 +-- docs/manual/helloworld2.xml | 14 +-- docs/manual/highlevel-xml.xml | 16 +-- docs/manual/pads.xml | 10 +- docs/manual/queues.xml | 10 +- docs/manual/threads.xml | 6 +- docs/manual/typedetection.xml | 4 +- docs/manual/xml.xml | 16 +-- examples/autoplug/autoplug.c | 14 +-- examples/cutter/cutter.c | 10 +- examples/events/seek.c | 4 +- examples/helloworld/helloworld.c | 6 +- examples/helloworld2/helloworld2.c | 10 +- examples/mixer/mixer.c | 18 ++-- examples/plugins/example.c | 14 +-- examples/queue/queue.c | 10 +- examples/queue2/queue2.c | 6 +- examples/queue3/queue3.c | 10 +- examples/queue4/queue4.c | 12 +-- examples/thread/thread.c | 4 +- examples/typefind/typefind.c | 4 +- examples/xml/createxml.c | 14 +-- gst/autoplug/autoplugtest.c | 14 +-- gst/autoplug/gstautoplugcache.c | 2 +- gst/autoplug/gstautoplugger.c | 32 +++--- gst/autoplug/gstsearchfuncs.c | 20 ++-- gst/autoplug/gstspider.c | 34 +++--- gst/autoplug/gstspideridentity.c | 36 +++---- gst/autoplug/gststaticautoplug.c | 32 +++--- gst/autoplug/gststaticautoplugrender.c | 30 +++--- gst/autoplug/spidertest.c | 10 +- gst/elements/gstaggregator.c | 4 +- gst/elements/gstelements.c | 4 +- gst/elements/gstfakesink.c | 4 +- gst/elements/gstfakesrc.c | 4 +- gst/elements/gstmd5sink.c | 6 +- gst/elements/gsttee.c | 4 +- gst/gst.c | 24 ++--- gst/gstautoplug.c | 68 ++++++------ gst/gstautoplug.h | 48 ++++----- gst/gstbin.c | 2 +- gst/gstcaps.c | 2 +- gst/gstelement.c | 58 +++++----- gst/gstelement.h | 34 +++--- gst/gstelementfactory.c | 106 +++++++++---------- gst/gstinfo.c | 2 +- gst/gstinfo.h | 2 +- gst/gstpad.c | 94 ++++++++-------- gst/gstpad.h | 50 ++++----- gst/gstparse.c | 77 ++++++++++---- gst/gstpipeline.c | 6 +- gst/gstscheduler.c | 76 ++++++------- gst/gstscheduler.h | 38 +++---- gst/gstthread.c | 6 +- gst/gsttimecache.c | 70 ++++++------ gst/gsttimecache.h | 46 ++++---- gst/gsttype.c | 72 ++++++------- gst/gsttype.h | 28 ++--- gst/gsttypefind.c | 52 ++++----- gst/gsttypefind.h | 34 +++--- gst/gstxml.c | 2 +- gst/parse/grammar.y | 6 +- gst/schedulers/gstbasicscheduler.c | 2 +- gst/schedulers/gstfastscheduler.c | 2 +- gst/schedulers/gststandardscheduler.c | 2 +- gst/types/gsttypes.c | 2 +- libs/gst/bytestream/bstest.c | 2 +- plugins/elements/gstaggregator.c | 4 +- plugins/elements/gstelements.c | 4 +- plugins/elements/gstfakesink.c | 4 +- plugins/elements/gstfakesrc.c | 4 +- plugins/elements/gstmd5sink.c | 6 +- plugins/elements/gsttee.c | 4 +- tests/lat.c | 14 +-- tests/muxing/case1.c | 12 +-- tests/old/examples/autoplug/autoplug.c | 14 +-- tests/old/examples/cutter/cutter.c | 10 +- tests/old/examples/events/seek.c | 4 +- tests/old/examples/helloworld/helloworld.c | 6 +- tests/old/examples/helloworld2/helloworld2.c | 10 +- tests/old/examples/mixer/mixer.c | 18 ++-- tests/old/examples/plugins/example.c | 14 +-- tests/old/examples/queue/queue.c | 10 +- tests/old/examples/queue2/queue2.c | 6 +- tests/old/examples/queue3/queue3.c | 10 +- tests/old/examples/queue4/queue4.c | 12 +-- tests/old/examples/thread/thread.c | 4 +- tests/old/examples/typefind/typefind.c | 4 +- tests/old/examples/xml/createxml.c | 14 +-- tests/old/testsuite/bytestream/gstbstest.c | 2 +- tests/old/testsuite/bytestream/test1.c | 8 +- tests/old/testsuite/cleanup/cleanup1.c | 4 +- tests/old/testsuite/cleanup/cleanup2.c | 4 +- tests/old/testsuite/cleanup/cleanup3.c | 6 +- tests/old/testsuite/cleanup/cleanup4.c | 4 +- tests/old/testsuite/cleanup/cleanup5.c | 2 +- tests/old/testsuite/dynparams/dparamstest.c | 10 +- tests/old/testsuite/elements/fake.c | 2 +- tests/old/testsuite/elements/tee.c | 2 +- tests/old/testsuite/refcounting/pad.c | 4 +- tests/old/testsuite/threads/thread.c | 8 +- tests/sched/dynamic-pipeline.c | 6 +- testsuite/bytestream/gstbstest.c | 2 +- testsuite/bytestream/test1.c | 8 +- testsuite/cleanup/cleanup1.c | 4 +- testsuite/cleanup/cleanup2.c | 4 +- testsuite/cleanup/cleanup3.c | 6 +- testsuite/cleanup/cleanup4.c | 4 +- testsuite/cleanup/cleanup5.c | 2 +- testsuite/dynparams/dparamstest.c | 10 +- testsuite/elements/fake.c | 2 +- testsuite/elements/tee.c | 2 +- testsuite/refcounting/pad.c | 4 +- testsuite/threads/thread.c | 8 +- tools/gst-compprep.c | 6 +- tools/gst-inspect.c | 36 +++---- 142 files changed, 1106 insertions(+), 1063 deletions(-) diff --git a/docs/gst/tmpl/gstautoplug.sgml b/docs/gst/tmpl/gstautoplug.sgml index 3c60034eeb..7b7cd6c328 100644 --- a/docs/gst/tmpl/gstautoplug.sgml +++ b/docs/gst/tmpl/gstautoplug.sgml @@ -13,7 +13,7 @@ non renderer ones do. -You first need to create a suitable autoplugger with gst_autoplugfactory_make() +You first need to create a suitable autoplugger with gst_autoplug_factory_make() (see #GstAutoplugFactory). The name of the autoplugger must be one of the registered autopluggers (see #GstStaticAutoplug and #GstStaticAutoplugRender). @@ -29,10 +29,10 @@ then add the bin to a pipeline and run it. GstElement *sink; /* create a static autoplugger */ - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); /* create an osssink */ - sink = gst_elementfactory_make ("osssink", "our_sink"); + sink = gst_element_factory_make ("osssink", "our_sink"); /* create an element that can play audio/mp3 through osssink */ element = gst_autoplug_to_renderers (autoplug, @@ -58,7 +58,7 @@ compatible with the provided sink caps. GstElement *element; /* create a static autoplugger */ - autoplug = gst_autoplugfactory_make ("static"); + autoplug = gst_autoplug_factory_make ("static"); /* create an element that converts audio/mp3 to audio/raw */ element = gst_autoplug_to_caps (autoplug, diff --git a/docs/gst/tmpl/gstautoplugfactory.sgml b/docs/gst/tmpl/gstautoplugfactory.sgml index 4742b30636..a2f47ed16e 100644 --- a/docs/gst/tmpl/gstautoplugfactory.sgml +++ b/docs/gst/tmpl/gstautoplugfactory.sgml @@ -10,20 +10,20 @@ An autoplugfactory is used to create instances of an autoplugger. It can be added to a #GstPlugin as it extends #GstPluginFeature. -Use gst_autoplugfactory_new() to create a new autoplugger which can be registered +Use gst_autoplug_factory_new() to create a new autoplugger which can be registered to a plugin with gst_plugin_add_feature(). -Use gst_autoplugfactory_find() to find the named autoplugfactory. -or use gst_autoplugfactory_get_list() to get a list of all available autopluggers. +Use gst_autoplug_factory_find() to find the named autoplugfactory. +or use gst_autoplug_factory_get_list() to get a list of all available autopluggers. -Once an autoplugfactory has been obtained use gst_autoplugfactory_create() to -instantiate a real autoplugger. Optionally gst_autoplugfactory_make() to create +Once an autoplugfactory has been obtained use gst_autoplug_factory_create() to +instantiate a real autoplugger. Optionally gst_autoplug_factory_make() to create a autoplugger from the named factory. -Use gst_autoplugfactory_destroy() to remove the factory from the global list. +Use gst_autoplug_factory_destroy() to remove the factory from the global list. @@ -37,7 +37,7 @@ Use gst_autoplugfactory_destroy() to remove the factory from the global list. - + @@ -48,7 +48,7 @@ Use gst_autoplugfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -56,7 +56,7 @@ Use gst_autoplugfactory_destroy() to remove the factory from the global list. @factory: - + @@ -65,7 +65,7 @@ Use gst_autoplugfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -73,7 +73,7 @@ Use gst_autoplugfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -82,7 +82,7 @@ Use gst_autoplugfactory_destroy() to remove the factory from the global list. @Returns: - + diff --git a/docs/gst/tmpl/gstelement.sgml b/docs/gst/tmpl/gstelement.sgml index c24dd75a70..40e586cfc0 100644 --- a/docs/gst/tmpl/gstelement.sgml +++ b/docs/gst/tmpl/gstelement.sgml @@ -256,7 +256,7 @@ The function to set the clock on a clock receiving element. @clock: The clock to set on the element - + @@ -405,7 +405,7 @@ instead. @Returns: - + @@ -414,7 +414,7 @@ instead. @Returns: - + diff --git a/docs/gst/tmpl/gstelementfactory.sgml b/docs/gst/tmpl/gstelementfactory.sgml index adae3a5be9..7115f4c6ae 100644 --- a/docs/gst/tmpl/gstelementfactory.sgml +++ b/docs/gst/tmpl/gstelementfactory.sgml @@ -10,21 +10,21 @@ GstElementFactory is used to create instances of elements. A GstElementfactory can be added to a #GstPlugin as it is also a #GstPluginFeature. -Use gst_elementfactory_new() to create a new factory which can be added to a plugin +Use gst_element_factory_new() to create a new factory which can be added to a plugin with gst_plugin_add_feature(). -gst_elementfactory_get_list() is used to get a list of all available factories in +gst_element_factory_get_list() is used to get a list of all available factories in the plugin repository. -gst_elementfactory_add_padtemplate() is used to add a padtemplate to the factory. +gst_element_factory_add_pad_template() is used to add a padtemplate to the factory. This function will enable the application to query for elementfactories that handle a specific media type. -Use the gst_elementfactory_find() and gst_elementfactory_create() functions -to create element instances or use gst_elementfactory_make() as a convenient +Use the gst_element_factory_find() and gst_element_factory_create() functions +to create element instances or use gst_element_factory_make() as a convenient shortcut. @@ -40,10 +40,10 @@ The following code example shows you how to create a GstDiskSrc element. gst_init(&argc,&argv); - srcfactory = gst_elementfactory_find("filesrc"); + srcfactory = gst_element_factory_find("filesrc"); g_return_if_fail(srcfactory != NULL); - src = gst_elementfactory_create(srcfactory,"src"); + src = gst_element_factory_create(srcfactory,"src"); g_return_if_fail(src != NULL); ... @@ -67,7 +67,7 @@ describes the element, mostly for the benefit of editors. @author: @copyright: - + @@ -78,7 +78,7 @@ describes the element, mostly for the benefit of editors. @Returns: - + @@ -87,7 +87,7 @@ describes the element, mostly for the benefit of editors. @Returns: - + @@ -95,7 +95,7 @@ describes the element, mostly for the benefit of editors. @Returns: - + @@ -107,7 +107,7 @@ describes the element, mostly for the benefit of editors. @pad: - + @@ -117,7 +117,7 @@ describes the element, mostly for the benefit of editors. @Returns: - + @@ -127,7 +127,7 @@ describes the element, mostly for the benefit of editors. @Returns: - + @@ -137,7 +137,7 @@ describes the element, mostly for the benefit of editors. @Returns: - + diff --git a/docs/gst/tmpl/gstpad.sgml b/docs/gst/tmpl/gstpad.sgml index 06d5e30f5b..97a332216f 100644 --- a/docs/gst/tmpl/gstpad.sgml +++ b/docs/gst/tmpl/gstpad.sgml @@ -70,7 +70,7 @@ Get the parent element of this pad. @pad: the pad to query - + Get the padtemplate that was used to create this pad. NULL if no padtemplate was used. @@ -662,7 +662,7 @@ Destroy the pad. @Returns: - + @@ -671,7 +671,7 @@ Destroy the pad. @Returns: - + diff --git a/docs/gst/tmpl/gstpadtemplate.sgml b/docs/gst/tmpl/gstpadtemplate.sgml index 7de975f629..0a8b9e3d56 100644 --- a/docs/gst/tmpl/gstpadtemplate.sgml +++ b/docs/gst/tmpl/gstpadtemplate.sgml @@ -11,19 +11,19 @@ handle. Pad and PadTemplates have #GstCaps attached to it to describe the media type they -are capable of dealing with. gst_padtemplate_get_caps() is used to get the +are capable of dealing with. gst_pad_template_get_caps() is used to get the caps of a padtemplate. It's not possible to modify the caps of a padtemplate after creation. -Padtemplates can be created with gst_padtemplate_new() or with the convenient -GST_PADTEMPLATE_FACTORY() macro. A padtemplate can be used to create a pad or +Padtemplates can be created with gst_pad_template_new() or with the convenient +GST_PAD_TEMPLATE_FACTORY() macro. A padtemplate can be used to create a pad or to add to an elementfactory. The following code example shows the code to create a pad from a padtemplate. - GST_PADTEMPLATE_FACTORY (my_template_factory, + GST_PAD_TEMPLATE_FACTORY (my_template_factory, "sink", /* the name of the pad */ GST_PAD_SINK, /* the direction of the pad */ GST_PAD_ALWAYS, /* when this pad will be present */ @@ -40,7 +40,7 @@ The following code example shows the code to create a pad from a padtemplate. { GstPad *pad; - pad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (my_template_factory), "sink"); + pad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (my_template_factory), "sink"); ... } @@ -53,10 +53,10 @@ The following example shows you how to add the padtemplate to an elementfactory: { GstElementFactory *factory; - factory = gst_elementfactory_new ("my_factory", GST_TYPE_MYFACTORY, &gst_myfactory_details); + factory = gst_element_factory_new ("my_factory", GST_TYPE_MYFACTORY, &gst_myfactory_details); g_return_val_if_fail (factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (my_template_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (my_template_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); @@ -87,7 +87,7 @@ gst_element_request_pad_by_name() or gst_element_request_compatible_pad(). - + Get a handle to the padtemplate #GstCaps @@ -95,7 +95,7 @@ Get a handle to the padtemplate #GstCaps @templ: the template to query - + Get the direction of the padtemplate. @@ -103,7 +103,7 @@ Get the direction of the padtemplate. @templ: the template to query - + Get the nametemplate of the padtemplate. @@ -111,7 +111,7 @@ Get the nametemplate of the padtemplate. @templ: the template to query - + Get the presence of the padtemplate. @@ -119,7 +119,7 @@ Get the presence of the padtemplate. @templ: the template to query - + Create a new padtemplate. @@ -130,10 +130,10 @@ Create a new padtemplate. @a...: the capabilities of this padtemplate usually created with GST_CAPS_NEW() - + Create a factory for a padtemplate. This can be used if you only want one instance -of the padtemplate. Use GST_PADTEMPLATE_GET() to get the unique padtemplate. +of the padtemplate. Use GST_PAD_TEMPLATE_GET() to get the unique padtemplate. @name: th name of the factory @@ -143,15 +143,15 @@ of the padtemplate. Use GST_PADTEMPLATE_GET() to get the unique padtemplate. @a...: the capabilities of this padtemplate, usually created with GST_CAPS_NEW() - + -Get the padtemplate of the factory created with GST_PADTEMPLATE_FACTORY() +Get the padtemplate of the factory created with GST_PAD_TEMPLATE_FACTORY() @fact: the factory name to get the padtemplate from. - + Get the flag indicating the properties are fixed from the template. @@ -159,7 +159,7 @@ Get the flag indicating the properties are fixed from the template. @templ: the template to query - + Check if the properties of the padtemplate are fixed @@ -167,7 +167,7 @@ Check if the properties of the padtemplate are fixed @templ: the template to query - + @@ -180,7 +180,7 @@ Check if the properties of the padtemplate are fixed @Returns: - + @@ -189,7 +189,7 @@ Check if the properties of the padtemplate are fixed @Returns: - + @@ -199,7 +199,7 @@ Check if the properties of the padtemplate are fixed @Returns: - + @@ -208,7 +208,7 @@ Check if the properties of the padtemplate are fixed @Returns: - + diff --git a/docs/gst/tmpl/gstreamer-unused.sgml b/docs/gst/tmpl/gstreamer-unused.sgml index 0d7a09b732..62ea66ce74 100644 --- a/docs/gst/tmpl/gstreamer-unused.sgml +++ b/docs/gst/tmpl/gstreamer-unused.sgml @@ -5001,7 +5001,7 @@ must be defined to activate the tracing functionality. @srccaps: @sinkcaps: - + @@ -5009,7 +5009,7 @@ must be defined to activate the tracing functionality. @parent: @Returns: - + @@ -5413,7 +5413,7 @@ must be defined to activate the tracing functionality. @element: - + @@ -5421,7 +5421,7 @@ must be defined to activate the tracing functionality. @elementfactory: @id: - + @@ -5429,7 +5429,7 @@ must be defined to activate the tracing functionality. @elementfactory: @id: - + @@ -5438,7 +5438,7 @@ must be defined to activate the tracing functionality. @caps: @Returns: - + @@ -5447,14 +5447,14 @@ must be defined to activate the tracing functionality. @caps: @Returns: - + @elementfactory: - + @@ -5462,14 +5462,14 @@ must be defined to activate the tracing functionality. @parent: @Returns: - + @elementfactory: - + @@ -5986,7 +5986,7 @@ Call the EOS function of the pad @sinkpad: @Returns: - + @@ -6072,7 +6072,7 @@ Call the EOS function of the pad - + @@ -6080,7 +6080,7 @@ Call the EOS function of the pad @name: @Returns: - + @@ -6088,7 +6088,7 @@ Call the EOS function of the pad @name: @Returns: - + @@ -6295,7 +6295,7 @@ Call the EOS function of the pad @sched: @element: - + @@ -6573,7 +6573,7 @@ Call the EOS function of the pad @parent: @Returns: - + @@ -6581,7 +6581,7 @@ Call the EOS function of the pad @parent: @Returns: - + diff --git a/docs/gst/tmpl/gstschedulerfactory.sgml b/docs/gst/tmpl/gstschedulerfactory.sgml index 17376bf0b6..a231913249 100644 --- a/docs/gst/tmpl/gstschedulerfactory.sgml +++ b/docs/gst/tmpl/gstschedulerfactory.sgml @@ -10,20 +10,20 @@ A schedulerfactory is used to create instances of a scheduler. It can be added to a #GstPlugin as it extends #GstPluginFeature. -Use gst_schedulerfactory_new() to create a new scheduler which can be registered +Use gst_scheduler_factory_new() to create a new scheduler which can be registered to a plugin with gst_plugin_add_feature(). -Use gst_schedulerfactory_find() to find the named schedulerfactory. -or use gst_schedulerfactory_get_list() to get a list of all available schedulers. +Use gst_scheduler_factory_find() to find the named schedulerfactory. +or use gst_scheduler_factory_get_list() to get a list of all available schedulers. -Once an schedulerfactory has been obtained use gst_schedulerfactory_create() to -instantiate a real scheduler. Optionally gst_schedulerfactory_make() to create +Once an schedulerfactory has been obtained use gst_scheduler_factory_create() to +instantiate a real scheduler. Optionally gst_scheduler_factory_make() to create a scheduler from the named factory. -Use gst_schedulerfactory_destroy() to remove the factory from the global list. +Use gst_scheduler_factory_destroy() to remove the factory from the global list. @@ -31,7 +31,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. - + @@ -41,7 +41,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -49,7 +49,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @factory: - + @@ -58,7 +58,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -66,7 +66,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -76,7 +76,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -87,7 +87,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @Returns: - + @@ -95,7 +95,7 @@ Use gst_schedulerfactory_destroy() to remove the factory from the global list. @Returns: - + diff --git a/docs/gst/tmpl/gsttimecache.sgml b/docs/gst/tmpl/gsttimecache.sgml index 4bab238005..4854dcc10a 100644 --- a/docs/gst/tmpl/gsttimecache.sgml +++ b/docs/gst/tmpl/gsttimecache.sgml @@ -42,13 +42,13 @@ used for efficient seeking. -@GST_TIMECACHE_UNKNOWN: -@GST_TIMECACHE_CERTAIN: -@GST_TIMECACHE_FUZZY_LOCATION: -@GST_TIMECACHE_FUZZY_TIMESTAMP: -@GST_TIMECACHE_FUZZY: +@GST_TIME_CACHE_UNKNOWN: +@GST_TIME_CACHE_CERTAIN: +@GST_TIME_CACHE_FUZZY_LOCATION: +@GST_TIME_CACHE_FUZZY_TIMESTAMP: +@GST_TIME_CACHE_FUZZY: - + @@ -56,7 +56,7 @@ used for efficient seeking. @Returns: - + @@ -65,7 +65,7 @@ used for efficient seeking. @Returns: - + @@ -74,7 +74,7 @@ used for efficient seeking. @Returns: - + @@ -84,7 +84,7 @@ used for efficient seeking. @Returns: - + @@ -93,7 +93,7 @@ used for efficient seeking. @certainty: - + @@ -102,7 +102,7 @@ used for efficient seeking. @Returns: - + @@ -112,7 +112,7 @@ used for efficient seeking. @timestamp: - + @@ -123,7 +123,7 @@ used for efficient seeking. @Returns: - + diff --git a/docs/gst/tmpl/gsttypefactory.sgml b/docs/gst/tmpl/gsttypefactory.sgml index f5ed4fcc60..7df5e4f2dd 100644 --- a/docs/gst/tmpl/gsttypefactory.sgml +++ b/docs/gst/tmpl/gsttypefactory.sgml @@ -8,22 +8,22 @@ Add types to plugins. A GstTypeFactory is used to add a new type and a typedetection function to a plugin. Typefactories are named so they can be found with -gst_typefactory_find(). +gst_type_factory_find(). -gst_typefactory_new() is used to create a new typefactory from the given +gst_type_factory_new() is used to create a new typefactory from the given #GstTypeDefinition. A typefactory is added to a #GstPlugin with gst_plugin_add_feature() as shown in the example: static GstCaps* - avi_typefind (GstBuffer *buf, gpointer private) + avi_type_find (GstBuffer *buf, gpointer private) { gchar *data = GST_BUFFER_DATA (buf); if (strncmp (&data[0], "RIFF", 4)) return NULL; if (strncmp (&data[8], "AVI ", 4)) return NULL; - return gst_caps_new ("avi_typefind","video/avi", NULL); + return gst_caps_new ("avi_type_find","video/avi", NULL); } /* typedefinition for 'avi' */ @@ -31,7 +31,7 @@ gst_plugin_add_feature() as shown in the example: "avidecoder_video/avi", /* the name of this definition */ "video/avi", /* the mime type */ ".avi", /* the file extensions */ - avi_typefind, /* a pointer to a GstTypeFindFunc function */ + avi_type_find, /* a pointer to a GstTypeFindFunc function */ }; static gboolean @@ -39,7 +39,7 @@ gst_plugin_add_feature() as shown in the example: { GstTypeFactory *type; ... - type = gst_typefactory_new (&avidefinition); + type = gst_type_factory_new (&avidefinition); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); ... } @@ -79,7 +79,7 @@ performed by a plugin. type was not recognized by this function; - + @@ -88,7 +88,7 @@ performed by a plugin. @Returns: - + @@ -97,7 +97,7 @@ performed by a plugin. @Returns: - + diff --git a/docs/manual/advanced-autoplugging.xml b/docs/manual/advanced-autoplugging.xml index eb7d5c70d3..e27b032741 100644 --- a/docs/manual/advanced-autoplugging.xml +++ b/docs/manual/advanced-autoplugging.xml @@ -21,7 +21,7 @@ ... /* now it's time to get the parser */ - decoder = gst_elementfactory_make ("mad", "decoder"); + decoder = gst_element_factory_make ("mad", "decoder"); ... @@ -220,7 +220,7 @@ struct _GstType { // obtain the factory factory = ... - element = gst_elementfactory_create (factory, "name"); + element = gst_element_factory_create (factory, "name"); This way, you do not have to create elements by name which diff --git a/docs/manual/advanced-dparams.xml b/docs/manual/advanced-dparams.xml index ef3e52e00f..91d348e276 100644 --- a/docs/manual/advanced-dparams.xml +++ b/docs/manual/advanced-dparams.xml @@ -50,7 +50,7 @@ GstElement *sinesrc; GstDParamManager *dpman; ... - sinesrc = gst_elementfactory_make("sinesrc","sine-source"); + sinesrc = gst_element_factory_make("sinesrc","sine-source"); ... dpman = gst_dpman_get_manager (sinesrc); gst_dpman_set_mode(dpman, "synchronous"); diff --git a/docs/manual/advanced-threads.xml b/docs/manual/advanced-threads.xml index f9b00b96b3..a63ad5f9b4 100644 --- a/docs/manual/advanced-threads.xml +++ b/docs/manual/advanced-threads.xml @@ -15,7 +15,7 @@ /* create the thread object */ my_thread = gst_thread_new ("my_thread"); - /* you could have used gst_elementfactory_make ("thread", "my_thread"); */ + /* you could have used gst_element_factory_make ("thread", "my_thread"); */ g_return_if_fail (my_thread != NULL); /* add some plugins */ @@ -115,14 +115,14 @@ main (int argc, char *argv[]) g_assert (pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread); /* and an audio sink */ - audiosink = gst_elementfactory_make ("audiosink", "play_audio"); + audiosink = gst_element_factory_make ("audiosink", "play_audio"); g_assert (audiosink != NULL); /* add objects to the main pipeline */ diff --git a/docs/manual/appendix-checklist.xml b/docs/manual/appendix-checklist.xml index fd7a891f3b..feb754164c 100644 --- a/docs/manual/appendix-checklist.xml +++ b/docs/manual/appendix-checklist.xml @@ -80,7 +80,7 @@ Mask (to be OR'ed) info/debug FLAGS 0x00000800 / CAPS 0x00001000 / CLOCK 0x00002000 / ELEMENT_PADS -0x00004000 / ELEMENTFACTORY +0x00004000 / ELEMENT_FACTORY 0x00008000 / PADS 0x00010000 / PIPELINE 0x00020000 / PLUGIN_LOADING diff --git a/docs/manual/appendix-debugging.xml b/docs/manual/appendix-debugging.xml index fd7a891f3b..feb754164c 100644 --- a/docs/manual/appendix-debugging.xml +++ b/docs/manual/appendix-debugging.xml @@ -80,7 +80,7 @@ Mask (to be OR'ed) info/debug FLAGS 0x00000800 / CAPS 0x00001000 / CLOCK 0x00002000 / ELEMENT_PADS -0x00004000 / ELEMENTFACTORY +0x00004000 / ELEMENT_FACTORY 0x00008000 / PADS 0x00010000 / PIPELINE 0x00020000 / PLUGIN_LOADING diff --git a/docs/manual/autoplugging.xml b/docs/manual/autoplugging.xml index 24b03f2176..b771191c4a 100644 --- a/docs/manual/autoplugging.xml +++ b/docs/manual/autoplugging.xml @@ -20,11 +20,11 @@ Using autoplugging - You first need to create a suitable autoplugger with gst_autoplugfactory_make(). + You first need to create a suitable autoplugger with gst_autoplug_factory_make(). The name of the autoplugger must be one of the registered autopluggers.. - A list of all available autopluggers can be obtained with gst_autoplugfactory_get_list(). + A list of all available autopluggers can be obtained with gst_autoplug_factory_get_list(). If the autoplugger supports the RENDERER API, use gst_autoplug_to_renderers() call to @@ -38,10 +38,10 @@ GstElement *sink; /* create a static autoplugger */ - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); /* create an osssink */ - sink = gst_elementfactory_make ("osssink", "our_sink"); + sink = gst_element_factory_make ("osssink", "our_sink"); /* create an element that can play audio/mp3 through osssink */ element = gst_autoplug_to_renderers (autoplug, @@ -68,7 +68,7 @@ GstElement *element; /* create a static autoplugger */ - autoplug = gst_autoplugfactory_make ("static"); + autoplug = gst_autoplug_factory_make ("static"); /* create an element that converts audio/mp3 to audio/raw */ element = gst_autoplug_to_caps (autoplug, diff --git a/docs/manual/basics-bins.xml b/docs/manual/basics-bins.xml index 47f05c466b..230a2761e2 100644 --- a/docs/manual/basics-bins.xml +++ b/docs/manual/basics-bins.xml @@ -56,13 +56,13 @@ /* create a new bin called 'mybin'. this bin will be only for organizational purposes; a normal GstBin doesn't affect plan generation */ - bin = gst_elementfactory_make ("bin", "mybin"); + bin = gst_element_factory_make ("bin", "mybin"); /* create a new thread, and give it a unique name */ - thread = gst_elementfactory_make ("thread", NULL); + thread = gst_element_factory_make ("thread", NULL); /* the core bins (GstBin, GstThread, GstPipeline) also have convenience APIs, - gst_<bintype>_new (). these are equivalent to the gst_elementfactory_make () syntax. */ + gst_<bintype>_new (). these are equivalent to the gst_element_factory_make () syntax. */ pipeline = gst_pipeline_new ("pipeline_name"); @@ -78,7 +78,7 @@ bin = gst_bin_new ("mybin"); - element = gst_elementfactory_make ("mpg123", "decoder"); + element = gst_element_factory_make ("mpg123", "decoder"); gst_bin_add (GST_BIN (bin), element); ... @@ -151,7 +151,7 @@ /* create the mp3player element */ - GstElement *mp3player = gst_elementfactory_make ("mp3player", "mp3player"); + GstElement *mp3player = gst_element_factory_make ("mp3player", "mp3player"); /* set the source mp3 audio file */ g_object_set (G_OBJECT (mp3player), "location", "helloworld.mp3", NULL); /* start playback */ @@ -215,7 +215,7 @@ GstElement *bin; GstElement *element; - element = gst_elementfactory_create ("mad", "decoder"); + element = gst_element_factory_create ("mad", "decoder"); bin = gst_bin_new ("mybin"); gst_bin_add (GST_BIN (bin), element); @@ -231,7 +231,7 @@ GstElement *filesrc; - filesrc = gst_elementfactory_create ("filesrc", "disk_reader"); + filesrc = gst_element_factory_create ("filesrc", "disk_reader"); gst_element_connect_pads (filesrc, "src", bin, "sink"); ... diff --git a/docs/manual/basics-elements.xml b/docs/manual/basics-elements.xml index 3b361dee8e..f1592df89b 100644 --- a/docs/manual/basics-elements.xml +++ b/docs/manual/basics-elements.xml @@ -115,7 +115,7 @@ GstElementFactory *factory; - factory = gst_elementfactory_find ("mad"); + factory = gst_element_factory_find ("mad"); Once you have the handle to the elementfactory, you can create a real element with @@ -124,10 +124,10 @@ GstElement *element; - element = gst_elementfactory_create (factory, "decoder"); + element = gst_element_factory_create (factory, "decoder"); - gst_elementfactory_create () will use the elementfactory to create an element with the given + gst_element_factory_create () will use the elementfactory to create an element with the given name. The name of the element is something you can use later on to lookup the element in a bin, for example. You can pass NULL as the name argument to get a unique, default name. @@ -139,7 +139,7 @@ GstElement *element; - element = gst_elementfactory_make ("mad", "decoder"); + element = gst_element_factory_make ("mad", "decoder"); An element can be destroyed with: FIXME talk about refcounting diff --git a/docs/manual/basics-helloworld.xml b/docs/manual/basics-helloworld.xml index 6072152e14..e7ff313c3b 100644 --- a/docs/manual/basics-helloworld.xml +++ b/docs/manual/basics-helloworld.xml @@ -34,14 +34,14 @@ main (int argc, char *argv[]) pipeline = gst_pipeline_new ("pipeline"); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); /* now it's time to get the decoder */ - decoder = gst_elementfactory_make ("mad", "decoder"); + decoder = gst_element_factory_make ("mad", "decoder"); /* and an audio sink */ - audiosink = gst_elementfactory_make ("osssink", "play_audio"); + audiosink = gst_element_factory_make ("osssink", "play_audio"); /* add objects to the main pipeline */ gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, audiosink, NULL); @@ -119,7 +119,7 @@ main (int argc, char *argv[]) /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); @@ -135,10 +135,10 @@ main (int argc, char *argv[]) /* now it's time to get the decoder */ - decoder = gst_elementfactory_make ("mad", "decoder"); + decoder = gst_element_factory_make ("mad", "decoder"); - gst_elementfactory_make() takes two arguments: a string that will + gst_element_factory_make() takes two arguments: a string that will identify the element you need and a second argument: how you want to name the element. The name of the element is something you can choose yourself and might be used to retrieve the element from a @@ -151,7 +151,7 @@ main (int argc, char *argv[]) /* and an audio sink */ - audiosink = gst_elementfactory_make ("audiosink", "play_audio"); + audiosink = gst_element_factory_make ("audiosink", "play_audio"); diff --git a/docs/manual/basics-pads.xml b/docs/manual/basics-pads.xml index 953367a6d1..595b1ffef5 100644 --- a/docs/manual/basics-pads.xml +++ b/docs/manual/basics-pads.xml @@ -104,7 +104,7 @@ main(int argc, char *argv[]) // create pipeline and do something usefull ... - mpeg2parser = gst_elementfactory_make ("mpegdemux", "mpegdemux"); + mpeg2parser = gst_element_factory_make ("mpegdemux", "mpegdemux"); g_signal_connect (G_OBJECT (mpeg2parser), "new_pad", pad_connect_func, pipeline); ... @@ -139,7 +139,7 @@ main(int argc, char *argv[]) ... GstPad *pad; ... - element = gst_elementfactory_make ("tee", "element"); + element = gst_element_factory_make ("tee", "element"); pad = gst_element_get_request_pad (element, "src%d"); g_print ("new pad %s\n", gst_pad_get_name (pad)); @@ -161,10 +161,10 @@ main(int argc, char *argv[]) GstPadTemplate *templ; GstPad *pad; ... - element = gst_elementfactory_make ("tee", "element"); - mad = gst_elementfactory_make ("mad", "mad"); + element = gst_element_factory_make ("tee", "element"); + mad = gst_element_factory_make ("mad", "mad"); - templ = gst_element_get_padtemplate_by_name (mad, "sink"); + templ = gst_element_get_pad_template_by_name (mad, "sink"); pad = gst_element_get_compatible_pad (element, templ); g_print ("new pad %s\n", gst_pad_get_name (pad)); diff --git a/docs/manual/bins.xml b/docs/manual/bins.xml index 47f05c466b..230a2761e2 100644 --- a/docs/manual/bins.xml +++ b/docs/manual/bins.xml @@ -56,13 +56,13 @@ /* create a new bin called 'mybin'. this bin will be only for organizational purposes; a normal GstBin doesn't affect plan generation */ - bin = gst_elementfactory_make ("bin", "mybin"); + bin = gst_element_factory_make ("bin", "mybin"); /* create a new thread, and give it a unique name */ - thread = gst_elementfactory_make ("thread", NULL); + thread = gst_element_factory_make ("thread", NULL); /* the core bins (GstBin, GstThread, GstPipeline) also have convenience APIs, - gst_<bintype>_new (). these are equivalent to the gst_elementfactory_make () syntax. */ + gst_<bintype>_new (). these are equivalent to the gst_element_factory_make () syntax. */ pipeline = gst_pipeline_new ("pipeline_name"); @@ -78,7 +78,7 @@ bin = gst_bin_new ("mybin"); - element = gst_elementfactory_make ("mpg123", "decoder"); + element = gst_element_factory_make ("mpg123", "decoder"); gst_bin_add (GST_BIN (bin), element); ... @@ -151,7 +151,7 @@ /* create the mp3player element */ - GstElement *mp3player = gst_elementfactory_make ("mp3player", "mp3player"); + GstElement *mp3player = gst_element_factory_make ("mp3player", "mp3player"); /* set the source mp3 audio file */ g_object_set (G_OBJECT (mp3player), "location", "helloworld.mp3", NULL); /* start playback */ @@ -215,7 +215,7 @@ GstElement *bin; GstElement *element; - element = gst_elementfactory_create ("mad", "decoder"); + element = gst_element_factory_create ("mad", "decoder"); bin = gst_bin_new ("mybin"); gst_bin_add (GST_BIN (bin), element); @@ -231,7 +231,7 @@ GstElement *filesrc; - filesrc = gst_elementfactory_create ("filesrc", "disk_reader"); + filesrc = gst_element_factory_create ("filesrc", "disk_reader"); gst_element_connect_pads (filesrc, "src", bin, "sink"); ... diff --git a/docs/manual/debugging.xml b/docs/manual/debugging.xml index fd7a891f3b..feb754164c 100644 --- a/docs/manual/debugging.xml +++ b/docs/manual/debugging.xml @@ -80,7 +80,7 @@ Mask (to be OR'ed) info/debug FLAGS 0x00000800 / CAPS 0x00001000 / CLOCK 0x00002000 / ELEMENT_PADS -0x00004000 / ELEMENTFACTORY +0x00004000 / ELEMENT_FACTORY 0x00008000 / PADS 0x00010000 / PIPELINE 0x00020000 / PLUGIN_LOADING diff --git a/docs/manual/dparams-app.xml b/docs/manual/dparams-app.xml index ef3e52e00f..91d348e276 100644 --- a/docs/manual/dparams-app.xml +++ b/docs/manual/dparams-app.xml @@ -50,7 +50,7 @@ GstElement *sinesrc; GstDParamManager *dpman; ... - sinesrc = gst_elementfactory_make("sinesrc","sine-source"); + sinesrc = gst_element_factory_make("sinesrc","sine-source"); ... dpman = gst_dpman_get_manager (sinesrc); gst_dpman_set_mode(dpman, "synchronous"); diff --git a/docs/manual/dynamic.xml b/docs/manual/dynamic.xml index b5b190606e..1846509135 100644 --- a/docs/manual/dynamic.xml +++ b/docs/manual/dynamic.xml @@ -44,11 +44,11 @@ main(int argc, char *argv[]) pipeline = gst_pipeline_new ("pipeline"); g_return_val_if_fail (pipeline != NULL, -1); - src = gst_elementfactory_make ("filesrc", "src"); + src = gst_element_factory_make ("filesrc", "src"); g_return_val_if_fail (src != NULL, -1); g_object_set (G_OBJECT (src), "location", argv[1], NULL); - demux = gst_elementfactory_make ("mpegdemux", "demux"); + demux = gst_element_factory_make ("mpegdemux", "demux"); g_return_val_if_fail (demux != NULL, -1); gst_bin_add_many (GST_BIN (pipeline), src, demux, NULL); @@ -105,9 +105,9 @@ new_pad_created (GstElement *parse, GstPad *pad, GstElement *pipeline) if (strncmp (gst_pad_get_name (pad), "audio_", 6) == 0) { // construct internal pipeline elements - decode = gst_elementfactory_make ("mad", "decode_audio"); + decode = gst_element_factory_make ("mad", "decode_audio"); g_return_if_fail (decode != NULL); - play = gst_elementfactory_make ("osssink", "play_audio"); + play = gst_element_factory_make ("osssink", "play_audio"); g_return_if_fail (play != NULL); // create the thread and pack stuff into it @@ -121,7 +121,7 @@ new_pad_created (GstElement *parse, GstPad *pad, GstElement *pipeline) gst_element_connect (decode, play); // construct queue and connect everything in the main pipelie - audio_queue = gst_elementfactory_make ("queue", "audio_queue"); + audio_queue = gst_element_factory_make ("queue", "audio_queue"); gst_bin_add_many (GST_BIN (pipeline), audio_queue, audio_thread, NULL); @@ -136,10 +136,10 @@ new_pad_created (GstElement *parse, GstPad *pad, GstElement *pipeline) else if (strncmp (gst_pad_get_name (pad), "video_", 6) == 0) { // construct internal pipeline elements - decode_video = gst_elementfactory_make ("mpeg2dec", "decode_video"); + decode_video = gst_element_factory_make ("mpeg2dec", "decode_video"); g_return_if_fail (decode_video != NULL); - show = gst_elementfactory_make ("xvideosink", "show"); + show = gst_element_factory_make ("xvideosink", "show"); g_return_if_fail (show != NULL); // create the thread and pack stuff into it @@ -153,7 +153,7 @@ new_pad_created (GstElement *parse, GstPad *pad, GstElement *pipeline) gst_element_connect (decode_video, show); // construct queue and connect everything in the main pipeline - video_queue = gst_elementfactory_make ("queue", "video_queue"); + video_queue = gst_element_factory_make ("queue", "video_queue"); gst_bin_add_many (GST_BIN (pipeline), video_queue, video_thread); diff --git a/docs/manual/elements.xml b/docs/manual/elements.xml index 3b361dee8e..f1592df89b 100644 --- a/docs/manual/elements.xml +++ b/docs/manual/elements.xml @@ -115,7 +115,7 @@ GstElementFactory *factory; - factory = gst_elementfactory_find ("mad"); + factory = gst_element_factory_find ("mad"); Once you have the handle to the elementfactory, you can create a real element with @@ -124,10 +124,10 @@ GstElement *element; - element = gst_elementfactory_create (factory, "decoder"); + element = gst_element_factory_create (factory, "decoder"); - gst_elementfactory_create () will use the elementfactory to create an element with the given + gst_element_factory_create () will use the elementfactory to create an element with the given name. The name of the element is something you can use later on to lookup the element in a bin, for example. You can pass NULL as the name argument to get a unique, default name. @@ -139,7 +139,7 @@ GstElement *element; - element = gst_elementfactory_make ("mad", "decoder"); + element = gst_element_factory_make ("mad", "decoder"); An element can be destroyed with: FIXME talk about refcounting diff --git a/docs/manual/factories.xml b/docs/manual/factories.xml index eb7d5c70d3..e27b032741 100644 --- a/docs/manual/factories.xml +++ b/docs/manual/factories.xml @@ -21,7 +21,7 @@ ... /* now it's time to get the parser */ - decoder = gst_elementfactory_make ("mad", "decoder"); + decoder = gst_element_factory_make ("mad", "decoder"); ... @@ -220,7 +220,7 @@ struct _GstType { // obtain the factory factory = ... - element = gst_elementfactory_create (factory, "name"); + element = gst_element_factory_create (factory, "name"); This way, you do not have to create elements by name which diff --git a/docs/manual/helloworld.xml b/docs/manual/helloworld.xml index 6072152e14..e7ff313c3b 100644 --- a/docs/manual/helloworld.xml +++ b/docs/manual/helloworld.xml @@ -34,14 +34,14 @@ main (int argc, char *argv[]) pipeline = gst_pipeline_new ("pipeline"); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); /* now it's time to get the decoder */ - decoder = gst_elementfactory_make ("mad", "decoder"); + decoder = gst_element_factory_make ("mad", "decoder"); /* and an audio sink */ - audiosink = gst_elementfactory_make ("osssink", "play_audio"); + audiosink = gst_element_factory_make ("osssink", "play_audio"); /* add objects to the main pipeline */ gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, audiosink, NULL); @@ -119,7 +119,7 @@ main (int argc, char *argv[]) /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); @@ -135,10 +135,10 @@ main (int argc, char *argv[]) /* now it's time to get the decoder */ - decoder = gst_elementfactory_make ("mad", "decoder"); + decoder = gst_element_factory_make ("mad", "decoder"); - gst_elementfactory_make() takes two arguments: a string that will + gst_element_factory_make() takes two arguments: a string that will identify the element you need and a second argument: how you want to name the element. The name of the element is something you can choose yourself and might be used to retrieve the element from a @@ -151,7 +151,7 @@ main (int argc, char *argv[]) /* and an audio sink */ - audiosink = gst_elementfactory_make ("audiosink", "play_audio"); + audiosink = gst_element_factory_make ("audiosink", "play_audio"); diff --git a/docs/manual/helloworld2.xml b/docs/manual/helloworld2.xml index 0234aaef62..072975d742 100644 --- a/docs/manual/helloworld2.xml +++ b/docs/manual/helloworld2.xml @@ -44,17 +44,17 @@ main (int argc, char *argv[]) g_assert (pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); gst_bin_add (GST_BIN (pipeline), filesrc); autobin = gst_bin_new ("autobin"); - cache = gst_elementfactory_make ("autoplugcache", "cache"); + cache = gst_element_factory_make ("autoplugcache", "cache"); g_signal_connect (G_OBJECT (cache), "cache_empty", G_CALLBACK (gst_play_cache_empty), pipeline); - typefind = gst_elementfactory_make ("typefind", "typefind"); + typefind = gst_element_factory_make ("typefind", "typefind"); g_signal_connect (G_OBJECT (typefind), "have_type", G_CALLBACK (gst_play_have_type), pipeline); gst_bin_add (GST_BIN (autobin), cache); @@ -112,10 +112,10 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) gst_bin_remove (GST_BIN (autobin), typefind); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); g_assert (autoplug != NULL); new_element = gst_autoplug_to_renderers (autoplug, @@ -172,10 +172,10 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); g_assert (autoplug != NULL); new_element = gst_autoplug_to_renderers (autoplug, diff --git a/docs/manual/highlevel-xml.xml b/docs/manual/highlevel-xml.xml index c9aeba8c14..db4785321d 100644 --- a/docs/manual/highlevel-xml.xml +++ b/docs/manual/highlevel-xml.xml @@ -43,9 +43,9 @@ main (int argc, char *argv[]) } /* create a new thread to hold the elements */ - thread = gst_elementfactory_make ("thread", "thread"); + thread = gst_element_factory_make ("thread", "thread"); g_assert (thread != NULL); - thread2 = gst_elementfactory_make ("thread", "thread2"); + thread2 = gst_element_factory_make ("thread", "thread2"); g_assert (thread2 != NULL); /* create a new bin to hold the elements */ @@ -53,18 +53,18 @@ main (int argc, char *argv[]) g_assert (bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - queue = gst_elementfactory_make ("queue", "queue"); - queue2 = gst_elementfactory_make ("queue", "queue2"); + queue = gst_element_factory_make ("queue", "queue"); + queue2 = gst_element_factory_make ("queue", "queue2"); /* and an audio sink */ - osssink = gst_elementfactory_make ("osssink", "play_audio"); + osssink = gst_element_factory_make ("osssink", "play_audio"); g_assert (osssink != NULL); - decode = gst_elementfactory_make ("mad", "decode"); + decode = gst_element_factory_make ("mad", "decode"); g_assert (decode != NULL); /* add objects to the main bin */ @@ -195,7 +195,7 @@ xmlNsPtr ns; ... ns = xmlNewNs (NULL, "http://gstreamer.net/gst-test/1.0/", "test"); ... - thread = gst_elementfactory_make ("thread", "thread"); + thread = gst_element_factory_make ("thread", "thread"); g_signal_connect (G_OBJECT (thread), "object_saved", G_CALLBACK (object_saved), g_strdup ("decoder thread")); ... diff --git a/docs/manual/pads.xml b/docs/manual/pads.xml index 953367a6d1..595b1ffef5 100644 --- a/docs/manual/pads.xml +++ b/docs/manual/pads.xml @@ -104,7 +104,7 @@ main(int argc, char *argv[]) // create pipeline and do something usefull ... - mpeg2parser = gst_elementfactory_make ("mpegdemux", "mpegdemux"); + mpeg2parser = gst_element_factory_make ("mpegdemux", "mpegdemux"); g_signal_connect (G_OBJECT (mpeg2parser), "new_pad", pad_connect_func, pipeline); ... @@ -139,7 +139,7 @@ main(int argc, char *argv[]) ... GstPad *pad; ... - element = gst_elementfactory_make ("tee", "element"); + element = gst_element_factory_make ("tee", "element"); pad = gst_element_get_request_pad (element, "src%d"); g_print ("new pad %s\n", gst_pad_get_name (pad)); @@ -161,10 +161,10 @@ main(int argc, char *argv[]) GstPadTemplate *templ; GstPad *pad; ... - element = gst_elementfactory_make ("tee", "element"); - mad = gst_elementfactory_make ("mad", "mad"); + element = gst_element_factory_make ("tee", "element"); + mad = gst_element_factory_make ("mad", "mad"); - templ = gst_element_get_padtemplate_by_name (mad, "sink"); + templ = gst_element_get_pad_template_by_name (mad, "sink"); pad = gst_element_get_compatible_pad (element, templ); g_print ("new pad %s\n", gst_pad_get_name (pad)); diff --git a/docs/manual/queues.xml b/docs/manual/queues.xml index 470c83eaca..0f00eca443 100644 --- a/docs/manual/queues.xml +++ b/docs/manual/queues.xml @@ -83,20 +83,20 @@ main (int argc, char *argv[]) g_assert (bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread); - queue = gst_elementfactory_make ("queue", "queue"); + queue = gst_element_factory_make ("queue", "queue"); /* and an audio sink */ - audiosink = gst_elementfactory_make ("audiosink", "play_audio"); + audiosink = gst_element_factory_make ("audiosink", "play_audio"); g_assert (audiosink != NULL); - parse = gst_elementfactory_make ("mp3parse", "parse"); - decode = gst_elementfactory_make ("mpg123", "decode"); + parse = gst_element_factory_make ("mp3parse", "parse"); + decode = gst_element_factory_make ("mpg123", "decode"); /* add objects to the main bin */ gst_bin_add (GST_BIN (bin), filesrc); diff --git a/docs/manual/threads.xml b/docs/manual/threads.xml index f9b00b96b3..a63ad5f9b4 100644 --- a/docs/manual/threads.xml +++ b/docs/manual/threads.xml @@ -15,7 +15,7 @@ /* create the thread object */ my_thread = gst_thread_new ("my_thread"); - /* you could have used gst_elementfactory_make ("thread", "my_thread"); */ + /* you could have used gst_element_factory_make ("thread", "my_thread"); */ g_return_if_fail (my_thread != NULL); /* add some plugins */ @@ -115,14 +115,14 @@ main (int argc, char *argv[]) g_assert (pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread); /* and an audio sink */ - audiosink = gst_elementfactory_make ("audiosink", "play_audio"); + audiosink = gst_element_factory_make ("audiosink", "play_audio"); g_assert (audiosink != NULL); /* add objects to the main pipeline */ diff --git a/docs/manual/typedetection.xml b/docs/manual/typedetection.xml index e5ac06875b..f0379e3e55 100644 --- a/docs/manual/typedetection.xml +++ b/docs/manual/typedetection.xml @@ -73,12 +73,12 @@ main(int argc, char *argv[]) g_assert (bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); /* create the typefind element */ - typefind = gst_elementfactory_make ("typefind", "typefind"); + typefind = gst_element_factory_make ("typefind", "typefind"); g_assert (typefind != NULL); /* add objects to the main pipeline */ diff --git a/docs/manual/xml.xml b/docs/manual/xml.xml index c9aeba8c14..db4785321d 100644 --- a/docs/manual/xml.xml +++ b/docs/manual/xml.xml @@ -43,9 +43,9 @@ main (int argc, char *argv[]) } /* create a new thread to hold the elements */ - thread = gst_elementfactory_make ("thread", "thread"); + thread = gst_element_factory_make ("thread", "thread"); g_assert (thread != NULL); - thread2 = gst_elementfactory_make ("thread", "thread2"); + thread2 = gst_element_factory_make ("thread", "thread2"); g_assert (thread2 != NULL); /* create a new bin to hold the elements */ @@ -53,18 +53,18 @@ main (int argc, char *argv[]) g_assert (bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - queue = gst_elementfactory_make ("queue", "queue"); - queue2 = gst_elementfactory_make ("queue", "queue2"); + queue = gst_element_factory_make ("queue", "queue"); + queue2 = gst_element_factory_make ("queue", "queue2"); /* and an audio sink */ - osssink = gst_elementfactory_make ("osssink", "play_audio"); + osssink = gst_element_factory_make ("osssink", "play_audio"); g_assert (osssink != NULL); - decode = gst_elementfactory_make ("mad", "decode"); + decode = gst_element_factory_make ("mad", "decode"); g_assert (decode != NULL); /* add objects to the main bin */ @@ -195,7 +195,7 @@ xmlNsPtr ns; ... ns = xmlNewNs (NULL, "http://gstreamer.net/gst-test/1.0/", "test"); ... - thread = gst_elementfactory_make ("thread", "thread"); + thread = gst_element_factory_make ("thread", "thread"); g_signal_connect (G_OBJECT (thread), "object_saved", G_CALLBACK (object_saved), g_strdup ("decoder thread")); ... diff --git a/examples/autoplug/autoplug.c b/examples/autoplug/autoplug.c index 1f7ae4f36b..56f25e8fce 100644 --- a/examples/autoplug/autoplug.c +++ b/examples/autoplug/autoplug.c @@ -23,15 +23,15 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) gst_bin_remove (GST_BIN (autobin), typefind); /* and an audio sink */ - osssink = gst_elementfactory_make ("osssink", "play_audio"); + osssink = gst_element_factory_make ("osssink", "play_audio"); g_assert (osssink != NULL); videosink = gst_bin_new ("videosink"); /* and an video sink */ - videoelement = gst_elementfactory_make ("xvideosink", "play_video"); + videoelement = gst_element_factory_make ("xvideosink", "play_video"); g_assert (videosink != NULL); - colorspace = gst_elementfactory_make ("colorspace", "colorspace"); + colorspace = gst_element_factory_make ("colorspace", "colorspace"); g_assert (colorspace != NULL); gst_element_connect_pads (colorspace, "src", videoelement, "sink"); @@ -41,7 +41,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) gst_element_add_ghost_pad (videosink, gst_element_get_pad (colorspace, "sink"), "sink"); - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); g_assert (autoplug != NULL); new_element = gst_autoplug_to_renderers (autoplug, @@ -117,16 +117,16 @@ int main(int argc,char *argv[]) g_assert(pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); gst_bin_add (GST_BIN (pipeline), filesrc); autobin = gst_bin_new ("autobin"); - cache = gst_elementfactory_make ("autoplugcache", "cache"); + cache = gst_element_factory_make ("autoplugcache", "cache"); g_signal_connect (G_OBJECT (cache), "cache_empty", G_CALLBACK (gst_play_cache_empty), pipeline); - typefind = gst_elementfactory_make ("typefind", "typefind"); + typefind = gst_element_factory_make ("typefind", "typefind"); g_signal_connect (G_OBJECT (typefind), "have_type", G_CALLBACK (gst_play_have_type), pipeline); gst_bin_add (GST_BIN (autobin), cache); gst_bin_add (GST_BIN (autobin), typefind); diff --git a/examples/cutter/cutter.c b/examples/cutter/cutter.c index 544da73eba..b1c80cee4d 100644 --- a/examples/cutter/cutter.c +++ b/examples/cutter/cutter.c @@ -114,7 +114,7 @@ int main (int argc, char *argv[]) g_print ("creating main bin\n"); /* create cutter */ - cutter = gst_elementfactory_make ("cutter", "cutter"); + cutter = gst_element_factory_make ("cutter", "cutter"); g_object_set (G_OBJECT (cutter), "threshold_dB", -40.0, @@ -123,7 +123,7 @@ int main (int argc, char *argv[]) NULL); /* create an audio src */ - audiosrc = gst_elementfactory_make ("osssrc", "audio_src"); + audiosrc = gst_element_factory_make ("osssrc", "audio_src"); /* set params */ @@ -131,8 +131,8 @@ int main (int argc, char *argv[]) "channels", 1, "format", 16, NULL); - encoder = gst_elementfactory_make ("passthrough", "encoder"); - disksink = gst_elementfactory_make ("afsink", "disk_sink"); + encoder = gst_element_factory_make ("passthrough", "encoder"); + disksink = gst_element_factory_make ("afsink", "disk_sink"); g_object_set (G_OBJECT (disksink), "location", "/dev/null", NULL); @@ -143,7 +143,7 @@ int main (int argc, char *argv[]) main_bin = gst_pipeline_new ("bin"); g_assert (main_bin != NULL); - queue = gst_elementfactory_make ("queue", "queue"); + queue = gst_element_factory_make ("queue", "queue"); /* add elements to bin */ gst_bin_add (GST_BIN (main_bin), audiosrc); diff --git a/examples/events/seek.c b/examples/events/seek.c index 11b045e2b1..b9ce8a1142 100644 --- a/examples/events/seek.c +++ b/examples/events/seek.c @@ -14,9 +14,9 @@ main (int argc, char *argv[]) g_return_val_if_fail (bin != NULL, -1); g_print ("--- creating src and sink elements\n"); - src = gst_elementfactory_make ("fakesrc", "src"); + src = gst_element_factory_make ("fakesrc", "src"); g_return_val_if_fail (src != NULL, -1); - sink = gst_elementfactory_make ("fakesink", "sink"); + sink = gst_element_factory_make ("fakesink", "sink"); g_return_val_if_fail (sink != NULL, -1); g_print ("--- about to add the elements to the bin\n"); diff --git a/examples/helloworld/helloworld.c b/examples/helloworld/helloworld.c index 67105949da..7f056c9082 100644 --- a/examples/helloworld/helloworld.c +++ b/examples/helloworld/helloworld.c @@ -17,18 +17,18 @@ int main (int argc, char *argv[]) g_assert (bin); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); /* now it's time to get the decoder */ - decoder = gst_elementfactory_make ("mad", "decode"); + decoder = gst_element_factory_make ("mad", "decode"); if (!decoder) { g_print ("could not find plugin \"mad\""); return -1; } /* and an audio sink */ - osssink = gst_elementfactory_make ("osssink", "play_audio"); + osssink = gst_element_factory_make ("osssink", "play_audio"); g_assert (osssink); /* add objects to the main pipeline */ diff --git a/examples/helloworld2/helloworld2.c b/examples/helloworld2/helloworld2.c index 4fa7e72826..301f3c170d 100644 --- a/examples/helloworld2/helloworld2.c +++ b/examples/helloworld2/helloworld2.c @@ -23,10 +23,10 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) gst_bin_remove (GST_BIN (autobin), typefind); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - autoplug = gst_autoplugfactory_make ("staticrender"); + autoplug = gst_autoplug_factory_make ("staticrender"); g_assert (autoplug != NULL); new_element = gst_autoplug_to_renderers (autoplug, @@ -98,17 +98,17 @@ main (int argc, char *argv[]) g_assert (pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); gst_bin_add (GST_BIN (pipeline), filesrc); autobin = gst_bin_new ("autobin"); - cache = gst_elementfactory_make ("autoplugcache", "cache"); + cache = gst_element_factory_make ("autoplugcache", "cache"); g_signal_connect (G_OBJECT (cache), "cache_empty", G_CALLBACK (gst_play_cache_empty), pipeline); - typefind = gst_elementfactory_make ("typefind", "typefind"); + typefind = gst_element_factory_make ("typefind", "typefind"); g_signal_connect (G_OBJECT (typefind), "have_type", G_CALLBACK (gst_play_have_type), pipeline); gst_bin_add (GST_BIN (autobin), cache); diff --git a/examples/mixer/mixer.c b/examples/mixer/mixer.c index 8bd3bde527..d6b9d6a38d 100644 --- a/examples/mixer/mixer.c +++ b/examples/mixer/mixer.c @@ -41,7 +41,7 @@ void eos(GstElement *element) } G_GNUC_UNUSED static GstCaps* -gst_play_typefind (GstBin *bin, GstElement *element) +gst_play_type_find (GstBin *bin, GstElement *element) { GstElement *typefind; GstElement *pipeline; @@ -52,7 +52,7 @@ gst_play_typefind (GstBin *bin, GstElement *element) pipeline = gst_pipeline_new ("autoplug_pipeline"); - typefind = gst_elementfactory_make ("typefind", "typefind"); + typefind = gst_element_factory_make ("typefind", "typefind"); g_return_val_if_fail (typefind != NULL, FALSE); gst_pad_connect (gst_element_get_pad (element, "src"), @@ -107,10 +107,10 @@ int main(int argc,char *argv[]) /* set up output channel and main bin */ /* create adder */ - adder = gst_elementfactory_make ("adder", "adderel"); + adder = gst_element_factory_make ("adder", "adderel"); /* create an audio sink */ - audiosink = gst_elementfactory_make ("esdsink", "play_audio"); + audiosink = gst_element_factory_make ("esdsink", "play_audio"); /* create main bin */ main_bin = gst_pipeline_new("bin"); @@ -267,7 +267,7 @@ create_input_channel (int id, char* location) GST_DEBUG(0, "c_i_p : creating filesrc"); sprintf (buffer, "filesrc%d", id); - channel->filesrc = gst_elementfactory_make ("filesrc", buffer); + channel->filesrc = gst_element_factory_make ("filesrc", buffer); g_assert(channel->filesrc != NULL); GST_DEBUG(0, "c_i_p : setting location"); @@ -286,7 +286,7 @@ create_input_channel (int id, char* location) #endif sprintf (buffer, "volenv%d", id); - channel->volenv = gst_elementfactory_make ("volenv", buffer); + channel->volenv = gst_element_factory_make ("volenv", buffer); g_assert(channel->volenv != NULL); /* autoplug the pipe */ @@ -296,7 +296,7 @@ create_input_channel (int id, char* location) #endif #ifdef WITH_BUG - srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->filesrc); + srccaps = gst_play_type_find (GST_BIN (channel->pipe), channel->filesrc); #endif #ifdef WITH_BUG2 { @@ -322,7 +322,7 @@ create_input_channel (int id, char* location) printf ("DEBUG : c_i_p : creating autoplug\n"); #endif - autoplug = gst_autoplugfactory_make ("static"); + autoplug = gst_autoplug_factory_make ("static"); g_assert (autoplug != NULL); #ifdef DEBUG @@ -343,7 +343,7 @@ create_input_channel (int id, char* location) /* static plug, use mad plugin and assume mp3 input */ printf ("using static plugging for input channel\n"); - decoder = gst_elementfactory_make ("mad", "mpg123"); + decoder = gst_element_factory_make ("mad", "mpg123"); if (!decoder) { fprintf (stderr, "Could not get a decoder element !\n"); diff --git a/examples/plugins/example.c b/examples/plugins/example.c index 45506fc93e..29861a27f9 100644 --- a/examples/plugins/example.c +++ b/examples/plugins/example.c @@ -58,7 +58,7 @@ enum { * can have. They can be quite complex, but for this example plugin * they are rather simple. */ -GST_PADTEMPLATE_FACTORY (sink_factory, +GST_PAD_TEMPLATE_FACTORY (sink_factory, "sink", /* The name of the pad */ GST_PAD_SINK, /* Direction of the pad */ GST_PAD_ALWAYS, /* The pad exists for every instance */ @@ -75,7 +75,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory, ); /* This factory is much simpler, and defines the source pad. */ -GST_PADTEMPLATE_FACTORY (src_factory, +GST_PAD_TEMPLATE_FACTORY (src_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -190,7 +190,7 @@ gst_example_init(GstExample *example) * We will use the template constructed by the factory. */ example->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (sink_factory), "sink"); + GST_PAD_TEMPLATE_GET (sink_factory), "sink"); /* Setting the chain function allows us to supply the function that will * actually be performing the work. Without this, the element would do * nothing, with undefined results (assertion failures and such). @@ -207,7 +207,7 @@ gst_example_init(GstExample *example) * they only produce them. */ example->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (src_factory), "src"); + GST_PAD_TEMPLATE_GET (src_factory), "src"); gst_element_add_pad(GST_ELEMENT(example),example->srcpad); /* Initialization of element's private variables. */ @@ -338,14 +338,14 @@ plugin_init (GModule *module, GstPlugin *plugin) * This consists of the name of the element, the GType identifier, * and a pointer to the details structure at the top of the file. */ - factory = gst_elementfactory_new("example", GST_TYPE_EXAMPLE, &example_details); + factory = gst_element_factory_new("example", GST_TYPE_EXAMPLE, &example_details); g_return_val_if_fail(factory != NULL, FALSE); /* The pad templates can be easily generated from the factories above, * and then added to the list of padtemplates for the elementfactory. */ - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_factory)); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_factory)); /* The very last thing is to register the elementfactory with the plugin. */ gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/examples/queue/queue.c b/examples/queue/queue.c index 15dd327f21..e68b278c56 100644 --- a/examples/queue/queue.c +++ b/examples/queue/queue.c @@ -23,17 +23,17 @@ int main(int argc,char *argv[]) g_assert(bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); - parse = gst_elementfactory_make("mp3parse", "parse"); - decode = gst_elementfactory_make("mpg123", "decode"); + parse = gst_element_factory_make("mp3parse", "parse"); + decode = gst_element_factory_make("mpg123", "decode"); - queue = gst_elementfactory_make("queue", "queue"); + queue = gst_element_factory_make("queue", "queue"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); /* add objects to the main pipeline */ diff --git a/examples/queue2/queue2.c b/examples/queue2/queue2.c index f92eed48ff..83c3173ecd 100644 --- a/examples/queue2/queue2.c +++ b/examples/queue2/queue2.c @@ -33,16 +33,16 @@ int main(int argc,char *argv[]) g_assert(pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect (G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); - queue = gst_elementfactory_make("queue", "queue"); + queue = gst_element_factory_make("queue", "queue"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); /* add objects to the main pipeline */ diff --git a/examples/queue3/queue3.c b/examples/queue3/queue3.c index 553846fce7..e2c1d38743 100644 --- a/examples/queue3/queue3.c +++ b/examples/queue3/queue3.c @@ -33,20 +33,20 @@ int main(int argc,char *argv[]) g_assert(bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect(G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); - queue = gst_elementfactory_make("queue", "queue"); + queue = gst_element_factory_make("queue", "queue"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - parse = gst_elementfactory_make("mp3parse", "parse"); - decode = gst_elementfactory_make("mpg123", "decode"); + parse = gst_element_factory_make("mp3parse", "parse"); + decode = gst_element_factory_make("mpg123", "decode"); /* add objects to the main bin */ gst_bin_add(GST_BIN(bin), filesrc); diff --git a/examples/queue4/queue4.c b/examples/queue4/queue4.c index 8e28592017..e2c4025f5b 100644 --- a/examples/queue4/queue4.c +++ b/examples/queue4/queue4.c @@ -35,21 +35,21 @@ int main(int argc,char *argv[]) g_assert(bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect(G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); - queue = gst_elementfactory_make("queue", "queue"); - queue2 = gst_elementfactory_make("queue", "queue2"); + queue = gst_element_factory_make("queue", "queue"); + queue2 = gst_element_factory_make("queue", "queue2"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - parse = gst_elementfactory_make("mp3parse", "parse"); - decode = gst_elementfactory_make("mpg123", "decode"); + parse = gst_element_factory_make("mp3parse", "parse"); + decode = gst_element_factory_make("mpg123", "decode"); /* add objects to the main bin */ gst_bin_add(GST_BIN(bin), filesrc); diff --git a/examples/thread/thread.c b/examples/thread/thread.c index 5492210c4d..62d4b1071d 100644 --- a/examples/thread/thread.c +++ b/examples/thread/thread.c @@ -34,14 +34,14 @@ int main(int argc,char *argv[]) g_assert(pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect(G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); /* add objects to the main pipeline */ diff --git a/examples/typefind/typefind.c b/examples/typefind/typefind.c index 53a849d5ce..0a66e26e61 100644 --- a/examples/typefind/typefind.c +++ b/examples/typefind/typefind.c @@ -32,11 +32,11 @@ main(int argc, char *argv[]) g_assert(bin != NULL); /* create a file reader */ - filesrc = gst_elementfactory_make("filesrc", "file_source"); + filesrc = gst_element_factory_make("filesrc", "file_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); - typefind = gst_elementfactory_make("typefind", "typefind"); + typefind = gst_element_factory_make("typefind", "typefind"); g_assert(typefind != NULL); /* add objects to the main pipeline */ diff --git a/examples/xml/createxml.c b/examples/xml/createxml.c index d4501c9a69..137f494c14 100644 --- a/examples/xml/createxml.c +++ b/examples/xml/createxml.c @@ -31,9 +31,9 @@ int main(int argc,char *argv[]) } /* create new threads to hold the elements */ - thread = gst_elementfactory_make ("thread", "thread"); + thread = gst_element_factory_make ("thread", "thread"); g_assert (thread != NULL); - thread2 = gst_elementfactory_make ("thread", "thread2"); + thread2 = gst_element_factory_make ("thread", "thread2"); g_assert (thread2 != NULL); /* these signals will allow us to save custom tags with the gst xml output */ @@ -49,18 +49,18 @@ int main(int argc,char *argv[]) g_assert (pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - queue = gst_elementfactory_make ("queue", "queue"); - queue2 = gst_elementfactory_make ("queue", "queue2"); + queue = gst_element_factory_make ("queue", "queue"); + queue2 = gst_element_factory_make ("queue", "queue2"); /* and an audio sink */ - osssink = gst_elementfactory_make ("osssink", "play_audio"); + osssink = gst_element_factory_make ("osssink", "play_audio"); g_assert (osssink != NULL); - decode = gst_elementfactory_make ("mad", "decode"); + decode = gst_element_factory_make ("mad", "decode"); g_assert (decode != NULL); /* add objects to the main pipeline */ diff --git a/gst/autoplug/autoplugtest.c b/gst/autoplug/autoplugtest.c index d7951551d9..daaf7d0e01 100644 --- a/gst/autoplug/autoplugtest.c +++ b/gst/autoplug/autoplugtest.c @@ -35,8 +35,8 @@ void have_type(GstElement *element, GstCaps *caps, GstCaps **private_caps) { gst_scheduler_show (GST_ELEMENT_SCHED(pipeline)); if (strstr(gst_caps_get_mime(caps),"mp3")) { - decoder = gst_elementfactory_make ("mad","decoder"); - sink = gst_elementfactory_make ("osssink","sink"); + decoder = gst_element_factory_make ("mad","decoder"); + sink = gst_element_factory_make ("osssink","sink"); gst_bin_add(GST_BIN(autobin),decoder); gst_bin_add(GST_BIN(autobin),sink); gst_element_connect_pads(decoder,"src",sink,"sink"); @@ -46,8 +46,8 @@ void have_type(GstElement *element, GstCaps *caps, GstCaps **private_caps) { gst_element_connect_pads(cache,"src",decoder,"sink"); } else if (strstr(gst_caps_get_mime(caps),"x-ogg")) { - decoder = gst_elementfactory_make ("vorbisdec","decoder"); - sink = gst_elementfactory_make ("osssink","sink"); + decoder = gst_element_factory_make ("vorbisdec","decoder"); + sink = gst_element_factory_make ("osssink","sink"); gst_bin_add(GST_BIN(autobin),decoder); gst_bin_add(GST_BIN(autobin),sink); gst_element_connect_pads(decoder,"src",sink,"sink"); @@ -67,14 +67,14 @@ int main (int argc,char *argv[]) { gst_init(&argc,&argv); pipeline = gst_pipeline_new("pipeline"); - src = gst_elementfactory_make ("filesrc","src"); + src = gst_element_factory_make ("filesrc","src"); g_object_set(G_OBJECT(src),"location",argv[1],NULL); gst_bin_add (GST_BIN(pipeline),src); autobin = gst_bin_new("autobin"); - cache = gst_elementfactory_make ("autoplugcache","cache"); + cache = gst_element_factory_make ("autoplugcache","cache"); g_signal_connect (G_OBJECT(cache),"cache_empty",(GCallback)cache_empty,NULL); - typefind = gst_elementfactory_make ("typefind", "typefind"); + typefind = gst_element_factory_make ("typefind", "typefind"); g_signal_connect (G_OBJECT(typefind),"have_type",(GCallback)have_type,&caps); gst_bin_add (GST_BIN(autobin),cache); gst_bin_add (GST_BIN(autobin),typefind); diff --git a/gst/autoplug/gstautoplugcache.c b/gst/autoplug/gstautoplugcache.c index d2f000c954..a660b365b0 100644 --- a/gst/autoplug/gstautoplugcache.c +++ b/gst/autoplug/gstautoplugcache.c @@ -341,7 +341,7 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new ("autoplugcache", GST_TYPE_AUTOPLUGCACHE, + factory = gst_element_factory_new ("autoplugcache", GST_TYPE_AUTOPLUGCACHE, &gst_autoplugcache_details); g_return_val_if_fail (factory != NULL, FALSE); diff --git a/gst/autoplug/gstautoplugger.c b/gst/autoplug/gstautoplugger.c index 7428240398..de36537f4b 100644 --- a/gst/autoplug/gstautoplugger.c +++ b/gst/autoplug/gstautoplugger.c @@ -100,7 +100,7 @@ static void gst_autoplugger_external_src_connected (GstPad *pad, GstPad *peerpa */ static void gst_autoplugger_cache_first_buffer (GstElement *element,GstBuffer *buf,GstAutoplugger *autoplugger); static void gst_autoplugger_cache_empty (GstElement *element, GstAutoplugger *autoplugger); -static void gst_autoplugger_typefind_have_type (GstElement *element, GstCaps *caps, GstAutoplugger *autoplugger); +static void gst_autoplugger_type_find_have_type (GstElement *element, GstCaps *caps, GstAutoplugger *autoplugger); static GstElementClass *parent_class = NULL; /*static guint gst_autoplugger_signals[LAST_SIGNAL] = { 0 };*/ @@ -165,7 +165,7 @@ gst_autoplugger_init (GstAutoplugger *autoplugger) /* create the autoplugger cache, which is the fundamental unit of the autopluggerger */ /* FIXME we need to find a way to set element's name before _init */ /* FIXME ... so we can name the subelements uniquely */ - autoplugger->cache = gst_elementfactory_make("autoplugcache", "unnamed_autoplugcache"); + autoplugger->cache = gst_element_factory_make("autoplugcache", "unnamed_autoplugcache"); g_return_if_fail (autoplugger->cache != NULL); GST_DEBUG(GST_CAT_AUTOPLUG, "turning on caps nego proxying in cache"); @@ -216,9 +216,9 @@ gst_autoplugger_external_sink_connected(GstPad *pad, GstPad *peerpad, GstAutoplu if (peercaps) GST_INFO(GST_CAT_AUTOPLUG, "there are some caps on this pad's peer: %s", gst_caps_get_mime(peercaps)); - peertemplate = GST_PAD_PADTEMPLATE(autoplugger->sinkpadpeer); + peertemplate = GST_PAD_PAD_TEMPLATE(autoplugger->sinkpadpeer); if (peertemplate) { - peertemplatecaps = GST_PADTEMPLATE_CAPS(peertemplate); + peertemplatecaps = GST_PAD_TEMPLATE_CAPS(peertemplate); if (peertemplatecaps) { GST_INFO(GST_CAT_AUTOPLUG, "there are some caps on this pad's peer's padtemplate %s", gst_caps_get_mime(peertemplatecaps)); @@ -241,9 +241,9 @@ gst_autoplugger_external_src_connected(GstPad *pad, GstPad *peerpad, GstAutoplug if (peercaps) GST_INFO(GST_CAT_AUTOPLUG, "there are some caps on this pad's peer: %s", gst_caps_get_mime(peercaps)); - peertemplate = GST_PAD_PADTEMPLATE(autoplugger->srcpadpeer); + peertemplate = GST_PAD_PAD_TEMPLATE(autoplugger->srcpadpeer); if (peertemplate) { - peertemplatecaps = GST_PADTEMPLATE_CAPS(peertemplate); + peertemplatecaps = GST_PAD_TEMPLATE_CAPS(peertemplate); if (peertemplatecaps) { GST_INFO(GST_CAT_AUTOPLUG, "there are some caps on this pad's peer's padtemplate %s", gst_caps_get_mime(peertemplatecaps)); @@ -287,7 +287,7 @@ gst_autoplugger_autoplug(GstAutoplugger *autoplugger,GstPad *srcpad,GstCaps *src gst_pad_disconnect(srcpad,sinkpad); if (!autoplugger->autoplug) { - autoplugger->autoplug = gst_autoplugfactory_make("static"); + autoplugger->autoplug = gst_autoplug_factory_make("static"); g_return_val_if_fail(autoplugger->autoplug != NULL, FALSE); } GST_DEBUG(GST_CAT_AUTOPLUG, "building autoplugged bin between caps"); @@ -337,9 +337,9 @@ gst_autoplugger_external_sink_caps_nego_failed(GstPad *pad, gboolean *result, Gs srcpad_peer = GST_PAD(GST_PAD_PEER(autoplugger->cache_srcpad)); g_return_if_fail(srcpad_peer != NULL); - srcpad_peer_template = GST_PAD_PADTEMPLATE(srcpad_peer); + srcpad_peer_template = GST_PAD_PAD_TEMPLATE(srcpad_peer); g_return_if_fail(srcpad_peer_template != NULL); - srcpad_peer_caps = GST_PADTEMPLATE_CAPS(srcpad_peer_template); + srcpad_peer_caps = GST_PAD_TEMPLATE_CAPS(srcpad_peer_template); g_return_if_fail(srcpad_peer_caps != NULL); sinkpad_peer = GST_PAD(GST_PAD_PEER(pad)); @@ -377,9 +377,9 @@ gst_autoplugger_external_src_caps_nego_failed(GstPad *pad, gboolean *result, Gst srcpad_peer = GST_PAD(GST_PAD_PEER(autoplugger->cache_srcpad)); g_return_if_fail(srcpad_peer != NULL); - srcpad_peer_template = GST_PAD_PADTEMPLATE(srcpad_peer); + srcpad_peer_template = GST_PAD_PAD_TEMPLATE(srcpad_peer); g_return_if_fail(srcpad_peer_template != NULL); - srcpad_peer_caps = GST_PADTEMPLATE_CAPS(srcpad_peer_template); + srcpad_peer_caps = GST_PAD_TEMPLATE_CAPS(srcpad_peer_template); g_return_if_fail(srcpad_peer_caps != NULL); if (gst_autoplugger_autoplug(autoplugger,autoplugger->cache_srcpad,srcpad_caps,srcpad_peer_caps)) @@ -434,7 +434,7 @@ gst_autoplugger_cache_empty(GstElement *element, GstAutoplugger *autoplugger) } static void -gst_autoplugger_typefind_have_type(GstElement *element, GstCaps *caps, GstAutoplugger *autoplugger) +gst_autoplugger_type_find_have_type(GstElement *element, GstCaps *caps, GstAutoplugger *autoplugger) { GST_INFO(GST_CAT_AUTOPLUG, "typefind claims to have a type: %s",gst_caps_get_mime(caps)); @@ -455,7 +455,7 @@ gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger)); /* FIXME FIXME FIXME!!!: this should really be done in the caps failure!!! */ /* if (!autoplugger->autoplug) { - autoplugger->autoplug = gst_autoplugfactory_make("static"); + autoplugger->autoplug = gst_autoplug_factory_make("static"); } autoplugger->autobin = gst_autoplug_to_caps(autoplugger->autoplug, caps,autoplugger->sinktemplatecaps,NULL); @@ -528,10 +528,10 @@ gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger)); /* instantiate the typefind and set up the signal handlers */ if (!autoplugger->typefind) { GST_DEBUG(GST_CAT_AUTOPLUG, "creating typefind and setting signal handler"); - autoplugger->typefind = gst_elementfactory_make("typefind","unnamed_typefind"); + autoplugger->typefind = gst_element_factory_make("typefind","unnamed_type_find"); autoplugger->typefind_sinkpad = gst_element_get_pad(autoplugger->typefind,"sink"); g_signal_connect (G_OBJECT(autoplugger->typefind),"have_type", - G_CALLBACK (gst_autoplugger_typefind_have_type), autoplugger); + G_CALLBACK (gst_autoplugger_type_find_have_type), autoplugger); } /* add it to self and attach it */ GST_DEBUG(GST_CAT_AUTOPLUG, "adding typefind to self and connecting to cache"); @@ -589,7 +589,7 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new ("autoplugger", GST_TYPE_AUTOPLUGGER, + factory = gst_element_factory_new ("autoplugger", GST_TYPE_AUTOPLUGGER, &gst_autoplugger_details); g_return_val_if_fail (factory != NULL, FALSE); diff --git a/gst/autoplug/gstsearchfuncs.c b/gst/autoplug/gstsearchfuncs.c index c27b5c4421..6345fd7f43 100644 --- a/gst/autoplug/gstsearchfuncs.c +++ b/gst/autoplug/gstsearchfuncs.c @@ -86,9 +86,9 @@ gst_autoplug_can_connect_src (GstElementFactory *fac, GstCaps *src) while (templs) { - if ((GST_PADTEMPLATE_DIRECTION (templs->data) == GST_PAD_SINK) && gst_autoplag_caps_intersect (src, GST_PADTEMPLATE_CAPS (templs->data))) + if ((GST_PAD_TEMPLATE_DIRECTION (templs->data) == GST_PAD_SINK) && gst_autoplag_caps_intersect (src, GST_PAD_TEMPLATE_CAPS (templs->data))) { - return GST_PADTEMPLATE (templs->data); + return GST_PAD_TEMPLATE (templs->data); } templs = g_list_next (templs); } @@ -113,9 +113,9 @@ gst_autoplug_can_connect_sink (GstElementFactory *fac, GstCaps *sink) while (templs) { - if ((GST_PADTEMPLATE_DIRECTION (templs->data) == GST_PAD_SRC) && gst_autoplag_caps_intersect (GST_PADTEMPLATE_CAPS (templs->data), sink)) + if ((GST_PAD_TEMPLATE_DIRECTION (templs->data) == GST_PAD_SRC) && gst_autoplag_caps_intersect (GST_PAD_TEMPLATE_CAPS (templs->data), sink)) { - return GST_PADTEMPLATE (templs->data); + return GST_PAD_TEMPLATE (templs->data); } templs = g_list_next (templs); } @@ -139,8 +139,8 @@ gst_autoplug_can_match (GstElementFactory *src, GstElementFactory *dest) if (srctemp->direction == GST_PAD_SRC && desttemp->direction == GST_PAD_SINK) { - if (gst_autoplag_caps_intersect (gst_padtemplate_get_caps (srctemp), - gst_padtemplate_get_caps (desttemp))) { + if (gst_autoplag_caps_intersect (gst_pad_template_get_caps (srctemp), + gst_pad_template_get_caps (desttemp))) { GST_DEBUG (GST_CAT_AUTOPLUG_ATTEMPT, "factory \"%s\" can connect with factory \"%s\"\n", GST_OBJECT_NAME (src), GST_OBJECT_NAME (dest)); @@ -166,7 +166,7 @@ gst_autoplug_factory_has_direction (GstElementFactory *fac, GstPadDirection dir) while (templs) { - if (GST_PADTEMPLATE_DIRECTION (templs->data) == dir) + if (GST_PAD_TEMPLATE_DIRECTION (templs->data) == dir) { return TRUE; } @@ -236,11 +236,11 @@ gst_autoplug_factories_filters_with_sink_caps (GList *factories) gboolean have_sink = FALSE; while (templs) { - if (GST_PADTEMPLATE_DIRECTION (templs->data) == GST_PAD_SRC) + if (GST_PAD_TEMPLATE_DIRECTION (templs->data) == GST_PAD_SRC) { have_src = TRUE; } - if ((GST_PADTEMPLATE_DIRECTION (templs->data) == GST_PAD_SINK) && (GST_PADTEMPLATE_CAPS (templs->data) != NULL)) + if ((GST_PAD_TEMPLATE_DIRECTION (templs->data) == GST_PAD_SINK) && (GST_PAD_TEMPLATE_CAPS (templs->data) != NULL)) { have_sink = TRUE; } @@ -272,7 +272,7 @@ gst_autoplug_factories_at_most_templates(GList *factories, GstPadDirection dir, while (templs) { - if (GST_PADTEMPLATE_DIRECTION (templs->data) == dir) + if (GST_PAD_TEMPLATE_DIRECTION (templs->data) == dir) { count++; } diff --git a/gst/autoplug/gstspider.c b/gst/autoplug/gstspider.c index fa0ce59e7b..b5174f0a53 100644 --- a/gst/autoplug/gstspider.c +++ b/gst/autoplug/gstspider.c @@ -58,14 +58,14 @@ enum { }; /* generic templates */ -GST_PADTEMPLATE_FACTORY (spider_src_factory, +GST_PAD_TEMPLATE_FACTORY (spider_src_factory, "src_%d", GST_PAD_SRC, GST_PAD_REQUEST, NULL /* no caps */ ); -GST_PADTEMPLATE_FACTORY (spider_sink_factory, +GST_PAD_TEMPLATE_FACTORY (spider_sink_factory, "sink_%d", GST_PAD_SINK, GST_PAD_REQUEST, @@ -113,13 +113,13 @@ static GstElementClass * parent_class = NULL; static guint gst_spider_signals[LAST_SIGNAL] = { 0 };*/ /* let gstreamer know that we have some request pads available */ -GST_PADTEMPLATE_FACTORY (gst_spider_sink_template_factory, +GST_PAD_TEMPLATE_FACTORY (gst_spider_sink_template_factory, "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, NULL ); -GST_PADTEMPLATE_FACTORY (gst_spider_src_template_factory, +GST_PAD_TEMPLATE_FACTORY (gst_spider_src_template_factory, "src%d", GST_PAD_SRC, GST_PAD_REQUEST, @@ -168,8 +168,8 @@ gst_spider_class_init (GstSpiderClass *klass) gobject_class->get_property = gst_spider_get_property; gobject_class->dispose = gst_spider_dispose; - gst_element_class_add_padtemplate (gstelement_class, gst_spider_src_template_factory()); - gst_element_class_add_padtemplate (gstelement_class, gst_spider_sink_template_factory()); + gst_element_class_add_pad_template (gstelement_class, gst_spider_src_template_factory()); + gst_element_class_add_pad_template (gstelement_class, gst_spider_sink_template_factory()); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR(gst_spider_request_new_pad); } @@ -178,7 +178,7 @@ gst_spider_init (GstSpider *spider) { /* use only elements which have sources and sinks and where the sinks have caps */ /* FIXME: How do we handle factories that are added after the spider was constructed? */ - spider->factories = gst_autoplug_factories_filters_with_sink_caps ((GList *) gst_elementfactory_get_list ()); + spider->factories = gst_autoplug_factories_filters_with_sink_caps ((GList *) gst_element_factory_get_list ()); spider->connections = NULL; } @@ -202,12 +202,12 @@ gst_spider_request_new_pad (GstElement *element, GstPadTemplate *templ, const gc GstSpider *spider; g_return_val_if_fail (templ != NULL, NULL); - g_return_val_if_fail (GST_IS_PADTEMPLATE (templ), NULL); + g_return_val_if_fail (GST_IS_PAD_TEMPLATE (templ), NULL); spider = GST_SPIDER (element); /* create an identity object, so we have a pad */ - switch ( GST_PADTEMPLATE_DIRECTION (templ)) + switch ( GST_PAD_TEMPLATE_DIRECTION (templ)) { case GST_PAD_SRC: padname = gst_spider_unused_elementname ((GstBin *)spider, "src_"); @@ -228,7 +228,7 @@ gst_spider_request_new_pad (GstElement *element, GstPadTemplate *templ, const gc /* FIXME: use the requested name for the pad */ gst_object_ref (GST_OBJECT (templ)); - GST_PAD_PADTEMPLATE (returnpad) = templ; + GST_PAD_PAD_TEMPLATE (returnpad) = templ; gst_bin_add (GST_BIN (element), GST_ELEMENT (identity)); @@ -255,7 +255,7 @@ gst_spider_set_property (GObject *object, guint prop_id, const GValue *value, GP while (list) { g_return_if_fail (list->data != NULL); - g_return_if_fail (GST_IS_ELEMENTFACTORY (list->data)); + g_return_if_fail (GST_IS_ELEMENT_FACTORY (list->data)); list = g_list_next (list); } g_list_free (spider->factories); @@ -529,14 +529,14 @@ gst_spider_create_and_plug (GstSpiderConnection *conn, GList *plugpath) { element = (GstElement *) (endelements == NULL ? conn->src : endelements->data); } else { - element = gst_elementfactory_create ((GstElementFactory *) plugpath->data, NULL); + element = gst_element_factory_create ((GstElementFactory *) plugpath->data, NULL); gst_bin_add (GST_BIN (spider), element); } /* insert and connect new element */ if (!gst_element_connect (conn->current, element)) { /* check if the src has SOMETIMES templates. If so, connect a callback */ - GList *templs = gst_element_get_padtemplate_list (conn->current); + GList *templs = gst_element_get_pad_template_list (conn->current); /* remove element that couldn't be connected, if it wasn't the endpoint */ if (element != (GstElement *) conn->src) @@ -544,7 +544,7 @@ gst_spider_create_and_plug (GstSpiderConnection *conn, GList *plugpath) while (templs) { GstPadTemplate *templ = (GstPadTemplate *) templs->data; - if ((GST_PADTEMPLATE_DIRECTION (templ) == GST_PAD_SRC) && (GST_PADTEMPLATE_PRESENCE(templ) == GST_PAD_SOMETIMES)) + if ((GST_PAD_TEMPLATE_DIRECTION (templ) == GST_PAD_SRC) && (GST_PAD_TEMPLATE_PRESENCE(templ) == GST_PAD_SOMETIMES)) { GST_DEBUG (GST_CAT_AUTOPLUG_ATTEMPT, "adding callback to connect element %s to %s", GST_ELEMENT_NAME (conn->current), GST_ELEMENT_NAME (conn->src)); conn->signal_id = g_signal_connect (G_OBJECT (conn->current), "new_pad", @@ -683,12 +683,12 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - factory = gst_elementfactory_new("spider", GST_TYPE_SPIDER, + factory = gst_element_factory_new("spider", GST_TYPE_SPIDER, &gst_spider_details); g_return_val_if_fail(factory != NULL, FALSE); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (spider_src_factory)); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (spider_sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (spider_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (spider_sink_factory)); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/gst/autoplug/gstspideridentity.c b/gst/autoplug/gstspideridentity.c index 2d5c20cecd..1b89105c89 100644 --- a/gst/autoplug/gstspideridentity.c +++ b/gst/autoplug/gstspideridentity.c @@ -38,14 +38,14 @@ GstElementDetails gst_spider_identity_details = { /* generic templates * delete me when meging with spider.c */ -GST_PADTEMPLATE_FACTORY (spider_src_factory, +GST_PAD_TEMPLATE_FACTORY (spider_src_factory, "src", GST_PAD_SRC, GST_PAD_REQUEST, NULL /* no caps */ ); -GST_PADTEMPLATE_FACTORY (spider_sink_factory, +GST_PAD_TEMPLATE_FACTORY (spider_sink_factory, "sink", GST_PAD_SINK, GST_PAD_REQUEST, @@ -75,17 +75,17 @@ static GstCaps * gst_spider_identity_getcaps (GstPad *pad, GstCaps *caps); /* loop functions */ static void gst_spider_identity_dumb_loop (GstSpiderIdentity *ident); static void gst_spider_identity_src_loop (GstSpiderIdentity *ident); -static void gst_spider_identity_sink_loop_typefinding (GstSpiderIdentity *ident); +static void gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity *ident); static void gst_spider_identity_sink_loop_emptycache (GstSpiderIdentity *ident); /* set/get functions */ static void gst_spider_identity_set_caps (GstSpiderIdentity *identity, GstCaps *caps); /* callback */ -static void callback_typefind_have_type (GstElement *typefind, GstCaps *caps, GstSpiderIdentity *identity); +static void callback_type_find_have_type (GstElement *typefind, GstCaps *caps, GstSpiderIdentity *identity); /* other functions */ -static void gst_spider_identity_start_typefinding (GstSpiderIdentity *ident); +static void gst_spider_identity_start_type_finding (GstSpiderIdentity *ident); static GstElementClass * parent_class = NULL; /* no signals @@ -120,8 +120,8 @@ gst_spider_identity_class_init (GstSpiderIdentityClass *klass) parent_class = g_type_class_ref (GST_TYPE_ELEMENT); /* add our two pad templates */ - gst_element_class_add_padtemplate (gstelement_class, GST_PADTEMPLATE_GET (spider_src_factory)); - gst_element_class_add_padtemplate (gstelement_class, GST_PADTEMPLATE_GET (spider_sink_factory)); + gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (spider_src_factory)); + gst_element_class_add_pad_template (gstelement_class, GST_PAD_TEMPLATE_GET (spider_sink_factory)); gstelement_class->change_state = GST_DEBUG_FUNCPTR(gst_spider_identity_change_state); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR(gst_spider_identity_request_new_pad); @@ -142,12 +142,12 @@ static void gst_spider_identity_init (GstSpiderIdentity *ident) { /* sink */ - ident->sink = gst_pad_new_from_template (GST_PADTEMPLATE_GET (spider_sink_factory), "sink"); + ident->sink = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (spider_sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (ident), ident->sink); gst_pad_set_connect_function (ident->sink, GST_DEBUG_FUNCPTR (gst_spider_identity_connect)); gst_pad_set_getcaps_function (ident->sink, GST_DEBUG_FUNCPTR (gst_spider_identity_getcaps)); /* src */ - ident->src = gst_pad_new_from_template (GST_PADTEMPLATE_GET (spider_src_factory), "src"); + ident->src = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (spider_src_factory), "src"); gst_element_add_pad (GST_ELEMENT (ident), ident->src); gst_pad_set_connect_function (ident->src, GST_DEBUG_FUNCPTR (gst_spider_identity_connect)); gst_pad_set_getcaps_function (ident->src, GST_DEBUG_FUNCPTR (gst_spider_identity_getcaps)); @@ -270,12 +270,12 @@ gst_spider_identity_request_new_pad (GstElement *element, GstPadTemplate *templ /*checks */ g_return_val_if_fail (templ != NULL, NULL); - g_return_val_if_fail (GST_IS_PADTEMPLATE (templ), NULL); + g_return_val_if_fail (GST_IS_PAD_TEMPLATE (templ), NULL); ident = GST_SPIDER_IDENTITY (element); g_return_val_if_fail (ident != NULL, NULL); g_return_val_if_fail (GST_IS_SPIDER_IDENTITY (ident), NULL); - switch (GST_PADTEMPLATE_DIRECTION (templ)) + switch (GST_PAD_TEMPLATE_DIRECTION (templ)) { case GST_PAD_SINK: if (ident->sink != NULL) break; @@ -332,7 +332,7 @@ gst_spider_identity_change_state (GstElement *element) { if (gst_pad_get_caps ((GstPad *) GST_PAD_PEER (ident->sink)) == NULL) { - gst_spider_identity_start_typefinding (ident); + gst_spider_identity_start_type_finding (ident); break; } else { gst_spider_identity_plug (ident); @@ -354,7 +354,7 @@ gst_spider_identity_change_state (GstElement *element) } static void -gst_spider_identity_start_typefinding (GstSpiderIdentity *ident) +gst_spider_identity_start_type_finding (GstSpiderIdentity *ident) { GstElement* typefind; gboolean restart = FALSE; @@ -367,13 +367,13 @@ gst_spider_identity_start_typefinding (GstSpiderIdentity *ident) } /* create and connect typefind object */ - typefind = gst_elementfactory_make ("typefind", g_strdup_printf("%s%s", "typefind", GST_ELEMENT_NAME(ident))); + typefind = gst_element_factory_make ("typefind", g_strdup_printf("%s%s", "typefind", GST_ELEMENT_NAME(ident))); g_signal_connect (G_OBJECT (typefind), "have_type", - G_CALLBACK (callback_typefind_have_type), ident); + G_CALLBACK (callback_type_find_have_type), ident); gst_bin_add (GST_BIN (GST_ELEMENT_PARENT (ident)), typefind); gst_pad_connect (gst_element_get_compatible_pad ((GstElement *) ident, gst_element_get_pad (typefind, "sink")), gst_element_get_pad (typefind, "sink")); - gst_element_set_loop_function (GST_ELEMENT (ident), (GstElementLoopFunction) GST_DEBUG_FUNCPTR (gst_spider_identity_sink_loop_typefinding)); + gst_element_set_loop_function (GST_ELEMENT (ident), (GstElementLoopFunction) GST_DEBUG_FUNCPTR (gst_spider_identity_sink_loop_type_finding)); if (restart) { @@ -397,7 +397,7 @@ gst_spider_identity_set_caps (GstSpiderIdentity *ident, GstCaps *caps) static void -callback_typefind_have_type (GstElement *typefind, GstCaps *caps, GstSpiderIdentity *ident) +callback_type_find_have_type (GstElement *typefind, GstCaps *caps, GstSpiderIdentity *ident) { gboolean restart_spider = FALSE; @@ -477,7 +477,7 @@ gst_spider_identity_src_loop (GstSpiderIdentity *ident) * and push it to the typefinder. */ static void -gst_spider_identity_sink_loop_typefinding (GstSpiderIdentity *ident) +gst_spider_identity_sink_loop_type_finding (GstSpiderIdentity *ident) { GstBuffer *buf; diff --git a/gst/autoplug/gststaticautoplug.c b/gst/autoplug/gststaticautoplug.c index 7c064900cd..d4d8f1ba74 100644 --- a/gst/autoplug/gststaticautoplug.c +++ b/gst/autoplug/gststaticautoplug.c @@ -88,7 +88,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "A static autoplugger"); - factory = gst_autoplugfactory_new ("static", + factory = gst_autoplug_factory_new ("static", "A static autoplugger, it constructs the complete element before running it", gst_static_autoplug_get_type ()); @@ -122,8 +122,8 @@ gst_autoplug_can_match (GstElementFactory *src, GstElementFactory *dest) if (srctemp->direction == GST_PAD_SRC && desttemp->direction == GST_PAD_SINK) { - if (gst_caps_check_compatibility (gst_padtemplate_get_caps (srctemp), - gst_padtemplate_get_caps (desttemp))) { + if (gst_caps_check_compatibility (gst_pad_template_get_caps (srctemp), + gst_pad_template_get_caps (desttemp))) { GST_DEBUG (GST_CAT_AUTOPLUG_ATTEMPT, "factory \"%s\" can connect with factory \"%s\"\n", GST_OBJECT_NAME (src), GST_OBJECT_NAME (dest)); @@ -197,10 +197,10 @@ autoplug_dynamic_pad (GstElement *element, GstPad *pad, gpointer data) while (pads) { GstPad *pad = GST_PAD (pads->data); - GstPadTemplate *templ = GST_PAD_PADTEMPLATE (pad); + GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad); pads = g_list_next (pads); - if (gst_caps_check_compatibility (GST_PADTEMPLATE_CAPS (templ), info->endcap)) { + if (gst_caps_check_compatibility (GST_PAD_TEMPLATE_CAPS (templ), info->endcap)) { gst_element_add_ghost_pad (info->result, pad, g_strdup_printf("src_%02d", info->i)); GST_DEBUG (0,"gstpipeline: new dynamic pad %s", GST_PAD_NAME (pad)); break; @@ -234,9 +234,9 @@ gst_autoplug_pads_autoplug (GstElement *src, GstElement *sink) } static const GList* -gst_autoplug_elementfactory_get_list (gpointer data) +gst_autoplug_element_factory_get_list (gpointer data) { - return gst_elementfactory_get_list (); + return gst_element_factory_get_list (); } typedef struct { @@ -256,10 +256,10 @@ gst_autoplug_caps_find_cost (gpointer src, gpointer dest, gpointer data) res = gst_caps_check_compatibility ((GstCaps *)src, (GstCaps *)dest); } else if (IS_CAPS (src)) { - res = gst_elementfactory_can_sink_caps ((GstElementFactory *)dest, (GstCaps *)src); + res = gst_element_factory_can_sink_caps ((GstElementFactory *)dest, (GstCaps *)src); } else if (IS_CAPS (dest)) { - res = gst_elementfactory_can_src_caps ((GstElementFactory *)src, (GstCaps *)dest); + res = gst_element_factory_can_src_caps ((GstElementFactory *)src, (GstCaps *)dest); } else { res = gst_autoplug_can_match ((GstElementFactory *)src, (GstElementFactory *)dest); @@ -300,7 +300,7 @@ gst_static_autoplug_to_caps (GstAutoplug *autoplug, GstCaps *srccaps, GstCaps *s GST_INFO (GST_CAT_AUTOPLUG_ATTEMPT,"autoplugging two caps structures"); elements = gst_autoplug_func (caps.src, caps.sink, - gst_autoplug_elementfactory_get_list, + gst_autoplug_element_factory_get_list, gst_autoplug_caps_find_cost, &caps); @@ -377,7 +377,7 @@ gst_static_autoplug_to_caps (GstAutoplug *autoplug, GstCaps *srccaps, GstCaps *s * initialization. i raelly don't know though. */ name = g_strdup (GST_OBJECT_NAME (factory)); - element = gst_elementfactory_create (factory, name); + element = gst_element_factory_create (factory, name); g_free(name); gst_bin_add (GST_BIN(result), element); @@ -392,9 +392,9 @@ gst_static_autoplug_to_caps (GstAutoplug *autoplug, GstCaps *srccaps, GstCaps *s while (pads) { GstPad *pad = GST_PAD (pads->data); - GstPadTemplate *templ = GST_PAD_PADTEMPLATE (pad); + GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad); - if (gst_caps_check_compatibility (srccaps, GST_PADTEMPLATE_CAPS (templ))) { + if (gst_caps_check_compatibility (srccaps, GST_PAD_TEMPLATE_CAPS (templ))) { gst_element_add_ghost_pad (result, pad, "sink"); break; } @@ -429,7 +429,7 @@ differ: factory = (GstElementFactory *)(factories[i]->data); GST_DEBUG (0,"factory \"%s\"", GST_OBJECT_NAME (factory)); - element = gst_elementfactory_create(factory, GST_OBJECT_NAME (factory)); + element = gst_element_factory_create(factory, GST_OBJECT_NAME (factory)); GST_DEBUG (0,"adding element %s", GST_ELEMENT_NAME (element)); gst_bin_add(GST_BIN(thebin), element); @@ -456,10 +456,10 @@ differ: while (pads) { GstPad *pad = GST_PAD (pads->data); - GstPadTemplate *templ = GST_PAD_PADTEMPLATE (pad); + GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad); pads = g_list_next (pads); - if (gst_caps_check_compatibility (GST_PADTEMPLATE_CAPS (templ), endcap)) { + if (gst_caps_check_compatibility (GST_PAD_TEMPLATE_CAPS (templ), endcap)) { gst_element_add_ghost_pad (result, pad, g_strdup_printf("src_%02d", i)); have_pad = TRUE; break; diff --git a/gst/autoplug/gststaticautoplugrender.c b/gst/autoplug/gststaticautoplugrender.c index 54c3592839..fee73cc99a 100644 --- a/gst/autoplug/gststaticautoplugrender.c +++ b/gst/autoplug/gststaticautoplugrender.c @@ -88,7 +88,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "A static autoplugger"); - factory = gst_autoplugfactory_new ("staticrender", + factory = gst_autoplug_factory_new ("staticrender", "A static autoplugger, it constructs the complete element before running it", gst_static_autoplug_render_get_type ()); @@ -119,11 +119,11 @@ gst_autoplug_match_caps (GstElementFactory *factory, GstPadDirection direction, GstPadTemplate *template = (GstPadTemplate *)templates->data; if (template->direction == direction && direction == GST_PAD_SRC) { - if (gst_caps_check_compatibility (GST_PADTEMPLATE_CAPS (template), caps)) + if (gst_caps_check_compatibility (GST_PAD_TEMPLATE_CAPS (template), caps)) return template; } else if (template->direction == direction && direction == GST_PAD_SINK) { - if (gst_caps_check_compatibility (caps, GST_PADTEMPLATE_CAPS (template))) + if (gst_caps_check_compatibility (caps, GST_PAD_TEMPLATE_CAPS (template))) return template; } templates = g_list_next (templates); @@ -152,7 +152,7 @@ gst_autoplug_can_match (GstElementFactory *src, GstElementFactory *dest) desttemps = g_list_next (desttemps); if (desttemp->direction == GST_PAD_SINK && desttemp->presence != GST_PAD_REQUEST) { - if (gst_caps_check_compatibility (GST_PADTEMPLATE_CAPS (srctemp), GST_PADTEMPLATE_CAPS (desttemp))) { + if (gst_caps_check_compatibility (GST_PAD_TEMPLATE_CAPS (srctemp), GST_PAD_TEMPLATE_CAPS (desttemp))) { GST_DEBUG (GST_CAT_AUTOPLUG_ATTEMPT, "factory \"%s\" can connect with factory \"%s\"\n", GST_OBJECT_NAME (src), GST_OBJECT_NAME (dest)); @@ -238,9 +238,9 @@ gst_autoplug_pads_autoplug (GstElement *src, GstElement *sink) } static GList* -gst_autoplug_elementfactory_get_list (gpointer data) +gst_autoplug_element_factory_get_list (gpointer data) { - return (GList *) gst_elementfactory_get_list (); + return (GList *) gst_element_factory_get_list (); } typedef struct { @@ -321,17 +321,17 @@ gst_static_autoplug_to_render (GstAutoplug *autoplug, GstCaps *srccaps, GstEleme GstPadTemplate *templ; pad = GST_PAD_REALIZE (gst_element_get_pad_list (targetelement)->data); - templ = GST_PAD_PADTEMPLATE (pad); + templ = GST_PAD_PAD_TEMPLATE (pad); if (templ) - caps.sink = GST_PADTEMPLATE_CAPS (templ); + caps.sink = GST_PAD_TEMPLATE_CAPS (templ); else goto next; GST_INFO (GST_CAT_AUTOPLUG_ATTEMPT,"autoplugging two caps structures"); elements = gst_autoplug_func (caps.src, caps.sink, - gst_autoplug_elementfactory_get_list, + gst_autoplug_element_factory_get_list, gst_autoplug_caps_find_cost, &caps); @@ -398,7 +398,7 @@ next: GST_DEBUG (0,"common factory \"%s\"", GST_OBJECT_NAME (factory)); - element = gst_elementfactory_create (factory, g_strdup (GST_OBJECT_NAME (factory))); + element = gst_element_factory_create (factory, g_strdup (GST_OBJECT_NAME (factory))); gst_bin_add (GST_BIN(result), element); if (srcelement != NULL) { @@ -412,9 +412,9 @@ next: while (pads) { GstPad *pad = GST_PAD (pads->data); - GstPadTemplate *templ = GST_PAD_PADTEMPLATE (pad); + GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (pad); - if (gst_caps_check_compatibility (srccaps, GST_PADTEMPLATE_CAPS (templ))) { + if (gst_caps_check_compatibility (srccaps, GST_PAD_TEMPLATE_CAPS (templ))) { gst_element_add_ghost_pad (result, pad, "sink"); break; } @@ -457,7 +457,7 @@ differ: factory = (GstElementFactory *)(factories[i]->data); GST_DEBUG (0,"factory \"%s\"", GST_OBJECT_NAME (factory)); - element = gst_elementfactory_create(factory, g_strdup (GST_OBJECT_NAME (factory))); + element = gst_element_factory_create(factory, g_strdup (GST_OBJECT_NAME (factory))); } else { element = sinkelement; @@ -475,11 +475,11 @@ differ: GST_DEBUG (0,"sugest new thread for \"%s\" %08x", GST_ELEMENT_NAME (element), GST_FLAGS(element)); /* create a new queue and add to the previous bin */ - queue = gst_elementfactory_make("queue", g_strconcat("queue_", GST_ELEMENT_NAME(element), NULL)); + queue = gst_element_factory_make("queue", g_strconcat("queue_", GST_ELEMENT_NAME(element), NULL)); GST_DEBUG (0,"adding element \"%s\"", GST_ELEMENT_NAME (element)); /* this will be the new bin for all following elements */ - thebin = gst_elementfactory_make("thread", g_strconcat("thread_", GST_ELEMENT_NAME(element), NULL)); + thebin = gst_element_factory_make("thread", g_strconcat("thread_", GST_ELEMENT_NAME(element), NULL)); gst_bin_add(GST_BIN(thebin), queue); gst_autoplug_signal_new_object (GST_AUTOPLUG (autoplug), GST_OBJECT (queue)); diff --git a/gst/autoplug/spidertest.c b/gst/autoplug/spidertest.c index 130671697e..316011cc44 100644 --- a/gst/autoplug/spidertest.c +++ b/gst/autoplug/spidertest.c @@ -15,7 +15,7 @@ gst_factories_at_most_templates(GList *factories, GstPadDirection dir, guint max while (templs) { - if (GST_PADTEMPLATE_DIRECTION (templs->data) == dir) + if (GST_PAD_TEMPLATE_DIRECTION (templs->data) == dir) { count++; } @@ -88,11 +88,11 @@ int main(int argc,char *argv[]) g_signal_connect (bin, "error", G_CALLBACK (error_callback), NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_object_set(G_OBJECT(filesrc),"location", argv[1], NULL); /* now it's time to get the decoder */ - decoder = gst_elementfactory_make("spider", "spider"); + decoder = gst_element_factory_make("spider", "spider"); if (!decoder) { g_print ("could not find plugin \"spider\"\n"); exit (-2); @@ -104,8 +104,8 @@ int main(int argc,char *argv[]) g_object_set (decoder, "factories", facs, NULL); /* create video and audio sink */ - osssink = gst_elementfactory_make("osssink", "audio"); - videosink = gst_elementfactory_make("xvideosink", "video"); + osssink = gst_element_factory_make("osssink", "audio"); + videosink = gst_element_factory_make("xvideosink", "video"); if ((!osssink) || (!videosink)) { g_print ("could not create output plugins\n"); diff --git a/gst/elements/gstaggregator.c b/gst/elements/gstaggregator.c index fe16c71bc8..1cc67f6909 100644 --- a/gst/elements/gstaggregator.c +++ b/gst/elements/gstaggregator.c @@ -47,7 +47,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (aggregator_src_factory, +GST_PAD_TEMPLATE_FACTORY (aggregator_src_factory, "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, @@ -349,7 +349,7 @@ gst_aggregator_chain (GstPad *pad, GstBuffer *buf) gboolean gst_aggregator_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (aggregator_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (aggregator_src_factory)); return TRUE; } diff --git a/gst/elements/gstelements.c b/gst/elements/gstelements.c index fe48108cc5..7797522fcc 100644 --- a/gst/elements/gstelements.c +++ b/gst/elements/gstelements.c @@ -74,13 +74,13 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "Standard GST Elements"); while (_elements[i].name) { - factory = gst_elementfactory_new (_elements[i].name, + factory = gst_element_factory_new (_elements[i].name, (_elements[i].type) (), _elements[i].details); if (!factory) { - g_warning ("gst_elementfactory_new failed for `%s'", + g_warning ("gst_element_factory_new failed for `%s'", _elements[i].name); continue; } diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index 55e9914f2b..5083874dfe 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -50,7 +50,7 @@ enum { ARG_LAST_MESSAGE, }; -GST_PADTEMPLATE_FACTORY (fakesink_sink_factory, +GST_PAD_TEMPLATE_FACTORY (fakesink_sink_factory, "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, @@ -276,7 +276,7 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf) gboolean gst_fakesink_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (fakesink_sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (fakesink_sink_factory)); return TRUE; } diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index 9686385b37..d9bc6de9aa 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -64,7 +64,7 @@ enum { ARG_LAST_MESSAGE, }; -GST_PADTEMPLATE_FACTORY (fakesrc_src_factory, +GST_PAD_TEMPLATE_FACTORY (fakesrc_src_factory, "src%d", GST_PAD_SRC, GST_PAD_REQUEST, @@ -792,7 +792,7 @@ gst_fakesrc_change_state (GstElement *element) gboolean gst_fakesrc_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (fakesrc_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (fakesrc_src_factory)); return TRUE; } diff --git a/gst/elements/gstmd5sink.c b/gst/elements/gstmd5sink.c index e220d364fc..561bcd876d 100644 --- a/gst/elements/gstmd5sink.c +++ b/gst/elements/gstmd5sink.c @@ -42,7 +42,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (md5_sink_factory, +GST_PAD_TEMPLATE_FACTORY (md5_sink_factory, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -408,7 +408,7 @@ static void gst_md5sink_init (GstMD5Sink *md5sink) { GstPad *pad; - pad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (md5_sink_factory), "sink"); + pad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (md5_sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (md5sink), pad); gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_md5sink_chain)); @@ -497,7 +497,7 @@ GstElementDetails gst_md5sink_details = { gboolean gst_md5sink_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (md5_sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (md5_sink_factory)); return TRUE; } diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index 2ea74286b2..11322296f3 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -47,7 +47,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (tee_src_factory, +GST_PAD_TEMPLATE_FACTORY (tee_src_factory, "src%d", GST_PAD_SRC, GST_PAD_REQUEST, @@ -345,7 +345,7 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf) gboolean gst_tee_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (tee_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (tee_src_factory)); return TRUE; } diff --git a/gst/gst.c b/gst/gst.c index 7576ca9e21..138efa557a 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -27,7 +27,7 @@ #include "gst.h" #include "gstqueue.h" -#ifndef GST_DISABLE_TYPEFIND +#ifndef GST_DISABLE_TYPE_FIND #include "gsttypefind.h" #endif @@ -281,13 +281,13 @@ init_post (void) gst_pad_get_type (); gst_real_pad_get_type (); gst_ghost_pad_get_type (); - gst_elementfactory_get_type (); + gst_element_factory_get_type (); gst_element_get_type (); - gst_typefactory_get_type (); - gst_schedulerfactory_get_type (); + gst_type_factory_get_type (); + gst_scheduler_factory_get_type (); gst_bin_get_type (); #ifndef GST_DISABLE_AUTOPLUG - gst_autoplugfactory_get_type (); + gst_autoplug_factory_get_type (); #endif plugin_path = g_getenv("GST_PLUGIN_PATH"); @@ -309,12 +309,12 @@ init_post (void) } /* register some standard builtin types */ - gst_elementfactory_new ("bin", gst_bin_get_type (), &gst_bin_details); - gst_elementfactory_new ("pipeline", gst_pipeline_get_type (), &gst_pipeline_details); - gst_elementfactory_new ("thread", gst_thread_get_type (), &gst_thread_details); - gst_elementfactory_new ("queue", gst_queue_get_type (), &gst_queue_details); -#ifndef GST_DISABLE_TYPEFIND - gst_elementfactory_new ("typefind", gst_typefind_get_type (), &gst_typefind_details); + gst_element_factory_new ("bin", gst_bin_get_type (), &gst_bin_details); + gst_element_factory_new ("pipeline", gst_pipeline_get_type (), &gst_pipeline_details); + gst_element_factory_new ("thread", gst_thread_get_type (), &gst_thread_details); + gst_element_factory_new ("queue", gst_queue_get_type (), &gst_queue_details); +#ifndef GST_DISABLE_TYPE_FIND + gst_element_factory_new ("typefind", gst_type_find_get_type (), &gst_type_find_details); #endif #ifndef GST_DISABLE_TRACE @@ -393,7 +393,7 @@ init_popt_callback (poptContext context, enum poptCallbackReason reason, split_and_iterate (arg, ",", prepare_for_load_plugin_func); break; case ARG_SCHEDULER: - gst_schedulerfactory_set_default_name (arg); + gst_scheduler_factory_set_default_name (arg); break; default: g_warning ("option %d not recognized", option->val); diff --git a/gst/gstautoplug.c b/gst/gstautoplug.c index 2992d297b0..74f7085025 100644 --- a/gst/gstautoplug.c +++ b/gst/gstautoplug.c @@ -168,19 +168,19 @@ gst_autoplug_to_renderers (GstAutoplug *autoplug, GstCaps *srccaps, GstElement * return element; } -static void gst_autoplugfactory_class_init (GstAutoplugFactoryClass *klass); -static void gst_autoplugfactory_init (GstAutoplugFactory *factory); +static void gst_autoplug_factory_class_init (GstAutoplugFactoryClass *klass); +static void gst_autoplug_factory_init (GstAutoplugFactory *factory); #ifndef GST_DISABLE_REGISTRY -static xmlNodePtr gst_autoplugfactory_save_thyself (GstObject *object, xmlNodePtr parent); -static void gst_autoplugfactory_restore_thyself (GstObject *object, xmlNodePtr parent); +static xmlNodePtr gst_autoplug_factory_save_thyself (GstObject *object, xmlNodePtr parent); +static void gst_autoplug_factory_restore_thyself (GstObject *object, xmlNodePtr parent); #endif static GstPluginFeatureClass *factory_parent_class = NULL; -/* static guint gst_autoplugfactory_signals[LAST_SIGNAL] = { 0 }; */ +/* static guint gst_autoplug_factory_signals[LAST_SIGNAL] = { 0 }; */ GType -gst_autoplugfactory_get_type (void) +gst_autoplug_factory_get_type (void) { static GType autoplugfactory_type = 0; @@ -189,12 +189,12 @@ gst_autoplugfactory_get_type (void) sizeof (GstAutoplugFactoryClass), NULL, NULL, - (GClassInitFunc) gst_autoplugfactory_class_init, + (GClassInitFunc) gst_autoplug_factory_class_init, NULL, NULL, sizeof(GstAutoplugFactory), 0, - (GInstanceInitFunc) gst_autoplugfactory_init, + (GInstanceInitFunc) gst_autoplug_factory_init, NULL }; autoplugfactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE, @@ -204,7 +204,7 @@ gst_autoplugfactory_get_type (void) } static void -gst_autoplugfactory_class_init (GstAutoplugFactoryClass *klass) +gst_autoplug_factory_class_init (GstAutoplugFactoryClass *klass) { GObjectClass *gobject_class; GstObjectClass *gstobject_class; @@ -217,22 +217,22 @@ gst_autoplugfactory_class_init (GstAutoplugFactoryClass *klass) factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE); #ifndef GST_DISABLE_REGISTRY - gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_autoplugfactory_save_thyself); - gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_autoplugfactory_restore_thyself); + gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_autoplug_factory_save_thyself); + gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_autoplug_factory_restore_thyself); #endif _gst_autoplugfactories = NULL; } static void -gst_autoplugfactory_init (GstAutoplugFactory *factory) +gst_autoplug_factory_init (GstAutoplugFactory *factory) { _gst_autoplugfactories = g_list_prepend (_gst_autoplugfactories, factory); } /** - * gst_autoplugfactory_new: + * gst_autoplug_factory_new: * @name: name of autoplugfactory to create * @longdesc: long description of autoplugfactory to create * @type: the gtk type of the GstAutoplug element of this factory @@ -242,14 +242,14 @@ gst_autoplugfactory_init (GstAutoplugFactory *factory) * Returns: a new #GstAutoplugFactory. */ GstAutoplugFactory* -gst_autoplugfactory_new (const gchar *name, const gchar *longdesc, GType type) +gst_autoplug_factory_new (const gchar *name, const gchar *longdesc, GType type) { GstAutoplugFactory *factory; g_return_val_if_fail(name != NULL, NULL); - factory = gst_autoplugfactory_find (name); + factory = gst_autoplug_factory_find (name); if (!factory) { - factory = GST_AUTOPLUGFACTORY (g_object_new (GST_TYPE_AUTOPLUGFACTORY, NULL)); + factory = GST_AUTOPLUG_FACTORY (g_object_new (GST_TYPE_AUTOPLUG_FACTORY, NULL)); } gst_object_set_name (GST_OBJECT (factory), name); @@ -262,13 +262,13 @@ gst_autoplugfactory_new (const gchar *name, const gchar *longdesc, GType type) } /** - * gst_autoplugfactory_destroy: + * gst_autoplug_factory_destroy: * @factory: factory to destroy * * Removes the autoplug from the global list. */ void -gst_autoplugfactory_destroy (GstAutoplugFactory *factory) +gst_autoplug_factory_destroy (GstAutoplugFactory *factory) { g_return_if_fail (factory != NULL); @@ -278,7 +278,7 @@ gst_autoplugfactory_destroy (GstAutoplugFactory *factory) } /** - * gst_autoplugfactory_find: + * gst_autoplug_factory_find: * @name: name of autoplugfactory to find * * Search for an autoplugfactory of the given name. @@ -286,7 +286,7 @@ gst_autoplugfactory_destroy (GstAutoplugFactory *factory) * Returns: #GstAutoplugFactory if found, NULL otherwise */ GstAutoplugFactory* -gst_autoplugfactory_find (const gchar *name) +gst_autoplug_factory_find (const gchar *name) { GList *walk; GstAutoplugFactory *factory; @@ -307,20 +307,20 @@ gst_autoplugfactory_find (const gchar *name) } /** - * gst_autoplugfactory_get_list: + * gst_autoplug_factory_get_list: * * Get the global list of autoplugfactories. * * Returns: GList of type #GstAutoplugFactory */ GList* -gst_autoplugfactory_get_list (void) +gst_autoplug_factory_get_list (void) { return _gst_autoplugfactories; } /** - * gst_autoplugfactory_create: + * gst_autoplug_factory_create: * @factory: the factory used to create the instance * * Create a new #GstAutoplug instance from the @@ -329,7 +329,7 @@ gst_autoplugfactory_get_list (void) * Returns: A new #GstAutoplug instance. */ GstAutoplug* -gst_autoplugfactory_create (GstAutoplugFactory *factory) +gst_autoplug_factory_create (GstAutoplugFactory *factory) { GstAutoplug *new = NULL; @@ -345,7 +345,7 @@ gst_autoplugfactory_create (GstAutoplugFactory *factory) } /** - * gst_autoplugfactory_make: + * gst_autoplug_factory_make: * @name: the name of the factory used to create the instance * * Create a new #GstAutoplug instance from the @@ -354,29 +354,29 @@ gst_autoplugfactory_create (GstAutoplugFactory *factory) * Returns: A new #GstAutoplug instance. */ GstAutoplug* -gst_autoplugfactory_make (const gchar *name) +gst_autoplug_factory_make (const gchar *name) { GstAutoplugFactory *factory; g_return_val_if_fail (name != NULL, NULL); - factory = gst_autoplugfactory_find (name); + factory = gst_autoplug_factory_find (name); if (factory == NULL) return NULL; - return gst_autoplugfactory_create (factory); + return gst_autoplug_factory_create (factory); } #ifndef GST_DISABLE_REGISTRY static xmlNodePtr -gst_autoplugfactory_save_thyself (GstObject *object, xmlNodePtr parent) +gst_autoplug_factory_save_thyself (GstObject *object, xmlNodePtr parent) { GstAutoplugFactory *factory; - g_return_val_if_fail(GST_IS_AUTOPLUGFACTORY (object), parent); + g_return_val_if_fail(GST_IS_AUTOPLUG_FACTORY (object), parent); - factory = GST_AUTOPLUGFACTORY (object); + factory = GST_AUTOPLUG_FACTORY (object); if (GST_OBJECT_CLASS (factory_parent_class)->save_thyself) { GST_OBJECT_CLASS (factory_parent_class)->save_thyself (object, parent); @@ -388,7 +388,7 @@ gst_autoplugfactory_save_thyself (GstObject *object, xmlNodePtr parent) } /** - * gst_autoplugfactory_load_thyself: + * gst_autoplug_factory_load_thyself: * @parent: the parent XML node pointer * * Load an autoplugfactory from the given XML parent node. @@ -396,9 +396,9 @@ gst_autoplugfactory_save_thyself (GstObject *object, xmlNodePtr parent) * Returns: A new factory based on the XML node. */ static void -gst_autoplugfactory_restore_thyself (GstObject *object, xmlNodePtr parent) +gst_autoplug_factory_restore_thyself (GstObject *object, xmlNodePtr parent) { - GstAutoplugFactory *factory = GST_AUTOPLUGFACTORY (object); + GstAutoplugFactory *factory = GST_AUTOPLUG_FACTORY (object); xmlNodePtr children = parent->xmlChildrenNode; if (GST_OBJECT_CLASS (factory_parent_class)->restore_thyself) { diff --git a/gst/gstautoplug.h b/gst/gstautoplug.h index ec37e8ae88..5cc8da2ae9 100644 --- a/gst/gstautoplug.h +++ b/gst/gstautoplug.h @@ -83,16 +83,16 @@ GstElement* gst_autoplug_to_renderers (GstAutoplug *autoplug, GstCaps *srccaps * creating autopluggers * */ -#define GST_TYPE_AUTOPLUGFACTORY \ - (gst_autoplugfactory_get_type()) -#define GST_AUTOPLUGFACTORY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUTOPLUGFACTORY,GstAutoplugFactory)) -#define GST_AUTOPLUGFACTORY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUTOPLUGFACTORY,GstAutoplugFactoryClass)) -#define GST_IS_AUTOPLUGFACTORY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUTOPLUGFACTORY)) -#define GST_IS_AUTOPLUGFACTORY_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUTOPLUGFACTORY)) +#define GST_TYPE_AUTOPLUG_FACTORY \ + (gst_autoplug_factory_get_type()) +#define GST_AUTOPLUG_FACTORY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUTOPLUG_FACTORY,GstAutoplugFactory)) +#define GST_AUTOPLUG_FACTORY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUTOPLUG_FACTORY,GstAutoplugFactoryClass)) +#define GST_IS_AUTOPLUG_FACTORY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUTOPLUG_FACTORY)) +#define GST_IS_AUTOPLUG_FACTORY_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUTOPLUG_FACTORY)) typedef struct _GstAutoplugFactory GstAutoplugFactory; typedef struct _GstAutoplugFactoryClass GstAutoplugFactoryClass; @@ -108,16 +108,16 @@ struct _GstAutoplugFactoryClass { GstPluginFeatureClass parent; }; -GType gst_autoplugfactory_get_type (void); +GType gst_autoplug_factory_get_type (void); -GstAutoplugFactory* gst_autoplugfactory_new (const gchar *name, const gchar *longdesc, GType type); -void gst_autoplugfactory_destroy (GstAutoplugFactory *factory); +GstAutoplugFactory* gst_autoplug_factory_new (const gchar *name, const gchar *longdesc, GType type); +void gst_autoplug_factory_destroy (GstAutoplugFactory *factory); -GstAutoplugFactory* gst_autoplugfactory_find (const gchar *name); -GList* gst_autoplugfactory_get_list (void); +GstAutoplugFactory* gst_autoplug_factory_find (const gchar *name); +GList* gst_autoplug_factory_get_list (void); -GstAutoplug* gst_autoplugfactory_create (GstAutoplugFactory *factory); -GstAutoplug* gst_autoplugfactory_make (const gchar *name); +GstAutoplug* gst_autoplug_factory_create (GstAutoplugFactory *factory); +GstAutoplug* gst_autoplug_factory_make (const gchar *name); #ifdef __cplusplus } @@ -130,15 +130,15 @@ GstAutoplug* gst_autoplugfactory_make (const gchar *name); #pragma GCC poison gst_autoplug_to_caps #pragma GCC poison gst_autoplug_to_renderers -#pragma GCC poison gst_autoplugfactory_get_type -#pragma GCC poison gst_autoplugfactory_new -#pragma GCC poison gst_autoplugfactory_destroy +#pragma GCC poison gst_autoplug_factory_get_type +#pragma GCC poison gst_autoplug_factory_new +#pragma GCC poison gst_autoplug_factory_destroy -#pragma GCC poison gst_autoplugfactory_find -#pragma GCC poison gst_autoplugfactory_get_list +#pragma GCC poison gst_autoplug_factory_find +#pragma GCC poison gst_autoplug_factory_get_list -#pragma GCC poison gst_autoplugfactory_create -#pragma GCC poison gst_autoplugfactory_make +#pragma GCC poison gst_autoplug_factory_create +#pragma GCC poison gst_autoplug_factory_make #endif /* GST_DISABLE_AUTOPLUG */ diff --git a/gst/gstbin.c b/gst/gstbin.c index a855a4741c..c1fc6418ac 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -148,7 +148,7 @@ gst_bin_init (GstBin * bin) GstElement * gst_bin_new (const gchar * name) { - return gst_elementfactory_make ("bin", name); + return gst_element_factory_make ("bin", name); } /** diff --git a/gst/gstcaps.c b/gst/gstcaps.c index da1bd48166..d33fc9c997 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -60,7 +60,7 @@ get_type_for_mime (const gchar *mime) definition.exts = NULL; definition.typefindfunc = NULL; - factory = gst_typefactory_new (&definition); + factory = gst_type_factory_new (&definition); typeid = gst_type_register (factory); } diff --git a/gst/gstelement.c b/gst/gstelement.c index e5c313c4bf..25cf224a32 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -570,17 +570,17 @@ gst_element_get_request_pad (GstElement *element, const gchar *name) g_return_val_if_fail (name != NULL, NULL); if (strstr (name, "%")) { - templ = gst_element_get_padtemplate_by_name (element, name); + templ = gst_element_get_pad_template (element, name); req_name = NULL; if (templ) templ_found = TRUE; } else { - list = gst_element_get_padtemplate_list(element); + list = gst_element_get_pad_template_list(element); while (!templ_found && list) { templ = (GstPadTemplate*) list->data; if (templ->presence == GST_PAD_REQUEST) { /* we know that %s and %d are the only possibilities because of sanity - checks in gst_padtemplate_new */ + checks in gst_pad_template_new */ GST_DEBUG (GST_CAT_PADS, "comparing %s to %s", name, templ->name_template); if ((str = strchr (templ->name_template, '%')) && strncmp (templ->name_template, name, str - templ->name_template) == 0 && @@ -633,28 +633,28 @@ gst_element_get_pad_list (GstElement *element) } /** - * gst_element_class_add_padtemplate: + * gst_element_class_add_pad_template: * @klass: element class to add padtemplate to * @templ: padtemplate to add * * Add a padtemplate to an element class. This is useful if you have derived a custom * bin and wish to provide an on-request pad at runtime. Plugin writers should use - * gst_elementfactory_add_padtemplate instead. + * gst_element_factory_add_pad_template instead. */ void -gst_element_class_add_padtemplate (GstElementClass *klass, GstPadTemplate *templ) +gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ) { g_return_if_fail (klass != NULL); g_return_if_fail (GST_IS_ELEMENT_CLASS (klass)); g_return_if_fail (templ != NULL); - g_return_if_fail (GST_IS_PADTEMPLATE (templ)); + g_return_if_fail (GST_IS_PAD_TEMPLATE (templ)); klass->padtemplates = g_list_append (klass->padtemplates, templ); klass->numpadtemplates++; } /** - * gst_element_get_padtemplate_list: + * gst_element_get_pad_template_list: * @element: element to get padtemplates of * * Retrieve a list of the padtemplates associated with the element. @@ -662,7 +662,7 @@ gst_element_class_add_padtemplate (GstElementClass *klass, GstPadTemplate *templ * Returns: GList of padtemplates */ GList* -gst_element_get_padtemplate_list (GstElement *element) +gst_element_get_pad_template_list (GstElement *element) { g_return_val_if_fail (element != NULL, NULL); g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); @@ -671,17 +671,17 @@ gst_element_get_padtemplate_list (GstElement *element) } /** - * gst_element_get_padtemplate_by_name: + * gst_element_get_pad_template: * @element: element to get padtemplate of * @name: the name of the padtemplate to get. * * Retrieve a padtemplate from this element with the * given name. * - * Returns: the padtemplate with the given name + * Returns: the padtemplate with the given name. No unreferencing is necessary. */ GstPadTemplate* -gst_element_get_padtemplate_by_name (GstElement *element, const guchar *name) +gst_element_get_pad_template (GstElement *element, const guchar *name) { GList *padlist; @@ -689,7 +689,7 @@ gst_element_get_padtemplate_by_name (GstElement *element, const guchar *name) g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); g_return_val_if_fail (name != NULL, NULL); - padlist = gst_element_get_padtemplate_list (element); + padlist = gst_element_get_pad_template_list (element); while (padlist) { GstPadTemplate *padtempl = (GstPadTemplate*) padlist->data; @@ -704,28 +704,28 @@ gst_element_get_padtemplate_by_name (GstElement *element, const guchar *name) } /** - * gst_element_get_padtemplate_by_compatible: + * gst_element_get_pad_template_by_compatible: * @element: element to get padtemplate of * @templ: a template to find a compatible template for * * Generate a padtemplate for this element compatible with the given * template, ie able to link to it. * - * Returns: the padtemplate + * Returns: the padtemplate. No unreferencing is necessary. */ static GstPadTemplate* -gst_element_get_padtemplate_by_compatible (GstElement *element, GstPadTemplate *compattempl) +gst_element_get_pad_template_by_compatible (GstElement *element, GstPadTemplate *compattempl) { GstPadTemplate *newtempl = NULL; GList *padlist; - GST_DEBUG(GST_CAT_ELEMENT_PADS,"gst_element_get_padtemplate_by_compatible()"); + GST_DEBUG(GST_CAT_ELEMENT_PADS,"gst_element_get_pad_template_by_compatible()"); g_return_val_if_fail (element != NULL, NULL); g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); g_return_val_if_fail (compattempl != NULL, NULL); - padlist = gst_element_get_padtemplate_list (element); + padlist = gst_element_get_pad_template_list (element); while (padlist) { GstPadTemplate *padtempl = (GstPadTemplate*) padlist->data; @@ -740,14 +740,14 @@ gst_element_get_padtemplate_by_compatible (GstElement *element, GstPadTemplate * if (padtempl->direction == GST_PAD_SRC && compattempl->direction == GST_PAD_SINK) { GST_DEBUG(GST_CAT_CAPS,"compatible direction: found src pad template"); - compat = gst_caps_check_compatibility(GST_PADTEMPLATE_CAPS (padtempl), - GST_PADTEMPLATE_CAPS (compattempl)); + compat = gst_caps_check_compatibility(GST_PAD_TEMPLATE_CAPS (padtempl), + GST_PAD_TEMPLATE_CAPS (compattempl)); GST_DEBUG(GST_CAT_CAPS,"caps are %scompatible", (compat?"":"not ")); } else if (padtempl->direction == GST_PAD_SINK && compattempl->direction == GST_PAD_SRC) { GST_DEBUG(GST_CAT_CAPS,"compatible direction: found sink pad template"); - compat = gst_caps_check_compatibility(GST_PADTEMPLATE_CAPS (compattempl), - GST_PADTEMPLATE_CAPS (padtempl)); + compat = gst_caps_check_compatibility(GST_PAD_TEMPLATE_CAPS (compattempl), + GST_PAD_TEMPLATE_CAPS (padtempl)); GST_DEBUG(GST_CAT_CAPS,"caps are %scompatible", (compat?"":"not ")); } @@ -784,7 +784,7 @@ gst_element_request_compatible_pad (GstElement *element, GstPadTemplate *templ) g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); g_return_val_if_fail (templ != NULL, NULL); - templ_new = gst_element_get_padtemplate_by_compatible (element, templ); + templ_new = gst_element_get_pad_template_by_compatible (element, templ); if (templ_new != NULL) pad = gst_element_request_pad (element, templ_new, NULL); @@ -844,7 +844,7 @@ gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad, GstCa templcaps = gst_caps_copy (gst_pad_get_caps (pad)); } - templ = gst_padtemplate_new ((gchar *) GST_PAD_NAME (pad), GST_RPAD_DIRECTION (pad), + templ = gst_pad_template_new ((gchar *) GST_PAD_NAME (pad), GST_RPAD_DIRECTION (pad), GST_PAD_ALWAYS, templcaps, NULL); foundpad = gst_element_request_compatible_pad (element, templ); gst_object_unref (GST_OBJECT (templ)); /* this will take care of the caps too */ @@ -852,7 +852,7 @@ gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad, GstCa /* FIXME: this is broken, but it's in here so autoplugging elements that don't have caps on their source padtemplates (spider) can connect... */ if (!foundpad && !filtercaps) { - templ = gst_padtemplate_new ((gchar *) GST_PAD_NAME (pad), GST_RPAD_DIRECTION (pad), + templ = gst_pad_template_new ((gchar *) GST_PAD_NAME (pad), GST_RPAD_DIRECTION (pad), GST_PAD_ALWAYS, NULL, NULL); foundpad = gst_element_request_compatible_pad (element, templ); gst_object_unref (GST_OBJECT (templ)); @@ -943,8 +943,8 @@ gst_element_connect_filtered (GstElement *src, GstElement *dest, } GST_DEBUG (GST_CAT_ELEMENT_PADS, "we might have request pads on both sides, checking..."); - srctempls = gst_element_get_padtemplate_list (src); - desttempls = gst_element_get_padtemplate_list (dest); + srctempls = gst_element_get_pad_template_list (src); + desttempls = gst_element_get_pad_template_list (dest); if (srctempls && desttempls) { while (srctempls) { @@ -953,8 +953,8 @@ gst_element_connect_filtered (GstElement *src, GstElement *dest, for (l=desttempls; l; l=l->next) { desttempl = (GstPadTemplate*) desttempls->data; if (desttempl->presence == GST_PAD_REQUEST && desttempl->direction != srctempl->direction) { - if (gst_caps_check_compatibility (gst_padtemplate_get_caps (srctempl), - gst_padtemplate_get_caps (desttempl))) { + if (gst_caps_check_compatibility (gst_pad_template_get_caps (srctempl), + gst_pad_template_get_caps (desttempl))) { srcpad = gst_element_get_request_pad (src, srctempl->name_template); destpad = gst_element_get_request_pad (dest, desttempl->name_template); if (gst_pad_connect_filtered (srcpad, destpad, filtercaps)) { diff --git a/gst/gstelement.h b/gst/gstelement.h index a99a143138..a04d677a08 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -172,7 +172,7 @@ struct _GstElementClass { GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ, const gchar* name); }; -void gst_element_class_add_padtemplate (GstElementClass *klass, GstPadTemplate *templ); +void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ); GType gst_element_get_type (void); #define gst_element_destroy(element) gst_object_destroy (GST_OBJECT (element)) @@ -205,8 +205,8 @@ GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name); GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name); GList* gst_element_get_pad_list (GstElement *element); -GList* gst_element_get_padtemplate_list (GstElement *element); -GstPadTemplate* gst_element_get_padtemplate_by_name (GstElement *element, const guchar *name); +GList* gst_element_get_pad_template_list (GstElement *element); +GstPadTemplate* gst_element_get_pad_template (GstElement *element, const guchar *name); GstPad* gst_element_get_compatible_pad (GstElement *element, GstPad *pad); GstPad* gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad, @@ -264,13 +264,13 @@ struct _GstElementDetails { gchar *copyright; /* copyright details (year, etc.) */ }; -#define GST_TYPE_ELEMENTFACTORY (gst_elementfactory_get_type()) -#define GST_ELEMENTFACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ELEMENTFACTORY,\ +#define GST_TYPE_ELEMENT_FACTORY (gst_element_factory_get_type()) +#define GST_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ELEMENT_FACTORY,\ GstElementFactory)) -#define GST_ELEMENTFACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ELEMENTFACTORY,\ +#define GST_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ELEMENT_FACTORY,\ GstElementFactoryClass)) -#define GST_IS_ELEMENTFACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ELEMENTFACTORY)) -#define GST_IS_ELEMENTFACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENTFACTORY)) +#define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ELEMENT_FACTORY)) +#define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT_FACTORY)) struct _GstElementFactory { GstPluginFeature feature; @@ -289,26 +289,26 @@ struct _GstElementFactoryClass { GstPluginFeatureClass parent_class; }; -GType gst_elementfactory_get_type (void); +GType gst_element_factory_get_type (void); -GstElementFactory* gst_elementfactory_new (const gchar *name,GType type, +GstElementFactory* gst_element_factory_new (const gchar *name,GType type, GstElementDetails *details); -GstElementFactory* gst_elementfactory_find (const gchar *name); -const GList* gst_elementfactory_get_list (void); +GstElementFactory* gst_element_factory_find (const gchar *name); +const GList* gst_element_factory_get_list (void); -void gst_elementfactory_add_padtemplate (GstElementFactory *elementfactory, +void gst_element_factory_add_pad_template (GstElementFactory *elementfactory, GstPadTemplate *templ); -gboolean gst_elementfactory_can_src_caps (GstElementFactory *factory, +gboolean gst_element_factory_can_src_caps (GstElementFactory *factory, GstCaps *caps); -gboolean gst_elementfactory_can_sink_caps (GstElementFactory *factory, +gboolean gst_element_factory_can_sink_caps (GstElementFactory *factory, GstCaps *caps); -GstElement* gst_elementfactory_create (GstElementFactory *factory, +GstElement* gst_element_factory_create (GstElementFactory *factory, const gchar *name); /* FIXME this name is wrong, probably so is the one above it */ -GstElement* gst_elementfactory_make (const gchar *factoryname, const gchar *name); +GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name); #ifdef __cplusplus } diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index 24c7cddc6f..19f793120c 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -25,24 +25,24 @@ #include "gstelement.h" -static void gst_elementfactory_class_init (GstElementFactoryClass *klass); -static void gst_elementfactory_init (GstElementFactory *factory); +static void gst_element_factory_class_init (GstElementFactoryClass *klass); +static void gst_element_factory_init (GstElementFactory *factory); #ifndef GST_DISABLE_REGISTRY -static void gst_elementfactory_restore_thyself (GstObject *object, xmlNodePtr parent); -static xmlNodePtr gst_elementfactory_save_thyself (GstObject *object, xmlNodePtr parent); +static void gst_element_factory_restore_thyself (GstObject *object, xmlNodePtr parent); +static xmlNodePtr gst_element_factory_save_thyself (GstObject *object, xmlNodePtr parent); #endif -static void gst_elementfactory_unload_thyself (GstPluginFeature *feature); +static void gst_element_factory_unload_thyself (GstPluginFeature *feature); /* global list of registered elementfactories */ static GList* _gst_elementfactories; static GstPluginFeatureClass *parent_class = NULL; -/* static guint gst_elementfactory_signals[LAST_SIGNAL] = { 0 }; */ +/* static guint gst_element_factory_signals[LAST_SIGNAL] = { 0 }; */ GType -gst_elementfactory_get_type (void) +gst_element_factory_get_type (void) { static GType elementfactory_type = 0; @@ -51,12 +51,12 @@ gst_elementfactory_get_type (void) sizeof (GstElementFactoryClass), NULL, NULL, - (GClassInitFunc) gst_elementfactory_class_init, + (GClassInitFunc) gst_element_factory_class_init, NULL, NULL, sizeof(GstElementFactory), 0, - (GInstanceInitFunc) gst_elementfactory_init, + (GInstanceInitFunc) gst_element_factory_init, NULL }; elementfactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE, @@ -66,7 +66,7 @@ gst_elementfactory_get_type (void) } static void -gst_elementfactory_class_init (GstElementFactoryClass *klass) +gst_element_factory_class_init (GstElementFactoryClass *klass) { GObjectClass *gobject_class; GstObjectClass *gstobject_class; @@ -79,17 +79,17 @@ gst_elementfactory_class_init (GstElementFactoryClass *klass) parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE); #ifndef GST_DISABLE_REGISTRY - gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_elementfactory_save_thyself); - gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_elementfactory_restore_thyself); + gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_element_factory_save_thyself); + gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_element_factory_restore_thyself); #endif - gstpluginfeature_class->unload_thyself = GST_DEBUG_FUNCPTR (gst_elementfactory_unload_thyself); + gstpluginfeature_class->unload_thyself = GST_DEBUG_FUNCPTR (gst_element_factory_unload_thyself); _gst_elementfactories = NULL; } static void -gst_elementfactory_init (GstElementFactory *factory) +gst_element_factory_init (GstElementFactory *factory) { factory->padtemplates = NULL; factory->numpadtemplates = 0; @@ -98,7 +98,7 @@ gst_elementfactory_init (GstElementFactory *factory) } /** - * gst_elementfactory_find: + * gst_element_factory_find: * @name: name of factory to find * * Search for an elementfactory of the given name. @@ -106,7 +106,7 @@ gst_elementfactory_init (GstElementFactory *factory) * Returns: #GstElementFactory if found, NULL otherwise */ GstElementFactory* -gst_elementfactory_find (const gchar *name) +gst_element_factory_find (const gchar *name) { GList *walk; GstElementFactory *factory; @@ -122,19 +122,19 @@ gst_elementfactory_find (const gchar *name) } /* this should be an ERROR */ - GST_DEBUG (GST_CAT_ELEMENTFACTORY,"no such elementfactory \"%s\"", name); + GST_DEBUG (GST_CAT_ELEMENT_FACTORY,"no such elementfactory \"%s\"", name); return NULL; } /** - * gst_elementfactory_get_list: + * gst_element_factory_get_list: * * Get the global list of elementfactories. * * Returns: GList of type #GstElementFactory */ const GList* -gst_elementfactory_get_list (void) +gst_element_factory_get_list (void) { return _gst_elementfactories; } @@ -160,7 +160,7 @@ gst_element_details_free (GstElementDetails *dp) } /** - * gst_elementfactory_new: + * gst_element_factory_new: * @name: name of new elementfactory * @type: GType of new element * @details: #GstElementDetails structure with element details @@ -171,7 +171,7 @@ gst_element_details_free (GstElementDetails *dp) * Returns: new elementfactory */ GstElementFactory* -gst_elementfactory_new (const gchar *name, GType type, +gst_element_factory_new (const gchar *name, GType type, GstElementDetails *details) { GstElementFactory *factory; @@ -180,10 +180,10 @@ gst_elementfactory_new (const gchar *name, GType type, g_return_val_if_fail (type, NULL); g_return_val_if_fail (details, NULL); - factory = gst_elementfactory_find (name); + factory = gst_element_factory_find (name); if (!factory) - factory = GST_ELEMENTFACTORY (g_object_new (GST_TYPE_ELEMENTFACTORY, NULL)); + factory = GST_ELEMENT_FACTORY (g_object_new (GST_TYPE_ELEMENT_FACTORY, NULL)); if (factory->details_dynamic) { @@ -204,7 +204,7 @@ gst_elementfactory_new (const gchar *name, GType type, } /** - * gst_elementfactory_create: + * gst_element_factory_create: * @factory: factory to instantiate * @name: name of new element * @@ -215,7 +215,7 @@ gst_elementfactory_new (const gchar *name, GType type, * Returns: new #GstElement */ GstElement * -gst_elementfactory_create (GstElementFactory *factory, +gst_element_factory_create (GstElementFactory *factory, const gchar *name) { GstElement *element; @@ -223,7 +223,7 @@ gst_elementfactory_create (GstElementFactory *factory, g_return_val_if_fail(factory != NULL, NULL); - GST_DEBUG (GST_CAT_ELEMENTFACTORY,"creating element from factory \"%s\" with name \"%s\" and type %d", + GST_DEBUG (GST_CAT_ELEMENT_FACTORY,"creating element from factory \"%s\" with name \"%s\" and type %d", GST_OBJECT_NAME (factory), name, (gint) factory->type); if (!gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) @@ -242,7 +242,7 @@ gst_elementfactory_create (GstElementFactory *factory, /* attempt to set the elemenfactory class pointer if necessary */ oclass = GST_ELEMENT_CLASS(G_OBJECT_GET_CLASS(element)); if (oclass->elementfactory == NULL) { - GST_DEBUG (GST_CAT_ELEMENTFACTORY,"class %s", GST_OBJECT_NAME (factory)); + GST_DEBUG (GST_CAT_ELEMENT_FACTORY,"class %s", GST_OBJECT_NAME (factory)); oclass->elementfactory = factory; /* copy pad template pointers to the element class, allow for custom padtemplates */ @@ -256,7 +256,7 @@ gst_elementfactory_create (GstElementFactory *factory, } /** - * gst_elementfactory_make: + * gst_element_factory_make: * @factoryname: a named factory to instantiate * @name: name of new element * @@ -267,24 +267,24 @@ gst_elementfactory_create (GstElementFactory *factory, * Returns: new #GstElement (or NULL if unable to create element) */ GstElement* -gst_elementfactory_make (const gchar *factoryname, const gchar *name) +gst_element_factory_make (const gchar *factoryname, const gchar *name) { GstElementFactory *factory; GstElement *element; g_return_val_if_fail (factoryname != NULL, NULL); - GST_DEBUG (GST_CAT_ELEMENTFACTORY, "gstelementfactory: make \"%s\" \"%s\"", factoryname, name); + GST_DEBUG (GST_CAT_ELEMENT_FACTORY, "gstelementfactory: make \"%s\" \"%s\"", factoryname, name); - /* gst_plugin_load_elementfactory(factoryname); */ - factory = gst_elementfactory_find(factoryname); + /* gst_plugin_load_element_factory(factoryname); */ + factory = gst_element_factory_find(factoryname); if (factory == NULL) { - GST_INFO (GST_CAT_ELEMENTFACTORY,"no such elementfactory \"%s\"!",factoryname); + GST_INFO (GST_CAT_ELEMENT_FACTORY,"no such elementfactory \"%s\"!",factoryname); return NULL; } - element = gst_elementfactory_create(factory,name); + element = gst_element_factory_create(factory,name); if (element == NULL) { - GST_INFO (GST_CAT_ELEMENTFACTORY,"couldn't create instance of elementfactory \"%s\"!",factoryname); + GST_INFO (GST_CAT_ELEMENT_FACTORY,"couldn't create instance of elementfactory \"%s\"!",factoryname); return NULL; } @@ -292,14 +292,14 @@ gst_elementfactory_make (const gchar *factoryname, const gchar *name) } /** - * gst_elementfactory_add_padtemplate : + * gst_element_factory_add_pad_template : * @elementfactory: factory to add the src id to * @templ: the padtemplate to add * * Add the given padtemplate to this elementfactory. */ void -gst_elementfactory_add_padtemplate (GstElementFactory *factory, +gst_element_factory_add_pad_template (GstElementFactory *factory, GstPadTemplate *templ) { GList *padtemplates; @@ -312,7 +312,7 @@ gst_elementfactory_add_padtemplate (GstElementFactory *factory, gst_object_ref (GST_OBJECT (templ)); while (padtemplates) { - GstPadTemplate *oldtempl = GST_PADTEMPLATE (padtemplates->data); + GstPadTemplate *oldtempl = GST_PAD_TEMPLATE (padtemplates->data); if (!strcmp (oldtempl->name_template, templ->name_template)) { gst_object_unref (GST_OBJECT (oldtempl)); @@ -327,7 +327,7 @@ gst_elementfactory_add_padtemplate (GstElementFactory *factory, } /** - * gst_elementfactory_can_src_caps : + * gst_element_factory_can_src_caps : * @factory: factory to query * @caps: the caps to check * @@ -336,7 +336,7 @@ gst_elementfactory_add_padtemplate (GstElementFactory *factory, * Returns: true if it can src the capabilities */ gboolean -gst_elementfactory_can_src_caps (GstElementFactory *factory, +gst_element_factory_can_src_caps (GstElementFactory *factory, GstCaps *caps) { GList *templates; @@ -350,7 +350,7 @@ gst_elementfactory_can_src_caps (GstElementFactory *factory, GstPadTemplate *template = (GstPadTemplate *)templates->data; if (template->direction == GST_PAD_SRC) { - if (gst_caps_check_compatibility (GST_PADTEMPLATE_CAPS (template), caps)) + if (gst_caps_check_compatibility (GST_PAD_TEMPLATE_CAPS (template), caps)) return TRUE; } templates = g_list_next (templates); @@ -360,7 +360,7 @@ gst_elementfactory_can_src_caps (GstElementFactory *factory, } /** - * gst_elementfactory_can_sink_caps : + * gst_element_factory_can_sink_caps : * @factory: factory to query * @caps: the caps to check * @@ -369,7 +369,7 @@ gst_elementfactory_can_src_caps (GstElementFactory *factory, * Returns: true if it can sink the capabilities */ gboolean -gst_elementfactory_can_sink_caps (GstElementFactory *factory, +gst_element_factory_can_sink_caps (GstElementFactory *factory, GstCaps *caps) { GList *templates; @@ -383,7 +383,7 @@ gst_elementfactory_can_sink_caps (GstElementFactory *factory, GstPadTemplate *template = (GstPadTemplate *)templates->data; if (template->direction == GST_PAD_SINK) { - if (gst_caps_check_compatibility (caps, GST_PADTEMPLATE_CAPS (template))) + if (gst_caps_check_compatibility (caps, GST_PAD_TEMPLATE_CAPS (template))) return TRUE; } templates = g_list_next (templates); @@ -393,24 +393,24 @@ gst_elementfactory_can_sink_caps (GstElementFactory *factory, } static void -gst_elementfactory_unload_thyself (GstPluginFeature *feature) +gst_element_factory_unload_thyself (GstPluginFeature *feature) { GstElementFactory *factory; - factory = GST_ELEMENTFACTORY (feature); + factory = GST_ELEMENT_FACTORY (feature); factory->type = 0; } #ifndef GST_DISABLE_REGISTRY static xmlNodePtr -gst_elementfactory_save_thyself (GstObject *object, +gst_element_factory_save_thyself (GstObject *object, xmlNodePtr parent) { GList *pads; GstElementFactory *factory; - factory = GST_ELEMENTFACTORY (object); + factory = GST_ELEMENT_FACTORY (object); if (GST_OBJECT_CLASS (parent_class)->save_thyself) { GST_OBJECT_CLASS (parent_class)->save_thyself (object, parent); @@ -438,7 +438,7 @@ gst_elementfactory_save_thyself (GstObject *object, GstPadTemplate *padtemplate = (GstPadTemplate *)pads->data; subtree = xmlNewChild(parent, NULL, "padtemplate", NULL); - gst_padtemplate_save_thyself(padtemplate, subtree); + gst_pad_template_save_thyself(padtemplate, subtree); pads = g_list_next (pads); } @@ -447,9 +447,9 @@ gst_elementfactory_save_thyself (GstObject *object, } static void -gst_elementfactory_restore_thyself (GstObject *object, xmlNodePtr parent) +gst_element_factory_restore_thyself (GstObject *object, xmlNodePtr parent) { - GstElementFactory *factory = GST_ELEMENTFACTORY (object); + GstElementFactory *factory = GST_ELEMENT_FACTORY (object); xmlNodePtr children = parent->xmlChildrenNode; factory->details_dynamic = TRUE; @@ -482,9 +482,9 @@ gst_elementfactory_restore_thyself (GstObject *object, xmlNodePtr parent) if (!strcmp(children->name, "padtemplate")) { GstPadTemplate *template; - template = gst_padtemplate_load_thyself (children); + template = gst_pad_template_load_thyself (children); - gst_elementfactory_add_padtemplate (factory, template); + gst_element_factory_add_pad_template (factory, template); } children = children->next; diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 6f1668371e..ef1d189c72 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -125,7 +125,7 @@ const gchar *_gst_category_colors[32] = { [GST_CAT_CAPS] = "04;34", [GST_CAT_CLOCK] = "00;33", /* !! */ [GST_CAT_ELEMENT_PADS] = "01;37;41", /* !! */ - [GST_CAT_ELEMENTFACTORY] = "01;37;41", /* !! */ + [GST_CAT_ELEMENT_FACTORY] = "01;37;41", /* !! */ [GST_CAT_PADS] = "01;37;41", /* !! */ [GST_CAT_PIPELINE] = "01;37;41", /* !! */ [GST_CAT_PLUGIN_LOADING] = "00;36", diff --git a/gst/gstinfo.h b/gst/gstinfo.h index fb3d8c0760..89d467de22 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -74,7 +74,7 @@ enum { GST_CAT_CAPS, /* Capabilities matching */ GST_CAT_CLOCK, /* Clocking */ GST_CAT_ELEMENT_PADS, /* Element pad management */ - GST_CAT_ELEMENTFACTORY, /* Elementfactory stuff */ + GST_CAT_ELEMENT_FACTORY, /* Elementfactory stuff */ GST_CAT_PADS, /* Pad creation/connection */ GST_CAT_PIPELINE, /* Pipeline stuff */ GST_CAT_PLUGIN_LOADING, /* Plugin loading */ diff --git a/gst/gstpad.c b/gst/gstpad.c index ddc0f055f1..1c9d239e33 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -304,7 +304,7 @@ gst_pad_new_from_template (GstPadTemplate *templ, pad = gst_pad_new (name, templ->direction); gst_object_ref (GST_OBJECT (templ)); - GST_PAD_PADTEMPLATE (pad) = templ; + GST_PAD_PAD_TEMPLATE (pad) = templ; return pad; } @@ -799,7 +799,7 @@ gst_pad_get_parent (GstPad *pad) } /** - * gst_pad_get_padtemplate: + * gst_pad_get_pad_template: * @pad: the pad to get the padtemplate from * * Get the padtemplate object of this pad. @@ -807,12 +807,12 @@ gst_pad_get_parent (GstPad *pad) * Returns: the padtemplate object */ GstPadTemplate* -gst_pad_get_padtemplate (GstPad *pad) +gst_pad_get_pad_template (GstPad *pad) { g_return_val_if_fail (pad != NULL, NULL); g_return_val_if_fail (GST_IS_PAD (pad), NULL); - return GST_PAD_PADTEMPLATE (pad); + return GST_PAD_PAD_TEMPLATE (pad); } @@ -976,12 +976,12 @@ gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps *caps, gboolean notify) GST_INFO (GST_CAT_CAPS, "trying to set caps %p on pad %s:%s", caps, GST_DEBUG_PAD_NAME (pad)); - if ((template = gst_pad_get_padtemplate (GST_PAD_CAST (pad)))) { - if (!gst_caps_intersect (caps, gst_padtemplate_get_caps (template))) { + if ((template = gst_pad_get_pad_template (GST_PAD_CAST (pad)))) { + if (!gst_caps_intersect (caps, gst_pad_template_get_caps (template))) { GST_INFO (GST_CAT_CAPS, "caps did not intersect with %s:%s's padtemplate", GST_DEBUG_PAD_NAME (pad)); gst_caps_debug (caps, "caps themselves (attemped to set)"); - gst_caps_debug (gst_padtemplate_get_caps (template), + gst_caps_debug (gst_pad_template_get_caps (template), "pad template caps that did not agree with caps"); return GST_PAD_CONNECT_REFUSED; } @@ -1377,9 +1377,9 @@ gst_pad_get_caps (GstPad *pad) GST_DEBUG (GST_CAT_CAPS, "using pad get function"); return GST_RPAD_GETCAPSFUNC (realpad) (GST_PAD_CAST (realpad), NULL); } - else if (GST_PAD_PADTEMPLATE (realpad)) { + else if (GST_PAD_PAD_TEMPLATE (realpad)) { GST_DEBUG (GST_CAT_CAPS, "using pad template"); - return GST_PADTEMPLATE_CAPS (GST_PAD_PADTEMPLATE (realpad)); + return GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (realpad)); } GST_DEBUG (GST_CAT_CAPS, "pad has no caps"); @@ -1387,7 +1387,7 @@ gst_pad_get_caps (GstPad *pad) } /** - * gst_pad_get_padtemplate_caps: + * gst_pad_get_pad_template_caps: * @pad: the pad to get the capabilities from * * Get the capabilities of this pad. @@ -1395,20 +1395,20 @@ gst_pad_get_caps (GstPad *pad) * Returns: a list of the capabilities of this pad */ GstCaps* -gst_pad_get_padtemplate_caps (GstPad *pad) +gst_pad_get_pad_template_caps (GstPad *pad) { g_return_val_if_fail (pad != NULL, NULL); g_return_val_if_fail (GST_IS_PAD (pad), NULL); - if (GST_PAD_PADTEMPLATE (pad)) - return GST_PADTEMPLATE_CAPS (GST_PAD_PADTEMPLATE (pad)); + if (GST_PAD_PAD_TEMPLATE (pad)) + return GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (pad)); return NULL; } /** - * gst_padtemplate_get_caps_by_name: + * gst_pad_template_get_caps_by_name: * @templ: the padtemplate to get the capabilities from * @name: the name of the capability to get * @@ -1417,13 +1417,13 @@ gst_pad_get_padtemplate_caps (GstPad *pad) * Returns: a capability or NULL if not found */ GstCaps* -gst_padtemplate_get_caps_by_name (GstPadTemplate *templ, const gchar *name) +gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const gchar *name) { GstCaps *caps; g_return_val_if_fail (templ != NULL, NULL); - caps = GST_PADTEMPLATE_CAPS (templ); + caps = GST_PAD_TEMPLATE_CAPS (templ); if (!caps) return NULL; @@ -1574,10 +1574,10 @@ gst_real_pad_dispose (GObject *object) GST_DEBUG (GST_CAT_REFCOUNTING, "dispose %s:%s", GST_DEBUG_PAD_NAME(pad)); - if (GST_PAD_PADTEMPLATE (pad)){ - GST_DEBUG (GST_CAT_REFCOUNTING, "unreffing padtemplate'%s'", GST_OBJECT_NAME (GST_PAD_PADTEMPLATE (pad))); - gst_object_unref (GST_OBJECT (GST_PAD_PADTEMPLATE (pad))); - GST_PAD_PADTEMPLATE (pad) = NULL; + if (GST_PAD_PAD_TEMPLATE (pad)){ + GST_DEBUG (GST_CAT_REFCOUNTING, "unreffing padtemplate'%s'", GST_OBJECT_NAME (GST_PAD_PAD_TEMPLATE (pad))); + gst_object_unref (GST_OBJECT (GST_PAD_PAD_TEMPLATE (pad))); + GST_PAD_PAD_TEMPLATE (pad) = NULL; } /* we destroy the ghostpads, because they are nothing without the real pad */ @@ -1952,8 +1952,8 @@ gst_pad_selectv (GstPad *pad, ...) * templates * */ -static void gst_padtemplate_class_init (GstPadTemplateClass *klass); -static void gst_padtemplate_init (GstPadTemplate *templ); +static void gst_pad_template_class_init (GstPadTemplateClass *klass); +static void gst_pad_template_init (GstPadTemplate *templ); enum { TEMPL_PAD_CREATED, @@ -1962,10 +1962,10 @@ enum { }; static GstObject *padtemplate_parent_class = NULL; -static guint gst_padtemplate_signals[TEMPL_LAST_SIGNAL] = { 0 }; +static guint gst_pad_template_signals[TEMPL_LAST_SIGNAL] = { 0 }; GType -gst_padtemplate_get_type (void) +gst_pad_template_get_type (void) { static GType padtemplate_type = 0; @@ -1974,12 +1974,12 @@ gst_padtemplate_get_type (void) sizeof(GstPadTemplateClass), NULL, NULL, - (GClassInitFunc)gst_padtemplate_class_init, + (GClassInitFunc)gst_pad_template_class_init, NULL, NULL, sizeof(GstPadTemplate), 32, - (GInstanceInitFunc)gst_padtemplate_init, + (GInstanceInitFunc)gst_pad_template_init, NULL }; padtemplate_type = g_type_register_static(GST_TYPE_OBJECT, "GstPadTemplate", &padtemplate_info, 0); @@ -1988,7 +1988,7 @@ gst_padtemplate_get_type (void) } static void -gst_padtemplate_class_init (GstPadTemplateClass *klass) +gst_pad_template_class_init (GstPadTemplateClass *klass) { GObjectClass *gobject_class; GstObjectClass *gstobject_class; @@ -1998,7 +1998,7 @@ gst_padtemplate_class_init (GstPadTemplateClass *klass) padtemplate_parent_class = g_type_class_ref(GST_TYPE_OBJECT); - gst_padtemplate_signals[TEMPL_PAD_CREATED] = + gst_pad_template_signals[TEMPL_PAD_CREATED] = g_signal_new ("pad_created", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstPadTemplateClass, pad_created), NULL, NULL, gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, @@ -2009,7 +2009,7 @@ gst_padtemplate_class_init (GstPadTemplateClass *klass) } static void -gst_padtemplate_init (GstPadTemplate *templ) +gst_pad_template_init (GstPadTemplate *templ) { } @@ -2054,7 +2054,7 @@ name_is_valid (const gchar *name, GstPadPresence presence) } /** - * gst_padtemplate_new: + * gst_pad_template_new: * @name_template: the name template * @direction: the direction for the template * @presence: the presence of the pad @@ -2066,7 +2066,7 @@ name_is_valid (const gchar *name, GstPadPresence presence) * Returns: the new padtemplate */ GstPadTemplate* -gst_padtemplate_new (gchar *name_template, +gst_pad_template_new (gchar *name_template, GstPadDirection direction, GstPadPresence presence, GstCaps *caps, ...) { @@ -2079,11 +2079,11 @@ gst_padtemplate_new (gchar *name_template, if (!name_is_valid (name_template, presence)) return NULL; - new = g_object_new(gst_padtemplate_get_type () ,NULL); + new = g_object_new(gst_pad_template_get_type () ,NULL); - GST_PADTEMPLATE_NAME_TEMPLATE (new) = name_template; - GST_PADTEMPLATE_DIRECTION (new) = direction; - GST_PADTEMPLATE_PRESENCE (new) = presence; + GST_PAD_TEMPLATE_NAME_TEMPLATE (new) = name_template; + GST_PAD_TEMPLATE_DIRECTION (new) = direction; + GST_PAD_TEMPLATE_PRESENCE (new) = presence; va_start (var_args, caps); @@ -2094,13 +2094,13 @@ gst_padtemplate_new (gchar *name_template, } va_end (var_args); - GST_PADTEMPLATE_CAPS (new) = thecaps; + GST_PAD_TEMPLATE_CAPS (new) = thecaps; return new; } /** - * gst_padtemplate_get_caps: + * gst_pad_template_get_caps: * @templ: the padtemplate to use * * Get the capabilities of the padtemplate @@ -2108,16 +2108,16 @@ gst_padtemplate_new (gchar *name_template, * Returns: a GstCaps* */ GstCaps* -gst_padtemplate_get_caps (GstPadTemplate *templ) +gst_pad_template_get_caps (GstPadTemplate *templ) { g_return_val_if_fail (templ != NULL, NULL); - return GST_PADTEMPLATE_CAPS (templ); + return GST_PAD_TEMPLATE_CAPS (templ); } #ifndef GST_DISABLE_LOADSAVE /** - * gst_padtemplate_save_thyself: + * gst_pad_template_save_thyself: * @templ: the padtemplate to save * @parent: the parent XML tree * @@ -2126,7 +2126,7 @@ gst_padtemplate_get_caps (GstPadTemplate *templ) * Returns: the new XML tree */ xmlNodePtr -gst_padtemplate_save_thyself (GstPadTemplate *templ, xmlNodePtr parent) +gst_pad_template_save_thyself (GstPadTemplate *templ, xmlNodePtr parent) { xmlNodePtr subtree; guchar *presence; @@ -2152,16 +2152,16 @@ gst_padtemplate_save_thyself (GstPadTemplate *templ, xmlNodePtr parent) } xmlNewChild(parent,NULL,"presence", presence); - if (GST_PADTEMPLATE_CAPS (templ)) { + if (GST_PAD_TEMPLATE_CAPS (templ)) { subtree = xmlNewChild (parent, NULL, "caps", NULL); - gst_caps_save_thyself (GST_PADTEMPLATE_CAPS (templ), subtree); + gst_caps_save_thyself (GST_PAD_TEMPLATE_CAPS (templ), subtree); } return parent; } /** - * gst_padtemplate_load_thyself: + * gst_pad_template_load_thyself: * @parent: the source XML tree * * Loads a padtemplate from the XML tree. @@ -2169,7 +2169,7 @@ gst_padtemplate_save_thyself (GstPadTemplate *templ, xmlNodePtr parent) * Returns: the new padtemplate */ GstPadTemplate* -gst_padtemplate_load_thyself (xmlNodePtr parent) +gst_pad_template_load_thyself (xmlNodePtr parent) { xmlNodePtr field = parent->xmlChildrenNode; GstPadTemplate *factory; @@ -2213,7 +2213,7 @@ gst_padtemplate_load_thyself (xmlNodePtr parent) field = field->next; } - factory = gst_padtemplate_new (name_template, direction, presence, caps, NULL); + factory = gst_pad_template_new (name_template, direction, presence, caps, NULL); return factory; } @@ -2325,7 +2325,7 @@ gst_ghost_pad_new (gchar *name, realpad = GST_PAD_REALIZE (realpad); } GST_GPAD_REALPAD (ghostpad) = realpad; - GST_PAD_PADTEMPLATE (ghostpad) = GST_PAD_PADTEMPLATE (pad); + GST_PAD_PAD_TEMPLATE (ghostpad) = GST_PAD_PAD_TEMPLATE (pad); /* add ourselves to the real pad's list of ghostpads */ gst_pad_add_ghost_pad (pad, GST_PAD (ghostpad)); diff --git a/gst/gstpad.h b/gst/gstpad.h index f46418da32..136cb8b2c5 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -230,7 +230,7 @@ struct _GstGhostPadClass { #define GST_PAD_NAME(pad) (GST_OBJECT_NAME(pad)) #define GST_PAD_PARENT(pad) ((GstElement *)(GST_OBJECT_PARENT(pad))) #define GST_PAD_ELEMENT_PRIVATE(pad) (((GstPad *)(pad))->element_private) -#define GST_PAD_PADTEMPLATE(pad) (((GstPad *)(pad))->padtemplate) +#define GST_PAD_PAD_TEMPLATE(pad) (((GstPad *)(pad))->padtemplate) /* GstRealPad */ #define GST_RPAD_DIRECTION(pad) (((GstRealPad *)(pad))->direction) @@ -274,11 +274,11 @@ struct _GstGhostPadClass { #define GST_PAD_IS_SINK(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SINK) /***** PadTemplate *****/ -#define GST_TYPE_PADTEMPLATE (gst_padtemplate_get_type ()) -#define GST_PADTEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PADTEMPLATE,GstPadTemplate)) -#define GST_PADTEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PADTEMPLATE,GstPadTemplateClass)) -#define GST_IS_PADTEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PADTEMPLATE)) -#define GST_IS_PADTEMPLATE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PADTEMPLATE)) +#define GST_TYPE_PAD_TEMPLATE (gst_pad_template_get_type ()) +#define GST_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD_TEMPLATE,GstPadTemplate)) +#define GST_PAD_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD_TEMPLATE,GstPadTemplateClass)) +#define GST_IS_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD_TEMPLATE)) +#define GST_IS_PAD_TEMPLATE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD_TEMPLATE)) typedef enum { GST_PAD_ALWAYS, @@ -286,13 +286,13 @@ typedef enum { GST_PAD_REQUEST, } GstPadPresence; -#define GST_PADTEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template) -#define GST_PADTEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction) -#define GST_PADTEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence) -#define GST_PADTEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps) -#define GST_PADTEMPLATE_FIXED(templ) (((GstPadTemplate *)(templ))->fixed) +#define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template) +#define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction) +#define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence) +#define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps) +#define GST_PAD_TEMPLATE_FIXED(templ) (((GstPadTemplate *)(templ))->fixed) -#define GST_PADTEMPLATE_IS_FIXED(templ) (GST_PADTEMPLATE_FIXED(templ) == TRUE) +#define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_PAD_TEMPLATE_FIXED(templ) == TRUE) struct _GstPadTemplate { GstObject object; @@ -311,21 +311,21 @@ struct _GstPadTemplateClass { void (*pad_created) (GstPadTemplate *templ, GstPad *pad); }; -#define GST_PADTEMPLATE_NEW(padname, dir, pres, a...) \ - gst_padtemplate_new ( \ +#define GST_PAD_TEMPLATE_NEW(padname, dir, pres, a...) \ + gst_pad_template_new ( \ padname, \ dir, \ pres, \ a , \ NULL) -#define GST_PADTEMPLATE_FACTORY(name, padname, dir, pres, a...) \ +#define GST_PAD_TEMPLATE_FACTORY(name, padname, dir, pres, a...) \ static GstPadTemplate* \ name (void) \ { \ static GstPadTemplate *templ = NULL; \ if (!templ) { \ - templ = GST_PADTEMPLATE_NEW ( \ + templ = GST_PAD_TEMPLATE_NEW ( \ padname, \ dir, \ pres, \ @@ -334,7 +334,7 @@ name (void) \ return templ; \ } -#define GST_PADTEMPLATE_GET(fact) (fact)() +#define GST_PAD_TEMPLATE_GET(fact) (fact)() GType gst_pad_get_type (void); GType gst_real_pad_get_type (void); @@ -357,7 +357,7 @@ void gst_pad_set_getcaps_function (GstPad *pad, GstPadGetCapsFunction getcaps void gst_pad_set_bufferpool_function (GstPad *pad, GstPadBufferPoolFunction bufpool); GstCaps* gst_pad_get_caps (GstPad *pad); -GstCaps* gst_pad_get_padtemplate_caps (GstPad *pad); +GstCaps* gst_pad_get_pad_template_caps (GstPad *pad); gboolean gst_pad_try_set_caps (GstPad *pad, GstCaps *caps); gboolean gst_pad_check_compatibility (GstPad *srcpad, GstPad *sinkpad); @@ -379,7 +379,7 @@ void gst_pad_add_ghost_pad (GstPad *pad, GstPad *ghostpad); void gst_pad_remove_ghost_pad (GstPad *pad, GstPad *ghostpad); GList* gst_pad_get_ghost_pad_list (GstPad *pad); -GstPadTemplate* gst_pad_get_padtemplate (GstPad *pad); +GstPadTemplate* gst_pad_get_pad_template (GstPad *pad); GstPad* gst_pad_get_peer (GstPad *pad); @@ -441,18 +441,18 @@ GstPad* gst_ghost_pad_new (gchar *name,GstPad *pad); /* templates and factories */ -GType gst_padtemplate_get_type (void); +GType gst_pad_template_get_type (void); -GstPadTemplate* gst_padtemplate_new (gchar *name_template, +GstPadTemplate* gst_pad_template_new (gchar *name_template, GstPadDirection direction, GstPadPresence presence, GstCaps *caps, ...); -GstCaps* gst_padtemplate_get_caps (GstPadTemplate *templ); -GstCaps* gst_padtemplate_get_caps_by_name (GstPadTemplate *templ, const gchar *name); +GstCaps* gst_pad_template_get_caps (GstPadTemplate *templ); +GstCaps* gst_pad_template_get_caps_by_name (GstPadTemplate *templ, const gchar *name); #ifndef GST_DISABLE_LOADSAVE -xmlNodePtr gst_padtemplate_save_thyself (GstPadTemplate *templ, xmlNodePtr parent); -GstPadTemplate* gst_padtemplate_load_thyself (xmlNodePtr parent); +xmlNodePtr gst_pad_template_save_thyself (GstPadTemplate *templ, xmlNodePtr parent); +GstPadTemplate* gst_pad_template_load_thyself (xmlNodePtr parent); #endif xmlNodePtr gst_pad_ghost_save_thyself (GstPad *pad, diff --git a/gst/gstparse.c b/gst/gstparse.c index a21535de3e..4774a670ea 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -1,8 +1,9 @@ /* GStreamer * Copyright (C) 1999,2000 Erik Walthinsen * 2000 Wim Taymans + * 2002 Andy Wingo * - * : + * gstparse.c: get a pipeline from a text pipeline description * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,15 +21,10 @@ * Boston, MA 02111-1307, USA. */ -/* #define DEBUG(format,args...) g_print (format, ##args) */ -#define DEBUG(format,args...) -#define DEBUG_NOPREFIX(format,args...) -#define VERBOSE(format,args...) - #include -#include "gst_private.h" #include "gstparse.h" +#include "gstinfo.h" #include "parse/types.h" typedef struct _gst_parse_delayed_pad gst_parse_delayed_pad; @@ -44,7 +40,7 @@ typedef struct GstPad *target; GstElement *pipeline; } -dyn_connect; +dynamic_connection_t; GQuark @@ -59,14 +55,14 @@ gst_parse_error_quark (void) G_GNUC_UNUSED static void dynamic_connect (GstElement * element, GstPad * newpad, gpointer data) { - dyn_connect *connect = (dyn_connect *) data; + dynamic_connection_t *dc = (dynamic_connection_t *) data; - if (!strcmp (gst_pad_get_name (newpad), connect->srcpadname)) { - gst_element_set_state (connect->pipeline, GST_STATE_PAUSED); - if (!gst_pad_connect (newpad, connect->target)) + if (!strcmp (gst_pad_get_name (newpad), dc->srcpadname)) { + gst_element_set_state (dc->pipeline, GST_STATE_PAUSED); + if (!gst_pad_connect (newpad, dc->target)) g_warning ("could not connect %s:%s to %s:%s", GST_DEBUG_PAD_NAME (newpad), - GST_DEBUG_PAD_NAME (connect->target)); - gst_element_set_state (connect->pipeline, GST_STATE_PLAYING); + GST_DEBUG_PAD_NAME (dc->target)); + gst_element_set_state (dc->pipeline, GST_STATE_PLAYING); } } @@ -90,7 +86,7 @@ make_elements (graph_t *g, GError **error) else bin_type = "pipeline"; - if (!(g->bin = gst_elementfactory_make (bin_type, NULL))) { + if (!(g->bin = gst_element_factory_make (bin_type, NULL))) { g_set_error (error, GST_PARSE_ERROR, GST_PARSE_ERROR_NO_SUCH_ELEMENT, @@ -101,7 +97,7 @@ make_elements (graph_t *g, GError **error) l = g->elements; while (l) { e = (element_t*)l->data; - if (!(e->element = gst_elementfactory_make (e->type, NULL))) { + if (!(e->element = gst_element_factory_make (e->type, NULL))) { g_set_error (error, GST_PARSE_ERROR, GST_PARSE_ERROR_NO_SUCH_ELEMENT, @@ -204,6 +200,7 @@ make_connections (graph_t *g, GError **error) connection_t *c; GstElement *src, *sink; GstPad *p1, *p2; + GstPadTemplate *pt1; l = g->connections; while (l) { @@ -240,7 +237,22 @@ make_connections (graph_t *g, GError **error) if (a && b) { /* balanced multipad connection */ while (a && b) { - if (!gst_element_connect_pads (src, (gchar*)a->data, sink, (gchar*)b->data)) { + p1 = gst_element_get_pad (src, (gchar*)a->data); + p2 = gst_element_get_pad (sink, (gchar*)b->data); + + if (!p1 && p2 && (pt1 = gst_element_get_pad_template (src, (gchar*)a->data)) && + pt1->presence == GST_PAD_SOMETIMES) { + dynamic_connection_t *dc = g_new0 (dynamic_connection_t, 1); + dc->srcpadname = (gchar*)a->data; + dc->target = p2; + dc->pipeline = g->bin; + + GST_DEBUG (GST_CAT_PIPELINE, "setting up dynamic connection %s:%s and %s:%s", + GST_OBJECT_NAME (GST_OBJECT (src)), + (gchar*)a->data, GST_DEBUG_PAD_NAME (p2)); + + g_signal_connect (G_OBJECT (src), "new_pad", G_CALLBACK (dynamic_connect), dc); + } else if (!p1 || !p2 || !gst_pad_connect (p1, p2)) { g_set_error (error, GST_PARSE_ERROR, GST_PARSE_ERROR_CONNECT, @@ -253,7 +265,32 @@ make_connections (graph_t *g, GError **error) b = g_list_next (b); } } else if (a) { - if (!(p1 = gst_element_get_pad (src, (gchar*)a->data))) { + if ((pt1 = gst_element_get_pad_template (src, (gchar*)a->data))) { + if ((p1 = gst_element_get_pad (src, (gchar*)a->data)) || pt1->presence == GST_PAD_SOMETIMES) { + if (!p1) { +/* + if ((p2 = gst_element_get_pad (sink, (gchar*)a->data))) { + dynamic_connection_t *dc = g_new0 (dynamic_connection_t, 1); + dc->srcpadname = (gchar*)a->data; + dc->target = p2; + dc->pipeline = g->bin; + + GST_DEBUG (GST_CAT_PIPELINE, "setting up dynamic connection %s:%s and %s:%s", + GST_OBJECT_NAME (GST_OBJECT (src)), + (gchar*)a->data, GST_DEBUG_PAD_NAME (p2)); + + g_signal_connect (G_OBJECT (src), "new_pad", G_CALLBACK (dynamic_connect), dc); +*/ + } + } else { + g_set_error (error, + GST_PARSE_ERROR, + GST_PARSE_ERROR_CONNECT, + "Could not get a pad %s from element %s", + (gchar*)a->data, GST_OBJECT_NAME (src)); + return FALSE; + } + } else { g_set_error (error, GST_PARSE_ERROR, GST_PARSE_ERROR_CONNECT, @@ -261,6 +298,7 @@ make_connections (graph_t *g, GError **error) (gchar*)a->data, GST_OBJECT_NAME (src)); return FALSE; } + if (!(p2 = gst_element_get_compatible_pad (sink, p1))) { g_set_error (error, GST_PARSE_ERROR, @@ -370,7 +408,8 @@ gst_parse_launchv (const gchar **argv, GError **error) * * Create a new pipeline based on command line syntax. * - * Returns: a new GstPipeline (cast to a Bin) on success, NULL on failure + * Returns: a new bin on success, NULL on failure. By default the bin is + * a GstPipeline, but it depends on the pipeline_description. */ GstBin * gst_parse_launch (const gchar * pipeline_description, GError **error) diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index 95f4697363..cb83949fbd 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -103,9 +103,9 @@ gst_pipeline_init (GstPipeline *pipeline) /* we're a manager by default */ GST_FLAG_SET (pipeline, GST_BIN_FLAG_MANAGER); - schedname = gst_schedulerfactory_get_default_name (); + schedname = gst_scheduler_factory_get_default_name (); - scheduler = gst_schedulerfactory_make (schedname, GST_ELEMENT (pipeline)); + scheduler = gst_scheduler_factory_make (schedname, GST_ELEMENT (pipeline)); GST_ELEMENT_SCHED (pipeline) = scheduler; @@ -139,7 +139,7 @@ gst_pipeline_dispose (GObject *object) GstElement* gst_pipeline_new (const gchar *name) { - return gst_elementfactory_make ("pipeline", name); + return gst_element_factory_make ("pipeline", name); } static GstElementStateReturn diff --git a/gst/gstscheduler.c b/gst/gstscheduler.c index 429680471d..4ad2fc3e1f 100644 --- a/gst/gstscheduler.c +++ b/gst/gstscheduler.c @@ -576,19 +576,19 @@ gst_scheduler_show (GstScheduler *sched) static GList* _gst_schedulerfactories; -static void gst_schedulerfactory_class_init (GstSchedulerFactoryClass *klass); -static void gst_schedulerfactory_init (GstSchedulerFactory *factory); +static void gst_scheduler_factory_class_init (GstSchedulerFactoryClass *klass); +static void gst_scheduler_factory_init (GstSchedulerFactory *factory); #ifndef GST_DISABLE_REGISTRY -static xmlNodePtr gst_schedulerfactory_save_thyself (GstObject *object, xmlNodePtr parent); -static void gst_schedulerfactory_restore_thyself (GstObject *object, xmlNodePtr parent); +static xmlNodePtr gst_scheduler_factory_save_thyself (GstObject *object, xmlNodePtr parent); +static void gst_scheduler_factory_restore_thyself (GstObject *object, xmlNodePtr parent); #endif static GstPluginFeatureClass *factory_parent_class = NULL; -/* static guint gst_schedulerfactory_signals[LAST_SIGNAL] = { 0 }; */ +/* static guint gst_scheduler_factory_signals[LAST_SIGNAL] = { 0 }; */ GType -gst_schedulerfactory_get_type (void) +gst_scheduler_factory_get_type (void) { static GType schedulerfactory_type = 0; @@ -597,12 +597,12 @@ gst_schedulerfactory_get_type (void) sizeof (GstSchedulerFactoryClass), NULL, NULL, - (GClassInitFunc) gst_schedulerfactory_class_init, + (GClassInitFunc) gst_scheduler_factory_class_init, NULL, NULL, sizeof(GstSchedulerFactory), 0, - (GInstanceInitFunc) gst_schedulerfactory_init, + (GInstanceInitFunc) gst_scheduler_factory_init, NULL }; schedulerfactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE, @@ -612,7 +612,7 @@ gst_schedulerfactory_get_type (void) } static void -gst_schedulerfactory_class_init (GstSchedulerFactoryClass *klass) +gst_scheduler_factory_class_init (GstSchedulerFactoryClass *klass) { GObjectClass *gobject_class; GstObjectClass *gstobject_class; @@ -625,8 +625,8 @@ gst_schedulerfactory_class_init (GstSchedulerFactoryClass *klass) factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE); #ifndef GST_DISABLE_REGISTRY - gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_schedulerfactory_save_thyself); - gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_schedulerfactory_restore_thyself); + gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_scheduler_factory_save_thyself); + gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_scheduler_factory_restore_thyself); #endif _gst_schedulerfactories = NULL; @@ -635,14 +635,14 @@ gst_schedulerfactory_class_init (GstSchedulerFactoryClass *klass) } static void -gst_schedulerfactory_init (GstSchedulerFactory *factory) +gst_scheduler_factory_init (GstSchedulerFactory *factory) { _gst_schedulerfactories = g_list_prepend (_gst_schedulerfactories, factory); } /** - * gst_schedulerfactory_new: + * gst_scheduler_factory_new: * @name: name of schedulerfactory to create * @longdesc: long description of schedulerfactory to create * @type: the gtk type of the GstScheduler element of this factory @@ -652,14 +652,14 @@ gst_schedulerfactory_init (GstSchedulerFactory *factory) * Returns: a new #GstSchedulerFactory. */ GstSchedulerFactory* -gst_schedulerfactory_new (const gchar *name, const gchar *longdesc, GType type) +gst_scheduler_factory_new (const gchar *name, const gchar *longdesc, GType type) { GstSchedulerFactory *factory; g_return_val_if_fail(name != NULL, NULL); - factory = gst_schedulerfactory_find (name); + factory = gst_scheduler_factory_find (name); if (!factory) { - factory = GST_SCHEDULERFACTORY (g_object_new (GST_TYPE_SCHEDULERFACTORY, NULL)); + factory = GST_SCHEDULER_FACTORY (g_object_new (GST_TYPE_SCHEDULER_FACTORY, NULL)); } gst_object_set_name (GST_OBJECT (factory), name); @@ -672,13 +672,13 @@ gst_schedulerfactory_new (const gchar *name, const gchar *longdesc, GType type) } /** - * gst_schedulerfactory_destroy: + * gst_scheduler_factory_destroy: * @factory: factory to destroy * * Removes the scheduler from the global list. */ void -gst_schedulerfactory_destroy (GstSchedulerFactory *factory) +gst_scheduler_factory_destroy (GstSchedulerFactory *factory) { g_return_if_fail (factory != NULL); @@ -688,7 +688,7 @@ gst_schedulerfactory_destroy (GstSchedulerFactory *factory) } /** - * gst_schedulerfactory_find: + * gst_scheduler_factory_find: * @name: name of schedulerfactory to find * * Search for an schedulerfactory of the given name. @@ -696,7 +696,7 @@ gst_schedulerfactory_destroy (GstSchedulerFactory *factory) * Returns: #GstSchedulerFactory if found, NULL otherwise */ GstSchedulerFactory* -gst_schedulerfactory_find (const gchar *name) +gst_scheduler_factory_find (const gchar *name) { GList *walk; GstSchedulerFactory *factory; @@ -717,20 +717,20 @@ gst_schedulerfactory_find (const gchar *name) } /** - * gst_schedulerfactory_get_list: + * gst_scheduler_factory_get_list: * * Get the global list of schedulerfactories. * * Returns: GList of type #GstSchedulerFactory */ GList* -gst_schedulerfactory_get_list (void) +gst_scheduler_factory_get_list (void) { return _gst_schedulerfactories; } /** - * gst_schedulerfactory_create: + * gst_scheduler_factory_create: * @factory: the factory used to create the instance * @parent: the parent element of this scheduler * @@ -740,7 +740,7 @@ gst_schedulerfactory_get_list (void) * Returns: A new #GstScheduler instance. */ GstScheduler* -gst_schedulerfactory_create (GstSchedulerFactory *factory, GstElement *parent) +gst_scheduler_factory_create (GstSchedulerFactory *factory, GstElement *parent) { GstScheduler *new = NULL; @@ -757,7 +757,7 @@ gst_schedulerfactory_create (GstSchedulerFactory *factory, GstElement *parent) } /** - * gst_schedulerfactory_make: + * gst_scheduler_factory_make: * @name: the name of the factory used to create the instance * @parent: the parent element of this scheduler * @@ -767,28 +767,28 @@ gst_schedulerfactory_create (GstSchedulerFactory *factory, GstElement *parent) * Returns: A new #GstScheduler instance. */ GstScheduler* -gst_schedulerfactory_make (const gchar *name, GstElement *parent) +gst_scheduler_factory_make (const gchar *name, GstElement *parent) { GstSchedulerFactory *factory; g_return_val_if_fail (name != NULL, NULL); - factory = gst_schedulerfactory_find (name); + factory = gst_scheduler_factory_find (name); if (factory == NULL) return NULL; - return gst_schedulerfactory_create (factory, parent); + return gst_scheduler_factory_create (factory, parent); } /** - * gst_schedulerfactory_set_default_name: + * gst_scheduler_factory_set_default_name: * @name: the name of the factory used as a default * * Set the default schedulerfactory name. */ void -gst_schedulerfactory_set_default_name (const gchar* name) +gst_scheduler_factory_set_default_name (const gchar* name) { if (_default_name) g_free (_default_name); @@ -797,27 +797,27 @@ gst_schedulerfactory_set_default_name (const gchar* name) } /** - * gst_schedulerfactory_get_default_name: + * gst_scheduler_factory_get_default_name: * * Get the default schedulerfactory name. * * Returns: the name of the default scheduler. */ const gchar* -gst_schedulerfactory_get_default_name (void) +gst_scheduler_factory_get_default_name (void) { return _default_name; } #ifndef GST_DISABLE_REGISTRY static xmlNodePtr -gst_schedulerfactory_save_thyself (GstObject *object, xmlNodePtr parent) +gst_scheduler_factory_save_thyself (GstObject *object, xmlNodePtr parent) { GstSchedulerFactory *factory; - g_return_val_if_fail (GST_IS_SCHEDULERFACTORY (object), parent); + g_return_val_if_fail (GST_IS_SCHEDULER_FACTORY (object), parent); - factory = GST_SCHEDULERFACTORY (object); + factory = GST_SCHEDULER_FACTORY (object); if (GST_OBJECT_CLASS (factory_parent_class)->save_thyself) { GST_OBJECT_CLASS (factory_parent_class)->save_thyself (object, parent); @@ -829,7 +829,7 @@ gst_schedulerfactory_save_thyself (GstObject *object, xmlNodePtr parent) } /** - * gst_schedulerfactory_load_thyself: + * gst_scheduler_factory_load_thyself: * @parent: the parent XML node pointer * * Load an schedulerfactory from the given XML parent node. @@ -837,9 +837,9 @@ gst_schedulerfactory_save_thyself (GstObject *object, xmlNodePtr parent) * Returns: A new factory based on the XML node. */ static void -gst_schedulerfactory_restore_thyself (GstObject *object, xmlNodePtr parent) +gst_scheduler_factory_restore_thyself (GstObject *object, xmlNodePtr parent) { - GstSchedulerFactory *factory = GST_SCHEDULERFACTORY (object); + GstSchedulerFactory *factory = GST_SCHEDULER_FACTORY (object); xmlNodePtr children = parent->xmlChildrenNode; if (GST_OBJECT_CLASS (factory_parent_class)->restore_thyself) { diff --git a/gst/gstscheduler.h b/gst/gstscheduler.h index 3e50922fcb..b48836adce 100644 --- a/gst/gstscheduler.h +++ b/gst/gstscheduler.h @@ -143,16 +143,16 @@ void gst_scheduler_show (GstScheduler *sched); * creating schedulers * */ -#define GST_TYPE_SCHEDULERFACTORY \ - (gst_schedulerfactory_get_type ()) -#define GST_SCHEDULERFACTORY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULERFACTORY, GstSchedulerFactory)) -#define GST_SCHEDULERFACTORY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULERFACTORY, GstSchedulerFactoryClass)) -#define GST_IS_SCHEDULERFACTORY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULERFACTORY)) -#define GST_IS_SCHEDULERFACTORY_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULERFACTORY)) +#define GST_TYPE_SCHEDULER_FACTORY \ + (gst_scheduler_factory_get_type ()) +#define GST_SCHEDULER_FACTORY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactory)) +#define GST_SCHEDULER_FACTORY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass)) +#define GST_IS_SCHEDULER_FACTORY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER_FACTORY)) +#define GST_IS_SCHEDULER_FACTORY_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER_FACTORY)) typedef struct _GstSchedulerFactory GstSchedulerFactory; typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass; @@ -168,19 +168,19 @@ struct _GstSchedulerFactoryClass { GstPluginFeatureClass parent; }; -GType gst_schedulerfactory_get_type (void); +GType gst_scheduler_factory_get_type (void); -GstSchedulerFactory* gst_schedulerfactory_new (const gchar *name, const gchar *longdesc, GType type); -void gst_schedulerfactory_destroy (GstSchedulerFactory *factory); +GstSchedulerFactory* gst_scheduler_factory_new (const gchar *name, const gchar *longdesc, GType type); +void gst_scheduler_factory_destroy (GstSchedulerFactory *factory); -GstSchedulerFactory* gst_schedulerfactory_find (const gchar *name); -GList* gst_schedulerfactory_get_list (void); +GstSchedulerFactory* gst_scheduler_factory_find (const gchar *name); +GList* gst_scheduler_factory_get_list (void); -GstScheduler* gst_schedulerfactory_create (GstSchedulerFactory *factory, GstElement *parent); -GstScheduler* gst_schedulerfactory_make (const gchar *name, GstElement *parent); +GstScheduler* gst_scheduler_factory_create (GstSchedulerFactory *factory, GstElement *parent); +GstScheduler* gst_scheduler_factory_make (const gchar *name, GstElement *parent); -void gst_schedulerfactory_set_default_name (const gchar* name); -const gchar* gst_schedulerfactory_get_default_name (void); +void gst_scheduler_factory_set_default_name (const gchar* name); +const gchar* gst_scheduler_factory_get_default_name (void); #ifdef __cplusplus diff --git a/gst/gstthread.c b/gst/gstthread.c index e7dfa53f50..465552b95c 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -142,9 +142,9 @@ gst_thread_init (GstThread *thread) GST_FLAG_SET (thread, GST_BIN_FLAG_MANAGER); GST_FLAG_SET (thread, GST_BIN_SELF_SCHEDULABLE); - schedname = gst_schedulerfactory_get_default_name (); + schedname = gst_scheduler_factory_get_default_name (); - scheduler = gst_schedulerfactory_make (schedname, GST_ELEMENT (thread)); + scheduler = gst_scheduler_factory_make (schedname, GST_ELEMENT (thread)); GST_ELEMENT_SCHED (thread) = scheduler; @@ -213,7 +213,7 @@ gst_thread_get_property (GObject *object, guint prop_id, GValue *value, GParamSp GstElement* gst_thread_new (const gchar *name) { - return gst_elementfactory_make ("thread", name); + return gst_element_factory_make ("thread", name); } diff --git a/gst/gsttimecache.c b/gst/gsttimecache.c index a112991689..407f68cf8a 100644 --- a/gst/gsttimecache.c +++ b/gst/gsttimecache.c @@ -25,13 +25,13 @@ #include "gsttimecache.h" -static void gst_timecache_class_init (GstTimeCacheClass *klass); -static void gst_timecache_init (GstTimeCache *tc); +static void gst_time_cache_class_init (GstTimeCacheClass *klass); +static void gst_time_cache_init (GstTimeCache *tc); static GstObject *timecache_parent_class = NULL; GType -gst_timecache_get_type(void) { +gst_time_cache_get_type(void) { static GType tc_type = 0; if (!tc_type) { @@ -39,12 +39,12 @@ gst_timecache_get_type(void) { sizeof(GstTimeCacheClass), NULL, NULL, - (GClassInitFunc)gst_timecache_class_init, + (GClassInitFunc)gst_time_cache_class_init, NULL, NULL, sizeof(GstTimeCache), 1, - (GInstanceInitFunc)gst_timecache_init, + (GInstanceInitFunc)gst_time_cache_init, NULL }; tc_type = g_type_register_static(GST_TYPE_OBJECT, "GstTimeCache", &tc_info, 0); @@ -53,19 +53,19 @@ gst_timecache_get_type(void) { } static void -gst_timecache_class_init (GstTimeCacheClass *klass) +gst_time_cache_class_init (GstTimeCacheClass *klass) { timecache_parent_class = g_type_class_ref(GST_TYPE_OBJECT); } static GstTimeCacheGroup * -gst_timecache_group_new(guint groupnum) +gst_time_cache_group_new(guint groupnum) { GstTimeCacheGroup *tcgroup = g_new(GstTimeCacheGroup,1); tcgroup->groupnum = groupnum; tcgroup->entries = NULL; - tcgroup->certainty = GST_TIMECACHE_UNKNOWN; + tcgroup->certainty = GST_TIME_CACHE_UNKNOWN; tcgroup->peergroup = -1; tcgroup->mintimestamp = 0LL; tcgroup->maxtimestamp = 0LL; @@ -78,33 +78,33 @@ gst_timecache_group_new(guint groupnum) } static void -gst_timecache_init (GstTimeCache *tc) +gst_time_cache_init (GstTimeCache *tc) { - tc->curgroup = gst_timecache_group_new(0); + tc->curgroup = gst_time_cache_group_new(0); tc->maxgroup = 0; tc->groups = g_list_prepend(NULL, tc->curgroup); GST_DEBUG(0, "created new timecache"); } /** - * gst_timecache_new: + * gst_time_cache_new: * * Create a new tilecache object * * Returns: a new timecache object */ GstTimeCache * -gst_timecache_new() +gst_time_cache_new() { GstTimeCache *tc; - tc = g_object_new (gst_timecache_get_type (), NULL); + tc = g_object_new (gst_time_cache_get_type (), NULL); return tc; } /** - * gst_timecache_get_group: + * gst_time_cache_get_group: * @tc: the timecache to get the current group from * * Get the id of the current group. @@ -112,13 +112,13 @@ gst_timecache_new() * Returns: the id of the current group. */ gint -gst_timecache_get_group(GstTimeCache *tc) +gst_time_cache_get_group(GstTimeCache *tc) { return tc->curgroup->groupnum; } /** - * gst_timecache_new_group: + * gst_time_cache_new_group: * @tc: the timecache to create the new group in * * Create a new group for the given timecache. It will be @@ -127,16 +127,16 @@ gst_timecache_get_group(GstTimeCache *tc) * Returns: the id of the newly created group. */ gint -gst_timecache_new_group(GstTimeCache *tc) +gst_time_cache_new_group(GstTimeCache *tc) { - tc->curgroup = gst_timecache_group_new(++tc->maxgroup); + tc->curgroup = gst_time_cache_group_new(++tc->maxgroup); tc->groups = g_list_append(tc->groups,tc->curgroup); GST_DEBUG(0, "created new group %d in timecache",tc->maxgroup); return tc->maxgroup; } /** - * gst_timecache_set_group: + * gst_time_cache_set_group: * @tc: the timecache to set the new group in * @groupnum: the groupnumber to set * @@ -146,7 +146,7 @@ gst_timecache_new_group(GstTimeCache *tc) * did not exist. */ gboolean -gst_timecache_set_group(GstTimeCache *tc, gint groupnum) +gst_time_cache_set_group(GstTimeCache *tc, gint groupnum) { GList *list; GstTimeCacheGroup *tcgroup; @@ -173,20 +173,20 @@ gst_timecache_set_group(GstTimeCache *tc, gint groupnum) } /** - * gst_timecache_set_certainty: + * gst_time_cache_set_certainty: * @tc: the timecache to set the certainty on * @certainty: the certainty to set * * Set the certainty of the given timecache. */ void -gst_timecache_set_certainty(GstTimeCache *tc, GstTimeCacheCertainty certainty) +gst_time_cache_set_certainty(GstTimeCache *tc, GstTimeCacheCertainty certainty) { tc->curgroup->certainty = certainty; } /** - * gst_timecache_get_certainty: + * gst_time_cache_get_certainty: * @tc: the timecache to get the certainty of * * Get the certainty of the given timecache. @@ -194,13 +194,13 @@ gst_timecache_set_certainty(GstTimeCache *tc, GstTimeCacheCertainty certainty) * Returns: the certainty of the timecache. */ GstTimeCacheCertainty -gst_timecache_get_certainty(GstTimeCache *tc) +gst_time_cache_get_certainty(GstTimeCache *tc) { return tc->curgroup->certainty; } /** - * gst_timecache_add_entry: + * gst_time_cache_add_entry: * @tc: the timecache to add the entry to * @location: the location * @timestamp: the timestamp @@ -209,7 +209,7 @@ gst_timecache_get_certainty(GstTimeCache *tc) * timecache. */ void -gst_timecache_add_entry (GstTimeCache *tc, guint64 location, gint64 timestamp) +gst_time_cache_add_entry (GstTimeCache *tc, guint64 location, gint64 timestamp) { GstTimeCacheEntry *entry = g_new(GstTimeCacheEntry,1); @@ -229,7 +229,7 @@ gst_timecache_add_entry (GstTimeCache *tc, guint64 location, gint64 timestamp) } static gint -_gst_timecache_find_location (const GstTimeCacheEntry *entry, const guint64 *location) +_gst_time_cache_find_location (const GstTimeCacheEntry *entry, const guint64 *location) { if (*location < entry->location) return -1; else if (*location > entry->location) return 1; @@ -237,7 +237,7 @@ _gst_timecache_find_location (const GstTimeCacheEntry *entry, const guint64 *loc } /** - * gst_timecache_find_location: + * gst_time_cache_find_location: * @tc: the timecache to find the timestamp in * @location: the location * @timestamp: the timestamp @@ -248,7 +248,7 @@ _gst_timecache_find_location (const GstTimeCacheEntry *entry, const guint64 *loc * Returns: TRUE if the location was found in the timecache. */ gboolean -gst_timecache_find_location (GstTimeCache *tc, guint64 location, gint64 *timestamp) +gst_time_cache_find_location (GstTimeCache *tc, guint64 location, gint64 *timestamp) { GList *list; GstTimeCacheEntry *entry = NULL; @@ -256,7 +256,7 @@ gst_timecache_find_location (GstTimeCache *tc, guint64 location, gint64 *timesta /* first check to see if it's in the current group */ if ((tc->curgroup->minlocation <= location) && (location <= tc->curgroup->maxlocation)) { GST_DEBUG(0, "location %Ld is in group %d",location,tc->curgroup->groupnum); - list = g_list_find_custom(tc->curgroup->entries,&location,(GCompareFunc)_gst_timecache_find_location); + list = g_list_find_custom(tc->curgroup->entries,&location,(GCompareFunc)_gst_time_cache_find_location); if (list) entry = (GstTimeCacheEntry *)(list->data); if (entry) *timestamp = entry->timestamp; return TRUE; @@ -269,7 +269,7 @@ gst_timecache_find_location (GstTimeCache *tc, guint64 location, gint64 *timesta } static gint -_gst_timecache_find_timestamp (const GstTimeCacheEntry *entry, const gint64 *timestamp) +_gst_time_cache_find_timestamp (const GstTimeCacheEntry *entry, const gint64 *timestamp) { if (*timestamp < entry->timestamp) return -1; else if (*timestamp > entry->timestamp) return 1; @@ -277,7 +277,7 @@ _gst_timecache_find_timestamp (const GstTimeCacheEntry *entry, const gint64 *tim } /** - * gst_timecache_find_timestamp: + * gst_time_cache_find_timestamp: * @tc: the timecache to find the location in * @location: the location * @timestamp: the timestamp @@ -288,7 +288,7 @@ _gst_timecache_find_timestamp (const GstTimeCacheEntry *entry, const gint64 *tim * Returns: TRUE if the timestamp was found in the timecache. */ gboolean -gst_timecache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *location) +gst_time_cache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *location) { GList *entries, *groups; GstTimeCacheEntry *entry = NULL; @@ -297,7 +297,7 @@ gst_timecache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *locat /* first check to see if it's in the current group */ if ((tc->curgroup->mintimestamp <= timestamp) && (timestamp <= tc->curgroup->maxtimestamp)) { GST_DEBUG(0, "timestamp %Ld may be in group %d",timestamp,tc->curgroup->groupnum); - entries = g_list_find_custom(tc->curgroup->entries,×tamp,(GCompareFunc)_gst_timecache_find_timestamp); + entries = g_list_find_custom(tc->curgroup->entries,×tamp,(GCompareFunc)_gst_time_cache_find_timestamp); if (entries) entry = (GstTimeCacheEntry *)(entries->data); if (entry) { *location = entry->location; @@ -312,7 +312,7 @@ gst_timecache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *locat if ((group->mintimestamp <= timestamp) && (timestamp <= group->maxtimestamp)) { GST_DEBUG(0, "timestamp %Ld may be in group %d",timestamp,group->groupnum); - entries = g_list_find_custom(group->entries,×tamp,(GCompareFunc)_gst_timecache_find_timestamp); + entries = g_list_find_custom(group->entries,×tamp,(GCompareFunc)_gst_time_cache_find_timestamp); if (entries) entry = (GstTimeCacheEntry *)(entries->data); if (entry) { *location = entry->location; diff --git a/gst/gsttimecache.h b/gst/gsttimecache.h index bdb291dd6f..826d018673 100644 --- a/gst/gsttimecache.h +++ b/gst/gsttimecache.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef __GST_TIMECACHE_H__ -#define __GST_TIMECACHE_H__ +#ifndef __GST_TIME_CACHE_H__ +#define __GST_TIME_CACHE_H__ #include @@ -31,11 +31,11 @@ extern "C" { #endif /* __cplusplus */ -#define GST_TYPE_TIMECACHE (gst_timecache_get_type ()) -#define GST_TIMECACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIMECACHE, GstTimeCache)) -#define GST_TIMECACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TIMECACHE, GstTimeCacheClass)) -#define GST_IS_TIMECACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIMECACHE)) -#define GST_IS_TIMECACHE_CLASS(obj) (GST_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TIMECACHE)) +#define GST_TYPE_TIME_CACHE (gst_time_cache_get_type ()) +#define GST_TIME_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TIME_CACHE, GstTimeCache)) +#define GST_TIME_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TIME_CACHE, GstTimeCacheClass)) +#define GST_IS_TIME_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TIME_CACHE)) +#define GST_IS_TIME_CACHE_CLASS(obj) (GST_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TIME_CACHE)) typedef struct _GstTimeCacheEntry GstTimeCacheEntry; typedef struct _GstTimeCacheGroup GstTimeCacheGroup; @@ -43,11 +43,11 @@ typedef struct _GstTimeCache GstTimeCache; typedef struct _GstTimeCacheClass GstTimeCacheClass; typedef enum { - GST_TIMECACHE_UNKNOWN, - GST_TIMECACHE_CERTAIN, - GST_TIMECACHE_FUZZY_LOCATION, - GST_TIMECACHE_FUZZY_TIMESTAMP, - GST_TIMECACHE_FUZZY, + GST_TIME_CACHE_UNKNOWN, + GST_TIME_CACHE_CERTAIN, + GST_TIME_CACHE_FUZZY_LOCATION, + GST_TIME_CACHE_FUZZY_TIMESTAMP, + GST_TIME_CACHE_FUZZY, } GstTimeCacheCertainty; struct _GstTimeCacheEntry { @@ -85,24 +85,24 @@ struct _GstTimeCache { gint maxgroup; }; -GType gst_timecache_get_type (void); -GstTimeCache* gst_timecache_new (void); +GType gst_time_cache_get_type (void); +GstTimeCache* gst_time_cache_new (void); -gint gst_timecache_get_group (GstTimeCache *tc); -gint gst_timecache_new_group (GstTimeCache *tc); -gboolean gst_timecache_set_group (GstTimeCache *tc, gint groupnum); +gint gst_time_cache_get_group (GstTimeCache *tc); +gint gst_time_cache_new_group (GstTimeCache *tc); +gboolean gst_time_cache_set_group (GstTimeCache *tc, gint groupnum); -void gst_timecache_set_certainty (GstTimeCache *tc, GstTimeCacheCertainty certainty); -GstTimeCacheCertainty gst_timecache_get_certainty (GstTimeCache *tc); +void gst_time_cache_set_certainty (GstTimeCache *tc, GstTimeCacheCertainty certainty); +GstTimeCacheCertainty gst_time_cache_get_certainty (GstTimeCache *tc); -void gst_timecache_add_entry (GstTimeCache *tc, guint64 location, gint64 timestamp); +void gst_time_cache_add_entry (GstTimeCache *tc, guint64 location, gint64 timestamp); -gboolean gst_timecache_find_location (GstTimeCache *tc, guint64 location, gint64 *timestamp); -gboolean gst_timecache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *location); +gboolean gst_time_cache_find_location (GstTimeCache *tc, guint64 location, gint64 *timestamp); +gboolean gst_time_cache_find_timestamp (GstTimeCache *tc, gint64 timestamp, guint64 *location); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* __GST_TIMECACHE_H__ */ +#endif /* __GST_TIME_CACHE_H__ */ diff --git a/gst/gsttype.c b/gst/gsttype.c index fca24e3189..973c3d1f1e 100644 --- a/gst/gsttype.c +++ b/gst/gsttype.c @@ -38,23 +38,23 @@ static guint16 _gst_maxtype; static GList *_gst_typefactories; -static void gst_typefactory_class_init (GstTypeFactoryClass *klass); -static void gst_typefactory_init (GstTypeFactory *factory); +static void gst_type_factory_class_init (GstTypeFactoryClass *klass); +static void gst_type_factory_init (GstTypeFactory *factory); -static GstCaps* gst_type_typefind_dummy (GstBuffer *buffer, gpointer priv); +static GstCaps* gst_type_type_find_dummy (GstBuffer *buffer, gpointer priv); #ifndef GST_DISABLE_REGISTRY -static xmlNodePtr gst_typefactory_save_thyself (GstObject *object, xmlNodePtr parent); -static void gst_typefactory_restore_thyself (GstObject *object, xmlNodePtr parent); +static xmlNodePtr gst_type_factory_save_thyself (GstObject *object, xmlNodePtr parent); +static void gst_type_factory_restore_thyself (GstObject *object, xmlNodePtr parent); #endif /* GST_DISABLE_REGISTRY */ -static void gst_typefactory_unload_thyself (GstPluginFeature *feature); +static void gst_type_factory_unload_thyself (GstPluginFeature *feature); static GstPluginFeatureClass *parent_class = NULL; -/* static guint gst_typefactory_signals[LAST_SIGNAL] = { 0 }; */ +/* static guint gst_type_factory_signals[LAST_SIGNAL] = { 0 }; */ GType -gst_typefactory_get_type (void) +gst_type_factory_get_type (void) { static GType typefactory_type = 0; @@ -63,12 +63,12 @@ gst_typefactory_get_type (void) sizeof (GstTypeFactoryClass), NULL, NULL, - (GClassInitFunc) gst_typefactory_class_init, + (GClassInitFunc) gst_type_factory_class_init, NULL, NULL, sizeof(GstTypeFactory), 0, - (GInstanceInitFunc) gst_typefactory_init, + (GInstanceInitFunc) gst_type_factory_init, NULL }; typefactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE, @@ -78,7 +78,7 @@ gst_typefactory_get_type (void) } static void -gst_typefactory_class_init (GstTypeFactoryClass *klass) +gst_type_factory_class_init (GstTypeFactoryClass *klass) { GObjectClass *gobject_class; GstObjectClass *gstobject_class; @@ -91,11 +91,11 @@ gst_typefactory_class_init (GstTypeFactoryClass *klass) parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE); #ifndef GST_DISABLE_REGISTRY - gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_typefactory_save_thyself); - gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_typefactory_restore_thyself); + gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_type_factory_save_thyself); + gstobject_class->restore_thyself = GST_DEBUG_FUNCPTR (gst_type_factory_restore_thyself); #endif /* GST_DISABLE_REGISTRY */ - gstpluginfeature_class->unload_thyself = GST_DEBUG_FUNCPTR (gst_typefactory_unload_thyself); + gstpluginfeature_class->unload_thyself = GST_DEBUG_FUNCPTR (gst_type_factory_unload_thyself); _gst_types = NULL; _gst_maxtype = 1; /* type 0 is undefined */ @@ -104,13 +104,13 @@ gst_typefactory_class_init (GstTypeFactoryClass *klass) } static void -gst_typefactory_init (GstTypeFactory *factory) +gst_type_factory_init (GstTypeFactory *factory) { _gst_typefactories = g_list_prepend (_gst_typefactories, factory); } /** - * gst_typefactory_new: + * gst_type_factory_new: * @definition: the definition to use * * Creata a new typefactory from the given definition. @@ -118,7 +118,7 @@ gst_typefactory_init (GstTypeFactory *factory) * Returns: the new typefactory */ GstTypeFactory* -gst_typefactory_new (GstTypeDefinition *definition) +gst_type_factory_new (GstTypeDefinition *definition) { GstTypeFactory *factory; @@ -126,10 +126,10 @@ gst_typefactory_new (GstTypeDefinition *definition) g_return_val_if_fail (definition->name != NULL, NULL); g_return_val_if_fail (definition->mime != NULL, NULL); - factory = gst_typefactory_find (definition->name); + factory = gst_type_factory_find (definition->name); if (!factory) { - factory = GST_TYPEFACTORY (g_object_new (GST_TYPE_TYPEFACTORY, NULL)); + factory = GST_TYPE_FACTORY (g_object_new (GST_TYPE_TYPE_FACTORY, NULL)); } gst_object_set_name (GST_OBJECT (factory), definition->name); @@ -291,20 +291,20 @@ gst_type_get_list (void) } /** - * gst_typefactory_get_list: + * gst_type_factory_get_list: * * Return a list of all typefactories * * Returns: a list of GstTypeFactories */ GList* -gst_typefactory_get_list (void) +gst_type_factory_get_list (void) { return _gst_typefactories; } /** - * gst_typefactory_find: + * gst_type_factory_find: * @name: the name of the typefactory to find * * Return the TypeFactory with the given name. @@ -312,13 +312,13 @@ gst_typefactory_get_list (void) * Returns: a GstTypeFactory with the given name; */ GstTypeFactory* -gst_typefactory_find (const gchar *name) +gst_type_factory_find (const gchar *name) { GList *walk = _gst_typefactories; GstTypeFactory *factory; while (walk) { - factory = GST_TYPEFACTORY (walk->data); + factory = GST_TYPE_FACTORY (walk->data); if (!strcmp (GST_OBJECT_NAME (factory), name)) return factory; walk = g_list_next (walk); @@ -327,20 +327,20 @@ gst_typefactory_find (const gchar *name) } static void -gst_typefactory_unload_thyself (GstPluginFeature *feature) +gst_type_factory_unload_thyself (GstPluginFeature *feature) { GstTypeFactory *factory; - g_return_if_fail (GST_IS_TYPEFACTORY (feature)); + g_return_if_fail (GST_IS_TYPE_FACTORY (feature)); - factory = GST_TYPEFACTORY (feature); + factory = GST_TYPE_FACTORY (feature); if (factory->typefindfunc) - factory->typefindfunc = gst_type_typefind_dummy; + factory->typefindfunc = gst_type_type_find_dummy; } static GstCaps* -gst_type_typefind_dummy (GstBuffer *buffer, gpointer priv) +gst_type_type_find_dummy (GstBuffer *buffer, gpointer priv) { GstTypeFactory *factory = (GstTypeFactory *)priv; @@ -359,13 +359,13 @@ gst_type_typefind_dummy (GstBuffer *buffer, gpointer priv) #ifndef GST_DISABLE_REGISTRY static xmlNodePtr -gst_typefactory_save_thyself (GstObject *object, xmlNodePtr parent) +gst_type_factory_save_thyself (GstObject *object, xmlNodePtr parent) { GstTypeFactory *factory; - g_return_val_if_fail (GST_IS_TYPEFACTORY (object), parent); + g_return_val_if_fail (GST_IS_TYPE_FACTORY (object), parent); - factory = GST_TYPEFACTORY (object); + factory = GST_TYPE_FACTORY (object); if (GST_OBJECT_CLASS (parent_class)->save_thyself) { GST_OBJECT_CLASS (parent_class)->save_thyself (object, parent); @@ -383,7 +383,7 @@ gst_typefactory_save_thyself (GstObject *object, xmlNodePtr parent) } /** - * gst_typefactory_restore_thyself: + * gst_type_factory_restore_thyself: * @parent: the parent node to load from * * Load a typefactory from an XML representation. @@ -391,9 +391,9 @@ gst_typefactory_save_thyself (GstObject *object, xmlNodePtr parent) * Returns: the new typefactory */ static void -gst_typefactory_restore_thyself (GstObject *object, xmlNodePtr parent) +gst_type_factory_restore_thyself (GstObject *object, xmlNodePtr parent) { - GstTypeFactory *factory = GST_TYPEFACTORY (object); + GstTypeFactory *factory = GST_TYPE_FACTORY (object); xmlNodePtr field = parent->xmlChildrenNode; factory->typefindfunc = NULL; @@ -409,7 +409,7 @@ gst_typefactory_restore_thyself (GstObject *object, xmlNodePtr parent) factory->exts = xmlNodeGetContent (field); } else if (!strcmp (field->name, "typefind")) { - factory->typefindfunc = gst_type_typefind_dummy; + factory->typefindfunc = gst_type_type_find_dummy; } field = field->next; } diff --git a/gst/gsttype.h b/gst/gsttype.h index a32879fe66..11172984ed 100644 --- a/gst/gsttype.h +++ b/gst/gsttype.h @@ -54,16 +54,16 @@ struct _GstTypeDefinition { GstTypeFindFunc typefindfunc; }; -#define GST_TYPE_TYPEFACTORY \ - (gst_typefactory_get_type()) -#define GST_TYPEFACTORY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TYPEFACTORY,GstTypeFactory)) -#define GST_TYPEFACTORY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TYPEFACTORY,GstTypeFactoryClass)) -#define GST_IS_TYPEFACTORY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TYPEFACTORY)) -#define GST_IS_TYPEFACTORY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TYPEFACTORY)) +#define GST_TYPE_TYPE_FACTORY \ + (gst_type_factory_get_type()) +#define GST_TYPE_FACTORY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TYPE_FACTORY,GstTypeFactory)) +#define GST_TYPE_FACTORY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TYPE_FACTORY,GstTypeFactoryClass)) +#define GST_IS_TYPE_FACTORY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TYPE_FACTORY)) +#define GST_IS_TYPE_FACTORY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TYPE_FACTORY)) struct _GstTypeFactory { GstPluginFeature feature; @@ -78,12 +78,12 @@ struct _GstTypeFactoryClass { }; -GType gst_typefactory_get_type (void); +GType gst_type_factory_get_type (void); -GstTypeFactory* gst_typefactory_new (GstTypeDefinition *definition); +GstTypeFactory* gst_type_factory_new (GstTypeDefinition *definition); -GstTypeFactory* gst_typefactory_find (const gchar *name); -GList* gst_typefactory_get_list (void); +GstTypeFactory* gst_type_factory_find (const gchar *name); +GList* gst_type_factory_get_list (void); /* create a new type, or find/merge an existing one */ diff --git a/gst/gsttypefind.c b/gst/gsttypefind.c index a0639bca98..3bd264be9d 100644 --- a/gst/gsttypefind.c +++ b/gst/gsttypefind.c @@ -29,7 +29,7 @@ /* #define GST_DEBUG_ENABLED */ -GstElementDetails gst_typefind_details = { +GstElementDetails gst_type_find_details = { "TypeFind", "TypeFind", "Finds the media type", @@ -52,21 +52,21 @@ enum { }; -static void gst_typefind_class_init (GstTypeFindClass *klass); -static void gst_typefind_init (GstTypeFind *typefind); +static void gst_type_find_class_init (GstTypeFindClass *klass); +static void gst_type_find_init (GstTypeFind *typefind); -static void gst_typefind_set_property (GObject *object, guint prop_id, +static void gst_type_find_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void gst_typefind_get_property (GObject *object, guint prop_id, +static void gst_type_find_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gst_typefind_chain (GstPad *pad, GstBuffer *buf); +static void gst_type_find_chain (GstPad *pad, GstBuffer *buf); static GstElementClass *parent_class = NULL; -static guint gst_typefind_signals[LAST_SIGNAL] = { 0 }; +static guint gst_type_find_signals[LAST_SIGNAL] = { 0 }; GType -gst_typefind_get_type (void) +gst_type_find_get_type (void) { static GType typefind_type = 0; @@ -75,12 +75,12 @@ gst_typefind_get_type (void) sizeof(GstTypeFindClass), NULL, NULL, - (GClassInitFunc)gst_typefind_class_init, + (GClassInitFunc)gst_type_find_class_init, NULL, NULL, sizeof(GstTypeFind), 0, - (GInstanceInitFunc)gst_typefind_init, + (GInstanceInitFunc)gst_type_find_init, NULL }; typefind_type = g_type_register_static (GST_TYPE_ELEMENT, "GstTypeFind", &typefind_info, 0); @@ -89,7 +89,7 @@ gst_typefind_get_type (void) } static void -gst_typefind_class_init (GstTypeFindClass *klass) +gst_type_find_class_init (GstTypeFindClass *klass) { GObjectClass *gobject_class; @@ -100,33 +100,33 @@ gst_typefind_class_init (GstTypeFindClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CAPS, g_param_spec_pointer("caps", "Caps", "Found capabilities", G_PARAM_READABLE)); - gst_typefind_signals[HAVE_TYPE] = + gst_type_find_signals[HAVE_TYPE] = g_signal_new ("have_type", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstTypeFindClass, have_type), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); - gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_typefind_set_property); - gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_typefind_get_property); + gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_type_find_set_property); + gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_type_find_get_property); } static void -gst_typefind_init (GstTypeFind *typefind) +gst_type_find_init (GstTypeFind *typefind) { typefind->sinkpad = gst_pad_new ("sink", GST_PAD_SINK); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sinkpad); - gst_pad_set_chain_function (typefind->sinkpad, gst_typefind_chain); + gst_pad_set_chain_function (typefind->sinkpad, gst_type_find_chain); } static void -gst_typefind_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +gst_type_find_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GstTypeFind *typefind; /* it's not null if we got it, but it might not be ours */ - g_return_if_fail (GST_IS_TYPEFIND (object)); + g_return_if_fail (GST_IS_TYPE_FIND (object)); - typefind = GST_TYPEFIND (object); + typefind = GST_TYPE_FIND (object); switch (prop_id) { default: @@ -135,14 +135,14 @@ gst_typefind_set_property (GObject *object, guint prop_id, const GValue *value, } static void -gst_typefind_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +gst_type_find_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GstTypeFind *typefind; /* it's not null if we got it, but it might not be ours */ - g_return_if_fail (GST_IS_TYPEFIND (object)); + g_return_if_fail (GST_IS_TYPE_FIND (object)); - typefind = GST_TYPEFIND (object); + typefind = GST_TYPE_FIND (object); switch (prop_id) { case ARG_CAPS: @@ -154,7 +154,7 @@ gst_typefind_get_property (GObject *object, guint prop_id, GValue *value, GParam } static void -gst_typefind_chain (GstPad *pad, GstBuffer *buf) +gst_type_find_chain (GstPad *pad, GstBuffer *buf) { GstTypeFind *typefind; GList *type_list; @@ -164,7 +164,7 @@ gst_typefind_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (buf != NULL); - typefind = GST_TYPEFIND (GST_OBJECT_PARENT (pad)); + typefind = GST_TYPE_FIND (GST_OBJECT_PARENT (pad)); GST_DEBUG (0,"got buffer of %d bytes in '%s'", GST_BUFFER_SIZE (buf), GST_OBJECT_NAME (typefind)); @@ -177,7 +177,7 @@ gst_typefind_chain (GstPad *pad, GstBuffer *buf) factories = type->factories; while (factories) { - GstTypeFactory *factory = GST_TYPEFACTORY (factories->data); + GstTypeFactory *factory = GST_TYPE_FACTORY (factories->data); GstTypeFindFunc typefindfunc = (GstTypeFindFunc)factory->typefindfunc; GstCaps *caps; @@ -194,7 +194,7 @@ gst_typefind_chain (GstPad *pad, GstBuffer *buf) { /* int oldstate = GST_STATE(typefind);*/ gst_object_ref (GST_OBJECT (typefind)); - g_signal_emit (G_OBJECT (typefind), gst_typefind_signals[HAVE_TYPE], 0, + g_signal_emit (G_OBJECT (typefind), gst_type_find_signals[HAVE_TYPE], 0, typefind->caps); /* if (GST_STATE(typefind) != oldstate) { GST_DEBUG(0, "state changed during signal, aborting"); diff --git a/gst/gsttypefind.h b/gst/gsttypefind.h index 19ee83bb96..c782b55756 100644 --- a/gst/gsttypefind.h +++ b/gst/gsttypefind.h @@ -21,10 +21,10 @@ */ -#ifndef __GST_TYPEFIND_H__ -#define __GST_TYPEFIND_H__ +#ifndef __GST_TYPE_FIND_H__ +#define __GST_TYPE_FIND_H__ -#ifndef GST_DISABLE_TYPEFIND +#ifndef GST_DISABLE_TYPE_FIND #include @@ -33,18 +33,18 @@ extern "C" { #endif /* __cplusplus */ -GstElementDetails gst_typefind_details; +GstElementDetails gst_type_find_details; -#define GST_TYPE_TYPEFIND \ - (gst_typefind_get_type()) -#define GST_TYPEFIND(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TYPEFIND,GstTypeFind)) -#define GST_TYPEFIND_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TYPEFIND,GstTypeFindClass)) -#define GST_IS_TYPEFIND(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TYPEFIND)) -#define GST_IS_TYPEFIND_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TYPEFIND)) +#define GST_TYPE_TYPE_FIND \ + (gst_type_find_get_type()) +#define GST_TYPE_FIND(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TYPE_FIND,GstTypeFind)) +#define GST_TYPE_FIND_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TYPE_FIND,GstTypeFindClass)) +#define GST_IS_TYPE_FIND(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TYPE_FIND)) +#define GST_IS_TYPE_FIND_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TYPE_FIND)) typedef struct _GstTypeFind GstTypeFind; typedef struct _GstTypeFindClass GstTypeFindClass; @@ -64,13 +64,13 @@ struct _GstTypeFindClass { void (*have_type) (GstElement *element); }; -GType gst_typefind_get_type (void); +GType gst_type_find_get_type (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* GST_DISABLE_TYPEFIND */ +#endif /* GST_DISABLE_TYPE_FIND */ -#endif /* __GST_TYPEFIND_H__ */ +#endif /* __GST_TYPE_FIND_H__ */ diff --git a/gst/gstxml.c b/gst/gstxml.c index 1ca262e1ff..adcf5a1f98 100644 --- a/gst/gstxml.c +++ b/gst/gstxml.c @@ -400,7 +400,7 @@ gst_xml_make_element (xmlNodePtr cur, GstObject *parent) GST_INFO (GST_CAT_XML,"loading \"%s\" of type \"%s\"", name, type); - element = gst_elementfactory_make (type, name); + element = gst_element_factory_make (type, name); g_return_val_if_fail (element != NULL, NULL); diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y index 53025f8a7b..3644f368c5 100644 --- a/gst/parse/grammar.y +++ b/gst/parse/grammar.y @@ -95,6 +95,10 @@ graph: /* empty */ { $$ = g_new0 (graph_t, 1); *((graph_t**) p $$->connections_pending = g_list_append ($$->connections_pending, $2); } | graph property_value { $$ = $1; + if (!$$->current) { + fprintf (stderr, "error: property value assignments must be preceded by an element definition\n"); + YYABORT; + } $$->current->property_values = g_list_append ($$->current->property_values, $2); } @@ -129,7 +133,7 @@ static int yylex (void *lvalp) { static int yyerror (const char *s) { - printf ("error: %s\n", s); + fprintf (stderr, "error: %s\n", s); return -1; } diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index 41767286a6..b2ee55fc27 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -199,7 +199,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "A basic scheduler"); - factory = gst_schedulerfactory_new ("basic", + factory = gst_scheduler_factory_new ("basic", "A basic scheduler, it uses cothreads", gst_basic_scheduler_get_type()); diff --git a/gst/schedulers/gstfastscheduler.c b/gst/schedulers/gstfastscheduler.c index 200d3119c2..6a9fa45734 100644 --- a/gst/schedulers/gstfastscheduler.c +++ b/gst/schedulers/gstfastscheduler.c @@ -194,7 +194,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "A fast scheduler"); - factory = gst_schedulerfactory_new ("fast", + factory = gst_scheduler_factory_new ("fast", "A fast scheduler, it uses cothreads", gst_fast_scheduler_get_type()); diff --git a/gst/schedulers/gststandardscheduler.c b/gst/schedulers/gststandardscheduler.c index 981ca7f413..d16703dfa5 100644 --- a/gst/schedulers/gststandardscheduler.c +++ b/gst/schedulers/gststandardscheduler.c @@ -202,7 +202,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "A standard scheduler"); - factory = gst_schedulerfactory_new ("standard", + factory = gst_scheduler_factory_new ("standard", "A standard scheduler, it uses cothreads", gst_standard_scheduler_get_type()); diff --git a/gst/types/gsttypes.c b/gst/types/gsttypes.c index c8acb4048f..e3408a61f7 100644 --- a/gst/types/gsttypes.c +++ b/gst/types/gsttypes.c @@ -36,7 +36,7 @@ plugin_init (GModule *module, GstPlugin *plugin) while (_definitions[i].name) { GstTypeFactory *factory; - factory = gst_typefactory_new (&_definitions[i]); + factory = gst_type_factory_new (&_definitions[i]); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); GST_DEBUG(0, "added factory #%d '%s'", i, _definitions[i].name); i++; diff --git a/libs/gst/bytestream/bstest.c b/libs/gst/bytestream/bstest.c index bdfb894207..6f2acf8dca 100644 --- a/libs/gst/bytestream/bstest.c +++ b/libs/gst/bytestream/bstest.c @@ -280,7 +280,7 @@ plugin_init (GModule *module, GstPlugin *plugin) * This consists of the name of the element, the GType identifier, * and a pointer to the details structure at the top of the file. */ - factory = gst_elementfactory_new("gstbstest", GST_TYPE_IDENTITY, &gst_identity_details); + factory = gst_element_factory_new("gstbstest", GST_TYPE_IDENTITY, &gst_identity_details); g_return_val_if_fail(factory != NULL, FALSE); /* The very last thing is to register the elementfactory with the plugin. */ diff --git a/plugins/elements/gstaggregator.c b/plugins/elements/gstaggregator.c index fe16c71bc8..1cc67f6909 100644 --- a/plugins/elements/gstaggregator.c +++ b/plugins/elements/gstaggregator.c @@ -47,7 +47,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (aggregator_src_factory, +GST_PAD_TEMPLATE_FACTORY (aggregator_src_factory, "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, @@ -349,7 +349,7 @@ gst_aggregator_chain (GstPad *pad, GstBuffer *buf) gboolean gst_aggregator_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (aggregator_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (aggregator_src_factory)); return TRUE; } diff --git a/plugins/elements/gstelements.c b/plugins/elements/gstelements.c index fe48108cc5..7797522fcc 100644 --- a/plugins/elements/gstelements.c +++ b/plugins/elements/gstelements.c @@ -74,13 +74,13 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_set_longname (plugin, "Standard GST Elements"); while (_elements[i].name) { - factory = gst_elementfactory_new (_elements[i].name, + factory = gst_element_factory_new (_elements[i].name, (_elements[i].type) (), _elements[i].details); if (!factory) { - g_warning ("gst_elementfactory_new failed for `%s'", + g_warning ("gst_element_factory_new failed for `%s'", _elements[i].name); continue; } diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index 55e9914f2b..5083874dfe 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -50,7 +50,7 @@ enum { ARG_LAST_MESSAGE, }; -GST_PADTEMPLATE_FACTORY (fakesink_sink_factory, +GST_PAD_TEMPLATE_FACTORY (fakesink_sink_factory, "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, @@ -276,7 +276,7 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf) gboolean gst_fakesink_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (fakesink_sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (fakesink_sink_factory)); return TRUE; } diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 9686385b37..d9bc6de9aa 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -64,7 +64,7 @@ enum { ARG_LAST_MESSAGE, }; -GST_PADTEMPLATE_FACTORY (fakesrc_src_factory, +GST_PAD_TEMPLATE_FACTORY (fakesrc_src_factory, "src%d", GST_PAD_SRC, GST_PAD_REQUEST, @@ -792,7 +792,7 @@ gst_fakesrc_change_state (GstElement *element) gboolean gst_fakesrc_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (fakesrc_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (fakesrc_src_factory)); return TRUE; } diff --git a/plugins/elements/gstmd5sink.c b/plugins/elements/gstmd5sink.c index e220d364fc..561bcd876d 100644 --- a/plugins/elements/gstmd5sink.c +++ b/plugins/elements/gstmd5sink.c @@ -42,7 +42,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (md5_sink_factory, +GST_PAD_TEMPLATE_FACTORY (md5_sink_factory, "sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -408,7 +408,7 @@ static void gst_md5sink_init (GstMD5Sink *md5sink) { GstPad *pad; - pad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (md5_sink_factory), "sink"); + pad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (md5_sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (md5sink), pad); gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_md5sink_chain)); @@ -497,7 +497,7 @@ GstElementDetails gst_md5sink_details = { gboolean gst_md5sink_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (md5_sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (md5_sink_factory)); return TRUE; } diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 2ea74286b2..11322296f3 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -47,7 +47,7 @@ enum { /* FILL ME */ }; -GST_PADTEMPLATE_FACTORY (tee_src_factory, +GST_PAD_TEMPLATE_FACTORY (tee_src_factory, "src%d", GST_PAD_SRC, GST_PAD_REQUEST, @@ -345,7 +345,7 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf) gboolean gst_tee_factory_init (GstElementFactory *factory) { - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (tee_src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (tee_src_factory)); return TRUE; } diff --git a/tests/lat.c b/tests/lat.c index eb08877b03..1931ff797b 100644 --- a/tests/lat.c +++ b/tests/lat.c @@ -42,7 +42,7 @@ GstElement *identity_add(GstPipeline *pipeline, GstElement *first, int count) { for (i=0; ifilesrc = gst_elementfactory_make ("filesrc", buffer); + channel->filesrc = gst_element_factory_make ("filesrc", buffer); g_assert(channel->filesrc != NULL); GST_DEBUG(0, "c_i_p : setting location"); @@ -286,7 +286,7 @@ create_input_channel (int id, char* location) #endif sprintf (buffer, "volenv%d", id); - channel->volenv = gst_elementfactory_make ("volenv", buffer); + channel->volenv = gst_element_factory_make ("volenv", buffer); g_assert(channel->volenv != NULL); /* autoplug the pipe */ @@ -296,7 +296,7 @@ create_input_channel (int id, char* location) #endif #ifdef WITH_BUG - srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->filesrc); + srccaps = gst_play_type_find (GST_BIN (channel->pipe), channel->filesrc); #endif #ifdef WITH_BUG2 { @@ -322,7 +322,7 @@ create_input_channel (int id, char* location) printf ("DEBUG : c_i_p : creating autoplug\n"); #endif - autoplug = gst_autoplugfactory_make ("static"); + autoplug = gst_autoplug_factory_make ("static"); g_assert (autoplug != NULL); #ifdef DEBUG @@ -343,7 +343,7 @@ create_input_channel (int id, char* location) /* static plug, use mad plugin and assume mp3 input */ printf ("using static plugging for input channel\n"); - decoder = gst_elementfactory_make ("mad", "mpg123"); + decoder = gst_element_factory_make ("mad", "mpg123"); if (!decoder) { fprintf (stderr, "Could not get a decoder element !\n"); diff --git a/tests/old/examples/plugins/example.c b/tests/old/examples/plugins/example.c index 45506fc93e..29861a27f9 100644 --- a/tests/old/examples/plugins/example.c +++ b/tests/old/examples/plugins/example.c @@ -58,7 +58,7 @@ enum { * can have. They can be quite complex, but for this example plugin * they are rather simple. */ -GST_PADTEMPLATE_FACTORY (sink_factory, +GST_PAD_TEMPLATE_FACTORY (sink_factory, "sink", /* The name of the pad */ GST_PAD_SINK, /* Direction of the pad */ GST_PAD_ALWAYS, /* The pad exists for every instance */ @@ -75,7 +75,7 @@ GST_PADTEMPLATE_FACTORY (sink_factory, ); /* This factory is much simpler, and defines the source pad. */ -GST_PADTEMPLATE_FACTORY (src_factory, +GST_PAD_TEMPLATE_FACTORY (src_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -190,7 +190,7 @@ gst_example_init(GstExample *example) * We will use the template constructed by the factory. */ example->sinkpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (sink_factory), "sink"); + GST_PAD_TEMPLATE_GET (sink_factory), "sink"); /* Setting the chain function allows us to supply the function that will * actually be performing the work. Without this, the element would do * nothing, with undefined results (assertion failures and such). @@ -207,7 +207,7 @@ gst_example_init(GstExample *example) * they only produce them. */ example->srcpad = gst_pad_new_from_template ( - GST_PADTEMPLATE_GET (src_factory), "src"); + GST_PAD_TEMPLATE_GET (src_factory), "src"); gst_element_add_pad(GST_ELEMENT(example),example->srcpad); /* Initialization of element's private variables. */ @@ -338,14 +338,14 @@ plugin_init (GModule *module, GstPlugin *plugin) * This consists of the name of the element, the GType identifier, * and a pointer to the details structure at the top of the file. */ - factory = gst_elementfactory_new("example", GST_TYPE_EXAMPLE, &example_details); + factory = gst_element_factory_new("example", GST_TYPE_EXAMPLE, &example_details); g_return_val_if_fail(factory != NULL, FALSE); /* The pad templates can be easily generated from the factories above, * and then added to the list of padtemplates for the elementfactory. */ - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (sink_factory)); - gst_elementfactory_add_padtemplate (factory, GST_PADTEMPLATE_GET (src_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_factory)); + gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_factory)); /* The very last thing is to register the elementfactory with the plugin. */ gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); diff --git a/tests/old/examples/queue/queue.c b/tests/old/examples/queue/queue.c index 15dd327f21..e68b278c56 100644 --- a/tests/old/examples/queue/queue.c +++ b/tests/old/examples/queue/queue.c @@ -23,17 +23,17 @@ int main(int argc,char *argv[]) g_assert(bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); - parse = gst_elementfactory_make("mp3parse", "parse"); - decode = gst_elementfactory_make("mpg123", "decode"); + parse = gst_element_factory_make("mp3parse", "parse"); + decode = gst_element_factory_make("mpg123", "decode"); - queue = gst_elementfactory_make("queue", "queue"); + queue = gst_element_factory_make("queue", "queue"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); /* add objects to the main pipeline */ diff --git a/tests/old/examples/queue2/queue2.c b/tests/old/examples/queue2/queue2.c index f92eed48ff..83c3173ecd 100644 --- a/tests/old/examples/queue2/queue2.c +++ b/tests/old/examples/queue2/queue2.c @@ -33,16 +33,16 @@ int main(int argc,char *argv[]) g_assert(pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect (G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); - queue = gst_elementfactory_make("queue", "queue"); + queue = gst_element_factory_make("queue", "queue"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); /* add objects to the main pipeline */ diff --git a/tests/old/examples/queue3/queue3.c b/tests/old/examples/queue3/queue3.c index 553846fce7..e2c1d38743 100644 --- a/tests/old/examples/queue3/queue3.c +++ b/tests/old/examples/queue3/queue3.c @@ -33,20 +33,20 @@ int main(int argc,char *argv[]) g_assert(bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect(G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); - queue = gst_elementfactory_make("queue", "queue"); + queue = gst_element_factory_make("queue", "queue"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - parse = gst_elementfactory_make("mp3parse", "parse"); - decode = gst_elementfactory_make("mpg123", "decode"); + parse = gst_element_factory_make("mp3parse", "parse"); + decode = gst_element_factory_make("mpg123", "decode"); /* add objects to the main bin */ gst_bin_add(GST_BIN(bin), filesrc); diff --git a/tests/old/examples/queue4/queue4.c b/tests/old/examples/queue4/queue4.c index 8e28592017..e2c4025f5b 100644 --- a/tests/old/examples/queue4/queue4.c +++ b/tests/old/examples/queue4/queue4.c @@ -35,21 +35,21 @@ int main(int argc,char *argv[]) g_assert(bin != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect(G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); - queue = gst_elementfactory_make("queue", "queue"); - queue2 = gst_elementfactory_make("queue", "queue2"); + queue = gst_element_factory_make("queue", "queue"); + queue2 = gst_element_factory_make("queue", "queue2"); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); - parse = gst_elementfactory_make("mp3parse", "parse"); - decode = gst_elementfactory_make("mpg123", "decode"); + parse = gst_element_factory_make("mp3parse", "parse"); + decode = gst_element_factory_make("mpg123", "decode"); /* add objects to the main bin */ gst_bin_add(GST_BIN(bin), filesrc); diff --git a/tests/old/examples/thread/thread.c b/tests/old/examples/thread/thread.c index 5492210c4d..62d4b1071d 100644 --- a/tests/old/examples/thread/thread.c +++ b/tests/old/examples/thread/thread.c @@ -34,14 +34,14 @@ int main(int argc,char *argv[]) g_assert(pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make("filesrc", "disk_source"); + filesrc = gst_element_factory_make("filesrc", "disk_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); g_signal_connect(G_OBJECT(filesrc),"eos", G_CALLBACK(eos), thread); /* and an audio sink */ - osssink = gst_elementfactory_make("osssink", "play_audio"); + osssink = gst_element_factory_make("osssink", "play_audio"); g_assert(osssink != NULL); /* add objects to the main pipeline */ diff --git a/tests/old/examples/typefind/typefind.c b/tests/old/examples/typefind/typefind.c index 53a849d5ce..0a66e26e61 100644 --- a/tests/old/examples/typefind/typefind.c +++ b/tests/old/examples/typefind/typefind.c @@ -32,11 +32,11 @@ main(int argc, char *argv[]) g_assert(bin != NULL); /* create a file reader */ - filesrc = gst_elementfactory_make("filesrc", "file_source"); + filesrc = gst_element_factory_make("filesrc", "file_source"); g_assert(filesrc != NULL); g_object_set(G_OBJECT(filesrc),"location", argv[1],NULL); - typefind = gst_elementfactory_make("typefind", "typefind"); + typefind = gst_element_factory_make("typefind", "typefind"); g_assert(typefind != NULL); /* add objects to the main pipeline */ diff --git a/tests/old/examples/xml/createxml.c b/tests/old/examples/xml/createxml.c index d4501c9a69..137f494c14 100644 --- a/tests/old/examples/xml/createxml.c +++ b/tests/old/examples/xml/createxml.c @@ -31,9 +31,9 @@ int main(int argc,char *argv[]) } /* create new threads to hold the elements */ - thread = gst_elementfactory_make ("thread", "thread"); + thread = gst_element_factory_make ("thread", "thread"); g_assert (thread != NULL); - thread2 = gst_elementfactory_make ("thread", "thread2"); + thread2 = gst_element_factory_make ("thread", "thread2"); g_assert (thread2 != NULL); /* these signals will allow us to save custom tags with the gst xml output */ @@ -49,18 +49,18 @@ int main(int argc,char *argv[]) g_assert (pipeline != NULL); /* create a disk reader */ - filesrc = gst_elementfactory_make ("filesrc", "disk_source"); + filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc != NULL); g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - queue = gst_elementfactory_make ("queue", "queue"); - queue2 = gst_elementfactory_make ("queue", "queue2"); + queue = gst_element_factory_make ("queue", "queue"); + queue2 = gst_element_factory_make ("queue", "queue2"); /* and an audio sink */ - osssink = gst_elementfactory_make ("osssink", "play_audio"); + osssink = gst_element_factory_make ("osssink", "play_audio"); g_assert (osssink != NULL); - decode = gst_elementfactory_make ("mad", "decode"); + decode = gst_element_factory_make ("mad", "decode"); g_assert (decode != NULL); /* add objects to the main pipeline */ diff --git a/tests/old/testsuite/bytestream/gstbstest.c b/tests/old/testsuite/bytestream/gstbstest.c index 7dc91e79bc..baee3cc1f5 100644 --- a/tests/old/testsuite/bytestream/gstbstest.c +++ b/tests/old/testsuite/bytestream/gstbstest.c @@ -397,7 +397,7 @@ plugin_init (GModule * module, GstPlugin * plugin) * This consists of the name of the element, the GType identifier, * and a pointer to the details structure at the top of the file. */ - factory = gst_elementfactory_new ("bstest", GST_TYPE_BSTEST, &gst_bstest_details); + factory = gst_element_factory_new ("bstest", GST_TYPE_BSTEST, &gst_bstest_details); g_return_val_if_fail (factory != NULL, FALSE); /* The very last thing is to register the elementfactory with the plugin. */ diff --git a/tests/old/testsuite/bytestream/test1.c b/tests/old/testsuite/bytestream/test1.c index 0670849e84..c7652bcf0f 100644 --- a/tests/old/testsuite/bytestream/test1.c +++ b/tests/old/testsuite/bytestream/test1.c @@ -172,17 +172,17 @@ main (int argc, char *argv[]) arg_walk++; iterations = atoi (argv[arg_walk]); - pipeline = gst_elementfactory_make ("pipeline", "pipeline"); + pipeline = gst_element_factory_make ("pipeline", "pipeline"); g_assert (pipeline); - src = gst_elementfactory_make ("fakesrc", "src"); + src = gst_element_factory_make ("fakesrc", "src"); g_assert (src); - sink = gst_elementfactory_make ("fakesink", "sink"); + sink = gst_element_factory_make ("fakesink", "sink"); g_assert (sink); g_signal_connect (G_OBJECT (sink), "handoff", G_CALLBACK (handoff), NULL); - bs = gst_elementfactory_make ("bstest", "bs"); + bs = gst_element_factory_make ("bstest", "bs"); g_assert (bs); gst_element_connect (src, "src", bs, "sink"); diff --git a/tests/old/testsuite/cleanup/cleanup1.c b/tests/old/testsuite/cleanup/cleanup1.c index 2c2ddf1466..9342ac75bc 100644 --- a/tests/old/testsuite/cleanup/cleanup1.c +++ b/tests/old/testsuite/cleanup/cleanup1.c @@ -9,8 +9,8 @@ create_pipeline (void) pipeline = gst_pipeline_new ("main_pipeline"); - fakesrc = gst_elementfactory_make ("fakesrc", "fakesrc"); - fakesink = gst_elementfactory_make ("fakesink", "fakesink"); + fakesrc = gst_element_factory_make ("fakesrc", "fakesrc"); + fakesink = gst_element_factory_make ("fakesink", "fakesink"); gst_element_connect (fakesrc, "src", fakesink, "sink"); diff --git a/tests/old/testsuite/cleanup/cleanup2.c b/tests/old/testsuite/cleanup/cleanup2.c index 9a5e2f416f..b32df0eb97 100644 --- a/tests/old/testsuite/cleanup/cleanup2.c +++ b/tests/old/testsuite/cleanup/cleanup2.c @@ -9,9 +9,9 @@ create_pipeline (void) pipeline = gst_pipeline_new ("main_pipeline"); - fakesrc = gst_elementfactory_make ("fakesrc", "fakesrc"); + fakesrc = gst_element_factory_make ("fakesrc", "fakesrc"); bin = gst_bin_new ("bin"); - fakesink = gst_elementfactory_make ("fakesink", "fakesink"); + fakesink = gst_element_factory_make ("fakesink", "fakesink"); gst_bin_add (GST_BIN (bin), fakesink); gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink"); diff --git a/tests/old/testsuite/cleanup/cleanup3.c b/tests/old/testsuite/cleanup/cleanup3.c index bf4a0144b9..48e39a8664 100644 --- a/tests/old/testsuite/cleanup/cleanup3.c +++ b/tests/old/testsuite/cleanup/cleanup3.c @@ -9,10 +9,10 @@ create_pipeline (void) pipeline = gst_pipeline_new ("main_pipeline"); - fakesrc = gst_elementfactory_make ("fakesrc", "fakesrc"); + fakesrc = gst_element_factory_make ("fakesrc", "fakesrc"); thread = gst_thread_new ("thread"); - fakesink = gst_elementfactory_make ("fakesink", "fakesink"); - queue = gst_elementfactory_make ("queue", "queue"); + fakesink = gst_element_factory_make ("fakesink", "fakesink"); + queue = gst_element_factory_make ("queue", "queue"); gst_bin_add (GST_BIN (thread), fakesink); gst_bin_add (GST_BIN (thread), queue); gst_element_connect (queue, "src", fakesink, "sink"); diff --git a/tests/old/testsuite/cleanup/cleanup4.c b/tests/old/testsuite/cleanup/cleanup4.c index fa14d8d385..5892e8f60a 100644 --- a/tests/old/testsuite/cleanup/cleanup4.c +++ b/tests/old/testsuite/cleanup/cleanup4.c @@ -20,7 +20,7 @@ main (gint argc, gchar *argv[]) pipeline = gst_pipeline_new ("main_pipeline"); - fakesrc = gst_elementfactory_make ("fakesrc", "fakesrc"); + fakesrc = gst_element_factory_make ("fakesrc", "fakesrc"); g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL); gst_bin_add (GST_BIN (pipeline), fakesrc); @@ -33,7 +33,7 @@ main (gint argc, gchar *argv[]) bin = gst_bin_new ("bin"); - fakesink = gst_elementfactory_make ("fakesink", "fakesink"); + fakesink = gst_element_factory_make ("fakesink", "fakesink"); gst_element_connect (fakesrc, "src", fakesink, "sink"); diff --git a/tests/old/testsuite/cleanup/cleanup5.c b/tests/old/testsuite/cleanup/cleanup5.c index d3e8b1e13c..f45baa092e 100644 --- a/tests/old/testsuite/cleanup/cleanup5.c +++ b/tests/old/testsuite/cleanup/cleanup5.c @@ -17,7 +17,7 @@ int main(int argc,char *argv[]) { fprintf (stderr, "+"); - element = gst_elementfactory_make ("tee", "tee"); + element = gst_element_factory_make ("tee", "tee"); if (!element) break; diff --git a/tests/old/testsuite/dynparams/dparamstest.c b/tests/old/testsuite/dynparams/dparamstest.c index 2310996753..7e5aa8fe9e 100644 --- a/tests/old/testsuite/dynparams/dparamstest.c +++ b/tests/old/testsuite/dynparams/dparamstest.c @@ -209,19 +209,19 @@ int main(int argc,char *argv[]) { gst_init (&argc, &argv); gst_control_init(&argc,&argv); - factory = gst_elementfactory_new ("dptest", GST_TYPE_DPTEST, &gst_dptest_details); + factory = gst_element_factory_new ("dptest", GST_TYPE_DPTEST, &gst_dptest_details); g_assert (factory != NULL); - pipeline = gst_elementfactory_make ("pipeline", "pipeline"); + pipeline = gst_element_factory_make ("pipeline", "pipeline"); g_assert (pipeline); - src = gst_elementfactory_make ("fakesrc", "src"); + src = gst_element_factory_make ("fakesrc", "src"); g_assert (src); - sink = gst_elementfactory_make ("fakesink", "sink"); + sink = gst_element_factory_make ("fakesink", "sink"); g_assert (sink); - testelement = gst_elementfactory_make ("dptest", "testelement"); + testelement = gst_element_factory_make ("dptest", "testelement"); g_assert (testelement); gst_element_connect (src, "src", testelement, "sink"); diff --git a/tests/old/testsuite/elements/fake.c b/tests/old/testsuite/elements/fake.c index 19778cae3b..d94aab57d4 100644 --- a/tests/old/testsuite/elements/fake.c +++ b/tests/old/testsuite/elements/fake.c @@ -18,7 +18,7 @@ element_create (char *name, char *element) { GstElement *el = NULL; - el = (GstElement *) gst_elementfactory_make (element, name); + el = (GstElement *) gst_element_factory_make (element, name); if (el == NULL) { fprintf (stderr, "Could not create element %s (%s) !\n", name, element); diff --git a/tests/old/testsuite/elements/tee.c b/tests/old/testsuite/elements/tee.c index 0f353034cf..9108a2f613 100644 --- a/tests/old/testsuite/elements/tee.c +++ b/tests/old/testsuite/elements/tee.c @@ -26,7 +26,7 @@ element_create (char *name, char *element) { GstElement *el = NULL; - el = (GstElement *) gst_elementfactory_make (element, name); + el = (GstElement *) gst_element_factory_make (element, name); if (el == NULL) { fprintf (stderr, "Could not create element %s (%s) !\n", name, element); diff --git a/tests/old/testsuite/refcounting/pad.c b/tests/old/testsuite/refcounting/pad.c index fed2554cb6..b308e4e670 100644 --- a/tests/old/testsuite/refcounting/pad.c +++ b/tests/old/testsuite/refcounting/pad.c @@ -205,13 +205,13 @@ main (int argc, gchar *argv[]) g_print ("pad destroy effects on connect pad ok %ld\n", vmsize()-usage1); for (i=0; idata); features = g_list_next (features); - if (!GST_IS_ELEMENTFACTORY (feature)) + if (!GST_IS_ELEMENT_FACTORY (feature)) continue; - factory = GST_ELEMENTFACTORY (feature); + factory = GST_ELEMENT_FACTORY (feature); factorynode = xmlNewChild (doc->xmlRootNode, NULL, "element", NULL); xmlNewChild (factorynode, NULL, "name", gst_object_get_name (GST_OBJECT (factory))); - element = gst_elementfactory_create(factory,"element"); + element = gst_element_factory_create(factory,"element"); GST_DEBUG(GST_CAT_PLUGIN_LOADING, "adding factory %s", gst_object_get_name (GST_OBJECT (factory))); if (element == NULL) { diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 6ea96cd3f5..6f0b741677 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -149,7 +149,7 @@ print_element_info (GstElementFactory *factory) gboolean have_flags; gint maxlevel = 0; - element = gst_elementfactory_create(factory,"element"); + element = gst_element_factory_create(factory,"element"); if (!element) { g_print ("couldn't construct element for some reason\n"); return -1; @@ -475,31 +475,31 @@ print_element_list (void) feature = GST_PLUGIN_FEATURE (features->data); - if (GST_IS_ELEMENTFACTORY (feature)) { + if (GST_IS_ELEMENT_FACTORY (feature)) { GstElementFactory *factory; - factory = GST_ELEMENTFACTORY (feature); + factory = GST_ELEMENT_FACTORY (feature); printf("%s: %s: %s\n",plugin->name, GST_OBJECT_NAME (factory) ,factory->details->longname); } - else if (GST_IS_AUTOPLUGFACTORY (feature)) { + else if (GST_IS_AUTOPLUG_FACTORY (feature)) { GstAutoplugFactory *factory; - factory = GST_AUTOPLUGFACTORY (feature); + factory = GST_AUTOPLUG_FACTORY (feature); printf("%s: %s: %s\n", plugin->name, GST_OBJECT_NAME (factory), factory->longdesc); } - else if (GST_IS_TYPEFACTORY (feature)) { + else if (GST_IS_TYPE_FACTORY (feature)) { GstTypeFactory *factory; - factory = GST_TYPEFACTORY (feature); + factory = GST_TYPE_FACTORY (feature); printf("%s: %s: %s\n", plugin->name, factory->mime, factory->exts); if (factory->typefindfunc) printf(" Has typefind function: %s\n",GST_DEBUG_FUNCPTR_NAME(factory->typefindfunc)); } - else if (GST_IS_SCHEDULERFACTORY (feature)) { + else if (GST_IS_SCHEDULER_FACTORY (feature)) { GstSchedulerFactory *factory; - factory = GST_SCHEDULERFACTORY (feature); + factory = GST_SCHEDULER_FACTORY (feature); printf("%s: %s: %s\n", plugin->name, GST_OBJECT_NAME (factory), factory->longdesc); } else { @@ -530,31 +530,31 @@ print_plugin_info (GstPlugin *plugin) feature = GST_PLUGIN_FEATURE (features->data); - if (GST_IS_ELEMENTFACTORY (feature)) { + if (GST_IS_ELEMENT_FACTORY (feature)) { GstElementFactory *factory; - factory = GST_ELEMENTFACTORY (feature); + factory = GST_ELEMENT_FACTORY (feature); printf(" %s: %s\n", GST_OBJECT_NAME (factory) ,factory->details->longname); } - else if (GST_IS_AUTOPLUGFACTORY (feature)) { + else if (GST_IS_AUTOPLUG_FACTORY (feature)) { GstAutoplugFactory *factory; - factory = GST_AUTOPLUGFACTORY (feature); + factory = GST_AUTOPLUG_FACTORY (feature); printf(" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc); } - else if (GST_IS_TYPEFACTORY (feature)) { + else if (GST_IS_TYPE_FACTORY (feature)) { GstTypeFactory *factory; - factory = GST_TYPEFACTORY (feature); + factory = GST_TYPE_FACTORY (feature); printf(" %s: %s\n", factory->mime, factory->exts); if (factory->typefindfunc) printf(" Has typefind function: %s\n",GST_DEBUG_FUNCPTR_NAME(factory->typefindfunc)); } - else if (GST_IS_SCHEDULERFACTORY (feature)) { + else if (GST_IS_SCHEDULER_FACTORY (feature)) { GstSchedulerFactory *factory; - factory = GST_SCHEDULERFACTORY (feature); + factory = GST_SCHEDULER_FACTORY (feature); printf(" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc); } else { @@ -594,7 +594,7 @@ main (int argc, char *argv[]) /* only search for a factory if there's not a '.so' */ if (! strstr(argv[1],".so")) { - factory = gst_elementfactory_find (argv[1]); + factory = gst_element_factory_find (argv[1]); /* if there's a factory, print out the info */ if (factory)