RTMP protocol based on http://rtmpdump.mplayerhq.hu/ librtmp.
More...
#include "libavutil/avstring.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "url.h"
#include <librtmp/rtmp.h>
#include <librtmp/log.h>
Go to the source code of this file.
|
static void | rtmp_log (int level, const char *fmt, va_list args) |
|
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. More...
|
|
static int | rtmp_write (URLContext *s, const uint8_t *buf, int size) |
|
static int | rtmp_read (URLContext *s, uint8_t *buf, int size) |
|
static int | rtmp_read_pause (URLContext *s, int pause) |
|
static int64_t | rtmp_read_seek (URLContext *s, int stream_index, int64_t timestamp, int flags) |
|
static int | rtmp_get_file_handle (URLContext *s) |
|
RTMP protocol based on http://rtmpdump.mplayerhq.hu/ librtmp.
Definition in file librtmp.c.
◆ OFFSET
◆ DEC
◆ ENC
◆ RTMP_CLASS
#define RTMP_CLASS |
( |
|
flavor | ) |
|
Value:static const AVClass lib ## flavor ## _class = {\
};
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static const AVOption options[]
Describe the class of an AVClass context structure.
Definition at line 336 of file librtmp.c.
◆ rtmp_log()
static void rtmp_log |
( |
int |
level, |
|
|
const char * |
fmt, |
|
|
va_list |
args |
|
) |
| |
|
static |
◆ rtmp_close()
◆ rtmp_open()
Open RTMP connection and verify that the stream can be played.
URL syntax: rtmp://server[:port][/app][/playpath][ keyword=value]... where 'app' is first one or two directories in the path (e.g. /ondemand/, /flash/live/, etc.) and 'playpath' is a file name (the rest of the path, may be prefixed with "mp4:")
Additional RTMP library options may be appended as space-separated key-value pairs.
Definition at line 95 of file librtmp.c.
◆ rtmp_write()
◆ rtmp_read()
◆ rtmp_read_pause()
◆ rtmp_read_seek()
static int64_t rtmp_read_seek |
( |
URLContext * |
s, |
|
|
int |
stream_index, |
|
|
int64_t |
timestamp, |
|
|
int |
flags |
|
) |
| |
|
static |
◆ rtmp_get_file_handle()
◆ options
Initial value:= {
{
"rtmp_buffer",
"Set buffer time in milliseconds. The default is 3000.",
OFFSET(client_buffer_time),
AV_OPT_TYPE_STRING, {.str =
"3000"}, 0, 0,
DEC|
ENC},
{
"rtmp_live",
"Specify that the media is a live stream.",
OFFSET(live),
AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX,
DEC,
"rtmp_live"},
{
"rtmp_pageurl",
"URL of the web page in which the media was embedded. By default no value will be sent.",
OFFSET(pageurl),
AV_OPT_TYPE_STRING, {.str =
NULL }, 0, 0,
DEC},
{
"rtmp_subscribe",
"Name of live stream to subscribe to. Defaults to rtmp_playpath.",
OFFSET(subscribe),
AV_OPT_TYPE_STRING, {.str =
NULL }, 0, 0, DEC},
{
"rtmp_swfverify",
"URL to player swf file, compute hash/size automatically. (unimplemented)",
OFFSET(swfverify),
AV_OPT_TYPE_STRING, {.str =
NULL }, 0, 0, DEC},
}
Definition at line 315 of file librtmp.c.
Referenced by rtmp_open().
◆ ff_librtmp_protocol
Initial value:= {
.name = "rtmp",
.priv_data_class = &librtmp_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
static int64_t rtmp_read_seek(URLContext *s, int stream_index, int64_t timestamp, int flags)
static int rtmp_read_pause(URLContext *s, int pause)
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.
static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
static int rtmp_get_file_handle(URLContext *s)
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
Definition at line 345 of file librtmp.c.
◆ ff_librtmpt_protocol
Initial value:= {
.name = "rtmpt",
.priv_data_class = &librtmpt_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
static int64_t rtmp_read_seek(URLContext *s, int stream_index, int64_t timestamp, int flags)
static int rtmp_read_pause(URLContext *s, int pause)
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.
static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
static int rtmp_get_file_handle(URLContext *s)
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
Definition at line 360 of file librtmp.c.
◆ ff_librtmpe_protocol
Initial value:= {
.name = "rtmpe",
.priv_data_class = &librtmpe_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
static int64_t rtmp_read_seek(URLContext *s, int stream_index, int64_t timestamp, int flags)
static int rtmp_read_pause(URLContext *s, int pause)
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.
static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
static int rtmp_get_file_handle(URLContext *s)
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
Definition at line 375 of file librtmp.c.
◆ ff_librtmpte_protocol
Initial value:= {
.name = "rtmpte",
.priv_data_class = &librtmpte_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
static int64_t rtmp_read_seek(URLContext *s, int stream_index, int64_t timestamp, int flags)
static int rtmp_read_pause(URLContext *s, int pause)
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.
static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
static int rtmp_get_file_handle(URLContext *s)
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
Definition at line 390 of file librtmp.c.
◆ ff_librtmps_protocol
Initial value:= {
.name = "rtmps",
.priv_data_class = &librtmps_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
static int64_t rtmp_read_seek(URLContext *s, int stream_index, int64_t timestamp, int flags)
static int rtmp_read_pause(URLContext *s, int pause)
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.
static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
static int rtmp_get_file_handle(URLContext *s)
static int rtmp_read(URLContext *s, uint8_t *buf, int size)
Definition at line 405 of file librtmp.c.