Skip to content

Commit

Permalink
Feat/doris 2176 support mixed ts cmaf stream (#21)
Browse files Browse the repository at this point in the history
* Add the initial check about this device support L1 or only L3.

* Try to fix the playback issue on the mixed-ts-cmaf stream.
  • Loading branch information
guoen21 authored Mar 4, 2024
1 parent 30cad92 commit 28aafd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ private FrameworkMediaDrm(UUID uuid) throws UnsupportedSchemeException {
this.mediaDrm = new MediaDrm(adjustUuid(uuid));
// Creators of an instance automatically acquire ownership of the created instance.
referenceCount = 1;
if (C.WIDEVINE_UUID.equals(uuid) && needsForceWidevineL3Workaround()) {
// Add the initial check about this device support L1 or only L3.
boolean mediaDrmL3 = "L3".equalsIgnoreCase(getPropertyString("securityLevel"));
if (C.WIDEVINE_UUID.equals(uuid) && !mediaDrmL3 && needsForceWidevineL3Workaround()) {
forceWidevineL3(mediaDrm);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,8 @@ private static HlsMediaPlaylist parseMediaPlaylist(
playlistDiscontinuitySequence = Integer.parseInt(line.substring(line.indexOf(':') + 1));
} else if (line.equals(TAG_DISCONTINUITY) && !discontinuityAfterSkip) {
relativeDiscontinuitySequence++;
// To fix the playback issue on the mixed-ts-cmaf stream.
initializationSegment = null;
} else if (line.startsWith(TAG_PROGRAM_DATE_TIME)) {
segmentStartTimeUtcUs = Util.msToUs(Util.parseXsDateTime(line.substring(line.indexOf(':') + 1)));
// Calc playlist start time with latest value of #EXT-X-PROGRAM-DATE-TIME tag, instead first value.
Expand Down

0 comments on commit 28aafd2

Please sign in to comment.