After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326736 - gconf(audio|video)sink response to key changes
gconf(audio|video)sink response to key changes
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-12 15:15 UTC by Jan Schmidt
Modified: 2006-02-06 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Schmidt 2006-01-12 15:15:53 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.
Comment 1 Tim-Philipp Müller 2006-01-12 16:01:06 UTC
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)
Comment 2 Thomas Vander Stichele 2006-01-13 18:39:59 UTC
no patch and I'm out of time, deferring until next release
Comment 3 Jan Schmidt 2006-01-26 12:02:21 UTC
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.
Comment 4 Jan Schmidt 2006-02-05 22:25:40 UTC
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)