This post was updated on .
Hi,
When I ran gstreamer on android, I had a problem. Most devices only provide 1 HW videodecoder + 1 HW audiodecoder resource, In other words, a/v decoder that is automatically loaded in playbin2/playbin3 must be kept in a single instance. Such as,when play an MKV file, it has 1 video,4 audio tracks, 4 subtitles, playbin2 seems to build a chain for each track all the way,and each chain request a decoder resources, regardless of whether we really play it -(so,i get media_codec.configure error while request second audio decoder instance.I have noticed that playbin2 has a current-audio/current-video/current-text, which attempts to set its properties immediately after the playbin2 is created. But there was no miracle,Playbin2 is still trying to create instances for each audio track. (BTW, I'm using GstPlayer API for building applications). Can anyone help me on this? Regards, rland -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list gstreamer-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le mar. 8 mai 2018 10:27, rland <[hidden email]> a écrit : Hi,When I ran gstreamer on android, I had a problem, Most devices only provide 1 HW videodecoder + 1 HW audiodecoder resource,In other words, a/v decoder that is automatically loaded in playbin2/playbin3 must be kept in a single instance. Such as,when play an MKV file, it has 1 video,4 audio tracks, 4 subtitles, playbin2 seems to build a chain for each track all the way,and each chain request a decoder resources, regardless of whether we really play it -( so,i get media_codec.configure error while request second audio decoder instance. I have noticed that playbin2 has a current-audio/current-video/current-text, which attempts to set its properties immediately after the playbin2 is created. But there was no miracle,Playbin2 is still trying to create instances for each audio track. BTW, I'm using GstPlayer API for building applications. Can anyone help me on this? Regards, rland There is little we can do about that.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
This post was updated on .
Nicolas Dufresne-5 wrote
> Le mar. 8 mai 2018 10:27, rland < > rlandjon@ > > a écrit : > >>There is little we can do about that. > Maybe something like this: https://bugzilla.gnome.org/show_bug.cgi?id=758689 But still need do some hacks in decodebin2. In this scenario, I think we just need to handle autoplug_select, and don't need an inputselector. -) Regards, rland |
In reply to this post by rland
I think this is a problem with the HW decoder sink elements. The HW sinks
should request theres HW resources in READY->PAUSED and release the resources in PAUSE->READY state transition. If doing so, multiple sinks can coexist. As far as we have observed, in nearly all cases there ist only one oth the sink in PAUSED resp. PLAYING state. So this issue should be adressed to the author of the hardware sink elements. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Juergen,
I think the following page is helpful: https://gstreamer.freedesktop.org/documentation/design/states.html There it is mentioned: NULL -> READY: - The element must check if the resources it needs are available. Device sinks and sources typically try to probe the device to constrain their caps. - The element opens the device, this is needed if the previous step requires the device to be opened. and READY -> NULL: - Elements close devices - Elements reset any internal state. Best regards, Marie -----Ursprüngliche Nachricht----- Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Juergen Sachs Gesendet: Donnerstag, 14. Juni 2018 16:08 An: [hidden email] Betreff: Re: How to get HW decoder singleton(playbin2 or playbin3)? I think this is a problem with the HW decoder sink elements. The HW sinks should request theres HW resources in READY->PAUSED and release the resources in PAUSE->READY state transition. If doing so, multiple sinks can coexist. As far as we have observed, in nearly all cases there ist only one oth the sink in PAUSED resp. PLAYING state. So this issue should be adressed to the author of the hardware sink elements. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hallo Marie,
I absolutely agree, that the resource handling _should_ be done in the NULL<->READY transitions. But this is the theory... In _reality_ we found a lot of implementations (browser backends and other media playback systems) that hold multiple (i.e. video) sinks in READY state simultaneously (i.e. one sink for each codec). But only one sink at a time is in PAUSED and above (*) So we have decided to aquire the hardware in the READY->PAUSED. This is the only way to handle this for us. (*) Indeed we found implemenattions that have multiple sinks in PAUSED and have only one of them in foreground, but this cannot be handled in sink and must be fixed in upper layer. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by rland
On Tue, 2018-05-08 at 01:21 -0700, rland wrote:
Hi, I believe playbin3 will not create decoders for streams that are not currently used/selected. You can make GstPlayer use playbin3 instead of playbin2 by setting the GST_PLAYER_USE_PLAYBIN3 environment variable to 1 (programmatically or when calling your application). Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com Join us at the GStreamer Conference! 25-26 October 2018 in Edinburgh, Scotland _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |