Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 09-07-2010, 10:20 PM
sean6lou sean6lou is offline
Junior Member
 
Join Date: Sep 2010
Posts: 1
sean6lou is on a distinguished road
Default

How to use rtmpdump (librtmp.so) in android


Is 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!
Reply With Quote
  #2  
Old 02-04-2011, 06:25 AM
javi242 javi242 is offline
Junior Member
 
Join Date: Feb 2011
Posts: 1
javi242 is on a distinguished road
Default

Re: How to use rtmpdump in android


Hi. 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
Reply With Quote
  #3  
Old 12-11-2011, 08:42 AM
mick666 mick666 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 1
mick666 is on a distinguished road
Default

Re: How to use rtmpdump (librtmp.so) in android


hey,
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);
but i really don't know how to call a method after that (and if it's even possible).
I suppose i need to declare something like
Code:
public native void RTMP_Alloc();
but it doesn't work.

Anyone knows more about that?

Thanks in advance.
Reply With Quote
Reply Post New Thread
Tags: , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 12:39 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons