For one of my app which saves camera preview to a buffer, I am using the function Mediacodec.createInputSurface() and everything works fine as I was using API 19 and above. Now I want the same code to work for api 17 and below as well for some other devices where this api does not exist. Can someone help me by telling what alternative I can use?
here is a piece of my code:
private Surface mInputSurface;
private MediaCodec mEncoder;
mInputSurface = mEncoder.createInputSurface();
Thanks for any help.