gst-play-1.0 - why no reversed play direction on non-compressed audio (wav, aiff) ?

Nicolas Dufresne nicolas at ndufresne.ca
Mon Aug 22 13:30:35 UTC 2022


Le dimanche 21 août 2022 à 12:40 +0100, Michael Z Freeman via gstreamer-devel a
écrit :
> Hi,
> 
> I'm not familiar with gstreamer so please forgive me if some of this seems
> obvious.
> 
> Reverse playback works fine on compressed audio files like mp3 and opus but
> when playing wav and aiff I get "Could not change playback rate to -1.00". 
> 
> What is gstreamer doing @ 982 ? ...

In order to change the playback direction, GStreamer must issue a flushing seek
with the new "negative" rate. The driver element (aka demuxer or parser) must
have support for this. If not, the element will fail the seek operation.

Nicolas

> 
> ---
> 
> play_set_rate_and_trick_mode (GstPlay * play, gdouble rate,
>     GstPlayTrickMode mode)
> {
>   gint64 pos = -1;
> 
>   g_return_val_if_fail (rate != 0, FALSE);
> 
>   if (!gst_element_query_position (play->playbin, GST_FORMAT_TIME, &pos))
>     return FALSE;
> 
>   return play_do_seek (play, pos, rate, mode);
> }
> 
> ---
> 
> This is what is called @ 1077 which gives working reverse with mp3 and opus
> but not wav or aiff. I can't see what is treating wav and aiff differently.
> 
> Cheers
> 
> Michael
>  



More information about the gstreamer-devel mailing list