summaryrefslogtreecommitdiff
path: root/gst/videoparsers
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-17 15:04:44 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-17 15:04:44 +0100
commit9f1257330db0928bd86de541689cf67da51694fa (patch)
treefb08c6a6727bb4895f2becba9289f161aa42211f /gst/videoparsers
parent7faf96eb14c71a668c8c0a2f5a6cf952f96b411d (diff)
downloadgstreamer-plugins-bad-9f1257330db0928bd86de541689cf67da51694fa.tar.gz
videoparsers: Use the peer caps for restrictions instead of the srcpad allowed caps
Otherwise we will intersect with the srcpad template caps and add all the caps fields that the parser will ever set, no matter if downstream restricts this field or not. This requires upstream to set this field on the caps to successfully negotiate. https://bugzilla.gnome.org/show_bug.cgi?id=690184
Diffstat (limited to 'gst/videoparsers')
-rw-r--r--gst/videoparsers/gstdiracparse.c2
-rw-r--r--gst/videoparsers/gsth263parse.c2
-rw-r--r--gst/videoparsers/gsth264parse.c2
-rw-r--r--gst/videoparsers/gstmpeg4videoparse.c6
-rw-r--r--gst/videoparsers/gstmpegvideoparse.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/gst/videoparsers/gstdiracparse.c b/gst/videoparsers/gstdiracparse.c
index 84232c7b3..eac906d33 100644
--- a/gst/videoparsers/gstdiracparse.c
+++ b/gst/videoparsers/gstdiracparse.c
@@ -394,7 +394,7 @@ gst_dirac_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c
index a2aea5411..4b0c29dbd 100644
--- a/gst/videoparsers/gsth263parse.c
+++ b/gst/videoparsers/gsth263parse.c
@@ -356,7 +356,7 @@ gst_h263_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index fdf7d9749..dd68446c8 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -1876,7 +1876,7 @@ gst_h264_parse_get_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c
index ca38a376a..9c370c0bb 100644
--- a/gst/videoparsers/gstmpeg4videoparse.c
+++ b/gst/videoparsers/gstmpeg4videoparse.c
@@ -39,7 +39,7 @@ GST_DEBUG_CATEGORY (mpeg4v_parse_debug);
#define GST_CAT_DEFAULT mpeg4v_parse_debug
static GstStaticPadTemplate src_template =
-GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
+ GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/mpeg, "
"mpegversion = (int) 4, "
@@ -51,7 +51,7 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
);
static GstStaticPadTemplate sink_template =
-GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
+ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/mpeg, "
"mpegversion = (int) 4, " "systemstream = (boolean) false; "
@@ -858,7 +858,7 @@ gst_mpeg4vparse_get_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;
diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c
index f8303a680..b3c188f0f 100644
--- a/gst/videoparsers/gstmpegvideoparse.c
+++ b/gst/videoparsers/gstmpegvideoparse.c
@@ -859,7 +859,7 @@ gst_mpegv_parse_get_caps (GstBaseParse * parse, GstCaps * filter)
GstCaps *res;
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
- peercaps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (parse));
+ peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
if (peercaps) {
guint i, n;