diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-07-12 11:36:42 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-07-12 11:36:42 +0200 |
commit | a24cdd41bc7b3dbc2387196e4ba553305bc3a05f (patch) | |
tree | 76c0ce9c97ec7b579ded8a543933f38110a9a05e /omx/gstomxmpeg4videodec.c | |
parent | 2023754bcf18a37c73605512da644c8d83fc0540 (diff) | |
download | gst-omx-a24cdd41bc7b3dbc2387196e4ba553305bc3a05f.tar.gz |
omxvideodec: Make sink/src pad template caps configurable
Diffstat (limited to 'omx/gstomxmpeg4videodec.c')
-rw-r--r-- | omx/gstomxmpeg4videodec.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/omx/gstomxmpeg4videodec.c b/omx/gstomxmpeg4videodec.c index c956a8b..6ef81e9 100644 --- a/omx/gstomxmpeg4videodec.c +++ b/omx/gstomxmpeg4videodec.c @@ -50,34 +50,11 @@ enum GST_BOILERPLATE_FULL (GstOMXMPEG4VideoDec, gst_omx_mpeg4_video_dec, GstOMXVideoDec, GST_TYPE_OMX_VIDEO_DEC, DEBUG_INIT); -static GstStaticPadTemplate gst_omx_mpeg4_video_dec_sink_template = -GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/mpeg, " - "mpegversion=(int) 4, " - "systemstream=(boolean) false, " - "parsed=(boolean) true, " - "width=(int) [ 16, 4096 ], " "height=(int) [ 16, 4096 ]") - ); - -static GstStaticPadTemplate gst_omx_mpeg4_video_dec_src_template = -GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420")) - ); - static void gst_omx_mpeg4_video_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_omx_mpeg4_video_dec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_omx_mpeg4_video_dec_sink_template)); - gst_element_class_set_details_simple (element_class, "OpenMAX MPEG4 Video Decoder", "Codec/Decoder/Video", @@ -97,6 +74,13 @@ gst_omx_mpeg4_video_dec_class_init (GstOMXMPEG4VideoDecClass * klass) GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_dec_is_format_change); videodec_class->set_format = GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_dec_set_format); + + videodec_class->default_sink_template_caps = "video/mpeg, " + "mpegversion=(int) 4, " + "systemstream=(boolean) false, " + "parsed=(boolean) true, " + "width=(int) [ 16, 4096 ], " "height=(int) [ 16, 4096 ]"; + videodec_class->default_src_template_caps = GST_VIDEO_CAPS_YUV ("I420"); } static void |