please help me !!! redroid12上,mediaPlayer使用异常,无法播放
在redroid12上,解码器是用的c2,然后我的程序中有mediaPlayer,用于播放mp4,或者解码mp4,但是无法运行,相同的代码在redroid11上是可行的; 然后反馈一个问题,在redroid12上,浏览器浏览一些视频网站比如哔哩哔哩,咪咕等,也是无法播放,不确定是否是同个问题
补充一下,是redroid12_64only版本
mediaplayer播放mp4时,黑屏,下面是logcat: --------- beginning of main 03-05 07:50:38.006 193 36364 D BufferPoolAccessor2.0: bufferpool2 0xb400f9a0056afce8 : 1(1382400 size) total buffers - 1(1382400 size) used buffers - 350/360 (recycle/alloc) - 10/359 (fetch/transfer) 03-05 07:50:43.680 193 586 D BufferPoolAccessor2.0: bufferpool2 0xb400f9a0056afce8 : 1(1382400 size) total buffers - 0(0 size) used buffers - 354/364 (recycle/alloc) - 10/364 (fetch/transfer) 03-05 07:50:43.680 193 586 D BufferPoolAccessor2.0: evictor expired: 1, evicted: 1 03-05 07:50:43.772 82 82 D hwcomposer: VSYNC event status:1 03-05 07:50:43.807 1108 1719 W MediaProvider: Failed to fetch original file descriptor 03-05 07:50:43.807 1108 1719 W MediaProvider: java.io.FileNotFoundException: Input file descriptor is already original 03-05 07:50:43.807 1108 1719 W MediaProvider: at com.android.providers.media.MediaProvider.getOriginalMediaFormatFileDescriptor(MediaProvider.java:5751) 03-05 07:50:43.807 1108 1719 W MediaProvider: at com.android.providers.media.MediaProvider.openTypedAssetFileCommon(MediaProvider.java:7167) 03-05 07:50:43.807 1108 1719 W MediaProvider: at com.android.providers.media.MediaProvider.openTypedAssetFile(MediaProvider.java:7148) 03-05 07:50:43.807 1108 1719 W MediaProvider: at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:548) 03-05 07:50:43.807 1108 1719 W MediaProvider: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:327) 03-05 07:50:43.807 1108 1719 W MediaProvider: at android.os.Binder.execTransactInternal(Binder.java:1179) 03-05 07:50:43.807 1108 1719 W MediaProvider: at android.os.Binder.execTransact(Binder.java:1143) 03-05 07:50:43.809 153 153 D NuPlayerDriver: NuPlayerDriver(0xb400ec57dc4f89d0) created, clientPid(37930) 03-05 07:50:43.810 24 24 I hwservicemanager: getTransport: Cannot find entry [email protected]::IOmx/default in either framework or device VINTF manifest. 03-05 07:50:43.810 153 153 D MediaPlayerService: OMX service is not available 03-05 07:50:43.810 153 153 D SurfaceUtils: connecting to surface 0xb400ec589c504650, reason setVideoSurfaceTexture 03-05 07:50:43.811 153 38098 D NuPlayer: onSetVideoSurface(0xb400ec589c50ac70, no video decoder) 03-05 07:50:43.812 153 38099 D GenericSource: FileSource remote 03-05 07:50:43.814 146 11326 D MediaBufferGroup: creating MemoryDealer 03-05 07:50:43.862 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:43.928 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.068 153 38098 I GenericSource: start 03-05 07:50:44.070 153 38113 D CCodec : allocate(c2.android.avc.decoder) 03-05 07:50:44.070 193 230 V C2Store : in init 03-05 07:50:44.070 193 230 V C2Store : loading dll 03-05 07:50:44.071 153 38113 I CCodec : Created component [c2.android.avc.decoder] 03-05 07:50:44.071 153 38113 D CCodecConfig: read media type: video/avc 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: output.subscribed-indices.values 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.allocator-ids.values 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values 03-05 07:50:44.072 153 38113 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.pool-ids.values 03-05 07:50:44.073 153 38113 D ReflectedParamUpdater: ignored struct field coded.color-format.locations 03-05 07:50:44.073 153 38113 D CCodecConfig: ignoring local param raw.size (0xd2001800) as it is already supported 03-05 07:50:44.073 153 38113 D CCodecConfig: ignoring local param default.color (0x5200180b) as it is already supported 03-05 07:50:44.073 153 38113 D ReflectedParamUpdater: ignored struct field raw.hdr-static-info.mastering 03-05 07:50:44.073 153 38113 I CCodecConfig: query failed after returning 12 values (BAD_INDEX) 03-05 07:50:44.074 153 38113 D CCodecConfig: c2 config diff is Dict { 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 coded.pl.level = 20496 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 coded.pl.profile = 20481 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 coded.vui.color.matrix = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 coded.vui.color.primaries = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 coded.vui.color.range = 2 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 coded.vui.color.transfer = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 default.color.matrix = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 default.color.primaries = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 default.color.range = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 default.color.transfer = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 input.buffers.max-size.value = 2097152 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 input.delay.value = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: string input.media-type.value = "video/avc" 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 output.delay.value = 8 03-05 07:50:44.074 153 38113 D CCodecConfig: string output.media-type.value = "video/raw" 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.color.matrix = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.color.primaries = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.color.range = 2 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.color.transfer = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.max-size.height = 240 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.max-size.width = 320 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.pixel-format.value = 35 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::i32 raw.rotation.flip = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::i32 raw.rotation.value = 0 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.sar.height = 1 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.sar.width = 1 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.size.height = 240 03-05 07:50:44.074 153 38113 D CCodecConfig: c2::u32 raw.size.width = 320 03-05 07:50:44.074 153 38113 D CCodecConfig: c2: 03-05 07:50:44.074 153 38113 W ColorUtils: expected specified color aspects (2:0:0:0) 03-05 07:50:44.075 153 38111 D SurfaceUtils: disconnecting from surface 0xb400ec589c50ac80, reason onConfigure 03-05 07:50:44.075 153 38112 D SurfaceUtils: connecting to surface 0xb400ec589c50ac80, reason connectToSurface 03-05 07:50:44.075 153 38112 I MediaCodec: [c2.android.avc.decoder] setting surface generation to 156679 03-05 07:50:44.075 153 38112 D SurfaceUtils: disconnecting from surface 0xb400ec589c50ac80, reason connectToSurface(reconnect) 03-05 07:50:44.075 153 38112 D SurfaceUtils: connecting to surface 0xb400ec589c50ac80, reason connectToSurface(reconnect) 03-05 07:50:44.075 153 38113 D CCodec : [c2.android.avc.decoder] buffers are bound to CCodec for this session 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for durationUs 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for frame-count 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for track-id 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for language 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for display-width 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for display-height 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for csd-1 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for native-window 03-05 07:50:44.076 153 38113 D CCodecConfig: no c2 equivalents for flags 03-05 07:50:44.076 153 38113 D CCodecConfig: config failed => CORRUPTED 03-05 07:50:44.076 153 38113 D CCodecConfig: c2 config diff is c2::u32 coded.pl.level = 20489 03-05 07:50:44.076 153 38113 D CCodecConfig: c2::u32 raw.size.height = 720 03-05 07:50:44.076 153 38113 D CCodecConfig: c2::u32 raw.size.width = 1280 03-05 07:50:44.076 153 38113 W Codec2Client: query -- param skipped: index = 1107298332. 03-05 07:50:44.076 153 38113 D CCodec : client requested max input size 8958, which is smaller than what component recommended (2097152); overriding with component recommendation. 03-05 07:50:44.076 153 38113 W CCodec : This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range. 03-05 07:50:44.076 153 38113 D CCodec : setup formats input: AMessage(what = 0x00000000) = { 03-05 07:50:44.076 153 38113 D CCodec : int32_t height = 720 03-05 07:50:44.076 153 38113 D CCodec : int32_t level = 512 03-05 07:50:44.076 153 38113 D CCodec : int32_t max-input-size = 2097152 03-05 07:50:44.076 153 38113 D CCodec : string mime = "video/avc" 03-05 07:50:44.076 153 38113 D CCodec : int32_t profile = 65536 03-05 07:50:44.076 153 38113 D CCodec : int32_t width = 1280 03-05 07:50:44.076 153 38113 D CCodec : Rect crop(0, 0, 1279, 719) 03-05 07:50:44.076 153 38113 D CCodec : } 03-05 07:50:44.076 153 38113 D CCodec : setup formats output: AMessage(what = 0x00000000) = { 03-05 07:50:44.076 153 38113 D CCodec : int32_t android._color-format = 2135033992 03-05 07:50:44.076 153 38113 D CCodec : int32_t android._video-scaling = 1 03-05 07:50:44.076 153 38113 D CCodec : int32_t rotation-degrees = 0 03-05 07:50:44.076 153 38113 D CCodec : int32_t color-standard = 1 03-05 07:50:44.076 153 38113 D CCodec : int32_t color-range = 2 03-05 07:50:44.076 153 38113 D CCodec : int32_t color-transfer = 3 03-05 07:50:44.076 153 38113 D CCodec : int32_t sar-height = 1 03-05 07:50:44.076 153 38113 D CCodec : int32_t sar-width = 1 03-05 07:50:44.076 153 38113 D CCodec : Rect crop(0, 0, 1279, 719) 03-05 07:50:44.076 153 38113 D CCodec : int32_t width = 1280 03-05 07:50:44.076 153 38113 D CCodec : int32_t height = 720 03-05 07:50:44.076 153 38113 D CCodec : int32_t max-height = 240 03-05 07:50:44.076 153 38113 D CCodec : int32_t max-width = 320 03-05 07:50:44.076 153 38113 D CCodec : string mime = "video/raw" 03-05 07:50:44.076 153 38113 D CCodec : int32_t android._dataspace = 260 03-05 07:50:44.076 153 38113 D CCodec : int32_t color-format = 2130708361 03-05 07:50:44.076 153 38113 D CCodec : } 03-05 07:50:44.076 153 38113 I CCodecConfig: query failed after returning 12 values (BAD_INDEX) 03-05 07:50:44.076 153 38113 D CCodecConfig: c2 config diff is c2::u32 raw.max-size.height = 720 03-05 07:50:44.076 153 38113 D CCodecConfig: c2::u32 raw.max-size.width = 1280 03-05 07:50:44.077 153 38112 I MediaCodec: MediaCodec will operate in async mode 03-05 07:50:44.077 153 38111 D MediaCodec: keep callback message for reclaim 03-05 07:50:44.077 153 38113 W Codec2Client: query -- param skipped: index = 1342179345. 03-05 07:50:44.077 153 38113 W Codec2Client: query -- param skipped: index = 2415921170. 03-05 07:50:44.077 153 38113 W Codec2Client: query -- param skipped: index = 1610614798. 03-05 07:50:44.078 153 38113 D CCodecBufferChannel: [c2.android.avc.decoder#205] Created input block pool with allocatorID 16 => poolID 23 - OK (0) 03-05 07:50:44.078 153 38113 D CCodecBufferChannel: [c2.android.avc.decoder#205] Query output surface allocator returned 0 params => BAD_INDEX (6) 03-05 07:50:44.078 153 38113 I CCodecBufferChannel: [c2.android.avc.decoder#205] Created output block pool with allocatorID 18 => poolID 58 - OK 03-05 07:50:44.078 153 38113 D CCodecBufferChannel: [c2.android.avc.decoder#205] Configured output block pool ids 58 => OK 03-05 07:50:44.078 153 38113 D Codec2-OutputBufferQueue: C2SurfaceSyncMemory created 20(20) 03-05 07:50:44.078 153 38113 D Codec2-OutputBufferQueue: remote graphic buffer migration 0/0 03-05 07:50:44.078 153 38113 D Codec2Client: setOutputSurface -- failed to set consumer usage (6/BAD_INDEX) 03-05 07:50:44.078 153 38113 D Codec2Client: setOutputSurface -- generation=156679 consumer usage=0x900 sync 03-05 07:50:44.078 193 590 D C2BqBuffer: local generation change 156679 , bqId: 162908109537281 migrated buffers # 0 03-05 07:50:44.078 153 38113 D Codec2Client: Surface configure completed 03-05 07:50:44.079 153 38112 W ResourceManagerService: Ignoring request to add new resource entry with value <= 0 03-05 07:50:44.080 153 9849 D BufferPoolAccessor2.0: bufferpool2 0xb400ec57fc5083a8 : 0(0 size) total buffers - 0(0 size) used buffers - 5/12 (recycle/alloc) - 7/12 (fetch/transfer) 03-05 07:50:44.080 153 9849 D BufferPoolAccessor2.0: Destruction - bufferpool2 0xb400ec57fc5083a8 cached: 0/0M, 0/0% in use; allocs: 12, 42% recycled; transfers: 12, 42% unfetched 03-05 07:50:44.080 193 38114 D SimpleC2Component: Using output block pool with poolID 58 => got 58 - 0 03-05 07:50:44.080 153 38112 W MediaCodec: mapFormat: no mediaType information 03-05 07:50:44.080 153 38112 D CCodecConfig: no recognized params in: Dict { 03-05 07:50:44.080 153 38112 D CCodecConfig: c2::float algo.rate.value = 25 03-05 07:50:44.080 153 38112 D CCodecConfig: c2::float ctrl.operating-rate.value = 25 03-05 07:50:44.080 153 38112 D CCodecConfig: } 03-05 07:50:44.081 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.081 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.081 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.081 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.081 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.081 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.081 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.081 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.083 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.083 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.083 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.083 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.083 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.083 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.083 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.083 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.083 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.083 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.083 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.083 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.084 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.084 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.084 193 38114 E C2AllocatorGralloc: failed transaction: lockYCbCr (err=3) 03-05 07:50:44.084 193 38114 E C2SoftAvcDec: graphic view map failed 14 03-05 07:50:44.127 82 82 D hwcomposer: VSYNC event status:0 03-05 07:50:44.128 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.196 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.262 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.328 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.395 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.462 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.528 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.595 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.662 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.728 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.795 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.862 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.928 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2) 03-05 07:50:44.995 95 95 E CompositionEngine: [Background for SurfaceView[com.example.websdkapplication/com.example.websdkapplication.MainActivity]#0] Invalid device requested composition type change: SOLID_COLOR (3) --> DEVICE (2)