java.io.IOException:准备失败:status = 0x1在2 surfaceview之间切换

时间:2014-03-09 12:42:56

标签: android android-camera android-mediaplayer surfaceview

嗨我正在尝试在2个表面视图之间切换,所以在第一个表面视图上我想显示相机进行记录,而另一个我要显示录制的视频。

我有一个例外:

  

java.io.IOException:准备失败:status = 0x1

这是我的logcat:

03-09 14:33:30.085: V/MediaPlayer(14492): constructor
03-09 14:33:30.085: V/MediaPlayerService(14492): Client(136) constructor
03-09 14:33:30.085: V/MediaPlayerService(14492): Create new client(136) from pid 23263, uid 10003, 
03-09 14:33:30.085: I/MediaPlayerFactory(14492): Can`t play mp3 and ogg file on NuPlayer , create Awesomeplayer.
03-09 14:33:30.085: V/MediaPlayerService(14492): player type = 3
03-09 14:33:30.090: V/MediaPlayerService(14492):  setDataSource
03-09 14:33:30.090: V/MediaPlayerService(14492): [136] setParameter(1604)
03-09 14:33:30.090: V/MediaPlayerService(14492): [136] getParameter(1700)
03-09 14:33:30.090: V/MediaPlayer(14492): MediaPlayer::setAudioStreamType
03-09 14:33:30.090: V/MediaPlayer(14492): prepare
03-09 14:33:30.090: V/MediaPlayerService(14492): [136] setAudioStreamType(7)
03-09 14:33:30.090: V/MediaPlayerService(14492): [136] prepareAsync
03-09 14:33:30.095: V/MediaPlayerService(14492): [136] notify (0x42bf7090, 200, 973, 0)
03-09 14:33:30.095: V/MediaPlayer(14492): message received msg=200, ext1=973, ext2=0
03-09 14:33:30.095: W/MediaPlayer(14492): info/warning (973, 0)
03-09 14:33:30.095: V/MediaPlayerService(14492): [136] notify (0x42bf7090, 5, 0, 0)
03-09 14:33:30.095: V/MediaPlayer(14492): message received msg=5, ext1=0, ext2=0
03-09 14:33:30.095: V/MediaPlayer(14492): New video size 0 x 0
03-09 14:33:30.095: V/MediaPlayerService(14492): [136] notify (0x42bf7090, 1, 0, 0)
03-09 14:33:30.095: V/MediaPlayer(14492): message received msg=1, ext1=0, ext2=0
03-09 14:33:30.095: V/MediaPlayer(14492): prepared
03-09 14:33:30.095: V/MediaPlayer(14492): signal application thread
03-09 14:33:30.095: V/MediaPlayer(14492): prepare complete - status=0
03-09 14:33:30.095: V/MediaPlayer(14492): constructor
03-09 14:33:30.095: V/MediaPlayerService(14492): Client(137) constructor
03-09 14:33:30.095: V/MediaPlayerService(14492): Create new client(137) from pid 23263, uid 10003, 
03-09 14:33:30.095: I/MediaPlayerFactory(14492): Can`t play mp3 and ogg file on NuPlayer , create Awesomeplayer.
03-09 14:33:30.095: V/MediaPlayerService(14492): player type = 3
03-09 14:33:30.095: V/MediaPlayerService(14492):  setDataSource
03-09 14:33:30.095: V/MediaPlayerService(14492): [137] setParameter(1604)
03-09 14:33:30.095: V/MediaPlayerService(14492): [137] getParameter(1700)
03-09 14:33:30.095: V/MediaPlayer(14492): MediaPlayer::setAudioStreamType
03-09 14:33:30.095: V/MediaPlayer(14492): prepare
03-09 14:33:30.095: V/MediaPlayerService(14492): [137] setAudioStreamType(7)
03-09 14:33:30.095: V/MediaPlayerService(14492): [137] prepareAsync
03-09 14:33:30.100: V/MediaPlayerService(14492): [137] notify (0x42be0008, 200, 973, 0)
03-09 14:33:30.100: V/MediaPlayer(14492): message received msg=200, ext1=973, ext2=0
03-09 14:33:30.100: W/MediaPlayer(14492): info/warning (973, 0)
03-09 14:33:30.100: V/MediaPlayerService(14492): [137] notify (0x42be0008, 5, 0, 0)
03-09 14:33:30.100: V/MediaPlayer(14492): message received msg=5, ext1=0, ext2=0
03-09 14:33:30.100: V/MediaPlayer(14492): New video size 0 x 0
03-09 14:33:30.100: V/MediaPlayerService(14492): [137] notify (0x42be0008, 1, 0, 0)
03-09 14:33:30.100: V/MediaPlayer(14492): message received msg=1, ext1=0, ext2=0
03-09 14:33:30.100: V/MediaPlayer(14492): prepared
03-09 14:33:30.100: V/MediaPlayer(14492): signal application thread
03-09 14:33:30.100: V/MediaPlayer(14492): prepare complete - status=0
03-09 14:33:30.100: V/MediaPlayer(14492): constructor
03-09 14:33:30.100: V/MediaPlayerService(14492): Client(138) constructor
03-09 14:33:30.100: V/MediaPlayerService(14492): Create new client(138) from pid 23263, uid 10003, 
03-09 14:33:30.100: I/MediaPlayerFactory(14492): Can`t play mp3 and ogg file on NuPlayer , create Awesomeplayer.
03-09 14:33:30.100: V/MediaPlayerService(14492): player type = 3
03-09 14:33:30.100: V/MediaPlayerService(14492):  setDataSource
03-09 14:33:30.100: V/MediaPlayerService(14492): [138] setParameter(1604)
03-09 14:33:30.100: V/MediaPlayerService(14492): [138] getParameter(1700)
03-09 14:33:30.100: V/MediaPlayer(14492): MediaPlayer::setAudioStreamType
03-09 14:33:30.100: V/MediaPlayer(14492): prepare
03-09 14:33:30.100: V/MediaPlayerService(14492): [138] setAudioStreamType(7)
03-09 14:33:30.100: V/MediaPlayerService(14492): [138] prepareAsync
03-09 14:33:30.105: V/MediaPlayerService(14492): [138] notify (0x427b8990, 200, 973, 0)
03-09 14:33:30.105: V/MediaPlayer(14492): message received msg=200, ext1=973, ext2=0
03-09 14:33:30.105: W/MediaPlayer(14492): info/warning (973, 0)
03-09 14:33:30.105: V/MediaPlayerService(14492): [138] notify (0x427b8990, 5, 0, 0)
03-09 14:33:30.105: V/MediaPlayer(14492): message received msg=5, ext1=0, ext2=0
03-09 14:33:30.105: V/MediaPlayer(14492): New video size 0 x 0
03-09 14:33:30.105: V/MediaPlayerService(14492): [138] notify (0x427b8990, 1, 0, 0)
03-09 14:33:30.105: V/MediaPlayer(14492): message received msg=1, ext1=0, ext2=0
03-09 14:33:30.105: V/MediaPlayer(14492): prepared
03-09 14:33:30.105: V/MediaPlayer(14492): signal application thread
03-09 14:33:30.105: V/MediaPlayer(14492): prepare complete - status=0
03-09 14:33:30.710: V/MediaPlayerService(14492): Create new media recorder client from pid 23263
03-09 14:33:36.140: V/MediaPlayer(14492): MediaPlayer::setVolume(0.500000, 0.500000)
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] setVolume(0.500000, 0.500000)
03-09 14:33:36.140: V/MediaPlayer(14492): seekTo 0
03-09 14:33:36.140: V/MediaPlayerService(14492): getDuration
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] getDuration = 387
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] seekTo(0)
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] notify (0x42be0008, 4, 0, 0)
03-09 14:33:36.140: V/MediaPlayer(14492): message received msg=4, ext1=0, ext2=0
03-09 14:33:36.140: V/MediaPlayer(14492): Received seek complete
03-09 14:33:36.140: V/MediaPlayer(14492): All seeks complete - return to regularly scheduled program
03-09 14:33:36.140: V/MediaPlayer(14492): start
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] setLooping(0)
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] setVolume(0.500000, 0.500000)
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] setAuxEffectSendLevel(0.000000)
03-09 14:33:36.140: V/MediaPlayerService(14492): [137] start
03-09 14:33:36.695: V/MediaPlayerService(14492): [137] notify (0x42be0008, 2, 0, 0)
03-09 14:33:36.695: V/MediaPlayer(14492): message received msg=2, ext1=0, ext2=0
03-09 14:33:36.695: V/MediaPlayer(14492): playback complete
03-09 14:33:41.600: V/MediaPlayer(14492): MediaPlayer::setVolume(0.500000, 0.500000)
03-09 14:33:41.600: V/MediaPlayerService(14492): [138] setVolume(0.500000, 0.500000)
03-09 14:33:41.600: V/MediaPlayer(14492): seekTo 0
03-09 14:33:41.600: V/MediaPlayerService(14492): getDuration
03-09 14:33:41.600: V/MediaPlayerService(14492): [138] getDuration = 93
03-09 14:33:41.600: V/MediaPlayerService(14492): [138] seekTo(0)
03-09 14:33:41.600: V/MediaPlayerService(14492): [138] notify (0x427b8990, 4, 0, 0)
03-09 14:33:41.600: V/MediaPlayer(14492): message received msg=4, ext1=0, ext2=0
03-09 14:33:41.600: V/MediaPlayer(14492): Received seek complete
03-09 14:33:41.600: V/MediaPlayer(14492): All seeks complete - return to regularly scheduled program
03-09 14:33:41.600: V/MediaPlayer(14492): start
03-09 14:33:41.605: V/MediaPlayerService(14492): [138] setLooping(0)
03-09 14:33:41.605: V/MediaPlayerService(14492): [138] setVolume(0.500000, 0.500000)
03-09 14:33:41.605: V/MediaPlayerService(14492): [138] setAuxEffectSendLevel(0.000000)
03-09 14:33:41.605: V/MediaPlayerService(14492): [138] start
03-09 14:33:41.930: V/MediaPlayerService(14492): [138] notify (0x427b8990, 2, 0, 0)
03-09 14:33:41.930: V/MediaPlayer(14492): message received msg=2, ext1=0, ext2=0
03-09 14:33:41.930: V/MediaPlayer(14492): playback complete
03-09 14:33:45.720: V/MediaPlayerService(14492): Delete media recorder client
03-09 14:33:45.910: V/MediaPlayer-JNI(23263): native_setup
03-09 14:33:45.910: V/MediaPlayer(23263): constructor
03-09 14:33:45.910: V/MediaPlayer(14492): disconnect
03-09 14:33:45.915: V/MediaPlayerService(14492): disconnect(136) from pid 23263
03-09 14:33:45.915: V/MediaPlayer(23263): setListener
03-09 14:33:45.915: V/MediaPlayerService(14492): Client(136) destructor pid = 23263
03-09 14:33:45.915: V/MediaPlayerService(14492): disconnect(136) from pid 23263
03-09 14:33:45.920: V/MediaPlayer(14492): destructor
03-09 14:33:45.920: V/MediaPlayer(14492): disconnect
03-09 14:33:45.920: V/MediaPlayer(14492): disconnect
03-09 14:33:45.920: V/MediaPlayerService(14492): disconnect(137) from pid 23263
03-09 14:33:45.920: V/MediaPlayerService(14492): Client(137) destructor pid = 23263
03-09 14:33:45.920: V/MediaPlayerService(14492): disconnect(137) from pid 23263
03-09 14:33:45.920: V/MediaPlayer(14492): destructor
03-09 14:33:45.920: V/MediaPlayer(14492): disconnect
03-09 14:33:45.920: V/MediaPlayer(14492): disconnect
03-09 14:33:45.920: V/MediaPlayerService(14492): disconnect(138) from pid 23263
03-09 14:33:45.925: V/MediaPlayerService(14492): Client(138) destructor pid = 23263
03-09 14:33:45.925: V/MediaPlayerService(14492): disconnect(138) from pid 23263
03-09 14:33:45.925: V/MediaPlayer(14492): destructor
03-09 14:33:45.925: V/MediaPlayer(14492): disconnect
03-09 14:33:45.970: V/MediaPlayer-JNI(23263): setDataSourceFD: fd 65
03-09 14:33:45.970: V/MediaPlayer(23263): setDataSource(65, 0, 576460752303423487)
03-09 14:33:45.970: V/MediaPlayerService(14492): Client(139) constructor
03-09 14:33:45.970: V/MediaPlayerService(14492): Create new client(139) from pid 23263, uid 10003, 
03-09 14:33:45.970: V/MediaPlayerService(14492): setDataSource fd=31, offset=0, length=576460752303423487
03-09 14:33:45.970: V/MediaPlayerService(14492): st_dev  = 18
03-09 14:33:45.970: V/MediaPlayerService(14492): st_mode = 33204
03-09 14:33:45.970: V/MediaPlayerService(14492): st_uid  = 0
03-09 14:33:45.970: V/MediaPlayerService(14492): st_gid  = 1015
03-09 14:33:45.970: V/MediaPlayerService(14492): st_size = 9557981
03-09 14:33:45.970: V/MediaPlayerService(14492): calculated length = 9557981
03-09 14:33:45.970: V/MediaPlayerService(14492): player type = 3
03-09 14:33:45.990: V/MediaPlayerService(14492):  setDataSource
03-09 14:33:45.990: V/MediaPlayerService(14492): [139] setParameter(1604)
03-09 14:33:45.990: V/MediaPlayerService(14492): [139] getParameter(1700)
03-09 14:33:45.990: V/MediaPlayer(23263): setVideoSurfaceTexture
03-09 14:33:45.990: V/MediaPlayerService(14492): [139] setVideoSurfaceTexture(0x42e6cfb8)
03-09 14:33:54.025: V/MediaPlayer(23263): setVideoSurfaceTexture
03-09 14:33:54.025: V/MediaPlayerService(14492): [139] setVideoSurfaceTexture(0x4309a338)
03-09 14:33:54.025: V/MediaPlayer(23263): prepare
03-09 14:33:54.025: V/MediaPlayerService(14492): [139] setAudioStreamType(3)
03-09 14:33:54.025: V/MediaPlayerService(14492): [139] prepareAsync
03-09 14:33:54.035: V/MediaPlayerService(14492): [139] notify (0x42bf7090, 100, 1, -2147483648)
03-09 14:33:54.040: V/MediaPlayer(23263): message received msg=100, ext1=1, ext2=-2147483648
03-09 14:33:54.040: E/MediaPlayer(23263): error (1, -2147483648)
03-09 14:33:54.040: V/MediaPlayer(23263): signal application thread
03-09 14:33:54.040: V/MediaPlayer(23263): prepare complete - status=1
03-09 14:34:10.840: V/MediaPlayer-JNI(23263): setAudioStreamType: 3
03-09 14:34:10.840: V/MediaPlayer(23263): MediaPlayer::setAudioStreamType
03-09 14:34:10.840: V/MediaPlayer-JNI(23263): setVolume: left 0.000000  right 0.000000
03-09 14:34:10.840: V/MediaPlayer(23263): MediaPlayer::setVolume(0.000000, 0.000000)
03-09 14:34:10.840: V/MediaPlayerService(14492): [139] setVolume(0.000000, 0.000000)
03-09 14:34:10.845: V/MediaPlayer-JNI(23263): start
03-09 14:34:10.845: V/MediaPlayer(23263): start
03-09 14:34:10.845: E/MediaPlayer(23263): start called in state 0
03-09 14:34:10.845: V/MediaPlayer(23263): message received msg=100, ext1=-38, ext2=0
03-09 14:34:10.845: E/MediaPlayer(23263): error (-38, 0)
03-09 14:34:10.845: V/MediaPlayer(23263): callback application
03-09 14:34:10.850: V/MediaPlayer(23263): back from callback
03-09 14:34:12.225: V/MediaPlayerService(14492): Client(139) destructor pid = 23263
03-09 14:34:12.225: V/MediaPlayerService(14492): disconnect(139) from pid 23263
03-09 14:34:29.970: V/MediaPlayerService(14492): Create new media retriever from pid 22479
03-09 14:34:30.900: V/MediaPlayerService(14492): Create new media retriever from pid 22479
03-09 14:34:31.400: V/MediaPlayerService(14492): Create new media retriever from pid 22479

我只添加了MediaPlayer标签。 如果需要更多信息,请询问。

谢谢!

0 个答案:

没有答案