Implementación de ejemplo de códec de medios en Android 4.1

I am trying to display video buffers on an android. I am using the media codec API released in Android 4.1 Jelly Bean.

The sample goes like this:

 MediaCodec codec = MediaCodec.createDecoderByType(type);
 codec.configure(format, ...);

configure method accepts 3 other arguments, apart from MediaFormat. I have been able to figure out MediaFormat somehow but I am not sure about the other 3 parameters. (below).

 MediaSurface, MediaCrypto and Flags. 

¿Alguna pista?

Also, what should I do with the MediaCrypto argument, if I am not encrypting my video buffers.


1) Decode the buffers on the android device, 
2) Display them on the screen. 

preguntado el 24 de agosto de 12 a las 06:08

Have a look at the example provided in the answer to my question [here][1]. [1]:… -

2 Respuestas

Respondido el 15 de Septiembre de 12 a las 10:09

It is usually helpful to include important/useful points from the linked posting in your answer so that your answer actually has some value on its own, particularly if that link stops working. - Nbrooks

Solo para completar:

To decode -

MediaSurface is the surface to render the frame to ( or null if not rendering )

MediaCrypto should be null if the is no encryption

banderas == 0 if decoding or MediaCodec.CONFIGURE_FLAG_ENCODE if encoding

Respondido 05 Oct 12, 03:10

how to get crypto scheme UUID? - Zyoo

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.