Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
How to use rtmpdump (librtmp.so) in androidIs here anyone can tell me how to use the rtmpdump in the android environment? What I have done please see below:
1. I have downloaded the "rtmpdump-2.3-android"; 2. Change the "librtmp.so.0" file to "librtmp.so"; 3. Push the librtmp.so into the android OS (/data/data folder); 4. Lode the librtmp.so in the code; 5. Try to us RTMP_Alloc method, but failed. The definition of RTMP_Alloc is: "RTMP *RTMP_Alloc(void);". But how can I refer the RTMP structure under the java code? If you are familiar with the rtmpdump-2.3-android, please help me. If you have any idea of the rtmpdump in andriod, please leave with your message here, tks! |
#2
|
|||
|
|||
Re: How to use rtmpdump in androidHi. I'm interesting in how to use this library too. I loaded the library but when I call any method I get UnsatisfiedLinkError. Any help?
Thanks |
#3
|
|||
|
|||
Re: How to use rtmpdump (librtmp.so) in androidhey,
it's a quite old post, but i'm really interested too in using this library into java code. I'm quite new to JNI. Here is the code i use to push and load the library on the device: Code:
String lib = "librtmp.so"; PackageManager pm = this.getPackageManager(); String iDataDir = pm.getApplicationInfo(this.getPackageName(), 0).dataDir; String iSourceDir = pm.getApplicationInfo(this.getPackageName(), 0).sourceDir; String apkLocation = iSourceDir; String libLocation = iDataDir + File.separator + lib; ZipFile zip = new ZipFile(apkLocation); ZipEntry zipen = zip.getEntry("assets/" + lib); InputStream is = zip.getInputStream(zipen); OutputStream os = new FileOutputStream(libLocation); byte[] buf = new byte[8092]; int n; while ((n = is.read(buf)) > 0) os.write(buf, 0, n); os.close(); is.close(); System.load(libLocation); I suppose i need to declare something like Code:
public native void RTMP_Alloc(); Anyone knows more about that? Thanks in advance. |
Tags: android, failed, help, librtmp, rtmpdump, rtmp_alloc |
Thread Tools | |
Display Modes | |
|
|