mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
audioparsers: remove fields from filter
We need to remove the fields from the filter when we can convert between them.
This commit is contained in:
parent
e8313a1e70
commit
e3f393f7e6
7 changed files with 57 additions and 7 deletions
|
@ -1375,7 +1375,15 @@ gst_aac_parse_sink_getcaps (GstBaseParse * parse, GstCaps * filter)
|
|||
|
||||
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 the fields we convert */
|
||||
|
|
|
@ -820,7 +820,14 @@ gst_ac3_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 framed and alignment field. We can convert
|
||||
|
|
|
@ -494,7 +494,14 @@ gst_dca_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 framed field */
|
||||
|
|
|
@ -1813,7 +1813,14 @@ gst_flac_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 framed field */
|
||||
|
|
|
@ -1418,7 +1418,14 @@ gst_mpeg_audio_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 */
|
||||
|
|
|
@ -319,7 +319,14 @@ gst_sbc_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 */
|
||||
|
|
|
@ -628,7 +628,14 @@ gst_wavpack_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 framed field */
|
||||
|
|
Loading…
Reference in a new issue