Go to the documentation of this file.
40 #define D AV_OPT_FLAG_DECODING_PARAM
41 #define E AV_OPT_FLAG_ENCODING_PARAM
70 char hostname[256],
buf[1024], path[1024];
73 if (
s->out_suite &&
s->out_params)
76 if (
s->in_suite &&
s->in_params)
81 path,
sizeof(path), uri);
84 NULL,
h->protocol_whitelist,
h->protocol_blacklist,
h)) < 0)
87 h->max_packet_size =
FFMIN(
s->rtp_hd->max_packet_size,
88 sizeof(
s->encryptbuf)) - 14;
103 if (
ret > 0 &&
s->srtp_in.aes) {
113 if (!
s->srtp_out.aes)
116 sizeof(
s->encryptbuf));
uint8_t encryptbuf[RTP_MAX_PACKET_LENGTH]
#define URL_PROTOCOL_FLAG_NETWORK
static int srtp_get_file_handle(URLContext *h)
static const AVClass srtp_context_class
int ffurl_close(URLContext *h)
static int srtp_read(URLContext *h, uint8_t *buf, int size)
int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr)
static int srtp_close(URLContext *h)
int ff_srtp_encrypt(struct SRTPContext *s, const uint8_t *in, int len, uint8_t *out, int outlen)
int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist, URLContext *parent)
Create an URLContext for accessing to the resource indicated by url, and open it.
int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...)
const URLProtocol ff_srtp_protocol
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles)
Return the file descriptors associated with this URL.
static int srtp_get_multi_file_handle(URLContext *h, int **handles, int *numhandles)
void ff_srtp_free(struct SRTPContext *s)
static int srtp_write(URLContext *h, const uint8_t *buf, int size)
struct SRTPContext srtp_out srtp_in
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.
int ff_srtp_set_crypto(struct SRTPContext *s, const char *suite, const char *params)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define RTP_MAX_PACKET_LENGTH
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.
static const AVOption options[]
int ffurl_write(URLContext *h, const unsigned char *buf, int size)
Write size bytes from buf to the resource accessed by h.
static int srtp_open(URLContext *h, const char *uri, int flags)
#define flags(name, subs,...)
int ffurl_get_file_handle(URLContext *h)
Return the file descriptor associated with this URL.