I have created surface in android Java and mentioned its width and height as below.
I'm rendering from native to the surface.
My decoded video dimension is w x h (less than surface layout size). When i render the yuv frames in native, video is filled complete area of the surface (video is stretched). I want to control the rendering area (it must be w x h). I tried with native_window_set_buffers_geometry and native_window_set_crop APIs. But still video is rendered will full area of surface.
I have used NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW option.
Please help me.