Commit graph

5767 commits

Author SHA1 Message Date
Nicolas Dufresne
ba0e1df657 Add missing include path for gst/glib-compat-prive.h
This fixes build failure in mplex and mpeg2enc plugins and most likely
in kate plugin (untested).
2017-03-24 15:43:07 -04:00
Nirbheek Chauhan
ddcd7735b6 meson: Build mpeg2enc and mplex when available 2017-03-23 02:48:39 +05:30
Sebastian Dröge
b8b2946e03 dashdemux: In reverse playback mode, if seeking to the beginning of a fragment, start with the previous one instead
There's no point to start downloading a fragment just to output 1ns.
2017-03-22 12:06:33 +02:00
Sebastian Dröge
19eba961d2 dashdemux: Implement SNAP_NEAREST seeks 2017-03-21 20:38:09 +02:00
Sebastian Dröge
0cc777b3b0 dashdemux: Don't use ABS() for calculating differences
We know which number is bigger.
2017-03-21 20:38:09 +02:00
Sebastian Dröge
7778e8293a dashdemux: Only snap seeks forwards if the seek position does not happen to be the exact segment position 2017-03-21 20:38:09 +02:00
Sebastian Dröge
bcbf1f67f0 dashdemux: Use gst_mpdparser_get_segment_end_time() directly instead of calculating it again
It does the exact same calculations.
2017-03-21 20:38:09 +02:00
Sebastian Dröge
43d1dd3dad mpdparser: Refactor to get rid of one level of indentation in seeking code
Also go out of the segment searching loop once segment->start > ts.
We're not going to find any earlier segment anymore.
2017-03-21 20:38:09 +02:00
Sebastian Dröge
ffa63c5933 dashdemux: Fix snap SIDX seeking and report if we're going outside the index
Instead of just going to the first or last fragment, report if we're
going outside the index. This should never happen unless there's a bug
or the stream is broken.

Allow some possibility for inaccuracies here though.
2017-03-21 20:38:09 +02:00
Tim-Philipp Müller
24ee608947 Update for 'mad' mp3 decoder removal
https://bugzilla.gnome.org/show_bug.cgi?id=776140
2017-03-20 17:15:54 +00:00
Seungha Yang
b8344ea997 m3u8: Fix parsing EXT-X-DISCONTINUITY
EXT-X-DISCONTINUITY tag should have no trailing ":" character

https://bugzilla.gnome.org/show_bug.cgi?id=780179
2017-03-17 12:13:40 +02:00
Seungha Yang
16dd0e693d m3u8: Release m3u8 lock if consistent checking failed
To fix deadlock during live m3u8 update

https://bugzilla.gnome.org/show_bug.cgi?id=780180
2017-03-17 12:13:40 +02:00
Sebastian Dröge
7e21168d4d dashdemux: Just reset SIDX parser if the index is invalid for the current segment
https://bugzilla.gnome.org/show_bug.cgi?id=780108
2017-03-16 12:35:40 +02:00
Chris Bass
4ac2a8d6a6 ttml: Replace assertions
Remove assertions and replace, where necessary, with code that handles
the error cases.

https://bugzilla.gnome.org/show_bug.cgi?id=776436
2017-03-15 13:28:36 +02:00
Sebastian Dröge
141f3b2f4d dashdemux: If a SIDX seek failed although we're in the correct segment, disable the SIDX usage for this segment
The SIDX apparently does not contain information about the current
segment, so better stop using it instead of using incorrect values.
2017-03-15 13:27:23 +02:00
Sebastian Dröge
b76a2200de dashdemux: Keep track of the PTS, not the SIDX index position between representations
There is no guarantee that the index positions are the same between
representations, and assuming this easily causes us to get into invalid
index positions.
2017-03-15 13:27:23 +02:00
Sebastian Dröge
b84f530a9a dashdemux: When clearing the sidx parser, reset all state
And especially don't keep entry count and index around, we have no
entries anymore after clearing.
2017-03-15 13:27:23 +02:00
Seungha Yang
644192aafe dashdemux: Drain buffer at the end of subfragment
Some of streams such as below have tailing boxes at the end of subfragment.
http://dash.akamaized.net/dash264/TestCases/1a/netflix/exMPD_BIP_TC1.mpd

https://bugzilla.gnome.org/show_bug.cgi?id=776200
2017-03-15 13:27:23 +02:00
Seungha Yang
42a38b6498 dashdemux: Do not advace subfragment after pending SIDX seek done
If a MPD is On-Demand profile and no index described, demux will terminate
download loop after parsing inband SIDX with flow return custom-success.
At this moment, SIDX index is excat target position, but finish_fragment()
might cause re-advancing subfragment depending on MPD structure.

https://bugzilla.gnome.org/show_bug.cgi?id=776200
2017-03-15 13:27:23 +02:00
Seungha Yang
b65e6db8d4 dashdemux: Reset SIDX related variables per fragment
SIDX's base offset (i.e., byte offset of SIDX + sidx.first_offset)
mostly vary as per fragment. Also, target SIDX index must be zero for the
new fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=776200
2017-03-15 13:27:23 +02:00
Seungha Yang
a599067786 dashdemux: Two depth seeking for On-Demand profile
Try to find fragment using MPD first, then do refinement to find
target subframgnet using SIDX if possible. Note that, if target fragment
was moved from the previously activated one, we should assume that
the last SIDX is invalid for new fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=776200
2017-03-15 13:27:23 +02:00
Seungha Yang
ad015ceef5 dashdemux: Exception handle in _sidx_seek()
If target seek position is outside of the range of sidx entries,
binary search returns NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=776200
2017-03-15 13:27:23 +02:00
Sebastian Dröge
0dcb1e4ecc dashdemux: Add assertion for preventing of access after the end of the sidx entries array
Better crash cleanly here than reading some random numbers from memory.
2017-03-15 13:27:23 +02:00
Seungha Yang
a9c34fb9e3 dashdemux: Advance subfragment only if any exist
SIDX based playback is not restricted to SegmentBase, but it possible
with SegmentList/SegmentTemplate. In the latter case, each fragment
has its own SIDX box and might be subdivided into subfragment.
So, demux should not assume that the end of subfragment is the end
of stream. Moreover, should try advance subfragment only if there
are remaining subfragments.

With additional fixes by Sebastian Dröge <sebastian@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=776200
2017-03-14 19:15:28 +02:00
George Kiagiadakis
5e9ce3313f waylandsink: fix memory offset calculation for dmabuf buffers
https://bugzilla.gnome.org/show_bug.cgi?id=779790
2017-03-14 17:07:40 +02:00
Matthew Waters
fd8d35298f Revert "adaptivedemux: answer duration queries for live streams"
Completely disabling duration reporting with live streams is not cool.

This reverts commit e1b68d9a65.

https://bugzilla.gnome.org/show_bug.cgi?id=753879
2017-03-14 16:50:30 +11:00
Matthew Waters
efc015f27d gl: GL_ARRAY_BUFFER is not a part of VAO state
As a result we need to bind it on every draw in order to have the
correct state in the GL state machine.
2017-03-14 14:15:00 +11:00
Matthew Waters
956c4d0bde gl/format: use our own GL format enum's instead of gstvideo's
They can describe in more detail (such as component sizes) the requested format.
2017-03-13 21:10:58 +11:00
Nicolas Dufresne
e03e7e7574 dash/smoothstreaming: Use GST_PLUGIN_LIBTOOLFLAGS
Use the flags defined by configure script instead of always disabling
static plugins.
2017-03-08 20:04:23 -05:00
Nicolas Dufresne
eb2dae8fd6 Rename plugin filesnames to match plugin names
- libgstgtksink.so -> libgstgtk.so
- libgstteletextdec.so -> libgstteletex.so
- libgstcamerabin2.so -> libgstcamerabin.so
- libgstonvif.so -> libgstrtponvif.so (meson only)
- sdp -> sdpelem (avoid clash with libgstsdp)
- gstsiren -> siren
- libgstkmssink.so -> libgstkms.so

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-03-08 20:04:23 -05:00
Nick Kallen
82c132aa50 applemedia/gl: Fix compile issues for OSX
https://bugzilla.gnome.org/show_bug.cgi?id=778333
2017-03-08 15:23:42 +02:00
Nick Kallen
46bbc60d24 applemedia/gl: Update code to use ARC
All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.

https://bugzilla.gnome.org/show_bug.cgi?id=777847
2017-03-07 13:37:07 +02:00
Seungha Yang
3c5eae63c0 hlsdemux: Try to find type at the end of a fragment
hlsdemux tries to find type if given buffer size is large enought to
find type (currently the threshold is 2KB), or EOS in some cases.
However, since there can be small byte fragments such as WebVTT,
demux should try to find type at the end of a fragment

https://bugzilla.gnome.org/show_bug.cgi?id=779011
2017-03-06 10:09:20 +02:00
Tim-Philipp Müller
a5e540bf55 voaacenc: limit bitrate property to 320 kbps
This appears to be the internal limit of voaacenc, higher
bitrates will be ignored and 128 kbps output will be produced
instead. Therefore, we might just as well limit the allowed
property values, so that people who try to set higher bitrates
get a big fat warning instead of silently a much lower bitrate.
2017-03-06 00:30:41 +00:00
Dongil Park
ffbe690656 hlsdemux: Fix checking adaptation_field_control field to parse pcr
The PCR_flag and PCR value is in adaptation_field, not in payload.
The MSB of adaptation_field_control is used as whether adaptation_
field is exist or not.

For the case(PCR in only adaptation_field without payload), we modify
checking condition about adaptation_field_control field.

https://bugzilla.gnome.org/show_bug.cgi?id=778731
2017-03-03 14:20:45 +11:00
Seungha Yang
5bd4bc8080 hls: Fix various leak on hlsdemux and m3u8
* default_variant should be freed, it holds ref.
* GstHLSMedia holds GstM3U8 ref.
* gst_m3u8_get_next_fragment() increases ref count.

https://bugzilla.gnome.org/show_bug.cgi?id=778073
2017-03-02 20:24:00 +02:00
Wojciech Przybyl
8eb87ce5dc dashdemux: fix default suggestedPresentationDelay
When MPD@suggestedPresentationDelay is not present in the MPD,
dashdemux can provide default suggestedPresentationDelay. However
when applying default value of suggestedPresentationDelay, the value
should be subtracted from current time, not added to it. When streams
setup is performed and live point is calculated, we have to go to the
wall clock (current time) minus suggestedPresentationDelay, if we tried
to start with current time plus suggestedPresentationDelay, we would
be asking for future stream, which has not yet been recorded. Also
the value needs to be converted from ms to us.

https://bugzilla.gnome.org/show_bug.cgi?id=764726
2017-03-02 20:11:55 +02:00
Alex Ashley
e1b68d9a65 adaptivedemux: answer duration queries for live streams
For duration queries on live streams, adaptivedemux ignores the query.
The problem then is that the query is answered by the downstream
qtdemux element, with the duration of the currently passing fragment.

This commit changes the behaviour of adaptivedemux to answer the duration
queries for live streams, returning GST_CLOCK_TIME_NONE.

    https://bugzilla.gnome.org/show_bug.cgi?id=753879
2017-03-02 19:54:04 +02:00
Seungha Yang
b2e9891f8a hlsdemux: Implement adaptivedemux's _stream_seek()
_stream_seek() can be called by adaptivedemux when "restart download" condition.
It's mostly caused by track switching.

https://bugzilla.gnome.org/show_bug.cgi?id=776997
2017-03-02 19:25:48 +02:00
Seungha Yang
78b2169c32 hlsdemux: Simplify seeking code by using macro
Import an adaptivedemux's macro to minimize code.
Also, this patch considers KEY_UNIT and TRICKMODE_KEY_UNITS
as snap seek.

https://bugzilla.gnome.org/show_bug.cgi?id=776997
2017-03-02 19:25:48 +02:00
Seungha Yang
32c4850b33 hlsdemux: Early terminate seeking if we don't need to do
Some codes are imported from dashdemux

https://bugzilla.gnome.org/show_bug.cgi?id=776997
2017-03-02 19:25:48 +02:00
Thomas Bluemel
9ce5646a0f hlsdemux: Add support for EXT-X-DISCONTINUITY-SEQUENCE
https://bugzilla.gnome.org/show_bug.cgi?id=772811
2017-03-02 19:05:57 +02:00
Sebastian Dröge
6da14bdb88 openexrdec: Also catch other exceptions by reference instead of by value
It would have to be copied otherwise, and is quite big.

CID 1373419
2017-03-01 15:29:42 +02:00
Sebastian Dröge
4d434c7db5 openexrdec: Catch exception by reference instead of by value
It would have to be copied otherwise, and is quite big.

CID 1373419
2017-02-28 15:56:02 +02:00
Sebastian Dröge
ef70cd48c6 dashdemux: Fix potential NULL pointer dereference
CID 1399700
2017-02-28 15:53:10 +02:00
Sebastian Dröge
95b85eae5a hlsdemux: Compare media type of the correct variable that is actually set
CID 1364752
2017-02-28 15:31:53 +02:00
Sebastian Dröge
0661a5aded gltestsrc: Fix potential NULL pointer dereference if we fail without GError
Which can happen here if we just propagate an error that happened
elsewhere, e.g. FBO failed.

CID 1364604
2017-02-28 15:23:55 +02:00
Sebastian Dröge
a064590912 glvideomixer/compositor: Correctly error out if calculating DAR fails
CID 1320700
2017-02-28 13:06:41 +02:00
Sebastian Dröge
d520d1b3ed motioncells: Initialize m_changed_datafile class field
CID 1197704
2017-02-28 12:53:11 +02:00
Sebastian Dröge
40d76ea7a5 gme: Remove useless comparison of unsigned integer with < 0
CID 206187
2017-02-28 12:46:42 +02:00