问题
How do I use Stagefright from the command line? Is it possible?
回答1:
Yes, stagefright can be used from a command line if you have rooted your device and can access a command line. Here's output from my android board:
root@android:/ # stagefright -h
usage: stagefright
-h(elp)
-a(udio)
-n repetitions
-l(ist) components
-m max-number-of-frames-to-decode in each pass
-b bug to reproduce
-p(rofiles) dump decoder profiles supported
-t(humbnail) extract video thumbnail or album art
-s(oftware) prefer software codec
-r(hardware) force to use hardware codec
-o playback audio
-w(rite) filename (write to .mp4 file)
-k seek test
-x display a histogram of decoding times/fps (video only)
-S allocate buffers from a surface
-T allocate buffers from a surface texture
-d(ump) filename (raw stream data to a file)
-D(ump) filename (decoded PCM data to a file)
回答2:
Unfortunately, Stagefright is a native library and does not have a command line test app. Still, MediaPlayer in android framewrork is easy to use and uses Stagefright under the covers.
来源:https://stackoverflow.com/questions/6900692/how-do-i-use-stagefright-from-the-command-line