35 #define RTMPT_DEFAULT_PORT 80
36 #define RTMPTS_DEFAULT_PORT RTMPS_DEFAULT_PORT
187 char headers[1024], url[1024];
216 "Cache-Control: no-cache\r\n"
217 "Content-type: application/x-fcs\r\n"
218 "User-Agent: Shockwave Flash\r\n");
261 #define OFFSET(x) offsetof(RTMP_HTTPContext, x)
262 #define DEC AV_OPT_FLAG_DECODING_PARAM
277 .
name =
"ffrtmphttp",
285 .default_whitelist =
"https,http,tcp,tls",
int ffurl_alloc(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb)
Create a URLContext for accessing to the resource indicated by url, but do not initiate the connectio...
int ffurl_read(URLContext *h, unsigned char *buf, int size)
Read up to size bytes from the resource accessed by h, and store the read bytes in buf.
int ffurl_closep(URLContext **hh)
Close the resource accessed by the URLContext h, and free the memory used by it.
int ffurl_connect(URLContext *uc, AVDictionary **options)
Connect an URLContext that has been allocated by ffurl_alloc.
#define AVIO_FLAG_READ_WRITE
read-write pseudo flag
#define AVIO_FLAG_NONBLOCK
Use non-blocking mode.
#define flags(name, subs,...)
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
Split a URL string into components.
#define AVERROR_EOF
End of file.
const char * av_default_item_name(void *ptr)
Return the context name.
char * av_strdup(const char *s)
Duplicate a string.
int av_reallocp(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
static av_const int av_isspace(int c)
Locale-independent conversion of ASCII isspace.
#define LIBAVUTIL_VERSION_INT
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
int av_opt_set_bin(void *obj, const char *name, const uint8_t *val, int len, int search_flags)
int ff_http_do_new_request(URLContext *h, const char *uri)
Send a new HTTP request, reusing the old connection.
common internal API header
static int rtmp_http_send_cmd(URLContext *h, const char *cmd)
static const AVOption ffrtmphttp_options[]
static int rtmp_http_write(URLContext *h, const uint8_t *buf, int size)
const URLProtocol ff_ffrtmphttp_protocol
static int rtmp_http_read(URLContext *h, uint8_t *buf, int size)
#define RTMPT_DEFAULT_PORT
#define RTMPTS_DEFAULT_PORT
static const AVClass ffrtmphttp_class
static int rtmp_http_open(URLContext *h, const char *uri, int flags)
static int rtmp_http_close(URLContext *h)
Describe the class of an AVClass context structure.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
int tls
use Transport Security Layer (RTMPTS)
int port
port to connect (default is 80)
uint8_t * out_data
output buffer
URLContext * stream
HTTP stream.
int nb_bytes_read
number of bytes read since the last request
char client_id[64]
client ID used for all requests except the first one
int finishing
flag indicating when the client closes the connection
int initialized
flag indicating when the http context is initialized
int out_capacity
current output buffer capacity
int seq
sequence ID used for all requests
int out_size
current output buffer size
char host[256]
hostname of the server
const char * protocol_whitelist
int av_usleep(unsigned usec)
Sleep for a period of time.
int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...)
#define URL_PROTOCOL_FLAG_NETWORK