[Bug 724231] New: appsrc flushing

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Feb 12 04:31:34 PST 2014


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

           Summary: appsrc flushing
    Classification: Platform
           Product: GStreamer
           Version: 1.2.2
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: theodorz at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


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);

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?

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