提交 fda28d2e 编写于 作者: Z Zhang Rui

VideoView: no need to setFormat from java side

上级 726c87c4
......@@ -168,7 +168,8 @@ public class VideoView extends SurfaceView implements
}
setLayoutParams(lp);
getHolder().setFixedSize(mSurfaceWidth, mSurfaceHeight);
getHolder().setFormat(ImageFormat.YV12);
// getHolder().setFormat(ImageFormat.YV12);
// getHolder().setFormat(ImageFormat.NV16);
DebugLog.dfmt(
TAG,
"VIDEO: %dx%dx%f, Surface: %dx%d, LP: %dx%d, Window: %dx%dx%f",
......@@ -445,6 +446,11 @@ public class VideoView extends SurfaceView implements
SurfaceHolder.Callback mSHCallback = new SurfaceHolder.Callback() {
public void surfaceChanged(SurfaceHolder holder, int format, int w,
int h) {
mSurfaceHolder = holder;
if (mMediaPlayer != null) {
mMediaPlayer.setDisplay(mSurfaceHolder);
}
mSurfaceWidth = w;
mSurfaceHeight = h;
boolean isValidState = (mTargetState == STATE_PLAYING);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册