mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
videoparsers: remove fields from filter
Don't filter out the caps properties we can convert between when proxying the getcaps query to the downstream peer pad.
This commit is contained in:
parent
d5a16bccac
commit
e9dd2df3f4
7 changed files with 60 additions and 7 deletions
|
@ -407,7 +407,14 @@ 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_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
/* Remove the parsed field */
|
||||
|
|
|
@ -381,7 +381,14 @@ 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_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
/* Remove parsed field */
|
||||
|
|
|
@ -1916,7 +1916,15 @@ 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_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
peercaps = gst_caps_make_writable (peercaps);
|
||||
remove_fields (peercaps);
|
||||
|
|
|
@ -1854,7 +1854,15 @@ gst_h265_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_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
peercaps = gst_caps_make_writable (peercaps);
|
||||
remove_fields (peercaps);
|
||||
|
|
|
@ -851,7 +851,14 @@ 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_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
/* Remove the parsed field */
|
||||
|
|
|
@ -1043,7 +1043,15 @@ 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_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), filter);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
/* Remove the parsed field */
|
||||
peercaps = gst_caps_make_writable (peercaps);
|
||||
|
|
|
@ -385,7 +385,15 @@ gst_vc1_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
|
|||
GstCaps *ret;
|
||||
|
||||
templ = gst_pad_get_pad_template_caps (GST_BASE_PARSE_SINK_PAD (parse));
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
if (filter) {
|
||||
GstCaps *fcopy = gst_caps_copy (filter);
|
||||
/* Remove the fields we convert */
|
||||
remove_fields (fcopy);
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), fcopy);
|
||||
gst_caps_unref (fcopy);
|
||||
} else
|
||||
peercaps = gst_pad_peer_query_caps (GST_BASE_PARSE_SRC_PAD (parse), NULL);
|
||||
|
||||
if (peercaps) {
|
||||
/* Remove the stream-format and header-format fields
|
||||
* and add the generic ones again by intersecting
|
||||
|
|
Loading…
Reference in a new issue