-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor transmuxing data flow #199
Conversation
fa04412
to
d725cd0
Compare
b80d6a7
to
988f82a
Compare
a6b9237
to
64728e7
Compare
@johnBartos I got a TypeScript error:
|
❗ Build for commit 64728e7 did not complete. |
…t support progressive demuxing
…ing lastEndDTS to duration if already defined
…io-stream-controller
❗ Build for commit 0b0131b did not complete. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a few failures:
startPTS
missing fromfrag
inFRAG_BUFFERED
event
http://player-pr-test-jenkins.longtailvideo.com/builds/20544/archive/test/hls/adaptive-display.html?file=%2F%2Fplayertest.longtailvideo.com%2Fadaptive%2Faviion%2Fmanifest.m3u8&xrange=30&version=latest%20debug%20build- Video with audio tracks doesn’t start http://player-pr-test-jenkins.longtailvideo.com/builds/20544/archive/test/hls/adaptive-display.html?file=%2F%2Fplayertest.longtailvideo.com%2Fadaptive%2Fconcert%2Fmanifest.m3u8&xrange=30&version=latest%20debug%20build
- AES issue
http://player-pr-test-jenkins.longtailvideo.com/builds/20544/archive/test/hls/adaptive-display.html?file=%2F%2Fplayertest.longtailvideo.com%2Fadaptive%2FcustomIV%2Fprog_index.m3u8&xrange=30&version=latest%20debug%20build
Overall much better than before, but with a refactor this size you need to keep track of what is breaking. It may become more difficult to address these issues without compromising your refactor's new design the further you go.
src/demux/mp4demuxer.ts
Outdated
destroy () {} | ||
} | ||
|
||
const dummyTrack = () => ({ type: '', id: -1, pid: -1, inputTimeScale: 90000, sequenceNumber: -1, len: 0, samples: [] }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just be exported/imported from non-progressive-demuxer.ts or defined as it's own module/type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
|
|
|
|
Latest bugs:
|
|
|
|
TODO: Pass AES token into provider fetch config |
|
|
This PR will...
ERROR
andFRAG_DECRYPTED
tsdemuxer
mp4-remuxer
mp4demuxer
passthrough-remuxer
demuxer
(renamed totransmuxer-interface
)demuxer-inline
(renamed totransmuxer
)demuxer-worker
(renamed totransmuxer-worker
)append
method to a new method:demux
:DemuxerResult
object when unencryptedDemuxerResult
promise when data is SAMPLE-AES encryptedremux
method:DemuxerResult
objectRemuxerResult
objectdemuxer-inline
totransmuxer
demuxer
andremuxer
remuxer
push
now returns the following:TransmuxerResult
object when the segment data is unencryptedTransmuxerResult
promise when the segment data is encrypteddemuxer-worker
totransmuxer-worker
transmuxComplete
message when transmuxing is completedemuxer
totransmuxer-interface
onTransmuxComplete
handlertransmuxComplete
is received from a workerfrag
andid
to each event; instead, the interface passes along aTransmuxIdentifier
object which is used post-transmux to regain the fragment referencemp4demuxer
andpassthrough-remuxer
stream-controller
andaudio-stream-controller
:FRAG_PARSING_DATA, FRAG_PARSED, FRAG_PARSING_DATA
eventshandleTransmuxComplete
handlerhandleTransmuxComplete
emits theFRAG_PARSING_USERDATA
andFRAG_PARSING_METADATA
eventsflush
method which is called when progressive downloading completesflush
on thetransmuxer-worker
the load promise resolves
NonProgressiveDemuxer
class, which buffers data until flush is called for the final remuxWhy is this Pull Request needed?
The event-driven architecture of the tranmuxing pipeline is not compatibly with a clean progressive segment parsing pipeline. By shifting to a return value based architecture, we're able to scope transmuxing to the controllers and segments to which the operation belongs. With this new architecture we will be able to safely transmux segments as a series of chunks, a core requirement for LHLS.
Are there any points in the code the reviewer needs to double check?
Yes
Resolves issues:
JW8-2638