开发者

SDL, ffmpeg and Android

I gathered together the ports ffmpeg and SDL under Android. Began working with the program described here: http://dranger.com/ffmpeg/tutorial03.html (need player for ffmpeg + SDL). Compile and run out, but after this function: SDL_OpenAudio (& wanted_spec, & spec) Wrote in the log:


        03-15 14:09:42.856: VERBOSE/SDL(436): SDL audio: opening device
03-15 14:09:42.976: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-15 14:09:42.976: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
03-15 14:09:42.986: INFO/DEBUG(31)开发者_如何学Python: pid: 436, tid: 436  >>> org.libsdl.app
03-15 14:09:42.986: INFO/DEBUG(31): signal 11 (SIGSEGV), fault addr 00000000
03-15 14:09:42.986: INFO/DEBUG(31):  r0 00000000  r1 00000000  r2 00000000  r3 be9587e4
03-15 14:09:42.996: INFO/DEBUG(31):  r4 000001cc  r5 80a7436c  r6 00004bb4  r7 ffff844c
03-15 14:09:42.996: INFO/DEBUG(31):  r8 00000400  r9 00000000  10 0000ac44  fp 00000000
03-15 14:09:43.006: INFO/DEBUG(31):  ip 00000000  sp be9587c8  lr 80a66411  pc 80a663ac  cpsr 00000030
03-15 14:09:43.246: INFO/DEBUG(31):          #00  pc 000663ac  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.257: INFO/DEBUG(31):          #01  pc 0006640c  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.257: INFO/DEBUG(31):          #02  pc 0006526c  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.266: INFO/DEBUG(31):          #03  pc 0002a5ba  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.277: INFO/DEBUG(31):          #04  pc 0002aad0  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.277: INFO/DEBUG(31):          #05  pc 00024d72  /data/data/org.libsdl.app/lib/libtest.so
03-15 14:09:43.300: INFO/DEBUG(31):          #06  pc 00013974  /system/lib/libdvm.so
03-15 14:09:43.300: INFO/DEBUG(31):          #07  pc 0003de3c  /system/lib/libdvm.so
03-15 14:09:43.306: INFO/DEBUG(31):          #08  pc 00037216  /system/lib/libdvm.so
03-15 14:09:43.316: INFO/DEBUG(31):          #09  pc 000432ec  /system/lib/libdvm.so
03-15 14:09:43.316: INFO/DEBUG(31):          #10  pc 00018714  /system/lib/libdvm.so
03-15 14:09:43.327: INFO/DEBUG(31):          #11  pc 0001e8c4  /system/lib/libdvm.so
03-15 14:09:43.327: INFO/DEBUG(31):          #12  pc 0001d790  /system/lib/libdvm.so
03-15 14:09:43.337: INFO/DEBUG(31):          #13  pc 0005408e  /system/lib/libdvm.so
03-15 14:09:43.347: INFO/DEBUG(31):          #14  pc 0005bde2  /system/lib/libdvm.so
03-15 14:09:43.347: INFO/DEBUG(31):          #15  pc 00018714  /system/lib/libdvm.so
03-15 14:09:43.357: INFO/DEBUG(31):          #16  pc 0001e8c4  /system/lib/libdvm.so
03-15 14:09:43.357: INFO/DEBUG(31):          #17  pc 0001d790  /system/lib/libdvm.so
03-15 14:09:43.376: INFO/DEBUG(31):          #18  pc 00053eec  /system/lib/libdvm.so
03-15 14:09:43.376: INFO/DEBUG(31):          #19  pc 0004072c  /system/lib/libdvm.so
03-15 14:09:43.387: INFO/DEBUG(31):          #20  pc 00034454  /system/lib/libdvm.so
03-15 14:09:43.397: INFO/DEBUG(31):          #21  pc 0002c930  /system/lib/libandroid_runtime.so
03-15 14:09:43.397: INFO/DEBUG(31):          #22  pc 0002d85c  /system/lib/libandroid_runtime.so
03-15 14:09:43.407: INFO/DEBUG(31):          #23  pc 00008c86  /system/bin/app_process
03-15 14:09:43.417: INFO/DEBUG(31):          #24  pc 0000d362  /system/lib/libc.so
03-15 14:09:43.417: INFO/DEBUG(31): code around pc:
03-15 14:09:43.427: INFO/DEBUG(31): 80a6638c ff8ef7ff 46c0bd10 0000dfe6 00004bb4 
03-15 14:09:43.427: INFO/DEBUG(31): 80a6639c b530b40c ab06b083 24e6cb04 93010064 
03-15 14:09:43.437: INFO/DEBUG(31): 80a663ac 592c6805 b00347a0 bc08bc30 4718b002 
03-15 14:09:43.437: INFO/DEBUG(31): 80a663bc 4657b5f0 b4c04646 1c144d30 4a314f30 
03-15 14:09:43.447: INFO/DEBUG(31): 80a663cc 1c0e447d 063618aa 4682b087 200219e9 
03-15 14:09:43.447: INFO/DEBUG(31): code around lr:
03-15 14:09:43.457: INFO/DEBUG(31): 80a663f0 19acdd3f 54a32238 69616922 6be24694 
03-15 14:09:43.457: INFO/DEBUG(31): 80a66400 46439301 93029000 46534660 ffc6f7ff 
03-15 14:09:43.457: INFO/DEBUG(31): 80a66410 61e01c01 d02e2800 68036920 47986d5b 
03-15 14:09:43.477: INFO/DEBUG(31): 80a66420 2300466a 70133217 5ce32320 61e01c01 
03-15 14:09:43.477: INFO/DEBUG(31): 80a66430 d11a2b00 23b86920 009b6807 479858fb 
03-15 14:09:43.477: INFO/DEBUG(31): stack:
03-15 14:09:43.487: INFO/DEBUG(31):     be958788  afd4054c  /system/lib/libc.so
03-15 14:09:43.487: INFO/DEBUG(31):     be95878c  000003fc  
03-15 14:09:43.487: INFO/DEBUG(31):     be958790  8135da50  /data/data/org.libsdl.app/lib/libtest.so
03-15 14:09:43.487: INFO/DEBUG(31):     be958794  afd14bd5  /system/lib/libc.so
03-15 14:09:43.487: INFO/DEBUG(31):     be958798  be9587a0  [stack]
03-15 14:09:43.487: INFO/DEBUG(31):     be95879c  be9587a8  [stack]
03-15 14:09:43.497: INFO/DEBUG(31):     be9587a0  00000001  
03-15 14:09:43.497: INFO/DEBUG(31):     be9587a4  00000000  
03-15 14:09:43.507: INFO/DEBUG(31):     be9587a8  00000000  
03-15 14:09:43.507: INFO/DEBUG(31):     be9587ac  afd103f0  /system/lib/libc.so
03-15 14:09:43.507: INFO/DEBUG(31):     be9587b0  00000003  
03-15 14:09:43.507: INFO/DEBUG(31):     be9587b4  afd41724  /system/lib/libc.so
03-15 14:09:43.507: INFO/DEBUG(31):     be9587b8  0012ecc0  [heap]
03-15 14:09:43.507: INFO/DEBUG(31):     be9587bc  c0000000  
03-15 14:09:43.517: INFO/DEBUG(31):     be9587c0  df002777  
03-15 14:09:43.517: INFO/DEBUG(31):     be9587c4  e3a070ad  
03-15 14:09:43.527: INFO/DEBUG(31): #00 be9587c8  00000003  
03-15 14:09:43.527: INFO/DEBUG(31):     be9587cc  be9587e4  [stack]
03-15 14:09:43.527: INFO/DEBUG(31):     be9587d0  80a7436c  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.527: INFO/DEBUG(31):     be9587d4  80a78f20  
03-15 14:09:43.537: INFO/DEBUG(31):     be9587d8  80a7436c  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.537: INFO/DEBUG(31):     be9587dc  80a66411  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.537: INFO/DEBUG(31):     be9587e0  00000000  
03-15 14:09:43.537: INFO/DEBUG(31):     be9587e4  0000ac44  [heap]
03-15 14:09:43.537: INFO/DEBUG(31): #01 be9587e8  00000001  
03-15 14:09:43.547: INFO/DEBUG(31):     be9587ec  00000001  
03-15 14:09:43.547: INFO/DEBUG(31):     be9587f0  00000400  
03-15 14:09:43.547: INFO/DEBUG(31):     be9587f4  0025b7d8  [heap]
03-15 14:09:43.557: INFO/DEBUG(31):     be9587f8  40000000  /dev/ashmem/system_properties (deleted)
03-15 14:09:43.557: INFO/DEBUG(31):     be9587fc  afd0c7a1  /system/lib/libc.so
03-15 14:09:43.557: INFO/DEBUG(31):     be958800  80a7436c  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.577: INFO/DEBUG(31):     be958804  00000000  
03-15 14:09:43.577: INFO/DEBUG(31):     be958808  00001cac  
03-15 14:09:43.577: INFO/DEBUG(31):     be95880c  80a7436c  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:43.577: INFO/DEBUG(31):     be958810  0025b7d8  [heap]
03-15 14:09:43.577: INFO/DEBUG(31):     be958814  00008010  /system/bin/app_process
03-15 14:09:43.577: INFO/DEBUG(31):     be958818  40000000  /dev/ashmem/system_properties (deleted)
03-15 14:09:43.587: INFO/DEBUG(31):     be95881c  80a65271  /data/data/org.libsdl.app/lib/libSDL.so
03-15 14:09:44.477: DEBUG/Zygote(33): Process 436 terminated by signal (11)

How to solve this problem? Or at least that means that in DEBUG Dunno if? thanks in advance.

If you do not know how to fix tell me an example of how to play audio through SDL for Android


SDL won't be allowed to access the audio device under android, as I understand it only the OS is allowed to. What you can probably do though is use the JNI to call the android library functions for playing sound. http://developer.android.com/reference/android/media/AudioTrack.html

Edit: This person seems to have gotten SDL to work together with android audio. Seems the most important puzzle pieces are these two files:

Audio.java - Create an instance of AudioThread in your main activity, it should set up the proper callbacks with SDL.

SDL_androidaudio.c - The bridge between SDL sound and android sound.

There is probably more you have to do to get it working, but this is probably a start. Look around the source tree.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜