New, also help on dealing with multiple audio streams using gstreamer-rs

Michael Johnson liquidmikerrs at gmail.com
Thu Dec 17 12:28:02 UTC 2020


As requested a toy example,
Here we see that the audio-changed emit never activates the connect, maybe
because it emits before the video has began playing?

I'm probably doing something very wrong

On Thu, 17 Dec 2020, 11:24 Michael Johnson, <liquidmikerrs at gmail.com> wrote:

> Do you have a link to a video that has multiple audio streams for the test
> case, I'm only finding single audio stream files
>
> On Thu, 17 Dec 2020, 11:02 Sebastian Dröge, <sebastian at centricular.com>
> wrote:
>
>> On Thu, 2020-12-17 at 10:46 +0000, Michael Johnson wrote:
>>
>> Another point here, connecting to the audio-stream signal and printing
>> the current-audio yields -1 until I physically close the window when it
>> gets the correct audio stream here
>>
>>
>> That seems wrong, please provide a testcase for that.
>>
>> Also, I imagine when I want to bind changing stream to a key press I need
>> to emit this signal to be caught. But I can't access any data structures
>> from the callback, so it'll always chose a constant stream. Am I missing
>> something? here
>>
>>
>> You can pass any heap allocated data without references to stack memory
>> into the signal handler closure.
>>
>> A common pattern would be to store your state in a std::sync::Arc to give
>> it reference counting, and use a std::sync::Mutex for getting interior
>> mutability of whatever state you need to change.
>>
>> --
>>
>> Sebastian Dröge, Centricular Ltd · https://www.centricular.com
>> <http://www.centricular.com>
>>
>> _______________________________________________
>> 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/20201217/3a1243fe/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.rs
Type: text/x-rust
Size: 2336 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201217/3a1243fe/attachment.bin>


More information about the gstreamer-devel mailing list