resampling and reformatting audio when rate/format will not need to change

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

resampling and reformatting audio when rate/format will not need to change

Charlie Laub
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: resampling and reformatting audio when rate/format will not need to change

Tim Müller
On Fri, 2018-03-16 at 09:10 -0700, Charlie Laub wrote:

Hi Charlie,
 
> In some cases I might not know the input audio caps, and they might
> already be the same as the desired output caps. In that case, does
> the resampling code actually run as if it was changing the sample
> rate, or is the element automatically bypassed when it discovers that
> no change is needed? I looked at the code in gstaudioresample.c but I
> did not see anything about it.

Yes, both elements should work in passthrough mode if downstream can
accept the input caps and no work is needed.

> Also, if I need to reformat AND resample, can I construct the
> pipeline like this:
> … ! audioconvert ! audioresample ! audio/x-
> raw,format=NEW_FORMAT,rate=NEW_RATE ! …

Yes, that should work.
 
> Or do I need to explicitly provide caps for both elements
> (audioconvert and audioresample), like this:
> … ! audioconvert ! audio/x-raw,format=NEW_FORMAT  ! audioresample !
> audio/x-raw,rate=NEW_RATE ! …

This should also work, but not be needed.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: resampling and reformatting audio when rate/format will not need to change

Charlie Laub
CONTENTS DELETED
The author has deleted this message.