[POC][FragmentedSampleReader] Included audio streams #1915
+146
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently ISA support to read the TS streams containing the audio stream into the same video stream
in other words, these HLS have a single video playlist stream in .ts, and the same video segments contains also the audio data (similar to local files)
in this case only a single
TSSampleReader
for video track is created, at each read theTSSampleReader
is automatically able to distinguish between video and audio data and change automagically also the stream ID as neededtherefore, its internal state changes continuously, between video and audio and provide data in PTS order at each read
with MP4 this is different
the
FragmentedSampleReader
useAP4_LinearReader
to read data, it that cannot switch automagically between audio/video data, it is strongly linked toAP4_Track
's usually one AP4_Track for video, one for audiotherefore we must use/share the same
AP4_LinearReader
for both a/v tracks,(otherwise create multiple
AP4_LinearReader
that point to the sameAdaptiveStream
(AP4_ByteStream) will cause a bad behaviors on data to be read)since most of code is coupled to
AP4_Track
it is difficult to reuse the sameFragmentedSampleReader
for both tracks, because we need read packet data from both tracks, also initialize the codechandler and extract extradataI thought about creating a
FragmentedSampleReader
clone by changing theAP4_Track
(imo maybe the "easy" way)where share the same
AP4_LinearReader
of video track,then inject the sample reader to the CStream by setting the appropriate StreamId
Currently, this is a POC that demonstrates that both audio and video work,
OFC it is not complete and has various problems
Motivation and context
POC to solve
#1909
#343
also #1005 but require to include changes to DASH parser
How has this been tested?
tested with dailymotion videos such as
https://www.dailymotion.com/video/x9qgg9c
the m3u8 link expire, can be found also other videos
just take a look that playlist is with mp4 and not TS
Screenshots (if appropriate):
Types of change
Checklist: