GNOME Bugzilla – Bug 700967
playbin: sink messages are not received in the bus
Last modified: 2013-06-09 15:21:20 UTC
If you run the pipeline gst-launch-1.0 playbin uri=http://v2v.cc/~j/theora_testsuite/320x240.ogv video-sink="eglglessink" The eglglessink should send a message to the application bus, and, in the case of gst-launch, a messsage like this should be printed: Got context from element 'eglglessink0': context, gst.egl.Display=(GstEGLDisplay)NULL; But it is not shown, so the message never reaches the bus.
Will work on this, problem is in playsink/playbin not adding the sink to the bin before setting it to READY.
Two pieces here 1) playbin/playsink should add the sinks to the bin before setting to READY (and set them locked state, and catch any error messages). This is not trivial because playbin currently does this during autoplugging, but playsink is the element who gets the sink set later and playsink is the parent of the sink. 2) gst-launch should use sync bus handlers for the have-context messages, and also answer need-context messages from there directly.
1) Probably needs some API in playsink to immediately set and "activate" (put into the bin, etc) a sink while allowing it to fail to go to READY and post error messages. Some kind of try-this-sink thing and use it if it works.
And 3) playbin could do more intelligent autoplug-query handling, by sorting into the audio/video/text categories already and forward to the relevant sinks all useful queries, including CONTEXT and ALLOCATION.
3) is done now, together with lots of other related fixes: commit a4ec6fe0b791dc76ec3272f0603d3c1d0677d7e4 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue May 28 13:14:15 2013 +0200 playbin: Forward CONTEXT queries to the corresponding sink if we have one https://bugzilla.gnome.org/show_bug.cgi?id=700967
And 1) is done too now... 2) left for tomorrow, that's easy commit 446574122213edd8b2f67fd13df095255dc5b9a5 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Sat Jun 8 23:51:13 2013 +0200 playbin: When activating a fixed sink, proxy error messages too If activating a fixed sink fails, everything will fail later anyway and we can just error out early. commit 44352deadb0eb9f925d4316edd82344ca03a1f58 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Sat Jun 8 23:34:53 2013 +0200 playbin: Improve autoplugging of decoder/sink combinations by trying to activate the sink And if that fails don't bother autoplugging that sink. Also gives us more accurate sink caps. commit ff8839d97b22a5e6f596a28d360c0cb3f6161526 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Sat Jun 8 23:08:05 2013 +0200 playbin: Proxy the playbin context to the sinks commit 77af24c493cb773943061ecf8d6229d271d077ab Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Sat Jun 8 23:04:43 2013 +0200 playbin: Proxy sink messages if we activate a sink in playbin already This makes sure the application gets any context related messages and can do whatever is required to a) get the sink a context or b) share the context with other elements in the pipeline. The proxying is necessary because the sink is not a child element of playbin, but instead will at a later point be a child of some bin inside playsink. https://bugzilla.gnome.org/show_bug.cgi?id=700967
Done, I'm also currently preparing a patch to WebKit to add support for GstContext handling there. commit b7ad14984be321aba76c4c3a7c6dc3972f74a1c9 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Sun Jun 9 17:20:22 2013 +0200 gst-launch: Improve GstContext handling https://bugzilla.gnome.org/show_bug.cgi?id=700967