Commit graph

14491 commits

Author SHA1 Message Date
Edward Hervey
2762ead5ef mpegtsdemux: New PCR<=>Offset estimation code
This allows:
* Better duration estimation
* More accurate PCR location
* Overall more accurate running-time location and calculation

Location and values of PCR are recorded in groups (PCROffsetGroup)
with notable PCR/Offset observations in them (when bitrate changed
for example). PCR and offset are stored as 32bit values to
reduce memory usage (they are differences against that group's
first_{pcr|offset}.

Those groups each contain a global PCR offset (pcr_offset) which
indicates how far in the stream that group is.

Whenever new PCR values are observed, we store them in a sliding
window estimator (PCROffsetGroupCurrent).

When a reset/wrapover/gap is detected, we close the current group with
current values and start a new one (the pcr_offset of that new group
is also calculated).

When a notable change in bitrate is observed (+/- 10%), we record
new values in the current group. This is a compromise between
storing all PCR/offset observations and none, while at the same time
providing better information for running-time<=>offset calculation
in VBR streams.

Whenever a new non-contiguous group is start (due to seeking for example)
we re-evaluate the pcr_offset of each groups. This allows detecting as
quickly as possible PCR wrapover/reset.

When wanting to find the offset of a certain running-time, one can
iterate the groups by looking at the pcr_offset (which in essence *is*
the running-time of that group in the overall stream).
Once a group (or neighbouring groups if the running-time is between two
groups) is found, once can use the recorded values to find the most
accurate offset.

Right now this code is only used in pull-mode , but could also
be activated later on for any seekable stream, like live timeshift
with queue2.

Future improvements:
* some heuristics to "compress" the stored values in groups so as to keep
  the memory usage down while still keeping a decent amount of notable
  points.
* After a seek compare expected and obtained PCR/Offset and if the
  difference is too big, re-calculate position with newly observed
  values and seek to that more accurate position.

Note that this code will *not* provide keyframe-accurate seeking, but
will allow a much more accurate PCR/running-time/offset location on
any random stream.
For past (observed) values it will be as accurate as can be.
For future values it will be better than the current situation.
Finally the more you seek, the more accurate your positioning will be.
2013-09-28 13:15:43 +02:00
Edward Hervey
5017ba84a7 mpegtspacketizer: No longer use a private struct
These are not public headers, it just adds complexity for no reason
2013-09-28 13:15:43 +02:00
Alex Ashley
0bdf13c36a hlsdemux: Fix dereferencing of NULL pointer
On some live HLS streams, gst_hls_demux_switch_playlist causes
assertion failures because it tried to dereference a NULL fragment.
This is because g_queue_peek_tail sometimes was returning NULL and
this case was not being checked.

This patch does two things:
* move the g_queue_peek_tail inside the semaphore protection
* check if q_queue_peek_tail returns NULL

https://bugzilla.gnome.org/show_bug.cgi?id=708849
2013-09-28 13:14:01 +02:00
Sebastian Dröge
d7c7f54734 mpegtsparse: Queue buffers until we have enough to know the caps
https://bugzilla.gnome.org/show_bug.cgi?id=708222
2013-09-27 16:10:54 +02:00
Arnaud Vrac
467e0151d3 mpegtspacketizer: rework TS packet sync and extraction
The previous code could enter an infinite loop because the adapter state
could get out of sync with its mapped data state after sync was lost.
The code was pretty confusing so it's been rewritten to be clearer.

The easiest way to reproduce the infinite loop is to use the breakmydata
element before tsdemux to trigger a resync.

https://bugzilla.gnome.org/show_bug.cgi?id=708161
2013-09-27 15:17:24 +02:00
Arnaud Vrac
85ad4f3ad6 tsdemux: fix buffer overflow
This can happen with a corrupt TS file, found with breakmydata element
plugged before tsdemux.

https://bugzilla.gnome.org/show_bug.cgi?id=708161
2013-09-27 15:10:23 +02:00
Tim-Philipp Müller
6b6ecd0942 configure: remove AS_SCRUB_INCLUDE
Shouldn't be needed any more.

https://bugzilla.gnome.org/show_bug.cgi?id=707658
2013-09-25 23:57:42 +01:00
Sebastian Dröge
1ab90f259f bluez: Fix compilation on big endian systems 2013-09-25 20:28:03 +02:00
Tim-Philipp Müller
1ba7288a76 Automatic update of common submodule
From 6b03ba7 to 865aa20
2013-09-24 18:31:10 +01:00
Sebastian Dröge
bc4d8d0888 configure: Actually use 1.3.0.1 as version to make configure happy 2013-09-24 15:05:28 +02:00
Sebastian Dröge
68f2d1fbeb Back to development 2013-09-24 15:00:27 +02:00
Sebastian Dröge
9f6bf6871c Release 1.2.0 2013-09-24 14:37:58 +02:00
Sebastian Dröge
bc1f4e070f Update .po files 2013-09-24 14:37:29 +02:00
Sebastian Dröge
f33a73b359 sdpdemux: Change rank to NONE until it can be autoplugged properly
https://bugzilla.gnome.org/show_bug.cgi?id=702495
2013-09-23 16:19:05 +02:00
Edward Hervey
ad2c27082d Automatic update of common submodule
From b613661 to 6b03ba7
2013-09-20 16:17:14 +02:00
Sebastian Dröge
92c696b22a audiofxbad: Change plugin name to audiofxbad from audiochannelmix 2013-09-19 20:17:01 +02:00
Sebastian Dröge
fef9ef6a8e dash/smoothstreaming: Remove unused debug category with the same name
It caused static linking to fail.
2013-09-19 20:09:59 +02:00
Tim-Philipp Müller
0a958c5f99 Automatic update of common submodule
From 74a6857 to b613661
2013-09-19 18:43:28 +01:00
Tim-Philipp Müller
92ccb58426 Automatic update of common submodule
From 098c0d7 to 74a6857
2013-09-19 17:36:03 +01:00
Sebastian Dröge
6cfbda3b7e eglglessink: Fix static linking for Android by passing --tag=CC to libtool 2013-09-19 16:44:48 +02:00
Sebastian Dröge
11f0669679 Back to development 2013-09-19 11:35:01 +02:00
Sebastian Dröge
0e07bf8a11 Release 1.1.90 2013-09-19 10:50:47 +02:00
Sebastian Dröge
b03ee55315 Update .po files 2013-09-19 10:46:27 +02:00
Sebastian Dröge
f0b879448d po: Update translations 2013-09-19 09:46:34 +02:00
Sebastian Dröge
ad0252fc04 eglglessink: Update for new GstContext API 2013-09-18 23:09:05 +02:00
Sebastian Dröge
14f2c30686 egl: Update for new GstContext API 2013-09-18 23:09:05 +02:00
Olivier Crête
b92791d102 hlsdemux: Reset GstUriDownloader cancellation when restarting to play 2013-09-17 17:41:39 -04:00
Sudip Jain
27739e8bb6 mpegtspacketizer: Correct condition check for current next indicator
https://bugzilla.gnome.org/show_bug.cgi?id=708106
2013-09-16 11:00:16 +02:00
Wim Taymans
b15177645b rawparse: fix event order
Delay forwarding the segment event until we pushed caps.
Send STREAM_START in pull mode.
2013-09-12 14:14:03 +02:00
Sebastian Dröge
2b94641a42 amcvideodec: Don't put the level restrictions on the sinkpad caps
They tend to be inaccurate and having them in the sinkpad caps
prevents playback of files that would otherwise play fine.
2013-09-12 13:23:28 +02:00
Thiago Santos
efb27f19ec tsdemux: respect seqnums on seeks
Pass the seqnum to other events that are consequence of the
original seek event
2013-09-10 19:44:24 -03:00
Sebastian Dröge
c70fceb16f opencv: We also work with OpenCV 2.4.6.1 2013-09-10 11:37:55 +02:00
Iain Lane
fd4cb22ae4 modplug: Specify directory when including stdafx.h
modplug stopped exposing their directory in their pcfile, meaining
consumers accessing the headers directly fail to build.

75e9b16698/
2013-09-10 11:08:24 +02:00
Olivier Crête
fb639741d7 uvch264src: Fix small mem leak 2013-09-09 13:14:24 -04:00
Matej Knopp
a41e8698b1 h264parse: don't update src caps if only codec_data differs
https://bugzilla.gnome.org/show_bug.cgi?id=705333
2013-09-09 15:09:10 +02:00
Olivier Crête
8fb6628842 uvch264src: Let the caps be NULL if there is no peer 2013-09-05 19:24:07 -04:00
Olivier Crête
5ac10edde7 uvch264src: No need to drop segment events
In 1.0, segment events are sticky and not additive, no need to prevent
their accumulation.
2013-09-05 19:24:07 -04:00
Tim-Philipp Müller
fb9fbc8fba decklinksrc: send caps event before segment 2013-09-05 19:10:31 +01:00
Julien Isorce
3a84875294 eglglessink: change pool->sink->last_buffer to pool->last_buffer
So that GstEGLImageBufferPool does not depend on GstEglGlesSink
The goal is still to move it into gstegl lib
2013-09-04 13:32:14 +01:00
Julien Isorce
fdaa26e1c8 eglglessink: buffer pool does not need to maintain a ref on the display
Because it does not use it and also it may not know it when
we create the pool
2013-09-04 13:32:14 +01:00
Julien Isorce
d16583d771 eglglessink: add GstEGLImageBufferPoolSendBlockingAllocate callback
The goal here is to prepare GstEGLBufferPool to be moved into
gstegl lib. So it has to not depend on 'gst_eglglessink_queue_object'
2013-09-04 13:32:14 +01:00
Julien Isorce
c0ca9bc422 eglglessink: prepare gst_egl_adaptation_allocate_eglimage to be moved
into gstegl lib or splited between gstegl lib and gstgl lib
because it both depends on egl and gl

So it has to not depend on GstEglAdaptationContext
2013-09-04 13:32:14 +01:00
Alex Ashley
31d1c05871 h264parse: Add support for stream-format=avc3
When outputting in AVC3 stream format, the codec_data should not
contain any SPS or PPS, because they are embedded inside the stream.

In case of avc->bytestream h264parse will push the SPS and PPS from
codec_data downstream at the start of the stream, at intervals
controlled by "config-interval" and when there is a codec_data change.

In the case of avc3->bytstream h264parse detects that there is
already SPS/PPS in the stream and sets h264parse->push_codec to FALSE.
Therefore avc3->bytstream was already supported, except for the stream
type.

In the case of bystream->avc h264parse will generate codec_data caps
from the parsed SPS/PPS in the stream. However it does not remove these
SPS/PPS from the stream. bytestream->avc3 is the same as bytestream->avc
except that the codec_data must not have any SPS/PPS in it.

|--------------+-------------+-------------------|
|stream-format | SPS in-band | SPS in codec_data |
|--------------+-------------+-------------------|
| avc          | maybe       | always            |
|--------------+-------------+-------------------|
| avc3         | always      | never             |
|--------------+-------------+-------------------|

Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new
structure for fragmented MP4 called "avc3". The principal difference
between AVC1 and AVC3 is the location of the codec initialisation
data (e.g. SPS, PPS). In AVC1 this data is placed in the initial MOOV box
(moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data goes in the
first sample of every fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=702004
2013-09-04 13:32:36 +02:00
Sebastian Dröge
8e5f0e37f8 soundtouch: Fix compilation with soundtouch 1.4.0
It used FLOAT_SAMPLES/INTEGER_SAMPLES #defines instead of ones properly
prefixed with a namespace.

https://bugzilla.gnome.org/show_bug.cgi?id=707390
2013-09-03 17:36:53 +02:00
Tim-Philipp Müller
b54637edc4 .gitignore: ignore new win32 config.h-new 2013-09-03 11:14:43 +01:00
Sebastian Dröge
d065c09684 amcvideodec: Port tiled NV12 conversion to 1.0 2013-09-03 11:06:00 +02:00
Sebastian Dröge
c4e742f428 amcvideodec: Add FIXME comment 2013-09-03 11:06:00 +02:00
Jorge Luis Zapata
48484f04a2 androidmedia: add support for a new qualcomm colorspace 2013-09-03 11:06:00 +02:00
Tim-Philipp Müller
310a633afb mpegpsdemux: minor clean-up 2013-09-02 23:28:38 +01:00
Matej Knopp
e43d1959a8 mpegdemux: send events on pads that are not linked
Someone might be waiting for certain events with a probe.

https://bugzilla.gnome.org/show_bug.cgi?id=707317
2013-09-02 23:24:08 +01:00