failed to link avmux_spdif link with alsasink for ac3 passthrough
Submitted by Lyon
Link to original bug (#796466)
Description
Hi,
I was trying to realize ac3 audio passthrough via hdmi by a certain pipeline with avmux_spdif.
By pipeline:
"gst-launch-1.0 filesrc location= 5.1_de.ac3 ! ac3parse ! avmux_spdif ! filesink location= ac3.spdif"
I managed to dump out the encapsulated ac3 (iec61958) format.
Then I was trying to link avmux_spdif with alsasink
Noticing avmux_spdif src caps is "application/x-gst-av-spdif", which alsasink not supported, so I modified avmux_spdif src caps with "audio/x-ac3, framed=true"
However seems I still met problem when trying to output the data via alsasink
below is some log with GST_DEBUG=audiobasesink:6,2
Setting pipeline to PAUSED ...
0:00:00.182977808 [335m 3646[00m 0x3c8bb190 [33;01mWARN [00m [00m basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<filesrc0>
[00m pad not activated yet
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstAc3Parse:ac3parse0.GstPad:src: caps = audio/x-ac3, framed=(boolean)true, rate=(int)48000, channels=(int)6, alignment=(string)frame
/GstPipeline:pipeline0/avmux_spdif:avmux_spdif0.GstPad:audio_0: caps = audio/x-ac3, framed=(boolean)true, rate=(int)48000, channels=(int)6, alignment=(string)frame
0:00:00.186149288 [335m 3646[00m 0x3c867280 [32;01mFIXME [00m [00m basesink gstbasesink.c:3145:gst_base_sink_default_event:<alsasink0>
[00m stream-start event without group-id. Consider implementing group-id handling in the upstream elements
0:00:00.186471848 [335m 3646[00m 0x3c867280 [37mDEBUG [00m [00m audiobasesink gstaudiobasesink.c:1197:gst_audio_base_sink_preroll:<alsasink0>
[00m ringbuffer in wrong state
0:00:00.186508208 [335m 3646[00m 0x3c867280 [33;01mWARN [00m [00m audiobasesink gstaudiobasesink.c:1198:gst_audio_base_sink_preroll:<alsasink0>
[00m error: sink not negotiated.
0:00:00.186702488 [335m 3646[00m 0x3c867280 [37mDEBUG [00m [00m audiobasesink gstaudiobasesink.c:1197:gst_audio_base_sink_preroll:<alsasink0>
[00m ringbuffer in wrong state
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: The stream is in the wrong format.
0:00:00.186732608 [335m 3646[00m 0x3c867280 [33;01mWARN [00m [00m audiobasesink gstaudiobasesink.c:1198:gst_audio_base_sink_preroll:<alsasink0>
[00m error: sink not negotiated.
Additional debug info:
../../../../git/gst-libs/gst/audio/gstaudiobasesink.c(1198): gst_audio_base_sink_preroll (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
sink not negotiated.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Do anyone meet similar issue when trying to use avmux_spdif to passthrough ac3 via alsasink?
Any hint will be appreciated for this issue
Thanks
Lyon
Version: 1.14.0