Enable HDMV DTS stream detection if a flag is set
Issue: #5330 PiperOrigin-RevId: 241381723
This commit is contained in:
parent
2dc07fc461
commit
9dc22c3086
@ -18,6 +18,10 @@
|
|||||||
* Support encrypted initialization segments
|
* Support encrypted initialization segments
|
||||||
([#5441](https://github.com/google/ExoPlayer/issues/5441)).
|
([#5441](https://github.com/google/ExoPlayer/issues/5441)).
|
||||||
* Parse `EXT-X-MEDIA` `CHARACTERISTICS` attribute into `Format.roleFlags`.
|
* Parse `EXT-X-MEDIA` `CHARACTERISTICS` attribute into `Format.roleFlags`.
|
||||||
|
* MPEG-TS: enable HDMV DTS stream detection only if a flag is set. By default
|
||||||
|
(if the flag is not set), the 0x82 elementary stream type is now treated as an
|
||||||
|
SCTE subtitle track
|
||||||
|
([#5330](https://github.com/google/ExoPlayer/issues/5330)).
|
||||||
* `ExtractorMediaSource` renamed to `ProgressiveMediaSource`.
|
* `ExtractorMediaSource` renamed to `ProgressiveMediaSource`.
|
||||||
* Support for playing spherical videos on Daydream.
|
* Support for playing spherical videos on Daydream.
|
||||||
* Improve decoder re-use between playbacks. TODO: Write and link a blog post
|
* Improve decoder re-use between playbacks. TODO: Write and link a blog post
|
||||||
|
@ -38,7 +38,8 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
|
|||||||
* Flags controlling elementary stream readers' behavior. Possible flag values are {@link
|
* Flags controlling elementary stream readers' behavior. Possible flag values are {@link
|
||||||
* #FLAG_ALLOW_NON_IDR_KEYFRAMES}, {@link #FLAG_IGNORE_AAC_STREAM}, {@link
|
* #FLAG_ALLOW_NON_IDR_KEYFRAMES}, {@link #FLAG_IGNORE_AAC_STREAM}, {@link
|
||||||
* #FLAG_IGNORE_H264_STREAM}, {@link #FLAG_DETECT_ACCESS_UNITS}, {@link
|
* #FLAG_IGNORE_H264_STREAM}, {@link #FLAG_DETECT_ACCESS_UNITS}, {@link
|
||||||
* #FLAG_IGNORE_SPLICE_INFO_STREAM} and {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS}.
|
* #FLAG_IGNORE_SPLICE_INFO_STREAM}, {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS} and {@link
|
||||||
|
* #FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS}.
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@ -51,7 +52,7 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
|
|||||||
FLAG_DETECT_ACCESS_UNITS,
|
FLAG_DETECT_ACCESS_UNITS,
|
||||||
FLAG_IGNORE_SPLICE_INFO_STREAM,
|
FLAG_IGNORE_SPLICE_INFO_STREAM,
|
||||||
FLAG_OVERRIDE_CAPTION_DESCRIPTORS,
|
FLAG_OVERRIDE_CAPTION_DESCRIPTORS,
|
||||||
FLAG_IGNORE_HDMV_DTS_STREAM
|
FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS
|
||||||
})
|
})
|
||||||
public @interface Flags {}
|
public @interface Flags {}
|
||||||
|
|
||||||
@ -88,11 +89,10 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
|
|||||||
*/
|
*/
|
||||||
public static final int FLAG_OVERRIDE_CAPTION_DESCRIPTORS = 1 << 5;
|
public static final int FLAG_OVERRIDE_CAPTION_DESCRIPTORS = 1 << 5;
|
||||||
/**
|
/**
|
||||||
* Prevents the creation of {@link DtsReader} instances when receiving {@link
|
* Sets whether HDMV DTS audio streams will be handled. If this flag is set, SCTE subtitles will
|
||||||
* TsExtractor#TS_STREAM_TYPE_HDMV_DTS} as stream type. Enabling this flag prevents a stream type
|
* not be detected, as they share the same elementary stream type as HDMV DTS.
|
||||||
* collision between HDMV DTS audio and SCTE-35 subtitles.
|
|
||||||
*/
|
*/
|
||||||
public static final int FLAG_IGNORE_HDMV_DTS_STREAM = 1 << 6;
|
public static final int FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS = 1 << 6;
|
||||||
|
|
||||||
private static final int DESCRIPTOR_TAG_CAPTION_SERVICE = 0x86;
|
private static final int DESCRIPTOR_TAG_CAPTION_SERVICE = 0x86;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
|
|||||||
case TsExtractor.TS_STREAM_TYPE_AC4:
|
case TsExtractor.TS_STREAM_TYPE_AC4:
|
||||||
return new PesReader(new Ac4Reader(esInfo.language));
|
return new PesReader(new Ac4Reader(esInfo.language));
|
||||||
case TsExtractor.TS_STREAM_TYPE_HDMV_DTS:
|
case TsExtractor.TS_STREAM_TYPE_HDMV_DTS:
|
||||||
if (isSet(FLAG_IGNORE_HDMV_DTS_STREAM)) {
|
if (!isSet(FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Fall through.
|
// Fall through.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user