summaryrefslogtreecommitdiff
path: root/ext/dash
Commit message (Collapse)AuthorAgeFilesLines
* dashdemux: Implement SIDX tracking based on buffer offsetSebastian Dröge2016-07-012-15/+7
| | | | | | | | This simplifies the code but also removes a bug with tracking of the remaining size for the initial subfragment: we were not considering the size between the index and the start of the first moof here. https://bugzilla.gnome.org/show_bug.cgi?id=764684
* dashdemux: Properly keep track of current offsetSebastian Dröge2016-07-012-19/+80
| | | | | | | GstAdapter does not guarantee to pass through all the offsets, we have to keep track of it ourselves. https://bugzilla.gnome.org/show_bug.cgi?id=764684
* adaptivedemux: Get rid of internal stream adapter and let subclasses handle ↵Sebastian Dröge2016-07-012-14/+24
| | | | | | | | | this directly This allows subclasses to have more control and especially ensure that they push data downstream with the correct offsets. https://bugzilla.gnome.org/show_bug.cgi?id=764684
* dash: strip lead/trailing whitespace from descriptortype attributesThiago Santos2016-04-221-1/+15
| | | | | | | The spec says it is xs:anyURI and leading and trailing whitespace are to be ignored https://bugzilla.gnome.org/show_bug.cgi?id=758064
* adaptivedemux: use GstSystemClock to all real-time calculationsFlorin Apostol2016-04-211-11/+26
| | | | | | | | | | | | | | | | | | | | | A realtime clock is used in many places, such as deciding which fragment to select at start up and deciding how long to sleep before a fragment becomes available. For example dashdemux needs sample the client's estimate of UTC when selecting where to start in a live DASH stream. The problem with dashdemux calculating the client's idea of UTC is that it makes it difficult to create unit tests, because the passage of time is a factor in the test. This commit changes dashdemux and adaptivedemux to use the GstSystemClock, so that a unit test can replace the system clock when it needs to be able to control the clock. This commit makes no change to the behaviour under normal usage, as GstSystemClock is based upon the system time. https://bugzilla.gnome.org/show_bug.cgi?id=762147
* mpdparser: clamp segment durations to each other and period endVincent Penquerc'h2016-04-051-11/+40
| | | | | | 5.3.2.1 in the spec. https://bugzilla.gnome.org/show_bug.cgi?id=751792
* bad: use new gst_element_class_add_static_pad_template()Vineeth TM2016-03-241-9/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=763081
* dashdemux: sync index and the selected chunk when seekingThiago Santos2016-02-261-1/+1
| | | | | | Otherwise the chunk selected isn't matched to the index and the timing will be different, causing it to actually start from a different position
* dashdemux: correctly handle an HTTP-XSDATE that is exactly the size of the ↵Florin Apostol2016-02-231-6/+8
| | | | | | | | | | | | | | | | date string The code in the gst_dash_demux_parse_http_xsdate() was trying to handle the case where the string is not null terminated by resizing the buffer and appending a zero byte. This does not work if the buffer is exactly the length of the string because the gst_buffer_resize() function does not re-allocate the buffer, it just changes its size. If a buffer is passed to gst_dash_demux_parse_http_xsdate() that is exactly the length of the string, the function fails with an assert failure in gst_buffer_resize(). https://bugzilla.gnome.org/show_bug.cgi?id=762148
* dashdemux: gst_dash_demux_get_live_seek_range returns positive valuesFlorin Apostol2016-02-101-6/+21
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752374
* dashdemux: plug mpd client leakThiago Santos2016-02-091-0/+1
| | | | | | On parsing error, free the mpd client object https://bugzilla.gnome.org/show_bug.cgi?id=760120
* dashdemux: fix memory leak in gst_dash_demux_update_manifest_dataFlorin Apostol2016-02-091-0/+8
| | | | | | | new_client local variable was not freed in case of errors. Also, the buffer is not unmapped. https://bugzilla.gnome.org/show_bug.cgi?id=760120
* mpdparser: renamed gst_mpd_client_get_next_segment_availability_end_time to ↵Florin Apostol2016-02-093-9/+10
| | | | | | | | | | | | gst_mpd_client_get_next_segment_availability_start_time The function actually returns the segment availability start time (as defined by the standard). That is at the end of the segment, but it is called availability start time. Availability end time is something else (the time when the segment is no longer available on the server). The function name was misleading. https://bugzilla.gnome.org/show_bug.cgi?id=757655
* mpdparser: corrected getting segment availabilityFlorin Apostol2016-02-091-10/+37
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=757655
* dashdemux: implement snap seek handlingThiago Santos2016-02-042-10/+72
| | | | | | | Handle snap seeking at the stream_seek method and let superclass do the rest to support snap seeking https://bugzilla.gnome.org/show_bug.cgi?id=759158
* adaptivedemux: handle snap seeksThiago Santos2016-02-043-18/+39
| | | | | | | | | | | | | | | | | | | | | Adaptive demuxers need to start downloading from specific positions (fragments) for every stream, this means that all streams can snap-seek to a different position when requested. Snap seeking in this case will be done in 2 steps: 1) do the snap seeking on the pad that received the seek event and get the final position 2) use this position to do a regular seek on the other streams to make sure they all start from the same position More arguments were added to the stream_seek function, allowing better control of how seeking is done. Knowing the flags and the playback direction allows subclasses to handle snap-seeking. And also adds a new return parameter to inform of the final selected seeking position that is used to align the other streams. https://bugzilla.gnome.org/show_bug.cgi?id=759158
* dashdemux: only update current reading position when neededThiago Santos2016-02-011-3/+12
| | | | | If the seek doesn't set the start/stop position, no need to reposition the download index.
* dashdemux: respect seeking parameterThiago Santos2016-02-011-2/+2
| | | | | Instead of using the segment values, use the parameter requested in the seeking argument
* mpdparser: Use RepresentationIndex instead of Initialization to get the URL ↵John Chang2016-01-221-1/+1
| | | | | | of the RepresentationIndex https://bugzilla.gnome.org/show_bug.cgi?id=760936
* dashdemux: added check that availabilityStartTime is present for live streamsFlorin Apostol2016-01-181-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=757602
* adaptivedemux: improved error message if availabilityStartTime is missing ↵Florin Apostol2016-01-181-3/+6
| | | | | | | | | | | | | | for a live stream For a live mpd, if availabilityStartTime is missing, adaptive demux asserts with: Unexpected critical/warning: gst_date_time_to_g_date_time: assertion 'datetime != NULL' failed. This patch improves the error message to: Unexpected critical/warning: gst_mpd_client_seek_to_time: assertion 'client->mpd_node->availabilityStartTime != NULL' failed https://bugzilla.gnome.org/show_bug.cgi?id=757602
* adaptivedemux: replace ghostpad with a standard padThiago Santos2016-01-151-1/+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
* dashdemux: removed unnecessary space trimming in gst_dash_demux_parse_http_headFlorin Apostol2015-12-281-3/+0
| | | | | | | sscanf has removed all spaces when it has constructed zone string. There is no need to search for leading spaces. https://bugzilla.gnome.org/show_bug.cgi?id=759743
* dashdemux: accept 2 or 4 digit year when using HTTP HEAD for calculating ↵Florin Apostol2015-12-281-4/+7
| | | | | | | | | | clock compensation Convert year from 2 digits to 4 digits in gst_dash_demux_parse_http_head https://bugzilla.gnome.org/show_bug.cgi?id=759743 Also updated references to Rfc822 to Rfc5322
* dashdemux: improve validation of UTCtiming elementFlorin Apostol2015-12-161-0/+5
| | | | | | | | | | | | | gst_mpdparser_parse_utctiming_node does not validate the parsed values completely. The following scenarios are incorrectly accepted: - elements with no schemeIdUri property should be rejected - elements with unrecognized UTCTiming scheme should be rejected - elements with empty values should be rejected The last one triggers a division by 0 in gst_dash_demux_poll_clock_drift: clock_drift->selected_url = clock_drift->selected_url % g_strv_length (urls); because it urls is a valid pointer to an empty array. https://bugzilla.gnome.org/show_bug.cgi?id=759547
* dashdemux: clock_cond is not used and should be removedFlorin Apostol2015-12-161-6/+0
| | | | | | | There are no threads waiting on clock_cond. It is just initialised and signalled. It should be removed. https://bugzilla.gnome.org/show_bug.cgi?id=759537
* adaptivedemux: fixed clock compensation in get_fragment_waiting_timeFlorin Apostol2015-12-161-1/+2
| | | | | | Clock compensation is calculated in usec but is added to a GstClockTime value. https://bugzilla.gnome.org/show_bug.cgi?id=759534
* dashdemux: Suggestion for setting the framerate information.suhwang.kim2015-12-083-0/+50
| | | | | | | | Dashdemux has set the width and height information from MPD manifest. Some embedded devices which are not insufficient H/W resources need more information such as framerate to assign H/W resources. So I suggested that dashdemux also needs to set the framerate information from MDP manifest. https://bugzilla.gnome.org/show_bug.cgi?id=758515
* dashdemux: maxFrameRate & minFrameRate should be in RepresentationBase.suhwang.kim2015-12-082-8/+8
| | | | | | | According to the spec, they can be in AdaptationSet, Representation and SubRepresentation. So They should be in RepresentationBase. https://bugzilla.gnome.org/show_bug.cgi?id=758515
* mpdparser: remove gst_mpd_client_check_time_positionFlorin Apostol2015-11-242-64/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=758593
* mpdparser: added support for parsing fraction of seconds in dateTime fieldsFlorin Apostol2015-11-231-4/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=758410
* dashdemux: always set presentationTimeOffsetThiago Santos2015-11-201-7/+30
| | | | | | | Set it for all types of segment lists (templates / lists / base) and not only for templates. https://bugzilla.gnome.org/show_bug.cgi?id=751529
* dashdemux: Add binary search for stream_sidx_seekJimmy Ohn2015-11-191-16/+35
| | | | | | Add binary search to optimize in stream_sidx_seek. https://bugzilla.gnome.org/show_bug.cgi?id=749653
* mpdparser: remove unused functions gst_mpdparser_get_chunk_by_index and ↵Florin Apostol2015-11-192-81/+0
| | | | | | gst_mpdparser_find_segment_by_index https://bugzilla.gnome.org/show_bug.cgi?id=758233
* Remove unnecessary NULL checks before g_free()Reynaldo H. Verdejo Pinochet2015-11-181-2/+1
| | | | g_free() is NULL-safe
* mpdparser: Also allow '/' in RepresentationIDSebastian Dröge2015-11-181-6/+14
| | | | | | Used by http://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd https://bugzilla.gnome.org/show_bug.cgi?id=757903
* dashdemux: fixed illegal memory access in ↵Florin Apostol2015-11-181-12/+17
| | | | | | gst_mpd_client_get_last_fragment_timestamp_end https://bugzilla.gnome.org/show_bug.cgi?id=758188
* dashdemux: remove unreachable codeFlorin Apostol2015-11-021-31/+11
| | | | | | | | | | | The stream->cur_seg_template is set to the lowest available segment template (representation or adaptation or period, in this order). Because the template elements are inherited, the lowest template will have all the elements the parents had, so there is no need to check the parent for an element that is not found in the child (eg initialisation or index). https://bugzilla.gnome.org/show_bug.cgi?id=752714
* mpdparser: add some checks to duration parsingVincent Penquerc'h2015-11-021-150/+212
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752336
* dashdemux: added duration format validationFlorin Apostol2015-11-021-6/+50
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752336
* dashdemux: fix memory leakLuis de Bethencourt2015-11-021-0/+1
| | | | | | | Free new_mpd, allocated with g_slice_new(), before going out of scope in goto error. CID 1338050
* mpdparser: make durations unsigned where appropriateVincent Penquerc'h2015-10-302-101/+73
| | | | | | | | | | The standard does not seem to make any particular explicit not implicit reference to the signedness of durations, and the code does not rely on such, nor on the negativity of the -1 value that's used as a placeholder when a duration property is not present in the XML. https://bugzilla.gnome.org/show_bug.cgi?id=750847
* dashdemux: inherit bitstreamSwitching from Period to AdaptationSetFlorin Apostol2015-10-301-1/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752340
* dashdemux: marked PROP_BANDWIDTH_USAGE property as deprecatedFlorin Apostol2015-10-301-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=753890
* dashdemux: inherited segment URLs are ignored if they are defined again in a ↵Florin Apostol2015-10-301-0/+19
| | | | | | | | | | | | | | | | lower SegmentList According to the standard: "SegmentBase, SegmentTemplate and SegmentList shall inherit attributes and elements from the same element on a higher level. If the same attribute or element is present on both levels, the one on the lower level shall take precedence over the one on the higher level." gst_mpdparser_parse_segment_list_node will now discard any inherited segment URLs if the parsed element defines some too. https://bugzilla.gnome.org/show_bug.cgi?id=751832
* dashdemux: provide a default suggestedPresentationDelayAlex Ashley2015-10-294-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | If MPD@suggestedPresentationDelay is not present in the manifest, dashdemux selects the fragment closest to the most recently generated fragment. This causes a playback issue because this choice does not allow the DASH client to build up any buffer of downloaded fragments without pausing playback. This is because by definition new fragments appear on the server in real-time (e.g. if segment duration is 4 seconds, a new fragment will appear on the server every 4 seconds). If the starting playback position was n*segmentDuration seconds behind "now", the DASH client could download up to 'n' fragments faster than realtime before it reached the point where it needed to wait for fragments to appear on the server. The MPD@suggestedPresentationDelay attribute allows a content publisher to provide a suggested starting position that is behind the current "live" position. If the MPD@suggestedPresentationDelay attribute is not present, provide a suitable default value as a property of the dashdemux element. To allow the default presentation delay to be specified either using fragments or seconds, the property is a string that contains a number and a unit (e.g. "10 seconds", "4 fragments", "2500ms").
* dashdemux: improve detection of stream languageFlorin Apostol2015-10-291-3/+10
| | | | | | | Improved the detection of stream's language if the AdaptationSet contains more than 1 ContentComponent https://bugzilla.gnome.org/show_bug.cgi?id=752367
* dash_mpd: restrict segment template format strings to %0[0-9]*d as per specVincent Penquerc'h2015-10-291-13/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=751735
* dashdemux: segment template parsing: added support for %dFlorin Apostol2015-10-291-6/+9
| | | | | Added support for %d in template identifier. Added testcases for %d, %3d, %0-4d identifier formats.
* dashdemux: corrected parsing of segment templatesFlorin Apostol2015-10-291-23/+34
| | | | | | | | Corrected the parsing of a segment template string. Added unit tests to test the segment template parsing. All reported problems are now correctly handled. https://bugzilla.gnome.org/show_bug.cgi?id=751735