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)) {
143 RTMP *
r = &ctx->
rtmp;
145 return RTMP_Write(r, buf, size);
151 RTMP *
r = &ctx->
rtmp;
153 return RTMP_Read(r, buf, size);
159 RTMP *
r = &ctx->
rtmp;
161 if (!RTMP_Pause(r, pause))
167 int64_t timestamp,
int flags)
170 RTMP *
r = &ctx->
rtmp;
176 if (stream_index < 0)
180 if (!RTMP_SendSeek(r, timestamp))
188 RTMP *
r = &ctx->
rtmp;
190 return RTMP_Socket(r);
193 #define OFFSET(x) offsetof(LibRTMPContext, x)
194 #define DEC AV_OPT_FLAG_DECODING_PARAM
195 #define ENC AV_OPT_FLAG_ENCODING_PARAM
202 #define RTMP_CLASS(flavor)\
203 static const AVClass lib ## flavor ## _class = {\
204 .class_name = "lib" #flavor " protocol",\
205 .item_name = av_default_item_name,\
207 .version = LIBAVUTIL_VERSION_INT,\
221 .priv_data_class = &librtmp_class,
236 .priv_data_class = &librtmpt_class,
251 .priv_data_class = &librtmpe_class,
266 .priv_data_class = &librtmpte_class,
281 .priv_data_class = &librtmps_class,