You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaced qtdemux with a Media Foundation-based MP4 demuxer on Windows.
The Media Foundation-based MP4 demuxer supports pull mode only due to the design of the Media Foundation APIs. For fragmented MP4 (fMP4) segments, each segment is demuxed independently because of API limitations. After processing each segment, the demuxer internally creates a new Source Reader.
HLSConnectionHolder: Headers are now sent with every segment because the MP4 demuxer reloads the Source Reader for each segment. Headers are intentionally not cached to avoid unnecessary connections. Additionally, HLS streams with separate audio renditions now seek to the last segment when seeking to the end of the stream, matching the behavior of standard HLS streams.
JavaSource: Removed the unused update flag and moved caps setting into a dedicated switch case.
Added trace support for Media Foundation-based plugins (both the demuxer and decoder). The tracing infrastructure is still a work in progress and will be expanded as needed for debugging. It is disabled by default and can only be enabled at compile time.
H.264 video from MP4 and fMP4 (HLS) is now decoded using Media Foundation instead of DirectShow. H.264 video in TS-based HLS streams continues to use DirectShow. This change avoids several DirectShow issues encountered with the new MP4 demuxer and reduces implementation complexity.
Updated MFWrapper to properly support H.264 decoding. Unlike H.265, H.264 requires using the display aperture for the display resolution, does not signal frame availability, requires handling format changes, and must fully drain output before accepting new input samples.
Modified the cache implementation to support pull mode for the HLS progress buffer.
Added pull mode support to the HLS progress buffer.
Changed progressbuffer to use a static source pad instead of a dynamic one, simplifying pipeline construction. The need for a dynamic source pad is unclear.
Performed minor cleanup by removing dead and obsolete code.
The progress buffer is now forced when JavaSource does not support pull mode (for example, with jar and jrt protocols). This provides a simple workaround until native pull mode support is implemented for these protocols. In particular, jar does not provide true random access at the Java layer anyway.
👋 Welcome back almatvee! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
The total number of required reviews for this PR has been set to 2 based on the presence of this label: rfr. This can be overridden with the /reviewers command.
@sashamatveev this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:
git checkout JDK-8331458-2
git fetch https://git.openjdk.org/jfx.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push
8305842: Replace qtdemux with MP4 demux based on Media Foundation [v5]
Changed on how HLS select media file index when variant playlist is switched. It was based on file name, but it is not reliable, since file names are not guarantee to match. Instead index is adjusted based on sequence number which should not drift more then +/- 1 when switch is done. Sequence number is like index of first segment file in live streams.
Fixed issue when variant playlist was not detected as live even it was live. Playlist with variant playlists was detected correctly as live.
Fixed reload time. Thread sleep is expecting milliseconds and we provided (seconds / 2) as milliseconds without conversion. As are result we where requesting playlist way too often.
Redone mechanism on how we waiting for live segments to be added. Old approach had a bug with semaphore and if we added two segments in one run it will cause code to assume that we have segments when we did not. As a result EOS was signaled for live streams. This issue does not reproduce often, but might happen.
Old playlist data will be cleared when we switching bitrate, otherwise we will attempt to play old segments which are gone long time.
Fixed removing old segments not to remove init header for fMP4.
Added additional tracing to mfdemux and mfwrapper.
mfdemux will not push caps event if caps did not change. When event is pushed decoder will flush and cause video glitch.
mfdemux will adjust segment event to first PTS. Needed for live streams, since their PTS does not start with 0.
Increase queue buffers for HLS Live on Windows with mfdemux since we reload source reader for each segment to eliminate stream break ups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
qtdemuxwith a Media Foundation-based MP4 demuxer on Windows.updateflag and moved caps setting into a dedicated switch case.MFWrapperto properly support H.264 decoding. Unlike H.265, H.264 requires using the display aperture for the display resolution, does not signal frame availability, requires handling format changes, and must fully drain output before accepting new input samples.progressbufferto use a static source pad instead of a dynamic one, simplifying pipeline construction. The need for a dynamic source pad is unclear.JavaSourcedoes not support pull mode (for example, withjarandjrtprotocols). This provides a simple workaround until native pull mode support is implemented for these protocols. In particular,jardoes not provide true random access at the Java layer anyway.Progress
Issues
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2206/head:pull/2206$ git checkout pull/2206Update a local copy of the PR:
$ git checkout pull/2206$ git pull https://git.openjdk.org/jfx.git pull/2206/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2206View PR using the GUI difftool:
$ git pr show -t 2206Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2206.diff
Using Webrev
Link to Webrev Comment