mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 07:26:29 +00:00
GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE same with *factory and typefind.
Original commit message from CVS: GstPadTemplate <-> gst_pad_template <-> GST_PAD_TEMPLATE same with *factory and typefind. also, some -Werror fixes.
This commit is contained in:
parent
762502fd52
commit
c8f838fd03
3 changed files with 27 additions and 27 deletions
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 38267abf56a3428093cea71429dca6a24a927547
|
Subproject commit 52a8d4bd490c495f1e71725644535dbf2cf209c7
|
|
@ -32,7 +32,7 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This factory is much simpler, and defines the source pad. */
|
/* 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",
|
"sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
@ -44,7 +44,7 @@ GST_PADTEMPLATE_FACTORY (gst_ffmpegdec_sink_factory,
|
||||||
)
|
)
|
||||||
|
|
||||||
/* This factory is much simpler, and defines the source pad. */
|
/* 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",
|
"src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
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. */
|
/* 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",
|
"src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
@ -150,17 +150,17 @@ gst_ffmpegdec_init(GstFFMpegDec *ffmpegdec)
|
||||||
ffmpegdec->context = g_malloc0 (sizeof (AVCodecContext));
|
ffmpegdec->context = g_malloc0 (sizeof (AVCodecContext));
|
||||||
|
|
||||||
ffmpegdec->sinkpad = gst_pad_new_from_template (
|
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);
|
gst_pad_set_connect_function (ffmpegdec->sinkpad, gst_ffmpegdec_sinkconnect);
|
||||||
|
|
||||||
if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
|
if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
|
||||||
ffmpegdec->srcpad = gst_pad_new_from_template (
|
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);
|
gst_pad_set_chain_function (ffmpegdec->sinkpad, gst_ffmpegdec_chain_video);
|
||||||
}
|
}
|
||||||
else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
|
else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
|
||||||
ffmpegdec->srcpad = gst_pad_new_from_template (
|
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);
|
gst_pad_set_chain_function (ffmpegdec->sinkpad, gst_ffmpegdec_chain_audio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,19 +358,19 @@ gst_ffmpegdec_register (GstPlugin *plugin)
|
||||||
(gpointer) in_plugin);
|
(gpointer) in_plugin);
|
||||||
|
|
||||||
/* register the plugin with gstreamer */
|
/* 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);
|
g_return_val_if_fail(factory != NULL, FALSE);
|
||||||
|
|
||||||
gst_elementfactory_add_padtemplate (factory,
|
gst_element_factory_add_pad_template (factory,
|
||||||
GST_PADTEMPLATE_GET (gst_ffmpegdec_sink_factory));
|
GST_PAD_TEMPLATE_GET (gst_ffmpegdec_sink_factory));
|
||||||
|
|
||||||
if (in_plugin->type == CODEC_TYPE_VIDEO) {
|
if (in_plugin->type == CODEC_TYPE_VIDEO) {
|
||||||
gst_elementfactory_add_padtemplate (factory,
|
gst_element_factory_add_pad_template (factory,
|
||||||
GST_PADTEMPLATE_GET (gst_ffmpegdec_video_src_factory));
|
GST_PAD_TEMPLATE_GET (gst_ffmpegdec_video_src_factory));
|
||||||
}
|
}
|
||||||
else if (in_plugin->type == CODEC_TYPE_AUDIO) {
|
else if (in_plugin->type == CODEC_TYPE_AUDIO) {
|
||||||
gst_elementfactory_add_padtemplate (factory,
|
gst_element_factory_add_pad_template (factory,
|
||||||
GST_PADTEMPLATE_GET (gst_ffmpegdec_audio_src_factory));
|
GST_PAD_TEMPLATE_GET (gst_ffmpegdec_audio_src_factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The very last thing is to register the elementfactory with the plugin. */
|
/* The very last thing is to register the elementfactory with the plugin. */
|
||||||
|
|
|
@ -40,7 +40,7 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This factory is much simpler, and defines the source pad. */
|
/* 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",
|
"src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
@ -52,7 +52,7 @@ GST_PADTEMPLATE_FACTORY (gst_ffmpegenc_src_factory,
|
||||||
)
|
)
|
||||||
|
|
||||||
/* This factory is much simpler, and defines the source pad. */
|
/* 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",
|
"sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
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. */
|
/* 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",
|
"sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
|
@ -235,7 +235,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
|
||||||
|
|
||||||
if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
|
if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
|
||||||
ffmpegenc->sinkpad = gst_pad_new_from_template (
|
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);
|
gst_pad_set_chain_function (ffmpegenc->sinkpad, gst_ffmpegenc_chain_video);
|
||||||
ffmpegenc->context->bit_rate = 300000;
|
ffmpegenc->context->bit_rate = 300000;
|
||||||
ffmpegenc->context->gop_size = 15;
|
ffmpegenc->context->gop_size = 15;
|
||||||
|
@ -245,7 +245,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
|
||||||
}
|
}
|
||||||
else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
|
else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
|
||||||
ffmpegenc->sinkpad = gst_pad_new_from_template (
|
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);
|
gst_pad_set_chain_function (ffmpegenc->sinkpad, gst_ffmpegenc_chain_audio);
|
||||||
ffmpegenc->context->bit_rate = 128000;
|
ffmpegenc->context->bit_rate = 128000;
|
||||||
ffmpegenc->context->sample_rate = -1;
|
ffmpegenc->context->sample_rate = -1;
|
||||||
|
@ -255,7 +255,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
|
||||||
gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->sinkpad);
|
||||||
|
|
||||||
ffmpegenc->srcpad = gst_pad_new_from_template (
|
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);
|
gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->srcpad);
|
||||||
|
|
||||||
/* Initialization of element's private variables. */
|
/* Initialization of element's private variables. */
|
||||||
|
@ -533,18 +533,18 @@ gst_ffmpegenc_register (GstPlugin *plugin)
|
||||||
(gpointer) in_plugin);
|
(gpointer) in_plugin);
|
||||||
|
|
||||||
/* register the plugin with gstreamer */
|
/* 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);
|
g_return_val_if_fail(factory != NULL, FALSE);
|
||||||
|
|
||||||
gst_elementfactory_add_padtemplate (factory,
|
gst_element_factory_add_pad_template (factory,
|
||||||
GST_PADTEMPLATE_GET (gst_ffmpegenc_src_factory));
|
GST_PAD_TEMPLATE_GET (gst_ffmpegenc_src_factory));
|
||||||
if (in_plugin->type == CODEC_TYPE_VIDEO) {
|
if (in_plugin->type == CODEC_TYPE_VIDEO) {
|
||||||
gst_elementfactory_add_padtemplate (factory,
|
gst_element_factory_add_pad_template (factory,
|
||||||
GST_PADTEMPLATE_GET (gst_ffmpegenc_video_sink_factory));
|
GST_PAD_TEMPLATE_GET (gst_ffmpegenc_video_sink_factory));
|
||||||
}
|
}
|
||||||
else if (in_plugin->type == CODEC_TYPE_AUDIO) {
|
else if (in_plugin->type == CODEC_TYPE_AUDIO) {
|
||||||
gst_elementfactory_add_padtemplate (factory,
|
gst_element_factory_add_pad_template (factory,
|
||||||
GST_PADTEMPLATE_GET (gst_ffmpegenc_audio_sink_factory));
|
GST_PAD_TEMPLATE_GET (gst_ffmpegenc_audio_sink_factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The very last thing is to register the elementfactory with the plugin. */
|
/* The very last thing is to register the elementfactory with the plugin. */
|
||||||
|
|
Loading…
Reference in a new issue