Mercurial > libavformat.hg
comparison librtmp.c @ 6203:24d0c5dec55a libavformat
Use new librtmp APIs instead of grubbing around in RTMP struct
author | hyc |
---|---|
date | Thu, 01 Jul 2010 10:59:44 +0000 |
parents | fa244b4fe683 |
children |
comparison
equal
deleted
inserted
replaced
6202:4fa881b244fa | 6203:24d0c5dec55a |
---|---|
92 rc = -1; | 92 rc = -1; |
93 goto fail; | 93 goto fail; |
94 } | 94 } |
95 | 95 |
96 if (flags & URL_WRONLY) | 96 if (flags & URL_WRONLY) |
97 r->Link.protocol |= RTMP_FEATURE_WRITE; | 97 RTMP_EnableWrite(r); |
98 | 98 |
99 if (!RTMP_Connect(r, NULL) || !RTMP_ConnectStream(r, 0)) { | 99 if (!RTMP_Connect(r, NULL) || !RTMP_ConnectStream(r, 0)) { |
100 rc = -1; | 100 rc = -1; |
101 goto fail; | 101 goto fail; |
102 } | 102 } |
125 | 125 |
126 static int rtmp_read_pause(URLContext *s, int pause) | 126 static int rtmp_read_pause(URLContext *s, int pause) |
127 { | 127 { |
128 RTMP *r = s->priv_data; | 128 RTMP *r = s->priv_data; |
129 | 129 |
130 if (pause) | 130 if (!RTMP_Pause(r, pause)) |
131 r->m_pauseStamp = | |
132 r->m_channelTimestamp[r->m_mediaChannel]; | |
133 if (!RTMP_SendPause(r, pause, r->m_pauseStamp)) | |
134 return -1; | 131 return -1; |
135 return 0; | 132 return 0; |
136 } | 133 } |
137 | 134 |
138 static int64_t rtmp_read_seek(URLContext *s, int stream_index, | 135 static int64_t rtmp_read_seek(URLContext *s, int stream_index, |
155 | 152 |
156 static int rtmp_get_file_handle(URLContext *s) | 153 static int rtmp_get_file_handle(URLContext *s) |
157 { | 154 { |
158 RTMP *r = s->priv_data; | 155 RTMP *r = s->priv_data; |
159 | 156 |
160 return r->m_sb.sb_socket; | 157 return RTMP_Socket(r); |
161 } | 158 } |
162 | 159 |
163 URLProtocol rtmp_protocol = { | 160 URLProtocol rtmp_protocol = { |
164 "rtmp", | 161 "rtmp", |
165 rtmp_open, | 162 rtmp_open, |