Usage of rtmp-dump/librtmp

1.2k Views Asked by At

I am using compiled version of rtmp-dump from github in my iOS project. Following is the code to connect to the server.

rtmp = RTMP_Alloc();
RTMP_Init(rtmp);
NSString *url = @"rtmp://192.168.0.119:1935/red5/sw231/";
char *strUrl = (char *)[url cStringUsingEncoding:NSASCIIStringEncoding];
RTMP_SetupURL(rtmp, strUrl);
RTMP_Connect(rtmp, NULL);

Since the proper documentation of rtmp-dump OR lib-rtmp is not available I want to know the methods that I can use for the following functionalities.

  1. I want to send an array of values while connecting. My query is by what method of rtmp-dump can I send values to the server when connecting?
  2. How can I call certain methods of the server and pass parameters to the server?
  3. How can I receive response from the server? As well as how can I implement client-side method invocation through rtmp-dump?
  4. How can I explicitly provide the name of the stream which I want to play or listen to after connecting?
  5. By using RTMP_Close(), will I be able to disconnect the connection?
1

There are 1 best solutions below

0
On

I know this post was asked 12 months ago but this may be usefull.

Download this and see the examples of usage of librtmp. I don't know why this library has no documentation but following that examples can help you a bit.