Android播放不同分辨率视频如何处理

现在在做一个短视频的。从网络获取的视频可能是不同分辨率的。请问下大家该怎么处理显示大小

 public class FullScreenVideoView extends VideoView {
    public FullScreenVideoView(Context context) {
        super(context);
    }

    public FullScreenVideoView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public FullScreenVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        int width = getDefaultSize(0, widthMeasureSpec);
        int height = getDefaultSize(0, heightMeasureSpec);
        setMeasuredDimension(width, height);

这是全屏播放的。 宽高你可以自己设置比例。

FFMPEG 可以不? http://stackoverflow.com/questions/22216322/how-to-build-and-use-ffmpeg-within-android

不同分辨率的视频都制作好,根据网速等条件判断调用哪个视频地址

视频流媒体的播放协议中,是有视频的分辨率的。

不是我的意思是。他可能是480*480这就是方的,720*1080这就是长方形的。。这个意思。

你是都要全屏播放还是,根据分辨率适配窗口大小呢?