GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE same with *factory and typefind. BRANCH-RELEASE-0_3_4-ROOT RELEASE-0_3_4-30SECONDFRENCHMAN
authorAndy Wingo <wingo@pobox.com>
Thu, 11 Apr 2002 20:42:00 +0000 (20:42 +0000)
committerAndy Wingo <wingo@pobox.com>
Thu, 11 Apr 2002 20:42:00 +0000 (20:42 +0000)
Original commit message from CVS:
GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE

same with *factory and typefind.

also, some -Werror fixes.

common
ext/ffmpeg/gstffmpegdec.c
ext/ffmpeg/gstffmpegenc.c

diff --git a/common b/common
index 38267ab..52a8d4b 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 38267abf56a3428093cea71429dca6a24a927547
+Subproject commit 52a8d4bd490c495f1e71725644535dbf2cf209c7
index 564564b..a4ec712 100644 (file)
@@ -32,7 +32,7 @@ enum {
 };
 
 /* This factory is much simpler, and defines the source pad. */
-GST_PADTEMPLATE_FACTORY (gst_ffmpegdec_sink_factory,
+GST_PAD_TEMPLATE_FACTORY (gst_ffmpegdec_sink_factory,
   "sink",
   GST_PAD_SINK,
   GST_PAD_ALWAYS,
@@ -44,7 +44,7 @@ GST_PADTEMPLATE_FACTORY (gst_ffmpegdec_sink_factory,
 )
 
 /* This factory is much simpler, and defines the source pad. */
-GST_PADTEMPLATE_FACTORY (gst_ffmpegdec_audio_src_factory,
+GST_PAD_TEMPLATE_FACTORY (gst_ffmpegdec_audio_src_factory,
   "src",
   GST_PAD_SRC,
   GST_PAD_ALWAYS,
@@ -63,7 +63,7 @@ GST_PADTEMPLATE_FACTORY (gst_ffmpegdec_audio_src_factory,
 )
 
 /* This factory is much simpler, and defines the source pad. */
-GST_PADTEMPLATE_FACTORY (gst_ffmpegdec_video_src_factory,
+GST_PAD_TEMPLATE_FACTORY (gst_ffmpegdec_video_src_factory,
   "src",
   GST_PAD_SRC,
   GST_PAD_ALWAYS,
@@ -150,17 +150,17 @@ gst_ffmpegdec_init(GstFFMpegDec *ffmpegdec)
   ffmpegdec->context = g_malloc0 (sizeof (AVCodecContext));
 
   ffmpegdec->sinkpad = gst_pad_new_from_template (
-                 GST_PADTEMPLATE_GET (gst_ffmpegdec_sink_factory), "sink");
+                 GST_PAD_TEMPLATE_GET (gst_ffmpegdec_sink_factory), "sink");
   gst_pad_set_connect_function (ffmpegdec->sinkpad, gst_ffmpegdec_sinkconnect);
 
   if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
     ffmpegdec->srcpad = gst_pad_new_from_template (
-                 GST_PADTEMPLATE_GET (gst_ffmpegdec_video_src_factory), "src");
+                 GST_PAD_TEMPLATE_GET (gst_ffmpegdec_video_src_factory), "src");
     gst_pad_set_chain_function (ffmpegdec->sinkpad, gst_ffmpegdec_chain_video);
   }
   else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
     ffmpegdec->srcpad = gst_pad_new_from_template (
-                 GST_PADTEMPLATE_GET (gst_ffmpegdec_audio_src_factory), "src");
+                 GST_PAD_TEMPLATE_GET (gst_ffmpegdec_audio_src_factory), "src");
     gst_pad_set_chain_function (ffmpegdec->sinkpad, gst_ffmpegdec_chain_audio);
   }
 
@@ -358,19 +358,19 @@ gst_ffmpegdec_register (GstPlugin *plugin)
                         (gpointer) in_plugin);
 
     /* register the plugin with gstreamer */
-    factory = gst_elementfactory_new(type_name,type,details);
+    factory = gst_element_factory_new(type_name,type,details);
     g_return_val_if_fail(factory != NULL, FALSE);
 
-    gst_elementfactory_add_padtemplate (factory, 
-                   GST_PADTEMPLATE_GET (gst_ffmpegdec_sink_factory));
+    gst_element_factory_add_pad_template (factory, 
+                   GST_PAD_TEMPLATE_GET (gst_ffmpegdec_sink_factory));
 
     if (in_plugin->type == CODEC_TYPE_VIDEO) {
-      gst_elementfactory_add_padtemplate (factory, 
-                   GST_PADTEMPLATE_GET (gst_ffmpegdec_video_src_factory));
+      gst_element_factory_add_pad_template (factory, 
+                   GST_PAD_TEMPLATE_GET (gst_ffmpegdec_video_src_factory));
     }
     else if (in_plugin->type == CODEC_TYPE_AUDIO) {
-      gst_elementfactory_add_padtemplate (factory, 
-                   GST_PADTEMPLATE_GET (gst_ffmpegdec_audio_src_factory));
+      gst_element_factory_add_pad_template (factory, 
+                   GST_PAD_TEMPLATE_GET (gst_ffmpegdec_audio_src_factory));
     }
 
     /* The very last thing is to register the elementfactory with the plugin. */
index 7286c6a..0232392 100644 (file)
@@ -40,7 +40,7 @@ enum {
 };
 
 /* This factory is much simpler, and defines the source pad. */
-GST_PADTEMPLATE_FACTORY (gst_ffmpegenc_src_factory,
+GST_PAD_TEMPLATE_FACTORY (gst_ffmpegenc_src_factory,
   "src",
   GST_PAD_SRC,
   GST_PAD_ALWAYS,
@@ -52,7 +52,7 @@ GST_PADTEMPLATE_FACTORY (gst_ffmpegenc_src_factory,
 )
 
 /* This factory is much simpler, and defines the source pad. */
-GST_PADTEMPLATE_FACTORY (gst_ffmpegenc_audio_sink_factory,
+GST_PAD_TEMPLATE_FACTORY (gst_ffmpegenc_audio_sink_factory,
   "sink",
   GST_PAD_SINK,
   GST_PAD_ALWAYS,
@@ -71,7 +71,7 @@ GST_PADTEMPLATE_FACTORY (gst_ffmpegenc_audio_sink_factory,
 )
 
 /* This factory is much simpler, and defines the source pad. */
-GST_PADTEMPLATE_FACTORY (gst_ffmpegenc_video_sink_factory,
+GST_PAD_TEMPLATE_FACTORY (gst_ffmpegenc_video_sink_factory,
   "sink",
   GST_PAD_SINK,
   GST_PAD_ALWAYS,
@@ -235,7 +235,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
 
   if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
     ffmpegenc->sinkpad = gst_pad_new_from_template (
-                 GST_PADTEMPLATE_GET (gst_ffmpegenc_video_sink_factory), "sink");
+                 GST_PAD_TEMPLATE_GET (gst_ffmpegenc_video_sink_factory), "sink");
     gst_pad_set_chain_function (ffmpegenc->sinkpad, gst_ffmpegenc_chain_video);
     ffmpegenc->context->bit_rate = 300000;
     ffmpegenc->context->gop_size = 15;
@@ -245,7 +245,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
   }
   else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
     ffmpegenc->sinkpad = gst_pad_new_from_template (
-                 GST_PADTEMPLATE_GET (gst_ffmpegenc_audio_sink_factory), "sink");
+                 GST_PAD_TEMPLATE_GET (gst_ffmpegenc_audio_sink_factory), "sink");
     gst_pad_set_chain_function (ffmpegenc->sinkpad, gst_ffmpegenc_chain_audio);
     ffmpegenc->context->bit_rate = 128000;
     ffmpegenc->context->sample_rate = -1;
@@ -255,7 +255,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
   gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->sinkpad);
 
   ffmpegenc->srcpad = gst_pad_new_from_template (
-                 GST_PADTEMPLATE_GET (gst_ffmpegenc_src_factory), "src");
+                 GST_PAD_TEMPLATE_GET (gst_ffmpegenc_src_factory), "src");
   gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->srcpad);
 
   /* Initialization of element's private variables. */
@@ -533,18 +533,18 @@ gst_ffmpegenc_register (GstPlugin *plugin)
                         (gpointer) in_plugin);
 
     /* register the plugin with gstreamer */
-    factory = gst_elementfactory_new(type_name,type,details);
+    factory = gst_element_factory_new(type_name,type,details);
     g_return_val_if_fail(factory != NULL, FALSE);
 
-    gst_elementfactory_add_padtemplate (factory, 
-                   GST_PADTEMPLATE_GET (gst_ffmpegenc_src_factory));
+    gst_element_factory_add_pad_template (factory, 
+                   GST_PAD_TEMPLATE_GET (gst_ffmpegenc_src_factory));
     if (in_plugin->type == CODEC_TYPE_VIDEO) {
-      gst_elementfactory_add_padtemplate (factory, 
-                   GST_PADTEMPLATE_GET (gst_ffmpegenc_video_sink_factory));
+      gst_element_factory_add_pad_template (factory, 
+                   GST_PAD_TEMPLATE_GET (gst_ffmpegenc_video_sink_factory));
     }
     else if (in_plugin->type == CODEC_TYPE_AUDIO) {
-      gst_elementfactory_add_padtemplate (factory, 
-                   GST_PADTEMPLATE_GET (gst_ffmpegenc_audio_sink_factory));
+      gst_element_factory_add_pad_template (factory, 
+                   GST_PAD_TEMPLATE_GET (gst_ffmpegenc_audio_sink_factory));
     }
 
     /* The very last thing is to register the elementfactory with the plugin. */