DJI-Mobile-SDK-Tutorials / Android-VideoStreamDecodingSample

This sample project demonstrates how to use FFmpeg for video frame parsing and to use MediaCodec for hardware decoding on DJI Products.
MIT License
169 stars 80 forks source link

Demo custom decoder #41

Open YangShengLiQQ opened 5 years ago

YangShengLiQQ commented 5 years ago

I ran the sample code and clicked demo custom decoder button. I found if I connected the remote control through the wifi, It worked well. However, If I connected the remote control through the USB line, and clicked demo custom decoder button, the screen was black. It didn't receive the video data because I didn't find Log.d(TAG, "camera recv video data size: " + size) in logcat. If I tried other buttons like Demo SurfaceView and Demo TextureView and connected the remote control through the USB line, They worked well. I also tried other cellphone to test it, and the result was the same.

Michael-DJI commented 5 years ago

which drone?

YangShengLiQQ commented 5 years ago

spark

YangShengLiQQ commented 5 years ago

I ran the lastest version sample code, and it worked well. My project use older SDK(4.5.1). If I use the latest SDK, the problem will be solved? Or just change some code?

Michael-DJI commented 5 years ago

in 4.7, decoding sample use data get from provideTranscodedVideoFeed() to feed into the custom decoder, could u explain what's your feature?

oscarmore2 commented 5 years ago

But TranscodedVideoFeed() was never called when in USB connection with Mavic Pro and Mavic 2. My sdk version is 4.8.1.

neilyoung commented 5 years ago

Here initCodec() immediately returns, since width and height are 0.

If I fake a w/h it is stuck a bit later

W/ACodec: [OMX.qcom.video.decoder.avc] does not support color format 2130708361

What a mess...