summaryrefslogtreecommitdiff
path: root/gst/mpeg1sys/gstmpeg1systemencode.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/mpeg1sys/gstmpeg1systemencode.c')
-rw-r--r--gst/mpeg1sys/gstmpeg1systemencode.c50
1 files changed, 21 insertions, 29 deletions
diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c
index 40eb41cba..94f01d1d8 100644
--- a/gst/mpeg1sys/gstmpeg1systemencode.c
+++ b/gst/mpeg1sys/gstmpeg1systemencode.c
@@ -49,39 +49,31 @@ enum {
/* FILL ME */
};
-GST_PAD_TEMPLATE_FACTORY (src_factory,
+static GstStaticPadTemplate src_factory =
+GST_STATIC_PAD_TEMPLATE (
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_CAPS_NEW (
- "src_video",
- "video/mpeg",
- "systemstream", GST_PROPS_BOOLEAN (TRUE)
- )
-)
-GST_PAD_TEMPLATE_FACTORY (video_sink_factory,
+ GST_STATIC_CAPS ("video/mpeg, "
+ "systemstream = (boolean) TRUE")
+);
+static GstStaticPadTemplate video_sink_factory =
+GST_STATIC_PAD_TEMPLATE (
"video_%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
- GST_CAPS_NEW (
- "sink_video",
- "video/mpeg",
- "mpegversion", GST_PROPS_INT (1),
- "systemstream", GST_PROPS_BOOLEAN (FALSE)
- /* we don't care about width/height/framerate */
- )
-)
+ GST_STATIC_CAPS ("video/mpeg, "
+ "mpegversion = (int) 1, "
+ "systemstream = (boolean) FALSE")
+);
-GST_PAD_TEMPLATE_FACTORY (audio_sink_factory,
+static GstStaticPadTemplate audio_sink_factory =
+GST_STATIC_PAD_TEMPLATE (
"audio_%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
- GST_CAPS_NEW (
- "sink_audio",
- "audio/mpeg",
- NULL /* well, "don't care" */
- )
-)
+ GST_STATIC_CAPS ("audio/mpeg")
+);
static void gst_system_encode_class_init (GstMPEG1SystemEncodeClass *klass);
static void gst_system_encode_base_init (GstMPEG1SystemEncodeClass *klass);
@@ -128,11 +120,11 @@ gst_system_encode_base_init (GstMPEG1SystemEncodeClass *klass)
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
- GST_PAD_TEMPLATE_GET (src_factory));
+ gst_static_pad_template_get (&src_factory));
gst_element_class_add_pad_template (element_class,
- GST_PAD_TEMPLATE_GET (audio_sink_factory));
+ gst_static_pad_template_get (&audio_sink_factory));
gst_element_class_add_pad_template (element_class,
- GST_PAD_TEMPLATE_GET (video_sink_factory));
+ gst_static_pad_template_get (&video_sink_factory));
gst_element_class_set_details (element_class, &system_encode_details);
}
@@ -157,7 +149,7 @@ static void
gst_system_encode_init (GstMPEG1SystemEncode *system_encode)
{
system_encode->srcpad = gst_pad_new_from_template (
- GST_PAD_TEMPLATE_GET (src_factory), "src");
+ gst_static_pad_template_get (&src_factory), "src");
gst_element_add_pad (GST_ELEMENT (system_encode), system_encode->srcpad);
system_encode->video_buffer = mpeg1mux_buffer_new (BUFFER_TYPE_VIDEO, 0xE0);
@@ -195,7 +187,7 @@ gst_system_encode_request_new_pad (GstElement *element, GstPadTemplate *templ, c
}
system_encode = GST_SYSTEM_ENCODE (element);
- if (templ == GST_PAD_TEMPLATE_GET (audio_sink_factory)) {
+ if (templ == gst_static_pad_template_get (&audio_sink_factory)) {
name = g_strdup_printf ("audio_%02d", system_encode->num_audio_pads);
g_print ("%s\n", name);
newpad = gst_pad_new_from_template (templ, name);
@@ -205,7 +197,7 @@ gst_system_encode_request_new_pad (GstElement *element, GstPadTemplate *templ, c
system_encode->num_audio_pads++;
system_encode->which_streams |= STREAMS_AUDIO;
}
- else if (templ == GST_PAD_TEMPLATE_GET (video_sink_factory)) {
+ else if (templ == gst_static_pad_template_get (&video_sink_factory)) {
name = g_strdup_printf ("video_%02d", system_encode->num_video_pads);
g_print ("%s\n", name);
newpad = gst_pad_new_from_template (templ, name);