I have written an android app that streams h.264 frames from a mobile-dvr/nvr and the solution works on all of the devices that I have tested on except for the Nexus 10. It successfully streams video on galaxy devices, the Nexus 7, and multiple Motorola devices without any problems. No exceptions are thrown and the log shows nothing strange, but when debugging
MediaCodec.dequeueInputBuffer(10000);
always returns -1, thus never supplying a valid input buffer index to send a frame to. I assume that I am configuring the MediaCodec properly considering it works on all other devices that have been tested. Has anyone else had an issue similar to this and if so is there a known fix or reason for this problem with the Nexus 10?
public void ConfigureDecoder(Surface s, int w, int h)
{
try
{
Decoder = MediaCodec.createDecoderByType("video/avc");
MediaFormat mFormat = MediaFormat.createVideoFormat("video/avc", w, h);
Decoder.configure(mFormat, s, null, 0);
}
catch (Exception e)
{
e.printStackTrace();
}
}