I am trying to use the MediaCodec API to decode and display an MPEG2 stream. I am using MediaExtractor to retrieve a stream from an MPEG ( TS ) transport stream.
I notice that the decoder's configure() does not work on all the devices I tried - Nexus7 (2012), Nexus7 (2013), Nexus10 with error code 0x80001001.
The only parameter that can make a mistake when using the configure() API is the MediaFormat configuration, and this comes from Android MediaExtractor . I do not understand what might be wrong, as a result of which this question will be noticed.
The configuration options present in the MediaFormat object MediaFormat as follows:
1. `CSD-0` - Containing Sequence header and sequence extension header. Seq_Hdr - 00 00 01 B3 2D 01 E0 24 09 C4 23 80 Seq_extnsn - 00 00 01 B5 14 8A 00 01 00 80 2. Height - 480 3. Width - 720 4. KEY_MIME - `video/mpeg2`
The error is very similar to all devices, which may mean that the error may arise from a shared object in the MediaCodec stack. Here is a bug from Nexus7 (2013). (0x80001001 - OMX_ErrorUndefined)
E/ACodec ( 6504): [OMX.qcom.video.decoder.mpeg2] configureCodec returning error -1010 E/MediaCodec( 6504): Codec reported an error. (omx error 0x80001001, internalError -1010)
Is this behavior because MPEG2 not a required codec for support on Android platforms, or am I doing something wrong? Any information about the behavior of the MPEG2 decoder will be appreciated.
source share