[Bug 724231] appsrc flushing

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Feb 13 08:03:02 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=724231
  GStreamer | gst-plugins-base | 1.2.2

Thiago Sousa Santos <thiago.sousa.santos> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thiago.sousa.santos at collabo
                   |                            |ra.co.uk

--- Comment #1 from Thiago Sousa Santos <thiago.sousa.santos at collabora.co.uk> 2014-02-13 16:02:56 UTC ---
(In reply to comment #0)
> I have the following pipeline: appsrc ! alsasink
> 
> I push buffers (from a buffer pool) into the appsrc to play a audio stream
> (track). When I switch tracks I need to force clear the pipeline to directly
> start playing the new data.
> 
> The problem is that I can't figure out how to do this without getting a ~500ms
> residue audio playback from the previous buffers.
> 
> This is my code to clear/flush the pipeline which i run each time i start
> delvering new buffers from a new track:
> 
> gst_element_send_event(GST_ELEMENT(pipeline), gst_event_new_flush_start());
> 
> gst_element_send_event(GST_ELEMENT(pipeline),
> gst_event_new_flush_stop(resetTime));
> 
> gst_element_set_state(GST_ELEMENT(appsrc), GST_STATE_NULL);
> gst_element_get_state(GST_ELEMENT(appsrc), NULL, NULL, 5 * GST_SECOND);
> gst_element_set_state(GST_ELEMENT(appsrc), GST_STATE_PLAYING);
> gst_element_get_state(GST_ELEMENT(appsrc), NULL, NULL, 5 * GST_SECOND);
> 

Sending a flush and then setting the element to NULL and back to PLAYING is
redundant. Either operation should be enough for your case.

> This code works fine in Win32 (with directaudiosink) but on linux on the RPI it
> plays <= 500 ms of the previous song even after i done the flushing.
> 
> Any ideas?

Can you share an example application to reproduce the problem?

> 
> Thanks,
> \\ Theo

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list