google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

TS_STREAM_TYPE_SPLICE_INFO stream type is equal to HDMV DTS Master Audio descriptor #2085

Closed Avetri closed 7 years ago

Avetri commented 7 years ago

ExoPlayer 2.0.4 File TsExtractor.java line 68:

public static final int TS_STREAM_TYPE_SPLICE_INFO = 0x86;
AquilesCanta commented 7 years ago

I am assuming you are speaking about the stream type for DTS-HD Master Audio. I say this because of the mentioning of descriptor at the end of the title. Unfortunately there is not much I can do to help you. We support SCTE 35's splice info section and it is signaled with stream type 0x86 as well (See SCTE 35 - 2016, Section 9.5.1). Since we don't support the mentioned audio format(does it use its own container format? Do we already support its container format? You would do well to provide a sample stream), it's not something we can do much about: It's in the user private stream_type values interval (0x80-0xFF).

If you need to support this, I guess the best option is to implement your own TsPayloadReader.Factory, catch any streamType == 0x86 requests and redirect any other to the default one. Can you think of any better solution?

The question now is how to discriminate them if both streams (splice info and DTS-HD) are present in the same program. I assume something can be done by using the 0x06 stream type, but that's in the muxer side. It would be nice to find out.

Avetri commented 7 years ago

You should not (can't obviously) use intersected ranges of descriptors in the same switch (DefaultTsPayloadReaderFactory class, method createPayloadReader(), line 60). It will be a problem in the furture. As example (if I remember right) it conflicts with NorDig too.

Avetri commented 7 years ago

Please look at my samples from the issue #1488 :

https://github.com/google/ExoPlayer/issues/1488#issuecomment-257849297

You may find some audio samples there. DTS HD Master Audio is also there.

AquilesCanta commented 7 years ago

But that's what the factory is for: creating your own streamType->TsPayloadReader mappings. What are you suggesting? I will have a look at the samples later to see whether we can extract them.

AquilesCanta commented 7 years ago

Is there anything we can do about this? Can we close otherwise?

Avetri commented 7 years ago

This problem doesn't bother me now. You can close it but I can't predict this question's related future issues.

AquilesCanta commented 7 years ago

For any future similar issue: You should implement your own factory if you need a different behavior from the one provided by the default implementation. You may want to wrap it, if the changes are small.