encoding from surface This is a function after api 18. Next, try to render the phone camera preview to the Input Surface. Then encode the Surface.
First, the Surface is created by MediaCodec:
Tag: surface
ex2_2 different presentation of a surface in 3D
% ex2_2.m% Chapter 2: Optimization with Matlab% Dr. P.Venkataraman % Example 2 Sec.2.3%% graphical solution using matlab (two design variables)% Unconstrained function illustrating global minimum%