diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-11-25 12:48:58 +0100 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-11-25 12:48:58 +0100 |
commit | b78b980d7236d03378450ac89452dc4ec537824c (patch) | |
tree | 1a4bbff76ac8020b99f3321afa73eebbb4e9006d /gst/videoparsers/gsth263parse.c | |
parent | c41b5d016cbbe8dc6fa99a377b169e96d24238a9 (diff) | |
parent | cdcc39455cc92ba5e6988056b03ac9c350a9bb6a (diff) | |
download | gstreamer-plugins-bad-b78b980d7236d03378450ac89452dc4ec537824c.tar.gz |
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
ext/faac/gstfaac.c
ext/opus/gstopusdec.c
ext/opus/gstopusenc.c
gst/audiovisualizers/gstspacescope.c
gst/colorspace/colorspace.c
Diffstat (limited to 'gst/videoparsers/gsth263parse.c')
-rw-r--r-- | gst/videoparsers/gsth263parse.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c index 14e8ef688..dba1f89f5 100644 --- a/gst/videoparsers/gsth263parse.c +++ b/gst/videoparsers/gsth263parse.c @@ -58,6 +58,8 @@ static gboolean gst_h263_parse_check_valid_frame (GstBaseParse * parse, GstBaseParseFrame * frame, guint * framesize, gint * skipsize); static GstFlowReturn gst_h263_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame); +static GstCaps *gst_h263_parse_get_sink_caps (GstBaseParse * parse, + GstCaps * filter); static void gst_h263_parse_class_init (GstH263ParseClass * klass) @@ -84,6 +86,7 @@ gst_h263_parse_class_init (GstH263ParseClass * klass) parse_class->check_valid_frame = GST_DEBUG_FUNCPTR (gst_h263_parse_check_valid_frame); parse_class->parse_frame = GST_DEBUG_FUNCPTR (gst_h263_parse_parse_frame); + parse_class->get_sink_caps = GST_DEBUG_FUNCPTR (gst_h263_parse_get_sink_caps); } static void @@ -357,3 +360,35 @@ out: return res; } + +static GstCaps * +gst_h263_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter) +{ + GstCaps *peercaps; + GstCaps *res; + + peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (peercaps) { + guint i, n; + + /* Remove parsed field */ + peercaps = gst_caps_make_writable (peercaps); + n = gst_caps_get_size (peercaps); + for (i = 0; i < n; i++) { + GstStructure *s = gst_caps_get_structure (peercaps, i); + gst_structure_remove_field (s, "parsed"); + } + + res = + gst_caps_intersect_full (peercaps, + gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse)), + GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (peercaps); + } else { + res = + gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD + (parse))); + } + + return res; +} |