[Bug 752762] New: crossfade: New example for crossfading audio tracks using audiomixer
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Jul 23 00:37:25 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=752762
Bug ID: 752762
Summary: crossfade: New example for crossfading audio tracks
using audiomixer
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: enhancement
Priority: Normal
Component: gst-plugins-bad
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: nirbheek.chauhan at gmail.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 307971
--> https://bugzilla.gnome.org/attachment.cgi?id=307971&action=edit
crossfade: New example for crossfading audio tracks using audiomixer
/*
* crossfade: An example application to play a list of audio files with
* cross-fade between each file.
*
* This example application uses the audiomixer element combined with
* GstController and pad probes to play a list of audio files in such a way
that
* the audio is cross-faded while switching between files.
*
* Each file is played by a decoder bin inside each CrossfadeItem. This bin has
* a queue right before its srcpad which has a "max-size-time" of
* 2 * CROSSFADE_TIME_MS. When an EOS is detected on the sinkpad of this queue,
* the next CrossfadeItem is attached to audiomixer, the correct pad offset is
* set, and fadein/fadeout is scheduled using GstControlSources.
*
* A crossfade can also be scheduled immediately by switching to the next item
* "early" using crossfade_app_activate_next_item_early().
*
* The list of CrossfadeItems can be edited and added to dynamically; except
the
* currently-playing item and the next one (which has been prepared already).
*
* Bugs:
* - If the size of the file being played is smaller than 3*CROSSFADE_TIME_MS
* and the file was played with a fadein crossfade (i.e., it was not the
first
* file to be played), the queue before audiomixer which is used to detect a
* file going EOS will contain buffers of a total time less than
* CROSSFADE_TIME_MS. The crossfade will hence happen in whatever buffer-time
* is available.
* - If CROSSFADE_TIME_MS is set to a value less than the duration of a single
* buffer, no crossfade will happen, but the switch will be gapless.
*/
This is a decent example of how to use audiomixer for gapless/crossfade
playback in an audio player. Although the example expects files, this method of
doing crossfade/gapless should also work with arbitrary URIs.
--
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