GNOME Bugzilla – Bug 326736
gconf(audio|video)sink response to key changes
Last modified: 2006-02-06 15:04:29 UTC
When the GConf key for the gconf(audio|video)sink changes, the element responds by replacing the contained objects, even if they're currently PLAYING or PAUSED. This means that suddenly a new sink appears inside the bin, and it gets fed data, but it has missed the newsegment information, and does not have the correct synchronisation information to sync with the clock. While this would be a rocking nice feature to have (dynamic switching of output backend in mid stream) at the moment it's just broken. A quick fix is that the gconfaudio/videosink should only change during PAUSED->READY/NULL->READY state transitions. A few thoughts on the requirements to do dynamic backend switching: * the gconf elements need to remember the most recent NEWSEGMENT and provide it to the new output pipeline * for video, gconfvideosink should keep a reference to the most recent frame and push it into the the child pipeline. This will trigger new xoverlay interface embedding. * Clock should be set, and any other required synchronisation information passed to the child sinks.
Sounds like something we might want to quick-fix before the release, no? (so that it ignores key changes that take place when state > NULL)
no patch and I'm out of time, deferring until next release
This still needs fixing. There's another nasty side effect, that just opening gstreamer-properties seems to trigger a gconf key change, which makes the sink replace the contained pipeline - instantly breaking playback in rhythmbox here.
Fixed in CVS. * ext/gconf/gconf.c: (gst_gconf_get_default_audio_sink), (gst_gconf_get_default_video_sink), (gst_gconf_get_default_audio_src), (gst_gconf_get_default_video_src): * ext/gconf/gconf.h: * ext/gconf/gstgconfaudiosink.c: (gst_gconf_audio_sink_reset), (gst_gconf_audio_sink_init), (gst_gconf_audio_sink_dispose), (do_toggle_element): * ext/gconf/gstgconfaudiosink.h: * ext/gconf/gstgconfaudiosrc.c: (gst_gconf_audio_src_reset), (gst_gconf_audio_src_init), (gst_gconf_audio_src_dispose), (do_toggle_element): * ext/gconf/gstgconfaudiosrc.h: * ext/gconf/gstgconfvideosink.c: (gst_gconf_video_sink_reset), (gst_gconf_video_sink_init), (gst_gconf_video_sink_dispose), (do_toggle_element): * ext/gconf/gstgconfvideosink.h: * ext/gconf/gstgconfvideosrc.c: (gst_gconf_video_src_reset), (gst_gconf_video_src_init), (gst_gconf_video_src_dispose), (do_toggle_element): * ext/gconf/gstgconfvideosrc.h: Ignore changing the GConf key to "". Ignore GConf key updates that don't actually change the string. For now, ignore the GConf key when the state is > READY, as it breaks streaming. Sometime it will be nice to bring the new sink online even mid-stream, by sending NEWSEGMENT info and possibly prerolling. (Fixes #326736)