FFmpeg
Loading...
Searching...
No Matches
srtpproto.c File Reference
#include "libavutil/opt.h"
#include "avformat.h"
#include "url.h"
#include "rtpdec.h"
#include "srtp.h"

Go to the source code of this file.

Data Structures

struct  SRTPProtoContext
 

Macros

#define D   AV_OPT_FLAG_DECODING_PARAM
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int srtp_close (URLContext *h)
 
static int srtp_open (URLContext *h, const char *uri, int flags, AVDictionary **options)
 
static int srtp_read (URLContext *h, uint8_t *buf, int size)
 
static int srtp_write (URLContext *h, const uint8_t *buf, int size)
 
static int srtp_get_file_handle (URLContext *h)
 
static int srtp_get_multi_file_handle (URLContext *h, int **handles, int *numhandles)
 

Variables

static const AVOption srtp_options []
 
static const AVClass srtp_context_class
 
const URLProtocol ff_srtp_protocol
 

Macro Definition Documentation

◆ D

Definition at line 38 of file srtpproto.c.

◆ E

Definition at line 39 of file srtpproto.c.

Function Documentation

◆ srtp_close()

static int srtp_close ( URLContext * h)
static

Definition at line 55 of file srtpproto.c.

Referenced by srtp_open().

◆ srtp_open()

static int srtp_open ( URLContext * h,
const char * uri,
int flags,
AVDictionary ** options )
static

Definition at line 64 of file srtpproto.c.

◆ srtp_read()

static int srtp_read ( URLContext * h,
uint8_t * buf,
int size )
static

Definition at line 94 of file srtpproto.c.

◆ srtp_write()

static int srtp_write ( URLContext * h,
const uint8_t * buf,
int size )
static

Definition at line 107 of file srtpproto.c.

◆ srtp_get_file_handle()

static int srtp_get_file_handle ( URLContext * h)
static

Definition at line 119 of file srtpproto.c.

◆ srtp_get_multi_file_handle()

static int srtp_get_multi_file_handle ( URLContext * h,
int ** handles,
int * numhandles )
static

Definition at line 125 of file srtpproto.c.

Variable Documentation

◆ srtp_options

const AVOption srtp_options[]
static
Initial value:
= {
{ "srtp_out_suite", "", 0x42 , AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
{ "srtp_out_params", "", 0x42 , AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
{ "srtp_in_suite", "", 0x42 , AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
{ "srtp_in_params", "", 0x42 , AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
{ NULL }
}
#define E
Definition avdct.c:34
#define D
Definition avdct.c:35
#define NULL
Definition coverity.c:32
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275

Definition at line 40 of file srtpproto.c.

◆ srtp_context_class

const AVClass srtp_context_class
static
Initial value:
= {
.class_name = "srtp",
.item_name = av_default_item_name,
.option = srtp_options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
static const AVOption srtp_options[]
Definition srtpproto.c:40

Definition at line 48 of file srtpproto.c.

◆ ff_srtp_protocol

const URLProtocol ff_srtp_protocol
Initial value:
= {
.name = "srtp",
.url_open2 = srtp_open,
.url_read = srtp_read,
.url_write = srtp_write,
.url_close = srtp_close,
.url_get_file_handle = srtp_get_file_handle,
.url_get_multi_file_handle = srtp_get_multi_file_handle,
.priv_data_size = sizeof(SRTPProtoContext),
.priv_data_class = &srtp_context_class,
}
#define flags(name, subs,...)
Definition cbs_h264.c:74
static int srtp_get_multi_file_handle(URLContext *h, int **handles, int *numhandles)
Definition srtpproto.c:125
static int srtp_read(URLContext *h, uint8_t *buf, int size)
Definition srtpproto.c:94
static int srtp_close(URLContext *h)
Definition srtpproto.c:55
static int srtp_write(URLContext *h, const uint8_t *buf, int size)
Definition srtpproto.c:107
static int srtp_get_file_handle(URLContext *h)
Definition srtpproto.c:119
static const AVClass srtp_context_class
Definition srtpproto.c:48
static int srtp_open(URLContext *h, const char *uri, int flags, AVDictionary **options)
Definition srtpproto.c:64
#define URL_PROTOCOL_FLAG_NETWORK
Definition url.h:33

Definition at line 132 of file srtpproto.c.