shaka-packager/packager/mpd/base
Caitlin O'Callaghan c87c5bcdef
Fix for gap size warning in Low Latency mode (#985)
## The issue
- With LL-DASH mode enabled, the gap size warning was hit and printed to the console every time a new segment was registered to the manifest.
- This occurred because the first chunk's size and duration were being stored for each segment, rather than the full segment size and duration. Note, only the first chunk's metrics are known at first because in low latency mode, the segment is registered to the manifest before it is finished being processed and written.
- Because of this, the gap size check was comparing the end time of the first chunk in the previous segment to the beginning time of the current segment, causing the check to fail every time.

## The Fix
- Update a low latency segment's duration and size once the segment file has been fully written.
- The full segment size and duration will be used to update the bandwidth estimator and the segment info list. 
- Updating the segment info list to hold the full duration is necessary for satisfying [the gap size check found in Represenation.cc](https://github.com/google/shaka-packager/blob/master/packager/mpd/base/representation.cc#L391).
- NOTE: bandwidth estimation is currently only used in HLS
2021-09-03 09:57:43 -07:00
..
xml Low latency DASH support (#979) 2021-08-25 08:38:05 -07:00
adaptation_set.cc cleanup: Convert all time parameters to signed 2021-08-05 18:24:15 +00:00
adaptation_set.h cleanup: Convert all time parameters to signed 2021-08-05 18:24:15 +00:00
adaptation_set_unittest.cc cleanup: Convert all time parameters to signed 2021-08-05 18:24:15 +00:00
bandwidth_estimator.cc Estimate target duration in bandwidth calculation from initial blocks 2019-07-11 17:45:55 -07:00
bandwidth_estimator.h Estimate target duration in bandwidth calculation from initial blocks 2019-07-11 17:45:55 -07:00
bandwidth_estimator_unittest.cc Estimate target duration in bandwidth calculation from initial blocks 2019-07-11 17:45:55 -07:00
content_protection_element.cc Rename top level namespace to shaka 2016-05-24 21:55:55 +00:00
content_protection_element.h Rename top level namespace to shaka 2016-05-24 21:55:55 +00:00
media_info.proto Low latency DASH support (#979) 2021-08-25 08:38:05 -07:00
mock_mpd_builder.cc Adding --allow_codec_switching (#726) 2020-03-17 19:33:44 -07:00
mock_mpd_builder.h Low latency DASH support (#979) 2021-08-25 08:38:05 -07:00
mock_mpd_notifier.cc Part one of supporting live profile with static mpd 2017-01-13 19:59:49 +00:00
mock_mpd_notifier.h Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
mpd_builder.cc Refactor XmlNode and libxml usages. 2020-11-16 14:35:37 -08:00
mpd_builder.h Refactor XmlNode and libxml usages. 2020-11-16 14:35:37 -08:00
mpd_builder_unittest.cc Put namespace URIs in DASH mpd only if needed 2018-09-25 15:45:48 -07:00
mpd_notifier.h Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
mpd_notifier_util.cc Move packager/media/file to packager/file 2017-07-17 12:08:28 -07:00
mpd_notifier_util.h Rename top level namespace to shaka 2016-05-24 21:55:55 +00:00
mpd_options.h Exclude short segments from peak bandwidth computation 2018-11-26 20:02:09 +00:00
mpd_utils.cc [DASH] Include <mspr:pro> alongside to <cenc:pssh> for PlayReady (#749) 2020-04-17 10:20:03 -07:00
mpd_utils.h [DASH] Include <mspr:pro> alongside to <cenc:pssh> for PlayReady (#749) 2020-04-17 10:20:03 -07:00
mpd_utils_unittest.cc Refactor XmlNode and libxml usages. 2020-11-16 14:35:37 -08:00
period.cc Low latency DASH support (#979) 2021-08-25 08:38:05 -07:00
period.h Refactor XmlNode and libxml usages. 2020-11-16 14:35:37 -08:00
period_unittest.cc Low latency DASH support (#979) 2021-08-25 08:38:05 -07:00
representation.cc Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
representation.h Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
representation_unittest.cc Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
segment_info.h Use segment duration in buffer depth calculation 2019-04-17 22:47:10 +00:00
simple_mpd_notifier.cc Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
simple_mpd_notifier.h Fix for gap size warning in Low Latency mode (#985) 2021-09-03 09:57:43 -07:00
simple_mpd_notifier_unittest.cc Low latency DASH support (#979) 2021-08-25 08:38:05 -07:00