33 #include <librtmp/rtmp.h>
34 #include <librtmp/log.h>
55 av_vlog(NULL, level, fmt, args);
96 RTMP_LogSetLevel(
level);
101 if (ctx->
app) len += strlen(ctx->
app) +
sizeof(
" app=");
119 if (!RTMP_SetupURL(r, filename)) {
127 if (!RTMP_Connect(r, NULL) || !RTMP_ConnectStream(r, 0)) {
146 RTMP *
r = &ctx->
rtmp;
148 return RTMP_Write(r, buf, size);
154 RTMP *
r = &ctx->
rtmp;
156 return RTMP_Read(r, buf, size);
162 RTMP *
r = &ctx->
rtmp;
164 if (!RTMP_Pause(r, pause))
170 int64_t timestamp,
int flags)
173 RTMP *
r = &ctx->
rtmp;
179 if (stream_index < 0)
183 if (!RTMP_SendSeek(r, timestamp))
191 RTMP *
r = &ctx->
rtmp;
193 return RTMP_Socket(r);
196 #define OFFSET(x) offsetof(LibRTMPContext, x)
197 #define DEC AV_OPT_FLAG_DECODING_PARAM
198 #define ENC AV_OPT_FLAG_ENCODING_PARAM
205 #define RTMP_CLASS(flavor)\
206 static const AVClass lib ## flavor ## _class = {\
207 .class_name = "lib" #flavor " protocol",\
208 .item_name = av_default_item_name,\
210 .version = LIBAVUTIL_VERSION_INT,\
224 .priv_data_class = &librtmp_class,
239 .priv_data_class = &librtmpt_class,
254 .priv_data_class = &librtmpe_class,
269 .priv_data_class = &librtmpte_class,
284 .priv_data_class = &librtmps_class,