failed to negotiate caps when dynamically change caps on appsrc
vinod kesti
vinodkesti at yahoo.com
Tue May 9 18:33:35 UTC 2023
CUSTOM_PARSER_ELEMENT and audioconvert linked?
Sent from Yahoo Mail. Get the app
On Friday, 5 May, 2023 at 06:03:50 am GMT-5, Bhoomil Chavda via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
Hi all,
I found one issue with appsrc similar like #372 (closed).
Actaully I'm feeding my gstreamer pipeline from ALSA source, and to push and pull in application buffer I'm using appsrc and appsink.
Below is my pipeline looks for PCM audio,appsrc ! audioconvert ! audioresample ! "audio/x-raw, rate=48000, format=F32LE" ! appsink
and for Compressed audio,appsrc ! CUSTOM_PARSER_ELEMENT ! CUSTOM_DECODER_ELEMENT ! audioconvert ! audioresample ! "audio/x-raw, rate=48000, format=F32LE" ! appsink
The default caps of appsrc is ANY and when I switch to PCM mode, I'm setting appsrc caps to "audio/x-raw, rate=WHATEVER_ALSA_GIVE_ME", format=WHATEVER_ALSA_GIVE_ME, channels=WHATEVER_ALSA_GIVE_ME". It is working fine. Event 48K to 44.1K switching and updating caps working fine in runtime.But for compress path, when I switch back to ANY caps then negotiation has been failed. The reason behind setting ANY caps during compress mode is, my CUSTOM_PARSER_ELEMENT caps not known when I start streaming. Actually parser itself produce new caps so I don't want appsrc to deal with that so go with ANY caps (That is not the case with PCM mode and that why I need audio/x-raw with other details so convert and resample can know)****. Now this ANY caps based appsrc and CUSTOM_PARSER_ELEMENT not negotiated.
NOTE: there is detection logic which can detect PCM/compress switching and from the callback I have did,
- unlink appsrc and audioconvert
- set appsrc caps to ANY
- link appsrc and CUSTOM_PARSER_ELEMENT.
Regards,
Bhoomil C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230509/aab322a7/attachment.htm>
More information about the gstreamer-devel
mailing list