解码
Completedval inputBufferIndex = decoder?.dequeueInputBuffer(TIMEOUT_US.toLong()) ?: return
if (inputBufferIndex >= 0) {
val inputBuffer = decoder?.getInputBuffer(inputBufferIndex) ?: return
val presentationTimeUs = extractor.sampleTime
inputBuffer.clear()
inputBuffer.put(h265Data)
decoder?.queueInputBuffer(inputBufferIndex, 0, h265Data.size, 0, 0)
}
val bufferInfo = MediaCodec.BufferInfo()
var outputBufferIndex = decoder?.dequeueOutputBuffer(bufferInfo, TIMEOUT_US.toLong()) ?: return
if(outputBufferIndex >= 0) {
decoder?.releaseOutputBuffer(outputBufferIndex, true)
}
我这样解码监听器中的h.265数据一直app闪退而且没有画面,可以帮忙看一下吗?
其中h265Data是ivideoframe中的data
-
2023-07-02 12:36:31.513 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/PerceptionManager: (co_a:5) updatePerceptionDelegate
2023-07-02 12:36:32.160 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.161 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.162 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) Failure getting key mKeyInfo:DJIKeyInfo{componentType=4, subComponentType=65534, converter=dji.sdk.keyvalue.converter.SingleValueConverter@6076689, canGet=true, canSet=false, canListen=false, canPerformAction=false, mIsEvent=false, identifier='FirmwareVersion'} mProductId:0 mComponentType:4 mComponentIndex:0 mSubComponentType:65534 mSubComponentIndex:65534. ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.163 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) Failure getting key mKeyInfo:DJIKeyInfo{componentType=4, subComponentType=65534, converter=dji.sdk.keyvalue.converter.SingleValueConverter@6076689, canGet=true, canSet=false, canListen=true, canPerformAction=false, mIsEvent=false, identifier='SerialNumber'} mProductId:0 mComponentType:4 mComponentIndex:0 mSubComponentType:65534 mSubComponentIndex:65534. ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.163 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (co_a:27) io.reactivex.rxjava3.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | RxError{djiError=ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}}
2023-07-02 12:36:32.163 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.164 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.169 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) Failure getting key mKeyInfo:DJIKeyInfo{componentType=4, subComponentType=65534, converter=dji.sdk.keyvalue.converter.SingleValueConverter@6076689, canGet=true, canSet=false, canListen=false, canPerformAction=false, mIsEvent=false, identifier='FirmwareVersion'} mProductId:0 mComponentType:4 mComponentIndex:0 mSubComponentType:65534 mSubComponentIndex:65534. ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.171 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) Failure getting key mKeyInfo:DJIKeyInfo{componentType=4, subComponentType=65534, converter=dji.sdk.keyvalue.converter.SingleValueConverter@6076689, canGet=true, canSet=false, canListen=true, canPerformAction=false, mIsEvent=false, identifier='SerialNumber'} mProductId:0 mComponentType:4 mComponentIndex:0 mSubComponentType:65534 mSubComponentIndex:65534. ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}
2023-07-02 12:36:32.171 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (co_a:27) io.reactivex.rxjava3.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | RxError{djiError=ErrorImp{errorType='CORE', errorCode='REQUEST_TIMEOUT', innerCode='', description='null', hint='error code = -3'}}
2023-07-02 12:36:32.259 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
2023-07-02 12:36:32.260 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
2023-07-02 12:36:32.260 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
2023-07-02 12:36:32.260 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
2023-07-02 12:36:32.328 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventNeverTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
2023-07-02 12:36:32.329 4398-4398/com.dji.sampleV5.aircraft E/DJIV5/RXUtil: (onFailure:1) SdrLostPreventHasTakeoffEnable-onFailure true ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='', description='null', hint='error code = -1'}
Please sign in to leave a comment.
Comments
4 comments