我的代码如下:
MediaFormat format = MediaFormat.createVideoFormat("video/hevc",480, 560);
decoder.configure(format, null, null, 0);
我的设备支持h265解码:OMX.amlogic.avc.decoder.awesome类型:video / hevc
崩溃日志:
05-09 16:32:16.670: E/xdance(14899): format:{durationUs=0, max-input-size=0, height=560, mime=video/hevc, width=480}
05-09 16:32:16.670: E/ACodec(14899): [OMX.amlogic.avc.decoder.awesome] configureCodec returning error -1010
05-09 16:32:16.670: E/MediaCodec(14899): Codec reported an error. (omx error 0x80001001, internalError -1010)
05-09 16:32:16.670: W/dalvikvm(14899): threadid=11: thread exiting with uncaught exception (group=0x41696ba8)
05-09 16:32:16.680: E/AndroidRuntime(14899): FATAL EXCEPTION: Thread-300
05-09 16:32:16.680: E/AndroidRuntime(14899): Process: com.clientgroup.server, PID: 14899
05-09 16:32:16.680: E/AndroidRuntime(14899): java.lang.IllegalStateException
05-09 16:32:16.680: E/AndroidRuntime(14899): at android.media.MediaCodec.native_configure(Native Method)
05-09 16:32:16.680: E/AndroidRuntime(14899): at android.media.MediaCodec.configure(MediaCodec.java:262)
05-09 16:32:16.680: E/AndroidRuntime(14899): at com.clientgroup.server.SensorServer$PlayerThread.run(SensorServer.java:257)
05-09 16:32:16.680: E/AndroidRuntime(14899): at java.lang.Thread.run(Thread.java:841)
那么,为什么简单地使用mediacodec是不行的。有人可以帮助我吗?