...
 
Commits (100)
This diff is collapsed.
This is GStreamer Base Plugins 1.4.0
This is GStreamer Base Plugins 1.4.5
Changes since 1.2:
New API:
• GstMessageType has GST_MESSAGE_EXTENDED added. All types before
that can be used together as a flags type as before, but from
that message onwards the types are just counted incrementally.
This was necessary to be able to add more message types.
In 2.0 GstMessageType will just become an enum and not a flags
type anymore.
• GstDeviceMonitor for device probing, e.g. to list all available
audio or video capture devices. This is the replacement for
GstPropertyProbe from 0.10.
• Events accumulate the running-time offset now when travelling
through pads, as set by the gst_pad_set_offset() function. This
allows to compensate for this in the QOS event for example.
• GstBuffer has a new flag "tag-memory" that is set automatically
when memory is added or removed to a buffer. This allows buffer
pools to detect if they can recycle a buffer or need to reset
it first.
• GstToc has new API to mark GstTocEntries as loops.
• A not-authorized resource error has been defined to notify
applications that accessing the resource has failed because
of missing authorization and to distinguish this case from others.
This change is actually already in 1.2.4.
• GstPad has a new flag "accept-intersect", that will let the default
ACCEPT_CAPS query handler do an intersection instead of subset check.
This is interesting for parser elements that can handle incomplete
caps.
• GstCollectPads has support for flushing and a default handler for
SEEK events now.
• New GstFlowAggregator helper object that simplifies handling of
flow returns in elements with multiple source pads. Additionally
GstPad now always stores the last flow return and provides an
API to retrieve it.
• GstSegment has new API to offset the running time by a specific
value and this is used in GstPad to allow positive and negative
offsets in gst_pad_set_offset() in all situations.
• Support for h265/HEVC and VP8 has been added to the codec utils and codec
parsers library, and was integrated into various elements.
• API for adjusting the TLS validation of RTSP connection has been added.
• The RTSP and SDP library has MIKEY (RFC 3830) support now, and
there is API to distinguish between the different RTSP profiles.
• API to access RTP time information and statistics.
• Support for auxiliary streams was added to rtpbin.
• Support for tiled, raw video formats has been added.
• GstVideoDecoder and GstAudioDecoder have API to help aggregating tag
events and merge custom tags into them consistently.
• GstBufferPool has support for flushing now.
• playbin/playsink has support for application provided audio and video
filters.
• GstDiscoverer has new and simplified API to get details about missing
plugins and information to pass to the plugin installer.
• The GL library was merged from gst-plugins-gl to gst-plugins-bad,
providing a generic infrastructure for handling GL inside GStreamer
pipelines and a plugin with some elements using these, especially
a video sink. Supported platforms currently are Android, Cocoa (OS X),
DispManX (Raspberry Pi), EAGL (iOS), WGL (Windows) and generic X11,
Wayland and EGL platforms.
This replaces eglglessink and also is supposed to replace osxvideosink.
• New GstAggregator base class in gst-plugins-bad. This is supposed to
replace GstCollectPads in the future and fix long-known shortcomings
in its API. Together with the base class some elements are provided
already, like a videomixer (compositor).
Major changes:
• New plugins and elements:
∘ v4l2videodec element for accessing hardware codecs on
platforms that make them accessible via V4L2, e.g.
Samsung Exynos. This comes together with major refactoring
of the existing V4L2 elements and the corresponding
infrastructure.
The v4l2videodec element replaces the mfcdec element.
∘ New downloadbuffer element that replaces the download
buffering feature of queue2. Compared to queue2's code
it is much simpler and only for this single use case.
A noteworthy new feature is that it's downloading gaps
in the already downloaded stream parts when nothing else
is to be downloaded.
This is now used by playbin when download buffering is
enabled.
∘ rtpstreampay and rtpstreamdepay elements for transmitting
RTP packets over a stream API (e.g. TCP) according to
RFC 4571.
∘ rtprtx elements for standard compliant implementation of
retransmissions, integrated into the rtpmanager plugin.
∘ audiomixer element that mixes multiple audio streams together
into a single one while keeping synchronization. This is
planned to become the replacement of the adder element.
∘ OpenNI2 plugin for 3D cameras like the Kinect camera.
∘ OpenEXR plugin for decoding high-dynamic-range EXR images.
∘ curlsshsink and curlsftpsink to write files via SSH/SFTP.
∘ videosignal, ivfparse and sndfile plugins ported from 0.10.
∘ avfvideosrc, vtdec and other elements were ported from 0.10 and
are available on OS X and iOS now.
• Other changes:
∘ gst-libav now uses libav 10.2, and gained support for H265/HEVC.
∘ Support for hardware codecs and special memory types has been
improved with bugfixes and feature additions in various plugins
and base classes.
∘ Various bugfixes and improvements to buffering in queue2 and
multiqueue elements.
∘ dvbsrc supports more delivery mechanisms and other features
now, including DVB S2 and T2 support.
∘ The MPEGTS library has support for many more descriptors.
∘ Major improvements to tsdemux and tsparse, especially time and
seeking related.
∘ souphttpsrc now has support for keep-alive connections,
compression, configurable number of retries and configuration
for SSL certificate validation.
∘ hlsdemux has undergone major refactoring and works more
reliable now and supports more HLS features like trick modes.
Also fragments are pushed downstream while they're downloaded
now instead of waiting for each fragment to finish.
∘ dashdemux and mssdemux are now also pushing fragments downstream
while they're downloaded instead of waiting for each fragment to
finish.
∘ videoflip can automatically flip based on the orientation tag.
∘ openjpeg supports the OpenJPEG2 API.
∘ waylandsink was refactored and should be more useful now. It also
includes a small library which most likely is going to be removed
in the future and will result in extensions to the GstVideoOverlay
interface.
∘ gst-rtsp-server supports SRTP and MIKEY now.
∘ gst-libav encoders are now negotiating any profile/level settings
with downstream via caps.
∘ Lots of fixes for coverity warnings all over the place.
∘ Negotiation related performance improvements.
∘ 800+ fixed bug reports, and many other bug fixes and other
improvements everywhere that had no bug report.
Things to look out for:
• The eglglessink element was removed and replaced by the glimagesink
element.
• The mfcdec element was removed and replaced by v4l2videodec.
• osxvideosink is only available in OS X 10.6 or newer.
• On Android the namespace of the automatically generated Java class
for initialization of GStreamer has changed from com.gstreamer to
org.freedesktop.gstreamer to prevent namespace pollution.
• On iOS you have to update your gst_ios_init.h and gst_ios_init.m in
your projects from the one included in the binaries if you used the
GnuTLS GIO module before. The loading mechanism has slightly changed.
Release notes for GStreamer Base Plugins 1.4.0
Release notes for GStreamer Base Plugins 1.4.5
The GStreamer team is pleased to announce a bugfix release of the stable
1.4 release series. The 1.4 release series is adding new features on top
of the 1.2 series and is part of the API and ABI-stable 1.x release
series of the GStreamer multimedia framework that contains new features.
The 1.4.x bugfix releases only contain important bugfixes compared to 1.4.0.
The GStreamer team is pleased to announce the first release of
the stable 1.4 release series. The 1.4 release series is adding new
features on top of the 1.0 and 1.2 series and is part of the API and
ABI-stable 1.x release series of the GStreamer multimedia framework.
Binaries for Android, iOS, Mac OS X and Windows are provided by the
GStreamer project for this release.
Binaries for Android, iOS, Mac OS X and Windows are provided together
with this release.
The 1.x series is a stable series targeted at end users. It is not API
or ABI compatible with the 0.10.x series. It can, however, be installed
in parallel with the 0.10.x series and will not affect an existing
0.10.x installation.
The stable 1.4 release series is API and ABI compatible with 1.0.x,
1.2.x and any other 1.x release series in the future. Compared to 1.2.x
it contains some new features and more intrusive changes that were
considered too risky as a bugfix.
The stable 1.4.x release series is API and ABI compatible with 1.0.x and
any other 1.x release series in the future. Compared to 1.0.x it contains
some new features and more intrusive changes that were considered too
risky as a bugfix.
......@@ -67,10 +71,17 @@ contains a set of codecs plugins based on libav (formerly gst-ffmpeg)
Bugs fixed in this release
* 733012 : playbin: *-filter properties are settable, but not gettable
* 733207 : POTFILES.in is out of date
* 733349 : encodebin: Documentation fixes and updates for GstEncodingProfile
* 733386 : appsrc: Leaking callback user data
* 741420 : video pools: should update size in configuration after applying alignment
* 715050 : add typefinder for audio/x-audible
* 739544 : tcp: Add test and fix memory leak in tcp elements
* 739840 : typefind should recognize Apple Core Audio Format (CAF)
* 740556 : videodecoder: don't complain when DTS != PTS on keyframes
* 740675 : playsink: continues playback, reset mute property
* 740730 : rtspconnection: don't remove child source if parent source is already destroyed
* 740853 : audiodecoder: Push pending events before sending EOS.
* 740952 : alsa: NetBSD fixes
* 741045 : audiorate can can lose timestamp precision in some cases
* 741198 : playbin: leaks GstPads
==== Download ====
......@@ -107,10 +118,21 @@ subscribe to the gstreamer-devel list.
Contributors to this release
* Arun Raghavan
* Nirbheek Chauhan
* Piotr Drąg
* Andrei Sarakeev
* Chad
* Edward Hervey
* Göran Jönsson
* Jan Schmidt
* Jonathan Matthew
* Matej Knopp
* Mathieu Duponchelle
* Peter G. Baum
* Sebastian Dröge
* Song Bing
* Thiago Santos
* Thibault Saunier
* Thomas Klausner
* Tim-Philipp Müller
* Youness Alaoui
* William Manley
* Wim Taymans
 
\ No newline at end of file
......@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
dnl initialize autoconf
dnl releases only do -Wall, git and prerelease does -Werror too
dnl use a three digit version number for releases, and four for git/prerelease
AC_INIT([GStreamer Base Plug-ins],[1.4.0],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-base])
AC_INIT([GStreamer Base Plug-ins],[1.4.5],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-base])
AG_GST_INIT
......@@ -56,7 +56,7 @@ dnl 1.2.5 => 205
dnl 1.10.9 (who knows) => 1009
dnl
dnl sets GST_LT_LDFLAGS
AS_LIBTOOL(GST, 400, 0, 400)
AS_LIBTOOL(GST, 405, 0, 405)
dnl *** required versions of GStreamer stuff ***
GST_REQ=1.4.0
......
......@@ -15,7 +15,6 @@ GObject
GstElement
GstAdder
GstAudioDecoder
GstIVorbisDec
GstVorbisDec
GstAudioEncoder
GstVorbisEnc
......
......@@ -3,7 +3,7 @@
<description>Adds multiple streams</description>
<filename>../../gst/adder/.libs/libgstadder.so</filename>
<basename>libgstadder.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>ALSA plugin library</description>
<filename>../../ext/alsa/.libs/libgstalsa.so</filename>
<basename>libgstalsa.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Elements used to communicate with applications</description>
<filename>../../gst/app/.libs/libgstapp.so</filename>
<basename>libgstapp.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Convert audio to different formats</description>
<filename>../../gst/audioconvert/.libs/libgstaudioconvert.so</filename>
<basename>libgstaudioconvert.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Adjusts audio frames</description>
<filename>../../gst/audiorate/.libs/libgstaudiorate.so</filename>
<basename>libgstaudiorate.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Resamples audio</description>
<filename>../../gst/audioresample/.libs/libgstaudioresample.so</filename>
<basename>libgstaudioresample.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Creates audio test signals of given frequency and volume</description>
<filename>../../gst/audiotestsrc/.libs/libgstaudiotestsrc.so</filename>
<basename>libgstaudiotestsrc.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Read audio from CD in paranoid mode</description>
<filename>../../ext/cdparanoia/.libs/libgstcdparanoia.so</filename>
<basename>libgstcdparanoia.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>various encoding-related elements</description>
<filename>../../gst/encoding/.libs/libgstencodebin.so</filename>
<basename>libgstencodebin.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>GIO elements</description>
<filename>../../gst/gio/.libs/libgstgio.so</filename>
<basename>libgstgio.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Vorbis Tremor decoder</description>
<filename>../../ext/vorbis/.libs/libgstivorbisdec.so</filename>
<basename>libgstivorbisdec.so</basename>
<version>1.4.0</version>
<version>1.4.3</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>libvisual visualization plugins</description>
<filename>../../ext/libvisual/.libs/libgstlibvisual.so</filename>
<basename>libgstlibvisual.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>ogg stream manipulation (info about ogg: http://xiph.org)</description>
<filename>../../ext/ogg/.libs/libgstogg.so</filename>
<basename>libgstogg.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Pango-based text rendering and overlay</description>
<filename>../../ext/pango/.libs/libgstpango.so</filename>
<basename>libgstpango.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>various playback elements</description>
<filename>../../gst/playback/.libs/libgstplayback.so</filename>
<basename>libgstplayback.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Subtitle parsing</description>
<filename>../../gst/subparse/.libs/libgstsubparse.so</filename>
<basename>libgstsubparse.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>transfer data over the network via TCP</description>
<filename>../../gst/tcp/.libs/libgsttcp.so</filename>
<basename>libgsttcp.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Theora plugin library</description>
<filename>../../ext/theora/.libs/libgsttheora.so</filename>
<basename>libgsttheora.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>default typefind functions</description>
<filename>../../gst/typefind/.libs/libgsttypefindfunctions.so</filename>
<basename>libgsttypefindfunctions.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Colorspace conversion</description>
<filename>../../gst/videoconvert/.libs/libgstvideoconvert.so</filename>
<basename>libgstvideoconvert.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Adjusts video frames</description>
<filename>../../gst/videorate/.libs/libgstvideorate.so</filename>
<basename>libgstvideorate.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Resizes video</description>
<filename>../../gst/videoscale/.libs/libgstvideoscale.so</filename>
<basename>libgstvideoscale.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Creates a test video stream</description>
<filename>../../gst/videotestsrc/.libs/libgstvideotestsrc.so</filename>
<basename>libgstvideotestsrc.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>plugin for controlling audio volume</description>
<filename>../../gst/volume/.libs/libgstvolume.so</filename>
<basename>libgstvolume.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>Vorbis plugin library</description>
<filename>../../ext/vorbis/.libs/libgstvorbis.so</filename>
<basename>libgstvorbis.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>X11 video output element based on standard Xlib calls</description>
<filename>../../sys/ximage/.libs/libgstximagesink.so</filename>
<basename>libgstximagesink.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -3,7 +3,7 @@
<description>XFree86 video output plugin using Xv extension</description>
<filename>../../sys/xvimage/.libs/libgstxvimagesink.so</filename>
<basename>libgstxvimagesink.so</basename>
<version>1.4.0</version>
<version>1.4.5</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -52,6 +52,10 @@
#include <gst/audio/gstaudioiec61937.h>
#include <gst/gst-i18n-plugin.h>
#ifndef ESTRPIPE
#define ESTRPIPE EPIPE
#endif
#define DEFAULT_DEVICE "default"
#define DEFAULT_DEVICE_NAME ""
#define DEFAULT_CARD_NAME ""
......
......@@ -49,6 +49,10 @@
#include <gst/gst-i18n-plugin.h>
#ifndef ESTRPIPE
#define ESTRPIPE EPIPE
#endif
#define DEFAULT_PROP_DEVICE "default"
#define DEFAULT_PROP_DEVICE_NAME ""
#define DEFAULT_PROP_CARD_NAME ""
......
This diff is collapsed.
......@@ -81,6 +81,28 @@ copy_samples (vorbis_sample_t * out, vorbis_sample_t ** in, guint samples,
#endif
}
static void
copy_samples_no_reorder (vorbis_sample_t * out, vorbis_sample_t ** in,
guint samples, gint channels)
{
#ifdef GST_VORBIS_DEC_SEQUENTIAL
gint i;
for (i = 0; i < channels; i++) {
memcpy (out, in[i], samples * sizeof (float));
out += samples;
}
#else
gint i, j;
for (j = 0; j < samples; j++) {
for (i = 0; i < channels; i++) {
*out++ = in[i][j];
}
}
#endif
}
CopySampleFunc
gst_vorbis_get_copy_sample_func (gint channels)
{
......@@ -93,9 +115,17 @@ gst_vorbis_get_copy_sample_func (gint channels)
case 2:
f = copy_samples_s;
break;
default:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
f = copy_samples;
break;
default:
f = copy_samples_no_reorder;
break;
}
return f;
......
......@@ -1093,7 +1093,8 @@ gst_app_sink_get_drop (GstAppSink * appsink)
* This function blocks until a preroll sample or EOS is received or the appsink
* element is set to the READY/NULL state.
*
* Returns: a #GstBuffer or NULL when the appsink is stopped or EOS.
* Returns: (transfer full): a #GstSample or NULL when the appsink is stopped or EOS.
* Call gst_sample_unref() after usage.
*/
GstSample *
gst_app_sink_pull_preroll (GstAppSink * appsink)
......@@ -1161,7 +1162,8 @@ not_started:
* If an EOS event was received before any buffers, this function returns
* %NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
*
* Returns: a #GstBuffer or NULL when the appsink is stopped or EOS.
* Returns: (transfer full): a #GstSample or NULL when the appsink is stopped or EOS.
* Call gst_sample_unref() after usage.
*/
GstSample *
......
......@@ -843,7 +843,7 @@ gst_audio_base_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
{
GstAudioBaseSink *sink = GST_AUDIO_BASE_SINK (bsink);
GstAudioRingBufferSpec *spec;
GstClockTime now;
GstClockTime now, internal_time;
GstClockTime crate_num, crate_denom;
if (!sink->ringbuffer)
......@@ -864,6 +864,7 @@ gst_audio_base_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
* gst_audio_clock_reset() which will use this last_time to create an offset
* so that time from the clock keeps on increasing monotonically. */
now = gst_clock_get_time (sink->provided_clock);
internal_time = gst_clock_get_internal_time (sink->provided_clock);
GST_DEBUG_OBJECT (sink, "time was %" GST_TIME_FORMAT, GST_TIME_ARGS (now));
......@@ -899,8 +900,7 @@ gst_audio_base_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
gst_clock_get_calibration (sink->provided_clock, NULL, NULL,
&crate_num, &crate_denom);
gst_clock_set_calibration (sink->provided_clock,
gst_clock_get_internal_time (sink->provided_clock), now, crate_num,
crate_denom);
internal_time, now, crate_num, crate_denom);
/* calculate actual latency and buffer times.
* FIXME: In 2.0, store the latency_time internally in ns */
......@@ -1464,15 +1464,21 @@ gst_audio_base_sink_sync_latency (GstBaseSink * bsink, GstMiniObject * obj)
* yet. if some other error occures, we continue. */
} while (status == GST_CLOCK_UNSCHEDULED);
GST_OBJECT_LOCK (sink);
GST_DEBUG_OBJECT (sink, "latency synced");
/* Do not acquire the sink object lock before trying to get time on the Sink.
* The get_time call may need to acquire the pulse audio mainloop lock. This can
* cause a deadlock with the Pulse Audio main loop thread which in turn has
* acquired its mainloop lock and now needs to acquire Object lock on the sink. */
itime = gst_audio_clock_get_time (sink->provided_clock);
itime = gst_audio_clock_adjust (sink->provided_clock, itime);
GST_OBJECT_LOCK (sink);
/* when we prerolled in time, we can accurately set the calibration,
* our internal clock should exactly have been the latency (== the running
* time of the external clock) */
etime = GST_ELEMENT_CAST (sink)->base_time + time;
itime = gst_audio_clock_get_time (sink->provided_clock);
itime = gst_audio_clock_adjust (sink->provided_clock, itime);
if (status == GST_CLOCK_EARLY) {
/* when we prerolled late, we have to take into account the lateness */
......@@ -2183,14 +2189,22 @@ gst_audio_base_sink_change_state (GstElement * element,
GstAudioBaseSink *sink = GST_AUDIO_BASE_SINK (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
if (sink->ringbuffer == NULL) {
gst_audio_clock_reset (GST_AUDIO_CLOCK (sink->provided_clock), 0);
sink->ringbuffer = gst_audio_base_sink_create_ringbuffer (sink);
}
case GST_STATE_CHANGE_NULL_TO_READY:{
GstAudioRingBuffer *rb;
gst_audio_clock_reset (GST_AUDIO_CLOCK (sink->provided_clock), 0);
rb = gst_audio_base_sink_create_ringbuffer (sink);
if (rb == NULL)
goto create_failed;
GST_OBJECT_LOCK (sink);
sink->ringbuffer = rb;
GST_OBJECT_UNLOCK (sink);
if (!gst_audio_ring_buffer_open_device (sink->ringbuffer))
goto open_failed;
break;
}
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_audio_base_sink_reset_sync (sink);
gst_audio_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
......@@ -2285,6 +2299,12 @@ gst_audio_base_sink_change_state (GstElement * element,
return ret;
/* ERRORS */
create_failed:
{
/* subclass must post a meaningful error message */
GST_DEBUG_OBJECT (sink, "create failed");
return GST_STATE_CHANGE_FAILURE;
}
open_failed:
{
/* subclass must post a meaningful error message */
......
......@@ -1124,17 +1124,23 @@ gst_audio_base_src_change_state (GstElement * element,
GstAudioBaseSrc *src = GST_AUDIO_BASE_SRC (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
case GST_STATE_CHANGE_NULL_TO_READY:{
GstAudioRingBuffer *rb;
GST_DEBUG_OBJECT (src, "NULL->READY");
gst_audio_clock_reset (GST_AUDIO_CLOCK (src->clock), 0);
rb = gst_audio_base_src_create_ringbuffer (src);
if (rb == NULL)
goto create_failed;
GST_OBJECT_LOCK (src);
if (src->ringbuffer == NULL) {
gst_audio_clock_reset (GST_AUDIO_CLOCK (src->clock), 0);
src->ringbuffer = gst_audio_base_src_create_ringbuffer (src);
}
src->ringbuffer = rb;
GST_OBJECT_UNLOCK (src);
if (!gst_audio_ring_buffer_open_device (src->ringbuffer))
goto open_failed;
break;
}
case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_DEBUG_OBJECT (src, "READY->PAUSED");
src->next_sample = -1;
......@@ -1197,6 +1203,12 @@ gst_audio_base_src_change_state (GstElement * element,
return ret;
/* ERRORS */
create_failed:
{
/* subclass must post a meaningful error message */
GST_DEBUG_OBJECT (src, "create failed");
return GST_STATE_CHANGE_FAILURE;
}
open_failed:
{
/* subclass must post a meaningful error message */
......
......@@ -965,6 +965,7 @@ gst_audio_cd_src_handle_event (GstBaseSrc * basesrc, GstEvent * event)
ret = gst_audio_cd_src_handle_track_seek (src, 1.0, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, track_num, GST_SEEK_TYPE_NONE, -1);
}
g_free (uid);
break;
}
default:{
......
......@@ -502,7 +502,6 @@ gst_audio_decoder_init (GstAudioDecoder * dec, GstAudioDecoderClass * klass)
GST_DEBUG_FUNCPTR (gst_audio_decoder_src_event));
gst_pad_set_query_function (dec->srcpad,
GST_DEBUG_FUNCPTR (gst_audio_decoder_src_query));
gst_pad_use_fixed_caps (dec->srcpad);
gst_element_add_pad (GST_ELEMENT (dec), dec->srcpad);
GST_DEBUG_OBJECT (dec, "srcpad created");
......@@ -1174,7 +1173,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
/* frame and ts book-keeping */
if (G_UNLIKELY (frames < 0)) {
if (G_UNLIKELY (-frames - 1 > priv->frames.length)) {
GST_ELEMENT_WARNING (dec, STREAM, ENCODE,
GST_ELEMENT_WARNING (dec, STREAM, DECODE,
("received more decoded frames %d than provided %d", frames,
priv->frames.length), (NULL));
frames = 0;
......@@ -1183,7 +1182,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
}
} else if (G_UNLIKELY (frames > priv->frames.length)) {
if (G_LIKELY (!priv->force)) {
GST_ELEMENT_WARNING (dec, STREAM, ENCODE,
GST_ELEMENT_WARNING (dec, STREAM, DECODE,
("received more decoded frames %d than provided %d", frames,
priv->frames.length), (NULL));
}
......@@ -1289,7 +1288,7 @@ exit:
/* ERRORS */
wrong_buffer:
{
GST_ELEMENT_ERROR (dec, STREAM, ENCODE, (NULL),
GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL),
("buffer size %" G_GSIZE_FORMAT " not a multiple of %d", size,
ctx->info.bpf));
gst_buffer_unref (buf);
......@@ -1451,8 +1450,16 @@ gst_audio_decoder_drain (GstAudioDecoder * dec)
gst_audio_decoder_chain_reverse (dec, NULL);
/* have subclass give all it can */
ret = gst_audio_decoder_push_buffers (dec, TRUE);
if (ret != GST_FLOW_OK) {
GST_WARNING_OBJECT (dec, "audio decoder push buffers failed");
goto drain_failed;
}
/* ensure all output sent */
ret = gst_audio_decoder_output (dec, NULL);
if (ret != GST_FLOW_OK)
GST_WARNING_OBJECT (dec, "audio decoder output failed");
drain_failed:
/* everything should be away now */
if (dec->priv->frames.length) {
/* not fatal/impossible though if subclass/codec eats stuff */
......@@ -1461,9 +1468,9 @@ gst_audio_decoder_drain (GstAudioDecoder * dec)
g_queue_foreach (&dec->priv->frames, (GFunc) gst_buffer_unref, NULL);
g_queue_clear (&dec->priv->frames);
}
/* discard (unparsed) leftover */
gst_adapter_clear (dec->priv->adapter);
return ret;
}
}
......@@ -2001,14 +2008,14 @@ _flush_events (GstPad * pad, GList * events)
GList *tmp;
for (tmp = events; tmp; tmp = tmp->next) {
if (GST_EVENT_TYPE (tmp->data) == GST_EVENT_EOS ||
GST_EVENT_TYPE (tmp->data) == GST_EVENT_SEGMENT ||
!GST_EVENT_IS_STICKY (tmp->data)) {
gst_event_unref (tmp->data);
} else {
if (GST_EVENT_TYPE (tmp->data) != GST_EVENT_EOS &&
GST_EVENT_TYPE (tmp->data) != GST_EVENT_SEGMENT &&
GST_EVENT_IS_STICKY (tmp->data)) {
gst_pad_store_sticky_event (pad, GST_EVENT_CAST (tmp->data));
}
gst_event_unref (tmp->data);
}
g_list_free (events);
return NULL;
}
......@@ -2130,6 +2137,8 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
/* Forward EOS because no buffer or serialized event will come after
* EOS and nothing could trigger another _finish_frame() call. */
if (dec->priv->pending_events)
send_pending_events (dec);
ret = gst_audio_decoder_push_event (dec, event);
break;
......@@ -2655,7 +2664,7 @@ gst_audio_decoder_stop (GstAudioDecoder * dec)
if (ret)
dec->priv->active = FALSE;
return TRUE;
return ret;
}
static gboolean
......@@ -2678,7 +2687,7 @@ gst_audio_decoder_start (GstAudioDecoder * dec)
if (ret)
dec->priv->active = TRUE;
return TRUE;
return ret;
}
static void
......
......@@ -1441,13 +1441,12 @@ _flush_events (GstPad * pad, GList * events)
GList *tmp;
for (tmp = events; tmp; tmp = tmp->next) {
if (GST_EVENT_TYPE (tmp->data) == GST_EVENT_EOS ||
GST_EVENT_TYPE (tmp->data) == GST_EVENT_SEGMENT ||
!GST_EVENT_IS_STICKY (tmp->data)) {
gst_event_unref (tmp->data);
} else {
if (GST_EVENT_TYPE (tmp->data) != GST_EVENT_EOS &&
GST_EVENT_TYPE (tmp->data) != GST_EVENT_SEGMENT &&
GST_EVENT_IS_STICKY (tmp->data)) {
gst_pad_store_sticky_event (pad, GST_EVENT_CAST (tmp->data));
}
gst_event_unref (tmp->data);
}
g_list_free (events);
......
......@@ -250,7 +250,7 @@ audio_orc_unpack_u8 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
/* 2: convuwl */
var38.i = (orc_uint16) var37.i;
/* 3: shll */
var39.i = var38.i << 24;
var39.i = ((orc_uint32) var38.i) << 24;
/* 5: xorl */
var36.i = var39.i ^ var35.i;
/* 6: storel */
......@@ -292,7 +292,7 @@ _backup_audio_orc_unpack_u8 (OrcExecutor * ORC_RESTRICT ex)
/* 2: convuwl */
var38.i = (orc_uint16) var37.i;
/* 3: shll */
var39.i = var38.i << 24;
var39.i = ((orc_uint32) var38.i) << 24;
/* 5: xorl */
var36.i = var39.i ^ var35.i;
/* 6: storel */
......@@ -391,7 +391,7 @@ audio_orc_unpack_s8 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
/* 2: convuwl */
var37.i = (orc_uint16) var36.i;
/* 3: shll */
var35.i = var37.i << 24;
var35.i = ((orc_uint32) var37.i) << 24;
/* 4: storel */
ptr0[i] = var35;
}
......@@ -423,7 +423,7 @@ _backup_audio_orc_unpack_s8 (OrcExecutor * ORC_RESTRICT ex)
/* 2: convuwl */
var37.i = (orc_uint16) var36.i;
/* 3: shll */
var35.i = var37.i << 24;
var35.i = ((orc_uint32) var37.i) << 24;
/* 4: storel */
ptr0[i] = var35;
}
......@@ -522,7 +522,7 @@ audio_orc_unpack_u16 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
/* 1: convuwl */
var36.i = (orc_uint16) var33.i;
/* 2: shll */
var37.i = var36.i << 16;
var37.i = ((orc_uint32) var36.i) << 16;
/* 4: xorl */
var35.i = var37.i ^ var34.i;
/* 5: storel */
......@@ -561,7 +561,7 @@ _backup_audio_orc_unpack_u16 (OrcExecutor * ORC_RESTRICT ex)
/* 1: convuwl */
var36.i = (orc_uint16) var33.i;
/* 2: shll */
var37.i = var36.i << 16;
var37.i = ((orc_uint32) var36.i) << 16;
/* 4: xorl */
var35.i = var37.i ^ var34.i;
/* 5: storel */
......@@ -654,7 +654,7 @@ audio_orc_unpack_s16 (gint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
/* 1: convuwl */
var35.i = (orc_uint16) var33.i;
/* 2: shll */
var34.i = var35.i << 16;
var34.i = ((orc_uint32) var35.i) << 16;
/* 3: storel */
ptr0[i] = var34;
}
......@@ -683,7 +683,7 @@ _backup_audio_orc_unpack_s16 (OrcExecutor * ORC_RESTRICT ex)
/* 1: convuwl */
var35.i = (orc_uint16) var33.i;
/* 2: shll */
var34.i = var35.i << 16;
var34.i = ((orc_uint32) var35.i) << 16;
/* 3: storel */
ptr0[i] = var34;
}
......@@ -781,7 +781,7 @@ audio_orc_unpack_u16_swap (gint32 * ORC_RESTRICT d1,
/* 2: convuwl */
var38.i = (orc_uint16) var37.i;
/* 3: shll */
var39.i = var38.i << 16;
var39.i = ((orc_uint32) var38.i) << 16;
/* 5: xorl */
var36.i = var39.i ^ var35.i;
/* 6: storel */
......@@ -823,7 +823,7 @@ _backup_audio_orc_unpack_u16_swap (OrcExecutor * ORC_RESTRICT ex)
/* 2: convuwl */
var38.i = (orc_uint16) var37.i;
/* 3: shll */
var39.i = var38.i << 16;
var39.i = ((orc_uint32) var38.i) << 16;
/* 5: xorl */
var36.i = var39.i ^ var35.i;
/* 6: storel */
......@@ -923,7 +923,7 @@ audio_orc_unpack_s16_swap (gint32 * ORC_RESTRICT d1,
/* 2: convuwl */
var37.i = (orc_uint16) var36.i;
/* 3: shll */
var35.i = var37.i << 16;
var35.i = ((orc_uint32) var37.i) << 16;
/* 4: storel */
ptr0[i] = var35;
}
......@@ -955,7 +955,7 @@ _backup_audio_orc_unpack_s16_swap (OrcExecutor * ORC_RESTRICT ex)
/* 2: convuwl */
var37.i = (orc_uint16) var36.i;
/* 3: shll */
var35.i = var37.i << 16;
var35.i = ((orc_uint32) var37.i) << 16;
/* 4: storel */
ptr0[i] = var35;
}
......@@ -1051,7 +1051,7 @@ audio_orc_unpack_u24_32 (gint32 * ORC_RESTRICT d1,
/* 0: loadl */
var33 = ptr4[i];
/* 1: shll */
var36.i = var33.i << 8;
var36.i = ((orc_uint32) var33.i) << 8;
/* 3: xorl */
var35.i = var36.i ^ var34.i;
/* 4: storel */
......@@ -1087,7 +1087,7 @@ _backup_audio_orc_unpack_u24_32 (OrcExecutor * ORC_RESTRICT ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: shll */
var36.i = var33.i << 8;
var36.i = ((orc_uint32) var33.i) << 8;
/* 3: xorl */
var35.i = var36.i ^ var34.i;
/* 4: storel */
......@@ -1175,7 +1175,7 @@ audio_orc_unpack_s24_32 (gint32 * ORC_RESTRICT d1,
/* 0: loadl */
var32 = ptr4[i];
/* 1: shll */
var33.i = var32.i << 8;
var33.i = ((orc_uint32) var32.i) << 8;
/* 2: storel */
ptr0[i] = var33;
}
......@@ -1201,7 +1201,7 @@ _backup_audio_orc_unpack_s24_32 (OrcExecutor * ORC_RESTRICT ex)
/* 0: loadl */
var32 = ptr4[i];
/* 1: shll */
var33.i = var32.i << 8;
var33.i = ((orc_uint32) var32.i) << 8;
/* 2: storel */
ptr0[i] = var33;
}
......@@ -1293,7 +1293,7 @@ audio_orc_unpack_u24_32_swap (gint32 * ORC_RESTRICT d1,
/* 1: swapl */
var36.i = ORC_SWAP_L (var33.i);
/* 2: shll */
var37.i = var36.i << 8;
var37.i = ((orc_uint32) var36.i) << 8;
/* 4: xorl */
var35.i = var37.i ^ var34.i;
/* 5: storel */
......@@ -1332,7 +1332,7 @@ _backup_audio_orc_unpack_u24_32_swap (OrcExecutor * ORC_RESTRICT ex)
/* 1: swapl */
var36.i = ORC_SWAP_L (var33.i);
/* 2: shll */
var37.i = var36.i << 8;
var37.i = ((orc_uint32) var36.i) << 8;
/* 4: xorl */
var35.i = var37.i ^ var34.i;
/* 5: storel */
......@@ -1426,7 +1426,7 @@ audio_orc_unpack_s24_32_swap (gint32 * ORC_RESTRICT d1,
/* 1: swapl */
var35.i = ORC_SWAP_L (var33.i);
/* 2: shll */
var34.i = var35.i << 8;
var34.i = ((orc_uint32) var35.i) << 8;
/* 3: storel */
ptr0[i] = var34;
}
......@@ -1455,7 +1455,7 @@ _backup_audio_orc_unpack_s24_32_swap (OrcExecutor * ORC_RESTRICT ex)
/* 1: swapl */
var35.i = ORC_SWAP_L (var33.i);
/* 2: shll */
var34.i = var35.i << 8;
var34.i = ((orc_uint32) var35.i) << 8;
/* 3: storel */
ptr0[i] = var34;
}
......
......@@ -1462,6 +1462,18 @@ default_commit (GstAudioRingBuffer * buf, guint64 * sample,
g_return_val_if_fail (buf->memory != NULL, -1);
g_return_val_if_fail (data != NULL, -1);
/* writing stuff now, ensure running clock */
if (G_UNLIKELY (g_atomic_int_get (&buf->state) !=
GST_AUDIO_RING_BUFFER_STATE_STARTED)) {
/* see if we are allowed to start it */
if (G_UNLIKELY (g_atomic_int_get (&buf->may_start) == FALSE)) {
GST_DEBUG_OBJECT (buf, "not allowed to start");
} else {
GST_DEBUG_OBJECT (buf, "start!");
gst_audio_ring_buffer_start (buf);
}
}
need_reorder = buf->need_reorder;