summaryrefslogtreecommitdiff
path: root/ext/hls
Commit message (Collapse)AuthorAgeFilesLines
* hls: Add OPENSSL_CFLAGS to CFLAGSJoe Gorse2016-03-041-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=763079
* adaptivedemux: replace ghostpad with a standard padThiago Santos2016-01-151-4/+1
| | | | | | | | | | | | Handling the ghostpad and its internal pad was causing more issues than helping because of their coupled activation/deactivation actions. As we have to install custom chain,event and query functions it is better to use a floating sink pad internally in the demuxer and just use those pad functions to push through a standard pad in the demuxer https://bugzilla.gnome.org/show_bug.cgi?id=757951
* hlsdemux: put boolean values into gboolean variablesTim-Philipp Müller2016-01-061-4/+3
| | | | And remove superfluous assignments.
* hlsdemux: fix reverse playback seek with snap flagsThiago Santos2016-01-061-5/+24
| | | | | | | | | | | | | | Properly handle snap flags during reverse seeking. In this case the before/after are also reversed, so handle those as such. For example: with a sequence of 1s fragments: |-- 0 --|-- 1 --|-- 2 --|-- 3 --| If you seek to 1.5s it is inside fragment 1. With reverse and snap-before: should play from the end of fragment 1 snap-after: should play from the end of fragment 0
* hlsdemux: simplify snap flags checkingThiago Santos2016-01-061-6/+4
| | | | | | | | Replace: if (boolean) var = true; with: var = (boolean);
* hlsdemux: respect keyunit flag for positionThiago Santos2016-01-061-2/+3
| | | | Set the segment start position when keyunit flag is active
* hlsdemux: unquote all the quoted-string attributesAlex Ashley2015-12-221-49/+18
| | | | | | | | | | | | | | | | | | The URI attribute from the EXT-X-KEY tag and the URI attribute from the EXT-X-I-FRAMES-ONLY tag are both quoted-string attibutes that have their quotation marks removed during parsing. The CODECS attribute of the EXT-X-STREAM-INF is also a quoted-string attribute, but this attribute was not being un-quoted. This commit changes the parser to always unquote all quoted-string attributes and adjusts the unit tests to this new bevahiour for the CODECS attribute. An additional test is added to check that parsing of all of the fields in the EXT-X-STREAM tag is correct, including those that contain comma characters. https://bugzilla.gnome.org/show_bug.cgi?id=758384
* hlsdemux: make sure every bad update_playlist return sets an errorThiago Santos2015-12-221-2/+6
| | | | Otherwise it segfaults when reporting the error in the bus
* hlsdemux: reflow update_playlist a bitTim-Philipp Müller2015-12-191-50/+50
| | | | Reduce indentation by erroring out directly on failure.
* hlsdemux: fix potential error leakTim-Philipp Müller2015-12-191-4/+2
| | | | | | | | | Clear error as soon as we determine that the download failed, otherwise there are code paths where we might return without clearing it ever, which would leak the GError then. Also, we can pass a NULL GError pointer to _fetch_uri(), so just do that instead of passing one that we're going to just free again right away anyway.
* hlsdemux: always set timestamp on reverse playbackThiago Santos2015-12-181-1/+1
| | | | | | | Downstream needs to be able to restore the timestamps after a discont to do reverse playback https://bugzilla.gnome.org/show_bug.cgi?id=759592
* hlsdemux: add support for seeking to fragment boundariesDuncan Palmer2015-12-081-1/+22
| | | | | | | | | Setting the seek flags to GST_SEEK_FLAG_SNAP_* will change the seek target time to a segment boundary. Based on original work by Ben Willers <bwillers@digisoft.tv>. https://bugzilla.gnome.org/show_bug.cgi?id=759108
* hlsdemux: Resync live playlists to the 3rd newest fragment if we fall off ↵Sebastian Dröge2015-12-041-0/+15
| | | | | | | | | | | | | | | | | the playlist As HLS does not provide any way of knowing the server's clock, and we do buffering of "live" streams, at some point we will fall behind the server in many cases and would have to advance to a fragment that is not in the playlist anymore. Previously we would've just resynced to the next oldest fragment that is still there, but this causes problems as from this point onwards we would always fall off the playlist again all the time. Instead we now resync and move to the 3rd newest fragment like we would do when starting playback of a live stream. https://bugzilla.gnome.org/show_bug.cgi?id=758987
* hls: m3u8: remove superfluous gst_m3u8_copy() implementationTim-Philipp Müller2015-12-031-78/+4
| | | | | | No need to implement _copy() when we just copy a list that we're freeing three lines later anyway. Instead just steal the new main list.
* hlsdemux: update current variant if connection speed is setMaroš Ondrášek2015-12-021-0/+3
| | | | | | | | | | | | | | | | | If connection speed is set, playlist according to connection speed is selected as current playlist. Problem is that the current variant of main playlist still points to previously set variant. If previously set variant doesn't correspond to current playlist, then it causes unnecessary change of playlist to the same playlist after first fragment is downloaded, because of not updated current variant. To fix this, we need to make sure that current variant of main playlist corresponds to the current playlist https://bugzilla.gnome.org/show_bug.cgi?id=758946
* hlsdemux: Tell the base class the fragment durationJan Schmidt2015-12-021-0/+1
| | | | | adaptivedemux uses the fragment duration as a delay in some cases, so make sure to set it.
* hlsdemux: When switching bitrate variants, don't jump backJan Schmidt2015-12-021-1/+4
| | | | | | | | | Don't jump backward to 3 files from the end of the playlist when switching variants - it just means we downloaded fragments fast and caught up to the end of the playlist. Disable that by treating a variant switch as a playlist update, not a restart due to a seek or so.
* hlsdemux: correct the calculation of seek range of non-live streamsAlex Ashley2015-12-021-4/+8
| | | | | | | | | | The seek range calculation for on-demand streams was incorrectly excluding the last three segments of the stream. This three segment rule should only be applied to live streams [1]. [1] https://tools.ietf.org/html/draft-pantos-http-live-streaming-17#section-6.3.3 https://bugzilla.gnome.org/show_bug.cgi?id=758386
* hlsdemux: fix crash when decryption key can't be downloadedTim-Philipp Müller2015-12-011-3/+6
| | | | | | Happened with http://sslhls.m6tv.cdn.sfr.net/hls-live/livepkgr/_definst_/m6_hls_aes/m6_hls_aes_856.m3u8 if glib-networking was not installed (since key has https uri).
* hls: m3u8: remove pointless client_has_main() functionTim-Philipp Müller2015-12-013-20/+1
| | | | We always have a main list.
* hls: m3u8: remove unused _get_current_fragment_duration() functionTim-Philipp Müller2015-12-012-25/+0
|
* hls: m3u8: remove unused m3u8 client update_failed_count fieldTim-Philipp Müller2015-12-012-6/+1
|
* hls: m3u8: remove helper var that's only used during parsing from structureTim-Philipp Müller2015-12-012-7/+4
| | | | Just keep that local to the parsing function.
* hls: rename plugin from fragmented to hlsTim-Philipp Müller2015-12-017-32/+32
|
* hlsdemux: Always give timestamps if we're discont and don't mark stream ↵Sebastian Dröge2015-12-011-1/+4
| | | | | | | | | | | | discont if a playlist change was not successful If the stream is discont, we must provide a timestamp in any case. Elements like tsdemux are not going to output anything if we give a NONE timestamp after a discont. Also marking a stream as discont if a playlist change was not successful would lead to the above situation, but in that case we are not required at all to mark the stream discont as we're still at the old playlist.
* Remove unnecessary NULL checks before g_free()Reynaldo H. Verdejo Pinochet2015-11-181-4/+2
| | | | g_free() is NULL-safe
* hls: m3u8: don't leak GList nodes when matching up variant lists after ↵Tim-Philipp Müller2015-11-061-1/+1
| | | | master list update
* adaptivedemux: fixed multithread supportFlorin Apostol2015-10-291-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=755169
* hlsdemux: don't crash or leak memory on broken master playlistAndré Draszik2015-10-251-3/+4
| | | | | | | | | | | | | | | | | If a (master) playlist contains a variant list entry without a URI then during parsing of the next variant list entry we are a) leaking the entry we're currently parsing (new_list), and b) free'ing the pointer to the previous list entry (list) without updating the pointer. Hence when then adding the URI for the latest parsed entry, incorrect information is stored, as the information is used from 'list' which is not valid memory anymore, also leading to crashes. Fix this by correctly storing the new variant list entry pointer as needed. https://bugzilla.gnome.org/show_bug.cgi?id=756861
* hlsdemux: change dispose function to finalizeTim-Philipp Müller2015-10-231-4/+4
|
* hlsdemux: remove helper function only used onceTim-Philipp Müller2015-10-231-16/+8
|
* hlsdemux: remove deprecated 'fragments-cache' propertyTim-Philipp Müller2015-10-231-52/+0
| | | | | It's been non-functional for two cycles now, let's get rid of it.
* hlsdemux: m3u8: move file lookup by sequence directly into codeTim-Philipp Müller2015-10-231-18/+16
| | | | | | Nicer to read, two lines of code less, and also the callback function should've been a GCompareFunc that returns a gint and not a boolean (it did work correctly, was just confusing).
* hlsdemux: m3u8: clean-up: remove unused argument in function callTim-Philipp Müller2015-10-232-7/+4
|
* hlsdemux: m3u8: clean-up: reindent header for better readabilityTim-Philipp Müller2015-10-231-30/+57
| | | | And remove duplicate define.
* hls/m3u8: Update current position in all casesEdward Hervey2015-10-192-15/+25
| | | | | | | | | | In order to ensure the sequence_position will always be consistently updated, store the current file duration. This way, when we advance, we can always increment the position based on what was previously outputted. https://bugzilla.gnome.org/show_bug.cgi?id=752132
* hls: if media sequence is not specified, use 0Thiago Santos2015-10-141-0/+1
| | | | | | | Allows playlists that are missing the mediasequence information to be correctly parsed. If the playlist was updated without reseting the mediasequence it would constantly increase over subsequent updates, leading to issues during playback.
* hls: Allow debugging of the playlistEdward Hervey2015-10-141-0/+2
| | | | Helps debugging issues
* hlsdemux: Avoid negative sequence numbersEdward Hervey2015-10-141-4/+12
| | | | | | | | | | | | | | | For live streams, we want to make sure there's a certain distance between the sequence to play and the last (earliest) fragment. The problem is that it assumes there are at least 3 fragments in the playlist, which might not always be the case (like in the case of a server restarting and gradually adding fragments). In order to avoid ending up with negative sequence numbers (which will just loop forever), limit the new target sequence number to the highest of: * either the first sequence number of the playlist (fallback) * or 3 fragments from the last one (standard behaviour)
* Update GLib dependency to 2.40.0Sebastian Dröge2015-10-021-19/+0
|
* hls: m3u8playlist: more clean-upsTim-Philipp Müller2015-09-302-37/+22
| | | | | Remove unused functions; move GstM3U8 struct into .c file, and indent the header so it's nice to read.
* hls: m3u8playlist: fix silly queue iteration codeTim-Philipp Müller2015-09-301-4/+4
|
* hls: m3u8playlist: more minor playlist_render() clean-upsTim-Philipp Müller2015-09-301-19/+10
| | | | | | | Move the TAG defines directly into the code, not sure what their purposes is, these are printf format strings so having them directly as literals in the code where they're used makes the code easier to follow.
* hls: m3u8playlist: move entry rendering into render_playlist()Tim-Philipp Müller2015-09-301-27/+15
| | | | | Makes the code easier to follow and avoids unnecessary temporary strings, since we can just append to the playlist GString directly.
* hls: m3u8playlist: simplify gst_m3u8_playlist_render()Tim-Philipp Müller2015-09-302-25/+20
| | | | | | Remove playlist_str GString variable from GstM3U8Playlist struct, since it's only used temporarily in playlist_render(). Might just as well keep it local then.
* hls: remove unused macro and direct gio usageTim-Philipp Müller2015-09-304-6/+2
|
* adaptivedemux: prefix the statistics message name macroPhilippe Normand2015-09-171-1/+1
| | | | | | Keep old define around for now. https://bugzilla.gnome.org/show_bug.cgi?id=754686
* Fix file permissions of some filesTim-Philipp Müller2015-08-282-0/+0
|
* hlsdemux: select correct position for live streams that don't remove fragmentsAthanasios Oikonomou2015-08-261-6/+5
| | | | | | | | | | | | | | Some live streams (eg youtube) don't remove fragments in order to allow seeking back in time (live + vod). When gst_m3u8_client_has_next_fragment is called, we are getting wrong fragment because current_file points in first file of the fragments list resulting in watching the stream from the beginning again. This patch sets current_file to nth fragment for live streams, then on gst_m3u8_client_has_next_fragment will keep up with the live stream. https://bugzilla.gnome.org/show_bug.cgi?id=753344
* hlsdemux: abort playlist update when cancelledArnaud Vrac2015-08-191-1/+1
| | | | | Otherwise the download thread will get stuck, since the downloader is disabled.