我正在使用 MediaPlayer 显示 SplashVideo,并且日志中充满了可疑的详细消息。这不是错误,但仍然不是正常行为。
Uri video = Uri.parse("android.resource://" + getPackageName() + "/"
+ R.raw.logo_vid);
videoHolder.setVideoURI(video);
videoHolder.setOnCompletionListener(new OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
jumpMain();
}
});
videoHolder.start();
}
这是日志...
08-01 12:52:16.045: V/MediaPlayer(12402): setListener
08-01 12:52:16.045: I/MediaPlayer(12402): path is null
08-01 12:52:16.045: V/MediaPlayer-JNI(12402): setDataSourceFD: fd 43
08-01 12:52:16.045: V/MediaPlayer(12402): setDataSource(43, 1088, 407705)
08-01 12:52:16.085: V/MediaPlayer(12402): setVideoSurfaceTexture
08-01 12:52:16.085: V/MediaPlayer-JNI(12402): setAudioStreamType: 3
08-01 12:52:16.085: V/MediaPlayer(12402): MediaPlayer::setAudioStreamType
08-01 12:52:16.085: V/MediaPlayer(12402): setVideoSurfaceTexture
08-01 12:52:16.085: V/MediaPlayer(12402): prepareAsync
08-01 12:52:16.265: V/MediaPlayer(12402): message received msg=5, ext1=360, ext2=480
08-01 12:52:16.265: V/MediaPlayer(12402): New video size 360 x 480
08-01 12:52:16.265: V/MediaPlayer(12402): callback application
08-01 12:52:16.265: V/MediaPlayer(12402): back from callback
08-01 12:52:16.265: V/MediaPlayer(12402): getVideoWidth
08-01 12:52:16.265: V/MediaPlayer-JNI(12402): getVideoWidth: 360
08-01 12:52:16.265: V/MediaPlayer(12402): getVideoHeight
08-01 12:52:16.265: V/MediaPlayer-JNI(12402): getVideoHeight: 480
08-01 12:52:16.265: V/MediaPlayer(12402): message received msg=1, ext1=0, ext2=0
08-01 12:52:16.265: V/MediaPlayer(12402): prepared
08-01 12:52:16.265: V/MediaPlayer(12402): callback application
08-01 12:52:16.265: V/MediaPlayer(12402): back from callback
08-01 12:52:16.305: D/MediaPlayer(12402): getMetadata
08-01 12:52:16.305: V/MediaPlayer(12402): getVideoWidth
08-01 12:52:16.305: V/MediaPlayer-JNI(12402): getVideoWidth: 360
08-01 12:52:16.305: V/MediaPlayer(12402): getVideoHeight
08-01 12:52:16.305: V/MediaPlayer-JNI(12402): getVideoHeight: 480
08-01 12:52:16.305: I/MediaPlayer(12402): sendBroadcast android.media.IMediaPlayer.videoexist
08-01 12:52:16.305: V/MediaPlayer-JNI(12402): start
08-01 12:52:16.305: V/MediaPlayer(12402): start
08-01 12:52:20.285: V/MediaPlayer(12402): message received msg=2, ext1=0, ext2=0
08-01 12:52:20.285: V/MediaPlayer(12402): playback complete
08-01 12:52:20.285: V/MediaPlayer(12402): callback application
08-01 12:52:20.285: V/MediaPlayer(12402): back from callback
08-01 12:52:24.060: V/MediaPlayer-JNI(12402): reset
08-01 12:52:24.060: V/MediaPlayer(12402): reset
08-01 12:52:24.105: V/MediaPlayer-JNI(12402): release
08-01 12:52:24.105: V/MediaPlayer(12402): setListener
08-01 12:52:24.105: V/MediaPlayer(12402): disconnect
08-01 12:52:24.105: V/MediaPlayer(12402): destructor
08-01 12:52:24.105: W/SurfaceView(12402): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=true surfaceChanged=true realSizeChanged=false redrawNeeded=false left=false top=false
08-01 12:52:24.105: V/MediaPlayer(12402): disconnect
当我写它的工作时,但我想知道我是否做得对