Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Timeline and multiperiod optimizations (Dash-Industry-Forum#3413)
* Add key session updated event and enable reuse of sourcebuffers via settings flag * WiP * WiP: Commong DVR window for all periods * Rename methods * Remove LiveEdgeFinder.js * Remove setExpectedLiveEdge and getExpectedLiveEdge * Fix unit tests * Fix linting error * Add additional unit tests for availabilityWindow calculation * Add missing return value * Adjust Settings.js * Adjust timeline calculation for availability window and dvr window * Adjust segment availability calculation * Use timeshift window as DVR window instead of availability windo * Use allowed gap length as tolerance for buffer level estimation * updateCurrentTime when representation update failed * Adjust segmentAvailability calculation to use availabilityWindow * Fix the representation update errors for multiperiod * Fix segment availability calculation * Small adjustments for segment availability calculation * Add timeline manifest drift * VoD onEnded fixes * Only set the initial live edge once after startup. * Remove hasDiscontinuities handling as we have gap handling as this can lead to an endless loop at period boundaries * Support availabilityTimeOffset set to Inf * Add unit tests for TimelineConverter.js * Adjust live start logic for SegmentTemplate using DVRwindow. * Fix MPD anchors for multiperiod static * Calculate DVR window using segmenttimeline * Adjust calculation of time for dynamic streams * Remove gap checking in SourceBufferSink.js * Use lastSeekWasInternal instead of removing event listener * Adjust unit tests * Add unintened removal again * Small change in timeline DVR window calculation * Fix a bug in the DVR window calculation for timeline * No gap jump when track change is in progress * Fix audio switch for multiperiod prebuffered streams * Fix errors in TimelineConverter.js and add additonal unit tests * Update StreamMock.js * Fix linting errors and unit tests * Fix a bug in AbrController.js * WiP: Enable preloading after seeking between periods * Fix bug in event presentation time calculation * Remove gap check in SourceBufferSink.js * prune buffer when seek causes a period switch * Fix Buffer.abort call for multiperiod streams * Fix stalling problem for multiperiod multi audio when seeking between periods * Fix linting errors and unit tests * Remove some stuff in SourceBufferSink.js * Minor formatting changes * Separate init handling in PlaybackController.js after period switch * Fix seg.replacementTime for $time and SegmentTemplate * Subtract duration of one segment from availability window * No need to subtract duration when calculating the avail window as we use the duration of the segment in SegmentsUtils.js * Small linting fix in AbrController.js * Distinguish between inner and outer period seeking to call specific seeking handler * Small refactoring in StreamController.js * Adjust seek to stream end logic in gap controller * Small adjustment in GapController.js * Use index of buffered ranges for gap jumping * Internal seek only if next stream is prebuffered * Fix a bug when seeking between periods. If some buffers are already pruned we can fire BUFFER_CLEARED_FOR_STREAM_SWITCH immediately * Fix a bug which lead to multiple stream switches when seeking * Fix a bug which lead to multiple stream switches when seeking * Fix calculation segmentReplacementTime for Template streams * Fix a bug in the GapController.js * Call updateCurrentTime when wallclock time is updated * Fix audio switch in multiperiod streams * wip audio switch when preloading streams * Deactivate preloading streams when switching a track * Wait for the now time to reach AST + Perio@start before starting playback * Wait for the now time to reach AST + Perio@start before starting playback * Adjust availabilityWindow calculation. The availability window is allowed to be larger than the period boundary. * Reset isEndedEventSignaled when switching stream * Add stream id specific handling in BufferController.js * Remove comment * Do not maintain an availabilityWindow, instead use SAST and SAET to calculate whether a segment can be downloaded or not. * Do not cann updateCurrentTime if there is already a seek going on * GapController.js stalls before seeking over gaps in a livestream. Otherwise we move too close to the end of the DVR window. Need to maintain a consistent live edge. * Reset gap timneout when seeking is done * WiP: Multiperiod gap handling and falsy termination of streams * WiP: Rewrite of the seek and buffer pruning logic * Fix and uncomment some of the unit tests * Fix linting errors * Fix missing values * Add required changes to calculate start times in StreamController.js * Minor bugfixes * Adjust _checkIfPrebufferingCanStart logic. No need to calculate AST in StreamController.js this is handled by the scheduling logic * Minor refactoring and cleanup * Adjust prebuffering logic * Add Elemental test streams * Remove unnecessarily exposed methods and rename buffer variables * Add setting to disable init segment caching * Rename append init function * Fix unit tests * Add additional JSDoc * Fix: Add dispatching of mediatype and streamId to SourceBufferSink.js otherwise segment scheduling logic is broken. * WiP: Adjust seeking logic * WiP: Adjust seeking logic * Fix bug in the timline calculation with negative @r parameter * WiP: Fix outer period seeking * Minor refactoring * Wip: Rework buffering completed logic * Add protdata to ProtectionController when updating in StreamController.js * Add missing streamId for ABR calculation * Fix wrong method naming * Remove unnecessary values in ScheduleController.js hasTopQualityChanged * Add missing streamId parameters in calls to AbrController.js methods * Fix linting errors * Rewrite scheduling logic * WiP : Rewrite logic to determine if scheduling is finished * WiP : Rewrite logic to determine if scheduling is finished * Fix cancelation of segment request at startup * WiP: Simplify scheduling logic * WiP: Simplify scheduling logic * Simplify scheduling logic * WiP: Outer period seek * Fix outer period seek * Fix preloading in case video is already buffered but audio is still missing some parts * Add small offsets to append window * Subtract small offset from waiting time when jumping gaps * Subtract UTC offset instead of adding it * WiP: Support track switching again * WiP: Seeking still causes minor issues. Move to promise based buffer handling * Working seeks, maybe some minor edge cases left * WiP: Move to promise based BufferController.js and SourceBufferSink.js * Add additional promises * Fix additional seeking bugs * Fix audio track switch * Account for quota exceeded error * Small adjustments in SourceBufferSink.js * Use TRACK_CHANGE_RENDERED event in GapController.js * Start working on SegmentBase support * WiP: Fix SegmentBase and SegmentList * Fix missing TimelineConverter in SegmentsController * Fix SegmentBase * Small changes to SegmentBase logic and bump of version number * Fix a bug in the SourceBufferSink.js that lead to chunks not being appended * Repair Thumbnails * Fix external VTT * Fix TTML segmented VoD * Fix sideloaded and fragmented TTML * Small improvement in TextController.js * WiP: Fix fragmented tracks for multiperiod * Fix wrong mime type when switching tracks * Remove prebuffering comment * Fix race condition when switching audio language * Fix a bug for multiperiod fragmented texts. * Fix MSE reinit error after loading a new stream * Fix DroppedFramesRule.js for multiperiod * ABR changes and reduce scheduling timeout * Add max index downloading * Proper AbrController.js resets * WiP: Fix embedded text tracks * Save sources.json * Fix CEA608 captions * Fix bug in DashAdapter.js caused by capability filtering. DashAdapter.js should always build voAdaptation based on data in DashManifestModel * Fix track switch if existing track is not to be replaced * Initial support for initialBufferLevel * Further improvements for initialBufferLevel * Fix a bug in subtitle switching * Compare codecs in isTracksEqual * Compare codecs in isTracksEqual * Fix thumbnails for SegmentTimeline with $time * Add pruneAllSafely to NotFragmentedTextBufferController.js * Add MediaCapabilitiesAPI * WiP: Optimize Textrack switching in multiperiod * Fix custom capabilities filter * Readd some stuff that has been removed while merging development * Minimal cleanup of MediaPlayer.js * Fix linting errors * Fix a bug in updateCurrentTime. Always use a media type to get the DVR window. Otherwise issues with removing media types in the CapabilitiesFilter * Fix a bug in the GapController.js leading to unwanted gap jumps once a stream has been completely buffered and the user is seeking back * WiP: TextController changes. Only one TextController which handles all periods * Fix two subtitle bugs * Fix linting errors * Retrigger init request in case no valid request could be made * Minor cleanups in ScheduleController.js and BufferController.js * Fix a bug in the TextController.js for multiperiod streams with texttracks * WiP: Fix unit tests * Fix unit test for DashAdapter.js * Fix unit tests for SegmentBaseLoader.js * Fix unit tests * Fix unit tests for streaming.Stream.js * Fix unit tests for AbrController.js * Fix unit tests for streaming.controllers.BufferController.js * Small refactoring and additional fixes for unit tests * Add streamInfo check to TextController.js * Fix unit tests in streaming.controllers.SourceBufferSink.js * Rework MediaCapabilities check * Fix unit tests for streaming.controllers.StreamController.js , streaming.Stream.js, streaming.models.FragmentModel.js * Additional unit test and linting fixes * Update version number in package-lock.json * Fix typo in sample * WiP: Restructure Settings.js * Minor settings parameter changes * Cleanup sources.json * Fix track change for tracks that are completely buffered. Preloading needs to be triggered again. * Fix display of metric values in reference UI for multiperiod content
- Loading branch information