GNOME Bugzilla – Bug 315352
pausing elements in a pipeline does not stop them
Last modified: 2005-11-14 15:03:30 UTC
see attached example
Created attachment 51865 [details] example that tests state changes when pausing element the sound continues to play and the streamtime of the element continiues too. That sound like a good indication that the elements have not been paused.
Created attachment 51871 [details] example that tests state changes example now also check states after setting them
in 0.9 there is no difference in PAUSE and PLAYING, only for sinks that don't render buffers in PAUSED. For all other elements it is exactly the same.
what is the difficulty in not pulling data from pads, where the element is paused?
Dataflow starts in the ready->paused transition. It is normal to see dataflow happening in any of these states. However the sink should block when it actually gets a buffer when it is in PAUSED. Why wouldn't you want dataflow in paused, if it is never output (as in with audio pipelines)? And if you really don't, consider not starting tasks in ready->paused (e.g. via using live sources). Or am I misunderstanding?
@andy: my problem is that a buzztard song can have *lots* of elements. As a musican there are three states (except normal) of gear you want to use: * mute: means don't pull data from this elements anymore or alternatively switch to a silence element on-the-fly. the question here is, can I unlink the pads and connect the peer of the element to be muted to a silence element while the pipeline is in playing * solo: mute everything but this element * bypass: only interesting for effects. same questing - can I link elements src to dst on-the-fly
You can link on the fly, yes. But normally mute/solo don't affect e.g. processor usage -- instead of outputting data on certain pads it just outputs 0. You should have different means for setting those states. IMO anyway. I don't think your question relates much to GStreamer states.
I not implement the desired behavior, be changing the pipeline. e.g. for mute I swap the element with a "audiotestsrc wave=silence".