“*libRTMP study”的版本间的差异

来自个人维基
跳转至: 导航搜索
第9行: 第9行:
 
     RTMP *r = {};
 
     RTMP *r = {};
 
     RTMP_Init(r); //init RTMP. BufferMS=30000,
 
     RTMP_Init(r); //init RTMP. BufferMS=30000,
 +
 +
filename = " "+
 +
app= 
 +
tcUrl=
 +
pageUrl=
 +
swfUrl=
 +
flashVer=
 +
conn=
 +
live=1
 +
subscribe=
 +
buffer=
 +
swfUrl=
 +
swfVfy=1
 +
 
 
2. Setup
 
2. Setup
 
     RTMP_SetupURL(r, filename)
 
     RTMP_SetupURL(r, filename)

2020年4月7日 (二) 22:20的版本

source code download:

git clone git://git.ffmpeg.org/rtmpdump

Calling flow:
1. Init

   RTMP_LogSetLevel(level);
   RTMP_LogSetCallback(rtmp_log);
     static void rtmp_log(int level, const char *fmt, va_list args)
   RTMP *r = {};
   RTMP_Init(r); //init RTMP. BufferMS=30000,

filename = " "+ 
app=   
tcUrl= 
pageUrl=
swfUrl=
flashVer=
conn=
live=1
subscribe=
buffer=
swfUrl=
swfVfy=1
  

2. Setup

   RTMP_SetupURL(r, filename)
   RTMP_EnableWrite(r); //r->Link.protocol |= RTMP_FEATURE_WRITE;
   RTMP_Connect(r, NULL)
   RTMP_ConnectStream(r, 0)
   //
   setsockopt()

3. write

   RTMP_Write(r, buf, size);

4. read

   RTMP_Read(r, buf, size);
   RTMP_Pause(r, pause);
   RTMP_SendSeek(r, timestamp);

5. close

  RTMP_Close(r)
  RTMP_Free(RTMP *r) // free(r)