33 #include <librtmp/rtmp.h>
34 #include <librtmp/log.h>
98 RTMP_LogSetLevel(
level);
103 if (ctx->
app) len += strlen(ctx->
app) +
sizeof(
" app=");
121 if (!RTMP_SetupURL(r, filename)) {
129 if (!RTMP_Connect(r,
NULL) || !RTMP_ConnectStream(r, 0)) {
144 RTMP *
r = &ctx->
rtmp;
146 return RTMP_Write(r, buf, size);
152 RTMP *
r = &ctx->
rtmp;
154 return RTMP_Read(r, buf, size);
160 RTMP *
r = &ctx->
rtmp;
162 if (!RTMP_Pause(r, pause))
168 int64_t timestamp,
int flags)
171 RTMP *
r = &ctx->
rtmp;
177 if (stream_index < 0)
181 if (!RTMP_SendSeek(r, timestamp))
189 RTMP *
r = &ctx->
rtmp;
191 return RTMP_Socket(r);
194 #define OFFSET(x) offsetof(LibRTMPContext, x)
195 #define DEC AV_OPT_FLAG_DECODING_PARAM
196 #define ENC AV_OPT_FLAG_ENCODING_PARAM
203 #define RTMP_CLASS(flavor)\
204 static const AVClass lib ## flavor ## _class = {\
205 .class_name = "lib" #flavor " protocol",\
206 .item_name = av_default_item_name,\
208 .version = LIBAVUTIL_VERSION_INT,\
222 .priv_data_class = &librtmp_class,
237 .priv_data_class = &librtmpt_class,
252 .priv_data_class = &librtmpe_class,
267 .priv_data_class = &librtmpte_class,
282 .priv_data_class = &librtmps_class,