GNOME Bugzilla – Bug 406807
visualisation plugin blocks video output when not active
Last modified: 2009-05-23 11:42:06 UTC
That bug has been described on https://launchpad.net/ubuntu/+source/rhythmbox/+bug/84245 "Binary package hint: rhythmbox Using feisty mplayer 2:1.0~rc1-0ubuntu3 rhythmbox 0.9.7.90-0ubuntu1 After dist-upgrade I have to use -vo x11 with mplayer. First I thought it was bug in mplayer, but when the rhythmbox is not playing I can watch movies with default options. Run Rhythmbox and make it play some music $ mplayer -vo xv some.avi # gives: (...) Xv: could not grab port 73 Could not find free Xvideo port - maybe another process is already using it. ... I'm not using any visualisation/effects. It's enough that the Visualisation plugin is enabled in the "Configure plugins". It doesn't have to be active. Moreover Rhythmbox is hidden (Ctrl+W). At first I had no idea that Rhythmbox is causing my problems with mplayer and I was wondering what's wrong with mplayer."
Indeed, if you enable the visual effects plugin in rhythmbox, the Xvideo port is blocked. I can confirm this with rhythmbox 0.10.0 on Mandriva Cooker.
In order to reproduce the bug, you need to have a video card with only one xv port, be careful to check xvinfo output : $ xvinfo | grep -B 1 ports Adaptor #0: "SIS 300/315/330 series Video Overlay" number of ports: 1 -- Adaptor #1: "SIS 315/330 series Video Blitter" number of ports: 16
*** Bug 442725 has been marked as a duplicate of this bug. ***
For the playbin-based case, we could use a GstSwitchSink to switch between a fakesink (while disabled) and the real sink (while enabled) - but GstSwitchSink doesn't yet support switching sinks in PLAYING state and also isn't exposed in the GStreamer API. Alternatively, if playbin was fixed so that we can enable visualization at any time (bug 379822 - playbin2, maybe?), the sink element would only exist while visualization was active. For the tee-based case, I think we just need to remove the code that sets the sink to READY during plugin activation. We'd probably want to set the sink to READY before adding the visualization branch to the pipeline to check that xv ports etc. were available for it, and just disable visualization if they're not.
Created attachment 90374 [details] [review] fix tee mode a bit Since the playbin-based code will be quite hard to fix, maybe we should just use the tee mode with the playbin player backend instead?
Created attachment 90536 [details] [review] less broken patch
Looks okay to me.
I fixed the patch up a bit more and committed it.
*** Bug 453768 has been marked as a duplicate of this bug. ***
I can confirm this bug under Ubuntu Gutsy Gibbon with Intel 915 graphic.
*** Bug 527814 has been marked as a duplicate of this bug. ***
Switching to playbin2 will fix this, I believe.
Switching to playbin2 has fixed this.