31 #include <librtmp/rtmp.h>
32 #include <librtmp/log.h>
88 if (!RTMP_SetupURL(r, s->
filename)) {
96 if (!RTMP_Connect(r,
NULL) || !RTMP_ConnectStream(r, 0)) {
111 return RTMP_Write(r, buf, size);
118 return RTMP_Read(r, buf, size);
125 if (!RTMP_Pause(r, pause))
131 int64_t timestamp,
int flags)
139 if (stream_index < 0)
143 if (!RTMP_SendSeek(r, timestamp))
152 return RTMP_Socket(r);
164 .priv_data_size =
sizeof(RTMP),
177 .priv_data_size =
sizeof(RTMP),
190 .priv_data_size =
sizeof(RTMP),
203 .priv_data_size =
sizeof(RTMP),
216 .priv_data_size =
sizeof(RTMP),
#define URL_PROTOCOL_FLAG_NETWORK
static int64_t rtmp_read_seek(URLContext *s, int stream_index, int64_t timestamp, int flags)
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
int is_streamed
true if streamed (no seek possible), default = false
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AVIO_FLAG_WRITE
write-only
static int rtmp_read_pause(URLContext *s, int pause)
int av_log_get_level(void)
static int rtmp_close(URLContext *s)
static int rtmp_open(URLContext *s, const char *uri, int flags)
Open RTMP connection and verify that the stream can be played.
URLProtocol ff_rtmpte_protocol
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
void av_vlog(void *avcl, int level, const char *fmt, va_list vl)
static void rtmp_log(int level, const char *fmt, va_list args)
void av_log(void *avcl, int level, const char *fmt,...)
#define AV_TIME_BASE
Internal time base represented as integer.
URLProtocol ff_rtmpe_protocol
URLProtocol ff_rtmpt_protocol
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
URLProtocol ff_rtmps_protocol
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
char * filename
specified URL
static int rtmp_get_file_handle(URLContext *s)
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
unbuffered private I/O API
URLProtocol ff_rtmp_protocol