最近在研究vlc显示画面的问题,通过查阅资料发现有3个相关的接口:
1、getMediaPlayer().getVLCVout().setWindowSize(wsur, hour); 设置画面显示的窗口大小;
2、getMediaPlayer().setAspectRatio(wsur+":"+hsur); 画面显示的大小,如果传null就是默认的大小;
3、getMediaPlayer().setScale(0); 画面显示的形式
第三个接口,setScale一定要设置为0,不然你改变控件的大小是没有用的,setScale官方介绍:
/**
* Set the video scaling factor
*
* That is the ratio of the number of pixels on screen to the number of pixels in the original
* decoded video in each dimension. Zero is a special value; it will adjust the video to the
* output window/drawable (in windowed mode) or the entire screen.
*
* @param scale the scaling factor, or zero
*/
public void setScale(float scale) {
nativeSetScale(scale);
}