how to use avdec_g726 to decode g726 raw data

Nicolas Dufresne nicolas at ndufresne.ca
Mon Mar 22 18:36:26 UTC 2021


Le lundi 22 mars 2021 à 11:50 +0800, strong a écrit :
> hi, Nicolas
>     Thanks for your help.
>     Now  I can make avdec_g726 work, like
> gst-launch-1.0 filesrc location=8000_1_b5.g726 do-timestamp=true blocksize=100
> ! audio/x-adpcm, bitrate=40000, rate=8000, channels=1, layout=g726,
> format=S16LE ! avdec_g726  ! alsasink sync=false
>     But another question is "mute" can not be set when "volume" plugin is
> used, for example,
> if the command line is like
> gst-launch-1.0 filesrc location=8000_1_b5.g726 do-timestamp=true blocksize=100
> ! audio/x-adpcm, bitrate=40000, rate=8000, channels=1, layout=g726,
> format=S16LE ! avdec_g726  ! volume volume=5.0 ! alsasink sync=false
>    it can work.
> 
> But if the command line is like
> gst-launch-1.0 filesrc location=8000_1_b5.g726 do-timestamp=true blocksize=100
> ! audio/x-adpcm, bitrate=40000, rate=8000, channels=1, layout=g726,
> format=S16LE ! avdec_g726  ! volume mute=true ! alsasink sync=false
>   it can not work, the print message is 
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> Redistribute latency...
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstAudioSinkClock
> Got EOS from element "pipeline0".
> Execution ended after 0:00:00.255093264
> Setting pipeline to NULL ...
> Freeing pipeline ...
>    
>     it seems that mute in volume will close the stream,  I do not know the
> reason

mute is optimized, instead of filling the stream with silence, it will send
gaps. As you have asked gstreamer to no do synchronization, gaps are consumed
very fast as they aren't blocked by the audio queue. Drop the sync=false for
better results.

> 
> Thanks very much
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210322/f29a2095/attachment.htm>


More information about the gstreamer-devel mailing list