Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface view returns empty output buffers #581

Closed
janegrytsenko opened this issue Jun 25, 2015 · 9 comments
Closed

Surface view returns empty output buffers #581

janegrytsenko opened this issue Jun 25, 2015 · 9 comments

Comments

@janegrytsenko
Copy link

Hi! I try to run demo app on my device and have this problem: codec.getOutputBuffers() returns buffer array with zero capacity of each element. And then dequeueOutputBuffer always returns -1. But if I put on configureCodec null instead of surface, capacity and limit parameters are set in output buffers. What problem may be?

@ojw28
Copy link
Contributor

ojw28 commented Jun 25, 2015

To clarify, does the demo app work on your device, or not? What device is it exactly, and what version of Android is it running?

@janegrytsenko
Copy link
Author

Almost not. Now I need mp4 playback, so demo app works if I use software decoder (OMX.google...) and it plays dizzy demo sample. If I try to play my own mp4 video, then exo player doesn't playback it. I wrote about my problem at #561. Also I've notised, that surface returns empty output buffers with this codec (if use surface with software codec, then buffers aew not sero-length). My test android version - 4.2.2, device is hd recever. I don't know if it Android CTS, but native Android Media Player plays all my mp4 videos well.
Would it be problem with hw codec? (decoder - OMX.amlogic.avc.decoder.awesome). Or it is problem with surface?
If I use surface as output, then codec has 8 input buffers and 4 outputs (as example of another my test android device - output buffers size 23, input - 4; output size always bigger). Is it important? Can you help me, plaese?

@ojw28
Copy link
Contributor

ojw28 commented Jun 26, 2015

Sounds like a bad device. What is the device model exactly? If you capture a bugreport with "adb bugreport" then it should provide a build fingerprint at the top of the file that includes the device model and exact OS build running on it.

If the device is bad and it hasn't gone through CTS, then it's a problem that the hardware vendor needs to resolve, and you should report the issue to them.

@janegrytsenko
Copy link
Author

I've run bugreport command and have received at the top of file:

Build: g18ref-usr 4.2.2 JDQ39 20150428 test-keys
Build fingerprint: 'MBX/g18ref/g18ref:4.2.2/JDQ39/20150428:usr/test-keys'
Bootloader: unknown
Radio: unknown
Network: (unknown)
Kernel: Linux version 3.0.50 (d52lz@fulan-ubuntu12) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) # 3 SMP PREEMPT Tue Apr 28 16:28:54 CST 2015

@janegrytsenko
Copy link
Author

I'm confused that standard Media Player plays all my mp4 files well.

@ojw28
Copy link
Contributor

ojw28 commented Jun 26, 2015

As far as I'm aware this device has not passed CTS. Please let me know if you think differently. Note that it's possible for you to download and run CTS yourself on the device to see if it passes:

https://source.android.com/compatibility/cts/index.html

MediaPlayer is a different platform API than the ones that ExoPlayer makes use of. It's possible that the device manufacturer has implemented that API correctly, but not MediaCodec, which is what ExoPlayer relies on.

@janegrytsenko
Copy link
Author

Ok, thnk you, I'll try to run tests. But could you say me, what problems may be with surface or mediacodec, that I receive empty output buffers?

@ojw28
Copy link
Contributor

ojw28 commented Jun 26, 2015

The problem is likely just that the device hasn't implemented the platform APIs correctly. In which case it's not a problem with the application level code.

@janegrytsenko
Copy link
Author

Thank you very much for your response!

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants