...
 
Commits (129)
This diff is collapsed.
This is GStreamer Base Plugins 1.2.0
Changes since 1.0:
New API:
• GstContext negotiation / sharing / announcing for sharing a
generic context between elements, e.g. a display handle
• GL texture upload conversion meta for allowing different
buffer types to be converted to an OpenGL texture
• GstCapsFeatures as extension to GstCaps for allowing the
negotiation of specific memory or meta requirements between
elements
• GstMemory flags for contiguous and non-mappable memory
• The stream-start event has optional flags now, e.g. for signalling
sparse streams
• The stream-start even has an optional group-id field now to signal
all streams that should be played together
• Allocators library in gst-plugins-base, currently only with generic
dmabuf memory support
• insertbin library for easier handling of dynamically linked
pipelines (in -bad for now)
• EGL helper library (in -bad for now)
• MPEG-TS data structure library (in -bad for now)
• New GstVideoRegionOfInterestMeta to describe a region of interest on
video frames.
• GstVideoDecoder/Encoder has new ::flush() vfunc to replace the
ill-defined ::reset() vfunc.
• The URI query allows to query the redirected URI now.
Major changes:
• New tool: gst-play-1.0 in gst-plugins-base for basic playback
testing on the command line.
• New plugins:
∘ mssdemux for Microsoft Smooth Streaming
∘ dashdemux for DASH adaptive streaming protocol
∘ bluez for interaction with Bluetooth devices
∘ openjpeg for JPEG2000 decoding and encoding
∘ daala for experimental Daala decoding and encoding
∘ vpx plugin has experimental VP9 decoding and encoding support
∘ webp plugin for WebP decoding (encoding to be added later)
∘ Various others: yadif, srtp, sbc, fluidsynth, midiparse,
mfc, ivtv, accuraterip and audiofxbad
• Moved plugins:
∘ dtmf, vp8rtp, scaletempo and rtpmux plugins are in
gst-plugins-good now
• Video:
∘ Fix handling of interlaced video in converters such as videoscale
and videoconvert (e.g. scale both fields independently)
∘ videoconvert will try harder to minimise quality losses when
conversion is necessary
∘ The experimental GstSurfaceConverter, GstSurfaceMeta and
GstVideoContext APIs from the (confusingly-named)
libgstbasevideo-1.0 library in gst-plugins-bad have now been
removed and been replaced by new APIs in GStreamer Core and
gst-plugins-base (see above). Since that was all that was left in
this library, the entire experimental libgstbasevideo-1.0 library
has been removed from gst-plugins-bad
∘ Chroma subsampling and chroma siting conversion is better handled
in videoconvert and the support for interlaced video was improved.
∘ New pinwheel and spoke patterns in videotestsrc
∘ videomixer can now accept different video formats on its sinkpads
and converts to a common format during mixing
• Audio:
∘ audioconvert will try harder to minimise quality losses when
conversion is necessary
∘ adder now allows muting/unmuting of its input streams, and also
per-input stream volume
∘ pulseaudio elements can switch between devices during playback now
∘ aacparse can convert between ADTS←→RAW
• Platform specific changes:
∘ Caps, events, etc. are now printed in the GStreamer debug logs
with their content instead of just the pointer address even on
non-glibc platforms (e.g. Windows, OSX, Android).
∘ Network elements (UDP/TCP) now work better with platforms,
where IPv6 sockets can't handle IPv4 (e.g. Windows)
∘ Linux/BSD: v4l2 had many improvements and cleanups
• Other changes:
∘ gst-libav now uses libav 9
∘ Static linking of plugins is supported now (also in 1.0.7)
∘ rtspsrc: add support for NetClientClock: when the server suggests a
GstNetTimeProvider in the SDP, set up a GstNetClientClock that
slaves to the remote clock and suggest this clock in provide_clock.
Simplifies synchronized playback of a resource from an RTSP server.
gst-rtsp-server now supports adding this to the SDP and can provide
a network clock
∘ RTP retransmission / NACK support and big RTP jitterbuffer improvements
∘ SRTP and DTLS support
∘ Changes to many elements and core to use the correct sticky event
order and also not lose any important sticky events during flushing
∘ >1000 fixed bug reports, and many other bug fixes and other
improvements everywhere that had no bug report
Things to look out for:
• Single header includes for all libraries, e.g. #include
<gst/video/video.h> - this was needed for some bindings.
• Stricter (correct) caps subset checking in some cases where this was
not correct before. Caps will now always fail to be a compatible
subset of another set of caps if the subset caps are missing some
fields that the superset caps have. This might lead to not-negotiated
errors if caps are incomplete now. However, it also prevents possible
data corruption caused by piping data formatted in an
incompatible/unexpected way into some elements. Check your h264 caps
for stream-format and alignment fields and AAC caps for the
stream-format field. This change will also be included in the next
stable 1.0.8 release.
• Stricter checking for missing events and correct sticky event order
(stream-start, caps, segment) in some places; this is not enabled in
stable releases by default, but you may get warnings when using git
builds, development releases or when compiling with
-UG_DISABLE_ASSERT in CFLAGS
• x264enc now outputs data in byte-stream by default if downstream has
ANY caps (e.g. appsink without caps set, filesink, udpsink,
tcpserversink etc.)
• The MPEG TS demuxer posts messages contain the PMT, PAT, etc. in a
different format now. This new format uses the data structures from
the new MPEGTS library
• The GstContext API has changed between 1.1.4 and 1.1.90
This is GStreamer Base Plugins 1.2.4
GStreamer 1.1.x development series
GStreamer 1.2.x stable series
WHAT IT IS
----------
......
Release notes for GStreamer Base Plugins 1.2.0
Release notes for GStreamer Base Plugins 1.2.4
The GStreamer team is proud to announce a new feature release
The GStreamer team is proud to announce a new bug-fix release
in the 1.x stable series of the
core of the GStreamer streaming media framework.
......@@ -60,10 +60,16 @@ contains a set of codecs plugins based on libav (formerly gst-ffmpeg)
Bugs fixed in this release
* 708667 : rtspconnection: leaks file descriptors/child sources
* 708372 : dmabuf: sys/mman.h: No such file or directory
* 708590 : adder: Should send its segment before checking for eos
* 708606 : video-frame: offsets are not copied from metadata
* 693263 : typefinding: MPEG-2 video ES detected as H.263
* 683504 : playsink: deadlock when disabling subtitles and suboptimal disabling of subtitles
* 700770 : typefinding: mp3 file mis-detected as h263 video
* 723597 : tagdemux: Seek event in GST_FORMAT_TIME are converted to BYTES to early
* 724633 : oggdemux: ignores last page in push mode
* 724720 : rtspconnection: not possible to disconnect/reconnect read connection in tunneled mode
* 725313 : rtspconnection: closed() callback is never called in tunneled mode
* 725644 : typefinding: mp3 file is misdetected as H.263
* 726642 : rtspconnection: minor memory leak in error handling
* 727025 : adder: rework the logic to check if eos has to be sent.
==== Download ====
......@@ -100,10 +106,13 @@ subscribe to the gstreamer-devel list.
Contributors to this release
* Edward Hervey
* Eric Trousset
* Jan Schmidt
* Mathieu Duponchelle
* Ognyan Tonchev
* Sebastian Dröge
* Thiago Santos
* Tim-Philipp Müller
* Vincent Penquerc'h
* Wim Taymans
 
\ No newline at end of file
common @ 74122499
Subproject commit 6b03ba716b9861277a435677ad9e31b3e14284e9
Subproject commit 7412249950b9fb00f78feb26277f84233fa4e4b4
......@@ -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.2.0],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-base])
AC_INIT([GStreamer Base Plug-ins],[1.2.4],[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, 200, 0, 200)
AS_LIBTOOL(GST, 204, 0, 204)
dnl *** required versions of GStreamer stuff ***
GST_REQ=1.2.0
......@@ -190,6 +190,7 @@ AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
#include <arm_neon.h>
int32x4_t testfunc(int16_t *a, int16_t *b) {
asm volatile ("vmull.s16 q0, d0, d0" : : : "q0");
return vmull_s16(vld1_s16(a), vld1_s16(b));
}
]])],
......
......@@ -4,8 +4,14 @@ SUBDIRS =
EXTRA_DIST = \
design-audiosinks.txt \
design-decodebin.txt \
design-encoding.txt \
design-encoding.txt \
design-orc-integration.txt \
draft-hw-acceleration.txt \
draft-keyframe-force.txt \
draft-subtitle-overlays.txt\
draft-va.txt \
part-interlaced-video.txt \
part-mediatype-audio-raw.txt\
part-mediatype-text-raw.txt\
part-mediatype-video-raw.txt\
part-playbin.txt
......@@ -1483,6 +1483,10 @@ gst_rtsp_connection_set_proxy
gst_rtsp_connection_get_read_socket
gst_rtsp_connection_get_write_socket
gst_rtsp_connection_get_tls
gst_rtsp_connection_set_tls_validation_flags
gst_rtsp_connection_get_tls_validation_flags
GstRTSPWatch
GstRTSPWatchFuncs
gst_rtsp_watch_new
......@@ -2507,6 +2511,7 @@ gst_video_decoder_get_allocator
gst_video_decoder_get_buffer_pool
gst_video_decoder_drop_frame
gst_video_decoder_finish_frame
gst_video_decoder_release_frame
gst_video_decoder_negotiate
gst_video_decoder_get_frame
gst_video_decoder_get_frames
......
......@@ -3,7 +3,7 @@
<description>Adds multiple streams</description>
<filename>../../gst/adder/.libs/libgstadder.so</filename>
<basename>libgstadder.so</basename>
<version>1.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</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.2.0</version>
<version>1.2.4</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins source release</package>
......
......@@ -282,7 +282,9 @@ gst_alsasink_getcaps (GstBaseSink * bsink, GstCaps * filter)
GstAlsaSink *sink = GST_ALSA_SINK (bsink);
GstCaps *caps, *templ_caps;
GST_OBJECT_LOCK (sink);
if (sink->handle == NULL) {
GST_OBJECT_UNLOCK (sink);
GST_DEBUG_OBJECT (sink, "device not open, using template caps");
return NULL; /* base class will get template caps for us */
}
......@@ -291,20 +293,26 @@ gst_alsasink_getcaps (GstBaseSink * bsink, GstCaps * filter)
if (filter) {
caps = gst_caps_intersect_full (filter, sink->cached_caps,
GST_CAPS_INTERSECT_FIRST);
GST_OBJECT_UNLOCK (sink);
GST_LOG_OBJECT (sink, "Returning cached caps %" GST_PTR_FORMAT " with "
"filter %" GST_PTR_FORMAT " applied: %" GST_PTR_FORMAT,
sink->cached_caps, filter, caps);
return caps;
} else {
GST_LOG_OBJECT (sink, "Returning cached caps %" GST_PTR_FORMAT,
sink->cached_caps);
return gst_caps_ref (sink->cached_caps);
caps = gst_caps_ref (sink->cached_caps);
GST_OBJECT_UNLOCK (sink);
GST_LOG_OBJECT (sink, "Returning cached caps %" GST_PTR_FORMAT, caps);
return caps;
}
}
element_class = GST_ELEMENT_GET_CLASS (sink);
pad_template = gst_element_class_get_pad_template (element_class, "sink");
g_return_val_if_fail (pad_template != NULL, NULL);
if (pad_template == NULL) {
GST_OBJECT_UNLOCK (sink);
g_assert_not_reached ();
return NULL;
}
templ_caps = gst_pad_template_get_caps (pad_template);
caps = gst_alsa_probe_supported_formats (GST_OBJECT (sink), sink->device,
......@@ -315,6 +323,8 @@ gst_alsasink_getcaps (GstBaseSink * bsink, GstCaps * filter)
sink->cached_caps = gst_caps_ref (caps);
}
GST_OBJECT_UNLOCK (sink);
GST_INFO_OBJECT (sink, "returning caps %" GST_PTR_FORMAT, caps);
if (filter) {
......@@ -943,11 +953,13 @@ gst_alsasink_close (GstAudioSink * asink)
{
GstAlsaSink *alsa = GST_ALSA_SINK (asink);
GST_OBJECT_LOCK (asink);
if (alsa->handle) {
snd_pcm_close (alsa->handle);
alsa->handle = NULL;
}
gst_caps_replace (&alsa->cached_caps, NULL);
GST_OBJECT_UNLOCK (asink);
return TRUE;
}
......
......@@ -1373,7 +1373,7 @@ gst_ogg_demux_seek_back_after_push_duration_check_unlock (GstOggDemux * ogg)
GST_INFO_OBJECT (ogg, "Seeking back to 0 after duration check");
event = gst_event_new_seek (1.0, GST_FORMAT_BYTES,
GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, 1, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
GST_SEEK_TYPE_SET, 1, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
if (!gst_pad_push_event (ogg->sinkpad, event)) {
GST_WARNING_OBJECT (ogg, "Failed seeking back to start");
return GST_FLOW_ERROR;
......@@ -2070,6 +2070,8 @@ gst_ogg_demux_init (GstOggDemux * ogg)
ogg->stats_bisection_max_steps[1] = 0;
ogg->newsegment = NULL;
ogg->chunk_size = CHUNKSIZE;
}
static void
......@@ -2110,6 +2112,8 @@ gst_ogg_demux_reset_streams (GstOggDemux * ogg)
GST_DEBUG_OBJECT (ogg, "Resetting current chain");
ogg->current_chain = NULL;
ogg->resync = TRUE;
ogg->chunk_size = CHUNKSIZE;
}
static gboolean
......@@ -2285,15 +2289,17 @@ gst_ogg_demux_get_data (GstOggDemux * ogg, gint64 end_offset)
if (ogg->read_offset == ogg->length)
goto eos;
oggbuffer = ogg_sync_buffer (&ogg->sync, CHUNKSIZE);
oggbuffer = ogg_sync_buffer (&ogg->sync, ogg->chunk_size);
if (G_UNLIKELY (oggbuffer == NULL))
goto no_buffer;
buffer =
gst_buffer_new_wrapped_full (0, oggbuffer, CHUNKSIZE, 0, CHUNKSIZE, NULL,
NULL);
gst_buffer_new_wrapped_full (0, oggbuffer, ogg->chunk_size, 0,
ogg->chunk_size, NULL, NULL);
ret = gst_pad_pull_range (ogg->sinkpad, ogg->read_offset, CHUNKSIZE, &buffer);
ret =
gst_pad_pull_range (ogg->sinkpad, ogg->read_offset, ogg->chunk_size,
&buffer);
if (ret != GST_FLOW_OK)
goto error;
......@@ -2440,11 +2446,12 @@ gst_ogg_demux_get_prev_page (GstOggDemux * ogg, ogg_page * og, gint64 * offset)
GST_LOG_OBJECT (ogg, "getting page before %" G_GINT64_FORMAT, begin);
while (cur_offset == -1) {
begin -= CHUNKSIZE;
begin -= ogg->chunk_size;
if (begin < 0)
begin = 0;
/* seek CHUNKSIZE back */
/* seek ogg->chunk_size back */
GST_LOG_OBJECT (ogg, "seeking back to %" G_GINT64_FORMAT, begin);
gst_ogg_demux_seek (ogg, begin);
/* now continue reading until we run out of data, if we find a page
......@@ -2769,13 +2776,14 @@ do_binary_search (GstOggDemux * ogg, GstOggChain * chain, gint64 begin,
while (begin < end) {
gint64 bisect;
if ((end - begin < CHUNKSIZE) || (endtime == begintime)) {
if ((end - begin < ogg->chunk_size) || (endtime == begintime)) {
bisect = begin;
} else {
/* take a (pretty decent) guess, avoiding overflow */
gint64 rate = (end - begin) * GST_MSECOND / (endtime - begintime);
bisect = (target - begintime) / GST_MSECOND * rate + begin - CHUNKSIZE;
bisect =
(target - begintime) / GST_MSECOND * rate + begin - ogg->chunk_size;
if (bisect <= begin)
bisect = begin;
......@@ -2802,7 +2810,7 @@ do_binary_search (GstOggDemux * ogg, GstOggChain * chain, gint64 begin,
if (bisect == 0)
goto seek_error;
bisect -= CHUNKSIZE;
bisect -= ogg->chunk_size;
if (bisect <= begin)
bisect = begin + 1;
......@@ -2861,7 +2869,7 @@ do_binary_search (GstOggDemux * ogg, GstOggChain * chain, gint64 begin,
} else {
if (end == ogg->offset) { /* we're pretty close - we'd be stuck in */
end = result;
bisect -= CHUNKSIZE; /* an endless loop otherwise. */
bisect -= ogg->chunk_size; /* an endless loop otherwise. */
if (bisect <= begin)
bisect = begin + 1;
gst_ogg_demux_seek (ogg, bisect);
......@@ -2973,11 +2981,40 @@ gst_ogg_demux_do_seek (GstOggDemux * ogg, GstSegment * segment,
&best, FALSE, 0))
goto seek_error;
/* second step: find pages for all streams, we use the keyframe_granule to keep
* track of which ones we saw. If we have seen a page for each stream we can
* calculate the positions of each keyframe. */
GST_DEBUG_OBJECT (ogg, "find keyframes");
/* second step: find pages for all relevant streams. We use the
* keyframe_granule to keep track of which ones we saw. If we have
* seen a page for each stream we can calculate the positions of
* each keyframe.
* Relevant streams are defined as those streams which are not
* Skeleton (which only has header pages). Discontinuous streams
* such as Kate and CMML are currently excluded, as they could
* cause performance issues if there are few pages in the area.
* TODO: We might want to include them on a flag, if we want to
* not miss a subtitle (Kate has repeat packets for this purpose,
* but a stream does not have to use them). */
pending = chain->streams->len;
for (i = 0; i < chain->streams->len; i++) {
GstOggPad *pad = g_array_index (chain->streams, GstOggPad *, i);
if (!pad) {
GST_WARNING_OBJECT (ogg, "No pad for serialno %08x", pad->map.serialno);
pending--;
continue;
}
if (pad->map.is_skeleton) {
GST_DEBUG_OBJECT (ogg, "Not finding pages for Skeleton stream %08x",
pad->map.serialno);
pending--;
continue;
}
if (pad->map.is_sparse) {
GST_DEBUG_OBJECT (ogg, "Not finding pages for sparse stream %08x (%s)",
pad->map.serialno, gst_ogg_stream_get_media_type (&pad->map));
pending--;
continue;
}
}
GST_DEBUG_OBJECT (ogg, "find keyframes for %d/%d streams", pending,
chain->streams->len);
/* figure out where the keyframes are */
keytarget = target;
......@@ -3002,7 +3039,7 @@ gst_ogg_demux_do_seek (GstOggDemux * ogg, GstSegment * segment,
if (pad == NULL)
continue;
if (pad->map.is_skeleton || pad->map.is_cmml)
if (pad->map.is_skeleton || pad->map.is_sparse)
goto next;
granulepos = ogg_page_granulepos (&og);
......@@ -3517,7 +3554,7 @@ gst_ogg_demux_perform_seek_push (GstOggDemux * ogg, GstEvent * event)
/* offset by typical page length, and ensure our best guess is within
reasonable bounds */
best -= CHUNKSIZE;
best -= ogg->chunk_size;
if (best < 0)
best = 0;
if (ogg->push_byte_length > 0 && best >= ogg->push_byte_length)
......@@ -3618,7 +3655,7 @@ gst_ogg_demux_bisect_forward_serialno (GstOggDemux * ogg,
while (searched < endsearched) {
gint64 bisect;
if (endsearched - searched < CHUNKSIZE) {
if (endsearched - searched < ogg->chunk_size) {
bisect = searched;
} else {
bisect = (searched + endsearched) / 2;
......@@ -3843,7 +3880,7 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain)
gint i;
while (!done) {
begin -= CHUNKSIZE;
begin -= ogg->chunk_size;
if (begin < 0)
begin = 0;
......@@ -4079,6 +4116,17 @@ no_last_page:
}
}
static void
gst_ogg_demux_update_chunk_size (GstOggDemux * ogg, ogg_page * page)
{
long size = page->header_len + page->body_len;
long chunk_size = size * 2;
if (chunk_size > ogg->chunk_size) {
GST_LOG_OBJECT (ogg, "Updating chunk size to %ld", chunk_size);
ogg->chunk_size = chunk_size;
}
}
static GstFlowReturn
gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page)
{
......@@ -4090,6 +4138,8 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page)
serialno = ogg_page_serialno (page);
granule = ogg_page_granulepos (page);
gst_ogg_demux_update_chunk_size (ogg, page);
GST_LOG_OBJECT (ogg,
"processing ogg page (serial %08x, "
"pageno %ld, granulepos %" G_GINT64_FORMAT ", bos %d)", serialno,
......@@ -4340,7 +4390,8 @@ gst_ogg_demux_loop_forward (GstOggDemux * ogg)
}
GST_LOG_OBJECT (ogg, "pull data %" G_GINT64_FORMAT, ogg->offset);
ret = gst_pad_pull_range (ogg->sinkpad, ogg->offset, CHUNKSIZE, &buffer);
ret =
gst_pad_pull_range (ogg->sinkpad, ogg->offset, ogg->chunk_size, &buffer);
if (ret != GST_FLOW_OK) {
GST_LOG_OBJECT (ogg, "Failed pull_range");
goto done;
......
......@@ -197,6 +197,7 @@ struct _GstOggDemux
/* ogg stuff */
ogg_sync_state sync;
long chunk_size;
};
struct _GstOggDemuxClass
......
......@@ -2325,7 +2325,7 @@ const GstOggMap mappers[] = {
granulepos_to_granule_opus,
granule_to_granulepos_default,
NULL,
NULL,
is_packet_keyframe_true,
is_header_opus,
packet_duration_opus,
NULL,
......
......@@ -1809,6 +1809,9 @@ gst_base_text_overlay_text_event (GstPad * pad, GstObject * parent,
GST_BASE_TEXT_OVERLAY_LOCK (overlay);
GST_BASE_TEXT_OVERLAY_BROADCAST (overlay);
GST_BASE_TEXT_OVERLAY_UNLOCK (overlay);
gst_event_unref (event);
ret = TRUE;
break;
}
case GST_EVENT_FLUSH_STOP:
......
......@@ -367,11 +367,11 @@ theora_parse_push_headers (GstTheoraParse * parse)
{
gint i;
theora_parse_drain_event_queue (parse);
if (!parse->streamheader_received)
theora_parse_set_streamheader (parse);
theora_parse_drain_event_queue (parse);
/* ignore return values, we pass along the result of pushing data packets only
*/
for (i = 0; i < 3; i++) {
......@@ -721,7 +721,8 @@ theora_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
ret = gst_pad_event_default (pad, parent, event);
break;
default:
if (parse->send_streamheader && GST_EVENT_IS_SERIALIZED (event))
if (parse->send_streamheader && GST_EVENT_IS_SERIALIZED (event)
&& GST_EVENT_TYPE (event) > GST_EVENT_CAPS)
ret = theora_parse_queue_event (parse, event);
else
ret = gst_pad_event_default (pad, parent, event);
......
......@@ -657,6 +657,7 @@ _gst_caps_set_buffer_array (GstCaps * caps, const gchar * field,
buf = va_arg (va, GstBuffer *);
}
va_end (va);
gst_structure_take_value (structure, field, &array);
......
......@@ -941,6 +941,7 @@ gst_app_src_emit_need_data (GstAppSrc * appsrc, guint size)
/* we can be flushing now because we released the lock */
}
/* must be called with the appsrc mutex */
static gboolean
gst_app_src_do_negotiate (GstBaseSrc * basesrc)
{
......@@ -953,12 +954,16 @@ gst_app_src_do_negotiate (GstBaseSrc * basesrc)
caps = priv->caps ? gst_caps_ref (priv->caps) : NULL;
GST_OBJECT_UNLOCK (basesrc);
/* Avoid deadlock by unlocking mutex
* otherwise we get deadlock between this and stream lock */
g_mutex_unlock (&priv->mutex);
if (caps) {
result = gst_base_src_set_caps (basesrc, caps);
gst_caps_unref (caps);
} else {
result = GST_BASE_SRC_CLASS (parent_class)->negotiate (basesrc);
}
g_mutex_lock (&priv->mutex);
return result;
}
......@@ -971,8 +976,8 @@ gst_app_src_negotiate (GstBaseSrc * basesrc)
gboolean result;
g_mutex_lock (&priv->mutex);
result = gst_app_src_do_negotiate (basesrc);
priv->new_caps = FALSE;
result = gst_app_src_do_negotiate (basesrc);
g_mutex_unlock (&priv->mutex);
return result;
}
......@@ -1029,10 +1034,18 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size,
guint buf_size;
if (priv->new_caps) {
gst_app_src_do_negotiate (bsrc);
priv->new_caps = FALSE;
}
gst_app_src_do_negotiate (bsrc);
/* Lock has released so now may need
*- flushing
*- new caps change
*- check queue has data */
if (G_UNLIKELY (priv->flushing))
goto flushing;
/* Contiue checks caps and queue */
continue;
}
*buf = g_queue_pop_head (priv->queue);
buf_size = gst_buffer_get_size (*buf);
......
......@@ -215,7 +215,7 @@ gst_audio_info_from_caps (GstAudioInfo * info, const GstCaps * caps)
goto no_channels;
if (!gst_structure_get (str, "channel-mask", GST_TYPE_BITMASK, &channel_mask,
NULL)) {
NULL) || (channel_mask == 0 && channels == 1)) {
if (channels == 1) {
position[0] = GST_AUDIO_CHANNEL_POSITION_MONO;
} else if (channels == 2) {
......
......@@ -185,8 +185,16 @@ gst_audio_buffer_clip (GstBuffer * buffer, GstSegment * segment, gint rate,
}
if (trim == 0 && size == osize) {
/* nothing changed */
ret = buffer;
if (GST_BUFFER_TIMESTAMP (ret) != timestamp) {
ret = gst_buffer_make_writable (ret);
GST_BUFFER_TIMESTAMP (ret) = timestamp;
}
if (GST_BUFFER_DURATION (ret) != duration) {
ret = gst_buffer_make_writable (ret);
GST_BUFFER_DURATION (ret) = duration;
}
} else {
/* Get a writable buffer and apply all changes */
GST_DEBUG ("trim %" G_GSIZE_FORMAT " size %" G_GSIZE_FORMAT, trim, size);
......
......@@ -515,30 +515,36 @@ done:
}
/* we call this function without holding the lock on sink for performance
* reasons. Try hard to not deal with and invalid ringbuffer and rate. */
static GstClockTime
gst_audio_base_sink_get_time (GstClock * clock, GstAudioBaseSink * sink)
{
guint64 raw, samples;
guint delay;
GstClockTime result;
GstAudioRingBuffer *ringbuffer;
gint rate;
if ((ringbuffer = sink->ringbuffer) == NULL)
return GST_CLOCK_TIME_NONE;
if (sink->ringbuffer == NULL || sink->ringbuffer->spec.info.rate == 0)
if ((rate = ringbuffer->spec.info.rate) == 0)
return GST_CLOCK_TIME_NONE;
/* our processed samples are always increasing */
raw = samples = gst_audio_ring_buffer_samples_done (sink->ringbuffer);
raw = samples = gst_audio_ring_buffer_samples_done (ringbuffer);
/* the number of samples not yet processed, this is still queued in the
* device (not played for playback). */
delay = gst_audio_ring_buffer_delay (sink->ringbuffer);
delay = gst_audio_ring_buffer_delay (ringbuffer);
if (G_LIKELY (samples >= delay))
samples -= delay;
else
samples = 0;
result = gst_util_uint64_scale_int (samples, GST_SECOND,
sink->ringbuffer->spec.info.rate);
result = gst_util_uint64_scale_int (samples, GST_SECOND, rate);
GST_DEBUG_OBJECT (sink,
"processed samples: raw %" G_GUINT64_FORMAT ", delay %u, real %"
......@@ -1023,6 +1029,13 @@ gst_audio_base_sink_wait_event (GstBaseSink * bsink, GstEvent * event)
GstMapInfo minfo;
spec = &sink->ringbuffer->spec;
if (G_UNLIKELY (spec->info.rate == 0)) {
GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
("Sink not negotiated before GAP event."));
ret = GST_FLOW_ERROR;
break;
}
gst_event_parse_gap (event, &timestamp, &duration);
/* If the GAP event has a duration, handle it like a
......@@ -1832,6 +1845,23 @@ gst_audio_base_sink_render (GstBaseSink * bsink, GstBuffer * buf)
render_start = gst_util_uint64_scale_int (render_start, rate, GST_SECOND);
render_stop = gst_util_uint64_scale_int (render_stop, rate, GST_SECOND);
/* If the slaving got us an interval spanning 0, render_start will
have been set to 0. So if render_start is 0, we check whether
render_stop is set to contain all samples. If not, we need to
drop samples to match. */
if (render_start == 0) {
guint nsamples = render_stop - render_start;
if (nsamples < samples) {
guint diff;
diff = samples - nsamples;
GST_DEBUG_OBJECT (bsink, "Clipped start: %u/%u samples", nsamples,
samples);
samples -= diff;
offset += diff * bpf;
}
}
/* positive playback rate, first sample is render_start, negative rate, first
* sample is render_stop. When no rate conversion is active, render exactly
* the amount of input samples to avoid aligning to rounding errors. */
......
......@@ -534,11 +534,17 @@ gst_audio_base_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
GstAudioRingBufferSpec *spec;
gint bpf, rate;
spec = &src->ringbuffer->spec;
if (G_UNLIKELY (spec->caps && gst_caps_is_equal (spec->caps, caps))) {
GST_DEBUG_OBJECT (src,
"Ringbuffer caps haven't changed, skipping reconfiguration");
return TRUE;
}
GST_DEBUG ("release old ringbuffer");
gst_audio_ring_buffer_release (src->ringbuffer);
spec = &src->ringbuffer->spec;
spec->buffer_time = src->buffer_time;
spec->latency_time = src->latency_time;
......
......@@ -1189,13 +1189,23 @@ gst_audio_cd_src_calculate_musicbrainz_discid (GstAudioCdSrc * src)
gchar *ptr;
gchar tmp[9];
gulong i;
unsigned int last_audio_track;
guint leadout_sector;
gsize digest_len;
s = g_string_new (NULL);
/* MusicBrainz doesn't consider trailing data tracks
* data tracks up front stay, since the disc has to start with 1 */
last_audio_track = 0;
for (i = 0; i < src->priv->num_tracks; i++) {
if (src->priv->tracks[i].is_audio) {
last_audio_track = src->priv->tracks[i].num;
}
}
leadout_sector =
src->priv->tracks[src->priv->num_tracks - 1].end + 1 + CD_MSF_OFFSET;
src->priv->tracks[last_audio_track - 1].end + 1 + CD_MSF_OFFSET;
/* generate SHA digest */
sha = g_checksum_new (G_CHECKSUM_SHA1);
......@@ -1203,10 +1213,8 @@ gst_audio_cd_src_calculate_musicbrainz_discid (GstAudioCdSrc * src)
g_string_append_printf (s, "%02X", src->priv->tracks[0].num);
g_checksum_update (sha, (guchar *) tmp, 2);
g_snprintf (tmp, sizeof (tmp), "%02X",
src->priv->tracks[src->priv->num_tracks - 1].num);
g_string_append_printf (s, " %02X",
src->priv->tracks[src->priv->num_tracks - 1].num);
g_snprintf (tmp, sizeof (tmp), "%02X", last_audio_track);
g_string_append_printf (s, " %02X", last_audio_track);
g_checksum_update (sha, (guchar *) tmp, 2);
g_snprintf (tmp, sizeof (tmp), "%08X", leadout_sector);
......@@ -1214,7 +1222,7 @@ gst_audio_cd_src_calculate_musicbrainz_discid (GstAudioCdSrc * src)
g_checksum_update (sha, (guchar *) tmp, 8);
for (i = 0; i < 99; i++) {
if (i < src->priv->num_tracks) {
if (i < last_audio_track) {
guint frame_offset = src->priv->tracks[i].start + CD_MSF_OFFSET;
g_snprintf (tmp, sizeof (tmp), "%08X", frame_offset);
......
This diff is collapsed.
......@@ -341,6 +341,7 @@ static gboolean gst_audio_encoder_decide_allocation_default (GstAudioEncoder *
static gboolean gst_audio_encoder_propose_allocation_default (GstAudioEncoder *
enc, GstQuery * query);
static gboolean gst_audio_encoder_negotiate_default (GstAudioEncoder * enc);
static gboolean gst_audio_encoder_negotiate_unlocked (GstAudioEncoder * enc);
static void
gst_audio_encoder_class_init (GstAudioEncoderClass * klass)
......@@ -605,6 +606,7 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf,
GstAudioEncoderPrivate *priv;
GstAudioEncoderContext *ctx;
GstFlowReturn ret = GST_FLOW_OK;
gboolean needs_reconfigure = FALSE;
klass = GST_AUDIO_ENCODER_GET_CLASS (enc);
priv = enc->priv;
......@@ -624,9 +626,9 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf,
"accepting %" G_GSIZE_FORMAT " bytes encoded data as %d samples",
buf ? gst_buffer_get_size (buf) : -1, samples);
if (G_UNLIKELY (ctx->output_caps_changed
|| gst_pad_check_reconfigure (enc->srcpad))) {
if (!gst_audio_encoder_negotiate (enc)) {
needs_reconfigure = gst_pad_check_reconfigure (enc->srcpad);
if (G_UNLIKELY (ctx->output_caps_changed || needs_reconfigure)) {
if (!gst_audio_encoder_negotiate_unlocked (enc)) {
gst_pad_mark_reconfigure (enc->srcpad);
if (GST_PAD_IS_FLUSHING (enc->srcpad))
ret = GST_FLOW_FLUSHING;
......@@ -2618,12 +2620,26 @@ no_decide_allocation:
}
}
static gboolean
gst_audio_encoder_negotiate_unlocked (GstAudioEncoder * enc)
{
GstAudioEncoderClass *klass = GST_AUDIO_ENCODER_GET_CLASS (enc);
gboolean ret = TRUE;
if (G_LIKELY (klass->negotiate))
ret = klass->negotiate (enc);
return ret;
}
/**
* gst_audio_encoder_negotiate:
* @enc: a #GstAudioEncoder
*
* Negotiate with downstreame elements to currently configured #GstCaps.
*
* Negotiate with downstream elements to currently configured #GstCaps.
* Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if
* negotiate fails.
*
* Returns: #TRUE if the negotiation succeeded, else #FALSE.
*/
gboolean
......@@ -2637,8 +2653,12 @@ gst_audio_encoder_negotiate (GstAudioEncoder * enc)
klass = GST_AUDIO_ENCODER_GET_CLASS (enc);
GST_AUDIO_ENCODER_STREAM_LOCK (enc);
if (klass->negotiate)
gst_pad_check_reconfigure (enc->srcpad);
if (klass->negotiate) {
ret = klass->negotiate (enc);
if (!ret)
gst_pad_mark_reconfigure (enc->srcpad);
}
GST_AUDIO_ENCODER_STREAM_UNLOCK (enc);
return ret;
......@@ -2704,6 +2724,7 @@ GstBuffer *
gst_audio_encoder_allocate_output_buffer (GstAudioEncoder * enc, gsize size)
{
GstBuffer *buffer = NULL;
gboolean needs_reconfigure = FALSE;
g_return_val_if_fail (size > 0, NULL);
......@@ -2711,9 +2732,10 @@ gst_audio_encoder_allocate_output_buffer (GstAudioEncoder * enc, gsize size)
GST_AUDIO_ENCODER_STREAM_LOCK (enc);
needs_reconfigure = gst_pad_check_reconfigure (enc->srcpad);
if (G_UNLIKELY (enc->priv->ctx.output_caps_changed || (enc->priv->ctx.caps
&& gst_pad_check_reconfigure (enc->srcpad)))) {
if (!gst_audio_encoder_negotiate (enc)) {
&& needs_reconfigure))) {
if (!gst_audio_encoder_negotiate_unlocked (enc)) {
GST_INFO_OBJECT (enc, "Failed to negotiate, fallback allocation");
gst_pad_mark_reconfigure (enc->srcpad);
goto fallback;
......
......@@ -1950,10 +1950,10 @@ gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer * buf,
channels = buf->spec.info.channels;
to = buf->spec.info.position;
buf->need_reorder = FALSE;
if (memcmp (position, to, channels * sizeof (to[0])) == 0)
return;
buf->need_reorder = FALSE;
if (!gst_audio_get_channel_reorder_map (channels, position, to,
buf->channel_reorder_map))
g_return_if_reached ();
......
......@@ -269,6 +269,7 @@ static const FormatInfo formats[] = {
{"image/vnd.wap.wbmp", "Wireless Bitmap", FLAG_IMAGE, "wbmp"},
/* subtitle formats with static descriptions */
{"text/x-raw", N_("Timed Text"), FLAG_SUB, ""},
{"application/x-ssa", "SubStation Alpha", FLAG_SUB, ""},
{"application/x-ass", "Advanced SubStation Alpha", FLAG_SUB, ""},
/* FIXME: add variant field to typefinder? */
......@@ -610,6 +611,8 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
}
GST_WARNING ("Unexpected MPEG-1 layer in %" GST_PTR_FORMAT, caps);
return g_strdup ("MPEG-1 Audio");
case 2:
return g_strdup ("MPEG-2 AAC");
case 4:
return g_strdup ("MPEG-4 AAC");
default:
......
......@@ -1002,6 +1002,10 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
guint i;
GList *tmp;
if (!dc->priv->streams) {
return NULL;
}
if (!gst_structure_id_has_field (topology, _TOPOLOGY_PAD_QUARK)) {
GST_DEBUG ("Could not find pad for node %" GST_PTR_FORMAT, topology);
return NULL;
......@@ -1010,11 +1014,6 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
gst_structure_id_get (topology, _TOPOLOGY_PAD_QUARK,
GST_TYPE_PAD, &pad, NULL);
if (!dc->priv->streams) {
gst_object_unref (pad);
return NULL;
}
for (i = 0, tmp = dc->priv->streams; tmp; tmp = tmp->next, i++) {
ps = (PrivateStream *) tmp->data;
......@@ -1033,6 +1032,25 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
return st;
}
/* this can fail due to {framed,parsed}={TRUE,FALSE} differences, thus we filter
* the parent */
static gboolean
child_is_same_stream (const GstCaps * _parent, const GstCaps * child)
{
GstCaps *parent = gst_caps_copy (_parent);
guint i, size = gst_caps_get_size (parent);
gboolean res;
for (i = 0; i < size; i++) {
gst_structure_remove_field (gst_caps_get_structure (parent, i), "parsed");
gst_structure_remove_field (gst_caps_get_structure (parent, i), "framed");
}
res = gst_caps_can_intersect (parent, child);
gst_caps_unref (parent);
return res;
}
static gboolean
child_is_raw_stream (const GstCaps * parent, const GstCaps * child)
{
......@@ -1090,10 +1108,7 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology,
/* FIXME : aggregate with information from main streams */
GST_DEBUG ("Coudn't find 'next' ! might be the last entry");
} else {
GstCaps *caps;
const GstStructure *st;
st = gst_value_get_structure (nval);
st = (GstStructure *) gst_value_get_structure (nval);
GST_DEBUG ("next is a structure %" GST_PTR_FORMAT, st);
......@@ -1101,7 +1116,7 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology,
parent = res;
if (gst_structure_id_get (st, _CAPS_QUARK, GST_TYPE_CAPS, &caps, NULL)) {
if (gst_caps_can_intersect (parent->caps, caps)) {
if (child_is_same_stream (parent->caps, caps)) {
/* We sometimes get an extra sub-stream from the parser. If this is
* the case, we just replace the parent caps with this stream's caps
* since they might contain more information */
......
......@@ -47,6 +47,7 @@ G_BEGIN_DECLS
#define GST_RIFF_TAG_idx1 GST_MAKE_FOURCC ('i','d','x','1')
#define GST_RIFF_TAG_dmlh GST_MAKE_FOURCC ('d','m','l','h')
#define GST_RIFF_TAG_ID32 GST_MAKE_FOURCC ('I','D','3','2')
#define GST_RIFF_TAG_id3 GST_MAKE_FOURCC ('i','d','3',' ')
#define GST_RIFF_TAG_IDVX GST_MAKE_FOURCC ('I','D','V','X')
/* WAV stuff */
#define GST_RIFF_TAG_fmt GST_MAKE_FOURCC ('f','m','t',' ')
......
......@@ -1243,7 +1243,7 @@ gst_rtp_buffer_ext_timestamp (guint64 * exttimestamp, guint32 timestamp)
result = timestamp;
} else {
/* pick wraparound counter from previous timestamp and add to new timestamp */
result = timestamp + (ext & ~(G_GINT64_CONSTANT (0xffffffff)));
result = timestamp + (ext & ~(G_GUINT64_CONSTANT (0xffffffff)));
/* check for timestamp wraparound */
if (result < ext)
......@@ -1254,7 +1254,7 @@ gst_rtp_buffer_ext_timestamp (guint64 * exttimestamp, guint32 timestamp)
if (diff > G_MAXINT32) {