Browse code

Use new librtmp APIs instead of grubbing around in RTMP struct

Originally committed as revision 23928 to svn://svn.ffmpeg.org/ffmpeg/trunk

Howard Chu authored on 2010/07/01 19:59:44
Showing 1 changed files
... ...
@@ -94,7 +94,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
94 94
     }
95 95
 
96 96
     if (flags & URL_WRONLY)
97
-        r->Link.protocol |= RTMP_FEATURE_WRITE;
97
+        RTMP_EnableWrite(r);
98 98
 
99 99
     if (!RTMP_Connect(r, NULL) || !RTMP_ConnectStream(r, 0)) {
100 100
         rc = -1;
... ...
@@ -127,10 +127,7 @@ static int rtmp_read_pause(URLContext *s, int pause)
127 127
 {
128 128
     RTMP *r = s->priv_data;
129 129
 
130
-    if (pause)
131
-        r->m_pauseStamp =
132
-            r->m_channelTimestamp[r->m_mediaChannel];
133
-    if (!RTMP_SendPause(r, pause, r->m_pauseStamp))
130
+    if (!RTMP_Pause(r, pause))
134 131
         return -1;
135 132
     return 0;
136 133
 }
... ...
@@ -157,7 +154,7 @@ static int rtmp_get_file_handle(URLContext *s)
157 157
 {
158 158
     RTMP *r = s->priv_data;
159 159
 
160
-    return r->m_sb.sb_socket;
160
+    return RTMP_Socket(r);
161 161
 }
162 162
 
163 163
 URLProtocol rtmp_protocol = {