1 ================================================================================
2 Stagefright Plugins for Android
3 ================================================================================
5 1. Enhance the Android multimedia framework providing additional Plugins for
7 2. FFmpeg provides demuxers and av codecs;
8 3. NamExtractor is a extractor plugin, it would be loaded by Stagefright when
9 Stagefright started. NamExtractor will load FFmpegExtractor.FFmpegExtractor
10 is the reference to "ffmpeg/ffplay" to achieve.
11 4. libstagefright_soft_ffmpegvdec plugin is video decoder
12 5. libstagefright_soft_ffmpegadec plugin is audio decoder
14 ================================================================================
15 Why is named nam[NamExtractor]?
16 ================================================================================
18 Namtso, or Lake Nam, is one of the three holy lakes in Tibet Autonomous Region
19 and should not be missed by any traveler to Tibet. In Tibetan, Namtso means
20 "Heavenly Lake." It is famous for its high altitude and imposing scenery.
22 I used to travel there in 2011 Sep.
24 ================================================================================
26 ================================================================================
28 CyanogenMod 9.x (Ice Cream Sandwich)
29 http://wiki.cyanogenmod.com/wiki/Galaxy_Nexus_(GSM):_Compile_CyanogenMod_(Linux)
33 ref: git://android.git.linaro.org/platform/external/ffmpeg.git
35 ================================================================================
37 ================================================================================
40 clone cm-9.1.0 source from CyanogenMod git:
41 repo init -u git://github.com/CyanogenMod/android.git -b cm-9.1.0
42 plz ref: http://wiki.cyanogenmod.com/wiki/Galaxy_Nexus_(GSM):_Compile_CyanogenMod_(Linux)
44 clone my sources from the omxcodec{github} git!
45 in your "android/external" folder, run:
47 git clone git@github.com:omxcodec/stagefright-plugins.git stagefright-plugins
49 git clone git@github.com:omxcodec/android_external_ffmpeg.git ffmpeg -b omxcodec-1.0
51 in your "android/external" folder, run:
52 cp stagefright-plugins/repo/local_manifest.xml ../.repo
53 cd .. // go to android folder
54 repo sync // sync "frameworks_base" code again!
56 "repo sync" sync "frameworks_base" code again! of course, you can merge my
57 android_external_ffmpeg code instread of "repo sync" frameworks_base. once you do,
58 so you should pay attention to the "USES_NAM" flag, it is only in the
59 "android/frameworks/base" directory
62 add USES_NAM flag to COMMON_GLOBAL_CFLAGS in android build system
63 vi vendor/samsung/maguro/BoardConfigVendor.mk and add these lines to it
66 COMMON_GLOBAL_CFLAGS += -DUSES_NAM
70 cd android/external/ffmpeg
71 mm ffmpeg // NOT "mm", plz FIXME!
73 cd android/external/stagefright-plugins
79 adb sync // sync your android build system to your phone or pad
80 reboot // reboot your phone or pad
84 wget http://movies.apple.com/media/us/ipad/2012/tv-spots/apple-ipad-this_good-us-20120307_848x480.mov
85 wget http://movies.apple.com/media/us/ipad/2012/80ba527a-1a34-4f70-aae8-14f87ab76eea/tours/apple-ipad-feature-us-20120307_848x480.mp4
87 let us suppose your media files locate at "/sdcard/Movies/" folder.
88 one console window, you should run:
90 and other cosole window, you should run:
91 test NamExtractor and FFmpegExtractor plugins:
92 adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-this_good-us-20120307_848x480.mov -t video/*
93 adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-feature-us-20120307_848x480.mp4 -t video/*
94 test SoftFFmpegVideo decoder plugin:
95 cd android/external/stagefright-plugins/tools folder, run:
97 ./install // install my scripts
98 adb root && adb shell set-vdec-sw1 // let omxcodec choose software decoder
99 adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-this_good-us-20120307_848x480.mov -t video/*
100 adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-feature-us-20120307_848x480.mp4 -t video/*
104 ================================================================================
106 ================================================================================
130 AC3 - A/52 (Dolby Digital)
136 ================================================================================
138 ================================================================================
139 1. some .mov movies do not av resync when seeking
140 2. some video stream ended while seeking
141 3. more video and audio codecs codec to be integrated
142 4. more formats to be integrated
144 If you need help with the library, or just want to discuss nam related issues,
145 you can contact me: Michael Chen (omxcodec@gmail.com)