android / codelab-exoplayer-intro

Media Streaming with ExoPlayer codelab
https://codelabs.developers.google.com/codelabs/exoplayer-intro
Apache License 2.0
220 stars 116 forks source link

android.media.AudioTrack: Error code -20 when initializing AudioTrack. #23

Closed bounmed closed 3 years ago

bounmed commented 6 years ago

Hi i'm getting this error when playing a movie. The issue i get in some videos and not in others.

08-13 18:04:25.683 14114 14114 D EventLogger: videoEnabled [478.91] 08-13 18:04:25.686 14114 14114 D EventLogger: audioEnabled [478.92] 08-13 18:04:25.711 14114 14114 D EventLogger: Tracks [ 08-13 18:04:25.711 14114 14114 D EventLogger: Renderer:0 [ 08-13 18:04:25.711 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [ 08-13 18:04:25.713 14114 14114 D EventLogger: [X] Track:0, id=0, mimeType=video/avc, bitrate=2325464, res=1280x720, supported=YES 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.713 14114 14114 D EventLogger: Renderer:2 [ 08-13 18:04:25.713 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [ 08-13 18:04:25.713 14114 14114 D EventLogger: [ ] Track:0, id=1/129, mimeType=audio/ac3, channels=6, sample_rate=48000, supported=YES 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.713 14114 14114 D EventLogger: Group:1, adaptive_supported=N/A [ 08-13 18:04:25.713 14114 14114 D EventLogger: [X] Track:0, id=Français, mimeType=audio/ac3, channels=6, sample_rate=48000, language=fr, supported=YES 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.713 14114 14114 D EventLogger: Group:2, adaptive_supported=N/A [ 08-13 18:04:25.713 14114 14114 D EventLogger: [ ] Track:0, id=English, mimeType=audio/ac3, channels=6, sample_rate=48000, language=en, supported=YES 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.713 14114 14114 D EventLogger: Renderer:4 [ 08-13 18:04:25.713 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [ 08-13 18:04:25.713 14114 14114 D EventLogger: [ ] Track:0, id=1/8219, mimeType=application/cea-608, supported=YES 08-13 18:04:25.713 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: Group:1, adaptive_supported=N/A [ 08-13 18:04:25.714 14114 14114 D EventLogger: [X] Track:0, id=Français, mimeType=text/vtt, language=fr, supported=YES 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: Renderer:5 [ 08-13 18:04:25.714 14114 14114 D EventLogger: Group:0, adaptive_supported=N/A [ 08-13 18:04:25.714 14114 14114 D EventLogger: [X] Track:0, id=1/21, mimeType=application/id3, supported=YES 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: Group:1, adaptive_supported=N/A [ 08-13 18:04:25.714 14114 14114 D EventLogger: [ ] Track:0, id=1/21, mimeType=application/id3, supported=YES 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: Group:2, adaptive_supported=N/A [ 08-13 18:04:25.714 14114 14114 D EventLogger: [ ] Track:0, id=1/21, mimeType=application/id3, supported=YES 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.714 14114 14114 D EventLogger: ] 08-13 18:04:25.727 4066 4610 I MediaPlayerService: MediaPlayerService::getOMX 08-13 18:04:25.728 14114 15512 I OMXClient: MuxOMX ctor 08-13 18:04:25.732 4063 4063 I OMXMaster: makeComponentInstance(OMX.amlogic.avc.decoder.awesome) in mediacodec process 08-13 18:04:25.733 4063 4063 D OmxComponentManagerImpl: support frame mode 08-13 18:04:25.733 4063 4063 D OmxComponentManagerImpl: getEntryByName_2_num=0, componentName:OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.733 4063 4063 V AmlogicVideoDecoderAwesome: AmlogicVideoDecoder:72 > 08-13 18:04:25.733 4063 4063 V AmlogicVideoDecoderAwesome: initializeState_l:1102 > 08-13 18:04:25.733 4063 4063 V AmlogicVideoDecoderAwesome: media.omx.latency is not set used def=1.000000 08-13 18:04:25.733 4063 4063 D AmlogicVideoDecoderAwesome: mCheckDvesDone = 1, mForceOpenDv=0 08-13 18:04:25.733 4063 4063 W OmxLogConf: Can not read property media.omx.log_levels, using 0 08-13 18:04:25.734 4063 4063 D OmxVideoDecoder: multi dec exist 08-13 18:04:25.734 4063 4063 D OmxVideoDecoder: Use frame mode for multidec. 08-13 18:04:25.734 4063 4063 D OmxVideoDecoder: Use min out buffer size 08-13 18:04:25.734 4063 4063 D OmxComponentManagerImpl: IncreaseEntryNumByName pEntry->mNum=0, pEntry->mMaxNum:9,componentName:OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.734 4063 4063 I omx_core: OMX_getHandle_num=1 08-13 18:04:25.734 4063 4063 D OmxComponent: mApkName=/proc/14114/cmdline 08-13 18:04:25.743 14114 15511 I MediaCodec: [OMX.amlogic.avc.decoder.awesome] setting surface generation to 14452739 08-13 18:04:25.744 4063 4074 D OmxVideoDecoder: setParameter 631 0x1000017 08-13 18:04:25.745 14114 15512 D ACodec_amlogic: query systemComposer 1 08-13 18:04:25.745 4063 5179 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeANWBufferInMetadata" 08-13 18:04:25.746 4063 5179 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeMetaDataInBuffers" 08-13 18:04:25.746 4063 5179 D OmxVideoDecoder: setParameter 631 0x7f000002 08-13 18:04:25.746 4063 5179 D OmxVideoDecoder: setParameter 1054 OMX_IndexAndroidStoreMetadataInBuffers 08-13 18:04:25.746 4063 5179 E OMXNodeInstance: setParameter(fdf0083:amlogic.avc.decoder.awesome, OMX.google.android.index.storeMetaDataInBuffers(0x7f000002): Output:1 en=1 type=1) ERROR: BadPortIndex(0x8000101b) 08-13 18:04:25.746 14114 15512 E ACodec : [OMX.amlogic.avc.decoder.awesome] storeMetaDataInBuffers failed w/ err -2147483648 08-13 18:04:25.751 4063 5135 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.prepareForAdaptivePlayback" 08-13 18:04:25.751 4063 5135 D OmxVideoDecoder: setParameter 631 0x7f000004 08-13 18:04:25.751 4063 5135 D OmxVideoDecoder: setParameter 1068 OMX_IndexAndroidPrepareForAdaptivePlayback 08-13 18:04:25.751 4063 5135 D OmxVideoDecoder: AdaptivePlayback: max resolution is 1280 * 720 08-13 18:04:25.752 4063 4522 D OmxVideoDecoder: setParameter 631 0x6000001 08-13 18:04:25.752 4063 4522 D OmxVideoDecoder: setParameter nPortIndex 0 CompFmt 0x7 ColorFmt 0 08-13 18:04:25.756 4063 5150 D OmxVideoDecoder: setParameter 631 0x6000001 08-13 18:04:25.756 4063 5150 D OmxVideoDecoder: setParameter nPortIndex 1 CompFmt 0 ColorFmt 0x15 08-13 18:04:25.759 4063 13475 D OmxVideoDecoder: setParameter 631 0x2000001 08-13 18:04:25.759 4063 13475 D OmxVideoDecoder: newBufferCount = 3, outWidth=1280, outHeight=720 08-13 18:04:25.759 4063 13475 D OmxVideoDecoder: setParameter nPortIndex 0 nFrameWidth 1280 nFrameHeight 720 nSliceHeight 16 08-13 18:04:25.761 4063 4063 V OmxVideoDecoder: mUseNativeBuffers 0 08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: setParameter 631 0x2000001 08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: newBufferCount = 4, outWidth=1280, outHeight=720 08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: setParameter mUseNativeBuffers=0 08-13 18:04:25.762 4063 5179 W OmxVideoDecoder: Can not read property media.omx.display_mode 08-13 18:04:25.762 4063 5179 D OmxVideoDecoder: setParameter nPortIndex 1 nFrameWidth 1280 nFrameHeight 720 nSliceHeight 720 08-13 18:04:25.762 4063 5179 V OmxVideoDecoder: mUseNativeBuffers 0 08-13 18:04:25.763 4063 5135 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.describeColorAspects" 08-13 18:04:25.763 4063 4546 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.describeHDRStaticInfo" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeMetaDataInBuffers" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.storeANWBufferInMetadata" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.prepareForAdaptivePlayback" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.configureVideoTunnelMode" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.enableAndroidNativeBuffers" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.allocateNativeHandle" 08-13 18:04:25.764 4063 5114 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.getAndroidNativeBufferUsage" 08-13 18:04:25.765 4063 5114 D OmxVideoDecoder: setConfig 1376 0x7f000009 08-13 18:04:25.765 4063 5114 D OmxVideoDecoder: HDRStaticInfo: R=0 0; G=0 0; B=0 0; W=0 0; MaxDisplayLuminance:0, MinDisplayLuminance=0, mMaxContentLightLevel=0, MaxContentLightLevel=0 08-13 18:04:25.765 4063 5114 D OmxVideoDecoder: HDRStaticInfo: all parmeter is 0, set mHasHDRStaticInfo to false 08-13 18:04:25.766 4063 4522 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.enableAndroidNativeBuffers" 08-13 18:04:25.766 4063 4522 D OmxVideoDecoder: setParameter 631 0x7f000000 08-13 18:04:25.766 4063 4522 V OmxVideoDecoder: setParameter 1048 EnableNativeBuffers 1 08-13 18:04:25.766 4063 4522 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.766 4063 4522 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.766 4063 4522 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.770 4063 5134 D OmxVideoDecoder: setConfig 1376 0x6f800002 08-13 18:04:25.770 4063 5134 V OmxVideoDecoder: setConfig 1448 nIndex 0x6f800002 08-13 18:04:25.770 4063 5134 D OmxComponent: setConfig 1092 08-13 18:04:25.770 4063 5134 E OMXNodeInstance: setConfig(fdf0083:amlogic.avc.decoder.awesome, ConfigPriority(0x6f800002)) ERROR: UnsupportedIndex(0x8000101a) 08-13 18:04:25.771 14114 15512 I ACodec : codec does not support config priority (err -1010) 08-13 18:04:25.774 4063 13475 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.775 4063 13475 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.775 4063 13475 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.776 4063 5150 D OmxVideoDecoder: getConfig 1300 0x700000f 08-13 18:04:25.776 4063 5150 D OmxVideoDecoder: getConfig 1303 nIndex 0x700000f 08-13 18:04:25.776 4063 5150 D OmxVideoDecoder: getConfig OMX_IndexConfigCommonOutputCrop pRect->nWidth=1280, pRect->nHeight=720 08-13 18:04:25.777 4063 5179 D OmxVideoDecoder: getConfig 1300 0x7f000009 08-13 18:04:25.781 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x2 08-13 18:04:25.781 4063 15513 I OmxComponent: STATE_SET: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.781 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.785 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.785 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.786 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.787 4063 5133 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.787 4063 5133 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.787 4063 5133 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.788 4063 5134 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.788 4063 5134 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.789 4063 5134 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.789 4063 4063 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.getAndroidNativeBufferUsage" 08-13 18:04:25.794 14114 15512 D SurfaceUtils: set up nativeWindow 0xc1acd808 for 1280x720, color 0x11, rotation 0, usage 0x2002900 08-13 18:04:25.796 4063 5150 D OmxVideoDecoder: setParameter 631 0x2000001 08-13 18:04:25.796 4063 5150 D OmxVideoDecoder: newBufferCount = 8, outWidth=1280, outHeight=720 08-13 18:04:25.797 4063 5150 E OmxVideoDecoder: set output error, new BufferCountActual = 8 08-13 18:04:25.797 4063 5150 E OMXNodeInstance: setParameter(fdf0083:amlogic.avc.decoder.awesome, ParamPortDefinition(0x2000001)) ERROR: UnsupportedSetting(0x80001019) 08-13 18:04:25.797 14114 15512 W ACodec : [OMX.amlogic.avc.decoder.awesome] setting nBufferCountActual to 8 failed: -1010 08-13 18:04:25.798 4063 5179 D OmxVideoDecoder: setParameter 631 0x2000001 08-13 18:04:25.798 4063 5179 D OmxVideoDecoder: newBufferCount = 7, outWidth=1280, outHeight=720 08-13 18:04:25.798 4063 5179 E OmxVideoDecoder: set output error, new BufferCountActual = 7 08-13 18:04:25.798 4063 5179 E OMXNodeInstance: setParameter(fdf0083:amlogic.avc.decoder.awesome, ParamPortDefinition(0x2000001)) ERROR: UnsupportedSetting(0x80001019) 08-13 18:04:25.799 14114 15512 W ACodec : [OMX.amlogic.avc.decoder.awesome] setting nBufferCountActual to 7 failed: -1010 08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: setParameter 631 0x2000001 08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: newBufferCount = 6, outWidth=1280, outHeight=720 08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: setParameter mUseNativeBuffers=1 08-13 18:04:25.799 4063 4546 W OmxVideoDecoder: Can not read property media.omx.display_mode 08-13 18:04:25.799 4063 4546 D OmxVideoDecoder: setParameter nPortIndex 1 nFrameWidth 1280 nFrameHeight 720 nSliceHeight 720 08-13 18:04:25.799 4063 4546 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.799 4063 4546 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.800 4063 4546 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.801 4045 4431 E ion : ioctl c0144900 failed with code -1: Out of memory 08-13 18:04:25.809 4063 4074 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.809 4063 4074 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.809 4063 4074 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.810 4063 4074 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.810 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.811 4045 4368 E ion : ioctl c0144900 failed with code -1: Out of memory 08-13 18:04:25.817 4063 4522 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.817 4063 4522 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.817 4063 4522 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.817 4063 4522 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.818 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.818 4045 4369 E ion : ioctl c0144900 failed with code -1: Out of memory 08-13 18:04:25.826 4063 5133 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.826 4063 5133 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.826 4063 5133 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.826 4063 5133 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.826 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.827 4045 4369 E ion : ioctl c0144900 failed with code -1: Out of memory 08-13 18:04:25.831 4063 13475 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.831 4063 13475 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.831 4063 13475 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.831 4063 13475 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.831 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.832 4045 4369 E ion : ioctl c0144900 failed with code -1: Out of memory 08-13 18:04:25.845 4063 5135 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.845 4063 5135 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.845 4063 5135 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.845 4063 5135 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.845 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.846 4045 4368 E ion : ioctl c0144900 failed with code -1: Out of memory 08-13 18:04:25.861 4063 5134 D OmxComponent: getExtensionIndex 1099 name="OMX.google.android.index.useAndroidNativeBuffer2" 08-13 18:04:25.861 4063 5134 V OmxVideoDecoder: mUseNativeBuffers 1 08-13 18:04:25.861 4063 5134 D AmlogicVideoDecoderAwesome: get native buffer info NV:w:1280,h:720.. 08-13 18:04:25.861 4063 5134 V OmxVideoDecoder: updatePort:portDef.format.video.nFrameWidth=1280,portDef.format.video.nFrameHeight=720 08-13 18:04:25.861 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.861 4063 15513 V AmlogicVideoDecoderAwesome: acquireResources:276 > 08-13 18:04:25.861 4063 15513 D AmlogicVideoDecoderAwesome: setUp mVideoDisplay =0, mDisplayMode=0 08-13 18:04:25.861 4063 15513 V AmlogicVideoDecoderAwesome: enable osd or video ...0 08-13 18:04:25.861 4063 15513 D AmlogicVideoDecoderAwesome: mDoubleWriteMode 16 08-13 18:04:25.861 4063 15513 V AmlogicVideoDecoderAwesome: get video layer sync version error, ret =-1 08-13 18:04:25.862 4063 15513 I AmlogicVideoDecoderAwesome: video layer sync version is 1 08-13 18:04:25.862 4063 15513 V debugSetup: media.omx.dumpRecv is disabled 08-13 18:04:25.862 4063 15513 V debugSetup: media.omx.dumpCodec is disabled 08-13 18:04:25.862 4063 15513 V AmlogicVideoDecoderAwesome: *Input Frame Rate is 0.. 08-13 18:04:25.862 4063 15513 V AmlogicVideoDecoderAwesome: videoDefine.xFramerate:0
08-13 18:04:25.862 4063 15513 D AmlogicVideoDecoderAwesome: decoder_type = 1 08-13 18:04:25.862 4063 15513 D AmlogicVideoDecoderAwesome: AmlogicVideoDecoder::setUp, mUseFrameMode 1, video_path 0 08-13 18:04:25.862 4063 15513 D AmlogicVideoDecoderAwesome: alloc ION Video device instance ID:0 08-13 18:04:25.869 14114 14114 D EventLogger: videoDecoderInitialized [479.10, OMX.amlogic.avc.decoder.awesome] 08-13 18:04:25.872 14114 14114 D EventLogger: videoFormatChanged [479.10, id=1/27, mimeType=video/avc, res=1280x720] 08-13 18:04:25.884 4066 8305 I MediaPlayerService: MediaPlayerService::getOMX 08-13 18:04:25.888 14114 15517 I OMXClient: MuxOMX ctor 08-13 18:04:25.893 4063 15513 V AmlogicVideoDecoderAwesome: mFlvFlag=0 08-13 18:04:25.893 4063 15513 V AmlogicVideoDecoderAwesome: mOutBufferCount =6 08-13 18:04:25.893 4063 15513 V AmlogicVideoDecoderAwesome: mIsNativeBuffers =1 08-13 18:04:25.893 4063 15513 D AmlogicVideoDecoderAwesome: mAmvideoDev->use_frame_mode=0 08-13 18:04:25.893 4063 15513 D AmlogicVideoDecoderAwesome: mAmvideoDev->use_frame_mode=1, mUseFrameMode=1 08-13 18:04:25.894 4063 15513 I amvdec : amvideo_init ret=0 08-13 18:04:25.894 4063 15513 D AmlogicVideoDecoderAwesome: output buffer:mWidth:1280, mHeight:720, mVideoDevId:0 08-13 18:04:25.895 4063 15513 I OmxComponent: STATE_DONE: OMX_StateLoaded => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.899 4063 5150 I OMXMaster: makeComponentInstance(OMX.google.raw.decoder) in mediacodec process 08-13 18:04:25.903 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x3 08-13 18:04:25.903 4063 15513 I OmxComponent: STATE_SET: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.903 4063 15513 V AmlogicVideoDecoderAwesome: prepare:212 > 08-13 18:04:25.903 4063 15513 D AmlogicVideoDecoderAwesome: mVideo mDisplayTread start 08-13 18:04:25.903 4063 15513 D AmlogicVideoDecoderAwesome: mDTaskStatus=0 08-13 18:04:25.904 4063 15513 V AmlogicVideoDecoderAwesome: start:225 > 08-13 18:04:25.905 4063 15513 D AmlogicVideoDecoderAwesome: mVideo start 08-13 18:04:25.905 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.905 4063 15513 I OmxComponent: STATE_DONE: OMX_StateIdle => OMX_StateExecuting : OMX.amlogic.avc.decoder.awesome 08-13 18:04:25.907 4063 15522 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorkerStatic:152 -------------------- 08-13 18:04:25.907 4063 15522 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorker:158 -------------------- 08-13 18:04:25.914 4063 15522 V AmlogicVideoDecoderAwesome: doCodecSpec csd_len=31 08-13 18:04:25.916 4063 15522 V AmlogicVideoDecoderAwesome: doCodecSpec csd_len=10 08-13 18:04:25.918 4063 4074 E OMXNodeInstance: setConfig(fdf0084:google.raw.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001) 08-13 18:04:25.919 14114 15517 I ACodec : codec does not support config priority (err -2147483648) 08-13 18:04:25.939 14114 14114 D EventLogger: audioDecoderInitialized [479.17, OMX.google.raw.decoder] 08-13 18:04:25.940 14114 14114 D EventLogger: audioFormatChanged [479.17, id=1/129, mimeType=audio/ac3, channels=6, sample_rate=48000] 08-13 18:04:25.955 4063 15522 D AmlogicVideoDecoderAwesome: =7, =1280, =720, =1280, =720, =83433, =250433, =166433, =995, =47, =44 08-13 18:04:25.998 4057 4645 W APM_AudioPolicyManager: getOutput() could not find output for stream 3, samplingRate 48000,format 150994944, channels 3f, flags 1 08-13 18:04:25.999 14114 14299 E AudioTrack: Could not get audio output for session 601, stream type -1, usage 1, sample rate 48000, format 0x9000000, channel mask 0x3f, flags 0x1 08-13 18:04:26.000 14114 14299 E AudioTrack-JNI: Error -22 initializing AudioTrack 08-13 18:04:26.001 14114 14299 E android.media.AudioTrack: Error code -20 when initializing AudioTrack. 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: Playback error. 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:535) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1088) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:573) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:98) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:154) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:61) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: Caused by: com.google.android.exoplayer2.audio.AudioSink$InitializationException: AudioTrack init failed: 0, Config(48000, 252, 20480) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.DefaultAudioSink.initializeAudioTrack(DefaultAudioSink.java:1130) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.DefaultAudioSink.initialize(DefaultAudioSink.java:561) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:617) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:529) 08-13 18:04:26.005 14114 14299 E ExoPlayerImplInternal: ... 7 more 08-13 18:04:26.008 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x2 08-13 18:04:26.008 4063 15513 I OmxComponent: STATE_SET: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.008 4063 15513 I OmxComponent: OMX.amlogic.avc.decoder.awesome: flush input 08-13 18:04:26.008 4063 15513 V AmlogicVideoDecoderAwesome: flushInput:690 > 08-13 18:04:26.008 4063 15513 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:flushInput:56 -------------------- 08-13 18:04:26.008 4063 15513 V AmlogicVideoDecoderAwesome: pause:217 > 08-13 18:04:26.012 4063 15513 V AmlogicVideoDecoderAwesome: reset:257 > 08-13 18:04:26.012 4063 15513 D AmlogicVideoDecoderAwesome: reset_1 08-13 18:04:26.013 4063 15513 I amcodec : AMSTREAM_SET_OMX_RUNNING ret=0 08-13 18:04:26.167 4063 15513 I amcodec : [codec_reset:1075]ret=0 08-13 18:04:26.168 4063 15513 D AmlogicVideoDecoderAwesome: reset_2 08-13 18:04:26.170 4063 15513 D AmlogicVideoDecoderAwesome: mDTaskStatus=1 08-13 18:04:26.172 4063 15513 V AmlogicVideoDecoderAwesome: start:225 > 08-13 18:04:26.172 4063 15513 E ThreadWorker: pthread on exit wait clean 08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: mVideo start 08-13 18:04:26.174 4063 15513 V AmlogicVideoDecoderAwesome: flushInput:715 > 08-13 18:04:26.174 4063 15513 I OmxComponent: OMX.amlogic.avc.decoder.awesome: flush output 08-13 18:04:26.174 4063 15513 V AmlogicVideoDecoderAwesome: flushOutput:718 > 08-13 18:04:26.174 4063 15526 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorkerStatic:152 -------------------- 08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThreadflushOutputfillBufferDone 08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThreadflushOutputfillBufferDone 08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThreadflushOutputfillBufferDone 08-13 18:04:26.174 4063 15513 D AmlogicVideoDecoderAwesome: displayThreadflushOutputfillBufferDone 08-13 18:04:26.174 4063 15526 V OMX_WorkerPeer: hardware/amlogic/omx/omx_framework/WorkerPeer.cpp:runWorker:158 -------------------- 08-13 18:04:26.183 4063 15513 V AmlogicVideoDecoderAwesome: flushOutput:771 > 08-13 18:04:26.183 4063 15513 D AmlogicVideoDecoderAwesome: mVideo stop 08-13 18:04:26.185 4063 15513 V AmlogicVideoDecoderAwesome: stop:247 > 08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.187 4063 15513 I OmxComponent: STATE_DONE: OMX_StateExecuting => OMX_StateIdle : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.189 4063 15513 I OmxComponent: OMX_CommandStateSet 716 Cmd 0 nParam1 0x1 08-13 18:04:26.189 4063 15513 I OmxComponent: STATE_SET: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: releaseResources:290 > 08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: tearDown:596 > 08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: tearDown:1050 > 08-13 18:04:26.189 4063 15513 V AmlogicVideoDecoderAwesome: initializeState_l:1102 > 08-13 18:04:26.201 4063 15513 D AmlogicVideoDecoderAwesome: free ION Video device instance ID:0 08-13 18:04:26.202 4063 15513 V AmlogicVideoDecoderAwesome: get def maping [decoder ppmgr deinterlace amvideo] 08-13 18:04:26.202 4063 15513 V AmlogicVideoDecoderAwesome: disable osd video ...0 08-13 18:04:26.202 4063 15513 I OmxComponent: STATE_TRANS: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.202 4063 15513 I OmxComponent: STATE_DONE: OMX_StateIdle => OMX_StateLoaded : OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.214 4063 5133 D OmxComponentManagerImpl: DecreaseEntryNumByName pEntry->mNum=1, pEntry->mMaxNum:9,componentName:OMX.amlogic.avc.decoder.awesome 08-13 18:04:26.214 4063 5133 I omx_core: OMX_freeHandlenum= 0 08-13 18:04:26.215 4063 5133 D AmlogicVideoDecoderAwesome: ~AmlogicVideoDecoderAwesome 08-13 18:04:26.216 4063 5133 D AmlogicVideoDecoderAwesome: ~AmlogicVideoDecoder 08-13 18:04:26.228 14114 14114 D EventLogger: videoDisabled [479.46] 08-13 18:04:26.253 14114 14114 D EventLogger: audioDisabled [479.48] 08-13 18:04:26.276 14114 14114 E EventLogger: playerFailed [479.51] 08-13 18:04:26.276 14114 14114 E EventLogger: com.google.android.exoplayer2.ExoPlaybackException 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:535) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1088) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:573) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301) 08-13 18:04:26.276 14114 14114 E EventLogger: at android.os.Handler.dispatchMessage(Handler.java:98) 08-13 18:04:26.276 14114 14114 E EventLogger: at android.os.Looper.loop(Looper.java:154) 08-13 18:04:26.276 14114 14114 E EventLogger: at android.os.HandlerThread.run(HandlerThread.java:61) 08-13 18:04:26.276 14114 14114 E EventLogger: Caused by: com.google.android.exoplayer2.audio.AudioSink$InitializationException: AudioTrack init failed: 0, Config(48000, 252, 20480) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.DefaultAudioSink.initializeAudioTrack(DefaultAudioSink.java:1130) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.DefaultAudioSink.initialize(DefaultAudioSink.java:561) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:617) 08-13 18:04:26.276 14114 14114 E EventLogger: at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:529) 08-13 18:04:26.276 14114 14114 E EventLogger: ... 7 more 08-13 18:04:26.277 14114 14114 D EventLogger: loading [false] 08-13 18:04:26.289 14114 14114 D EventLogger: state [479.52, true,

eliezedeck commented 5 years ago

Have you found a reason why it happens? I'm using a different project (https://github.com/hajimehoshi/oto/issues/84), and I'm getting the same error message Error -12 initializing AudioTrack. Thanks for the update.

dturner commented 4 years ago

What device model and Android build are you testing on? Also, please provide the steps to reproduce.

reid-mcpherson commented 4 years ago

I am also experience this error as well using ExoPlayer and a Pixel first gen. I'm unable to reproduce on newer devices.

dturner commented 4 years ago

There are 2 different errors being reported on this issue. The original one was:

AudioTrack-JNI: Error -22 initializing AudioTrack

and another one is:

E/AudioTrack-JNI(23057): Error -12 initializing AudioTrack

The 2nd one seems to be associated with a problem on the emulator and I'm going to assume is unrelated.

So, back to the first issue. Does this issue occur with the ExoPlayer codelab media files (below for reference)? If so, which one?

<string name="media_url_mp3">https://storage.googleapis.com/exoplayer-test-media-0/Jazz_In_Paris.mp3</string>
  <!-- Big Buck Bunny video provided by the Blender Foundation.
  (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org -->
  <string name="media_url_mp4">https://storage.googleapis.com/exoplayer-test-media-0/BigBuckBunny_320x180.mp4</string>
  <string name="media_url_dash"><![CDATA[https://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0]]></string>
dturner commented 3 years ago

Closing due to inactivity. Please open a new issue if you're still experiencing problems.