From 001b4a0072fae1f695698660e2d7642c37ea665b Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 22 Sep 2011 15:38:51 +0200 Subject: [PATCH] audioencoder: proxy some more optional downstream caps fields to upstream --- gst-libs/gst/audio/gstaudioencoder.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 17dceee..edd9263 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -1085,6 +1085,18 @@ gst_audio_encoder_proxy_getcaps (GstAudioEncoder * enc, GstCaps * caps) gst_structure_set_value (s, "rate", val); if ((val = gst_structure_get_value (allowed_s, "channels"))) gst_structure_set_value (s, "channels", val); + /* following might also make sense for some encoded formats, + * e.g. wavpack */ + if ((val = gst_structure_get_value (allowed_s, "width"))) + gst_structure_set_value (s, "width", val); + if ((val = gst_structure_get_value (allowed_s, "depth"))) + gst_structure_set_value (s, "depth", val); + if ((val = gst_structure_get_value (allowed_s, "endianness"))) + gst_structure_set_value (s, "endianness", val); + if ((val = gst_structure_get_value (allowed_s, "signed"))) + gst_structure_set_value (s, "signed", val); + if ((val = gst_structure_get_value (allowed_s, "channel-positions"))) + gst_structure_set_value (s, "channel-positions", val); gst_caps_merge_structure (filter_caps, s); } -- 2.7.4