On Thu, 2020-12-17 at 13:49 +0000, Michael Johnson wrote:
You were ignoring Results. set_property(), emit(), etc return Results.
One side is connecting to a signal, the other side is emitting signals. For normal signals, the emitter is the object itself. In this case playbin. For action signals (get-audio-tags on playbin for example), you would emit the signal instead of playbin. Action signals "abuse" the signal machinery for having something like "dynamic function calls".
You print the current value before you set it to the new one. So in the end it is 2, but you don't print it anymore. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Michael Johnson
Regardless, if you want to press a button to change audio stream surely you emit when the button is pressed, which then causes the callback to run Without that it only emits on startup and close. And that's not helpful Thank you for all your help so far, it's been highly appreciated On Thu, 17 Dec 2020, 13:50 Michael Johnson, <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Ahhh I think I see, so then how do you go about emitting that signal without using it from playbin for these action signals On Thu, 17 Dec 2020, 14:04 Michael Johnson, <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Michael Johnson
On Thu, 2020-12-17 at 14:04 +0000, Michael Johnson wrote:
You would then set the property from the button pressed signal handler. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
But I'm not using the gstreamer library for handling buttons being pressed. Surely there's a way to do this another way On Thu, 17 Dec 2020, 14:06 Sebastian Dröge, <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Thu, 2020-12-17 at 14:09 +0000, Michael Johnson wrote:
You can call set_property() on the playbin from wherever you want, it just has to be after the playbin is started or it will ignore that. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
This then brings back to the original point. As commented in the test case, setting the property of current audio is doing absolutely nothing, even with removing the set in the callback On Thu, 17 Dec 2020, 14:15 Sebastian Dröge, <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Thu, 2020-12-17 at 14:18 +0000, Michael Johnson wrote:
That works fine for me with your code. 0, 1, and 2 all have different audio. You just have to make sure to set the track after playbin is started and knows the number of tracks. Which it notifies you about with the "audio-changed" signal. But you can set that property from anywhere, it doesn't have to be from the signal handler. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Can you send back the test case where the switch is working. I still have it a line above the fixed aspect ratio, and that may still be too soon for it? On Thu, 17 Dec 2020, 14:27 Sebastian Dröge, <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Yeah that was it, if I sleep the main thread it can then be switched Thank you so much for all your help. It's been very informative On Thu, 17 Dec 2020, 14:28 Michael Johnson, <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Michael Johnson
On Thu, 2020-12-17 at 14:28 +0000, Michael Johnson wrote:
Yes that's too early. That's long before playbin even knows how many audio tracks there are. You either have to wait until the Paused/Playing state is reached or use the "audio-changed" signal as an indication when playbin knows about the audio tracks. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel main.rs (2K) Download Attachment |
Free forum by Nabble | Edit this page |