b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

android如何获取媒体播放器状态使用 adb 命令

电脑杂谈  发布时间:2019-09-11 14:04:55  来源:网络整理

播放器 命令行_传奇3 gm命令查看器_传奇gm命令查看器下载

本文来自:

注意事项: 本文中文内容也许为机器翻译,如要查看中文原文请单击下面连接.

你可以让我明白是否有任何亚行命令以获得的状态 MediaPlayer 喜欢播放器 命令行,播放/暂停等。

传奇gm命令查看器下载_播放器 命令行_传奇3 gm命令查看器

这是我尝试像上面。

c:\>adb shell dumpsys media.player
 Client
  pid(3764), connId(94), status(0), looping(false)
 AwesomePlayer
  fd(40), flags(0x00000010), bitrate(48000 bps)
  Track 1
   MIME(audio/mpeg), decoder(OMX.google.mp3.decoder)
 AudioOutput
  stream type(3), left - right volume(1.000000, 1.000000)
  msec per frame(0.000000), latency (-1)
  aux effect id(0), send level (0.000000)
 Client
  pid(3764), connId(93), status(0), looping(false)
 AwesomePlayer
  fd(35), flags(0x00084014), bitrate(48000 bps)
  Track 1
   MIME(audio/mpeg), decoder(OMX.google.mp3.decoder)
 AudioOutput
  stream type(3), left - right volume(1.000000, 1.000000)
  msec per frame(0.022676), latency (261)
  aux effect id(0), send level (0.000000)
 AudioTrack::dump
  stream type(3), left - right volume(1.000000, 1.000000)
  format(1), channel count(2), frame count(7680)
  sample rate(44100), status(0)
  state(2), latency (261)
 No media recorder client
 Files opened and/or mapped:
  /proc/749/fd/35 -> /storage/sdcard1/Music/xxx/aaaa.mp3
  /proc/749/fd/40 -> /storage/sdcard1/Music/xxx/bbbb.mp3

如果您只是想既然音频是暂停或玩。

播放器 命令行_传奇3 gm命令查看器_传奇gm命令查看器下载

您可以尝试使用

$ adb shell dumpsys audio
Remote Control stack entries (last is top of stack):
/*....
* Some Output Here... 
*/
pi: PendingIntent{42feb5a8: PendingIntentRecord{42b6b748 com.google.android.music broadcastIntent}} -- pack: com.google.android.music  -- ercvr: ComponentInfo{com.google.android.music/com.google.android.music.playback.MediaButtonIntentReceiver}  -- client: android.media.IRemoteControlClient$Stub$Proxy@42e544d8  -- uid: 10059  -- type: 0  state: PLAYSTATE_PAUSED, 208457ms, 1.0X
Remote Control Client stack entries (last is top of stack):
  uid: -1  -- id: 1  -- type: 0  -- state: PLAYSTATE_STOPPED, PLAYBACK_POSITION_INVALID,     1.0X  -- vol handling: 1  -- vol: 15  -- volMax: 15  -- volObs: null
  uid: -1  -- id: 8  -- type: 0  -- state: PLAYSTATE_STOPPED, PLAYBACK_POSITION_INVALID, 1.0X  -- vol handling: 1  -- vol: 15  -- volMax: 15  -- volObs: null
  uid: 10059  -- id: 9  -- type: 0  -- state: PLAYSTATE_PAUSED, 208457ms, 1.0X  -- vol handling: 1  -- vol: 15  -- volMax: 15  -- volObs: null

在它们中,它说明是否状况是 PLAYSTATE_PAUSED播放器 命令行, PLAYSTATE_PLAYING 或 PLAYSTATE_STOPPED 。

传奇3 gm命令查看器_播放器 命令行_传奇gm命令查看器下载

甚至在不同设备上,试着它

$ adb shell dumpsys audio
Remote Control stack entries:
pi: PendingIntent{41b84660: PendingIntentRecord{42239310 com.sonyericsson.music broadcastIntent}}  -- ercvr: ComponentInfo{com.sonyericsson.music/com.sonyericsson.music.proxyservice.MediaButtonReceiver}  -- client: android.media.IRemoteControlClient$Stub$Proxy@428b5528  -- uid: 10049  -- type: 0  state: 2
Remote Control Client stack entries:
  uid: -1  -- id: 1  -- type: 0  -- state: 1  -- vol handling: 1  -- vol: 15  -- volMax: 15  -- volObs: null
  uid: -1  -- id: 2  -- type: 0  -- state: 1  -- vol handling: 1  -- vol: 15  -- volMax: 15  -- volObs: null
  uid: 10049  -- id: 5  -- type: 0  -- state: 2  -- vol handling: 1  -- vol: 15  -- volMax: 15  -- volObs: null

在这里它显示 state:1 或 state:2 ,

传奇3 gm命令查看器_传奇gm命令查看器下载_播放器 命令行

它基本上的值。

PLAYSTATE_PLAYING

PLAYSTATE_PAUSED

PLAYSTATE_STOPPED

你能预测以下来获得很多值的输出。

但愿这是你在寻求哪些。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/bofangqi/article-122520-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...