android - MediaFormat required for Mediacodec -



android - MediaFormat required for Mediacodec -

i trying decode h264 file using media codec. not straight supported android, configuring own decoder. i've attempted follow.

codec = mediacodec.createdecoderbytype("video/avc"); format.createvideoformat("video/avc", /*640*/320, /*480*/240); seek { codec.configure(format, null, null,0); } catch(exception codec) { log.i(tag,"codec_configure " +codec.getmessage()); } //codec.start(); codec.getinputbuffers(); codec.getoutputbuffers(); inputbuffers = codec.getinputbuffers(); outputbuffers = codec.getoutputbuffers();

i getting nullpointerexception @ format.creatvideoformat() , illegalstateexception @ codec.start()

could help me prepare it?

i sense createvideoformat

format = mediaformat::createvideoformat("video/avc", /*640*/320, /*480*/240);

android h.264 android-4.2-jelly-bean decoder

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -