FFmpeg
Data Structures | Macros | Functions | Variables
tls_gnutls.c File Reference
#include <errno.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#include "avformat.h"
#include "internal.h"
#include "network.h"
#include "os_support.h"
#include "url.h"
#include "tls.h"
#include "libavcodec/internal.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"

Go to the source code of this file.

Data Structures

struct  TLSContext
 

Macros

#define GNUTLS_VERSION_NUMBER   LIBGNUTLS_VERSION_NUMBER
 

Functions

void ff_gnutls_init (void)
 
void ff_gnutls_deinit (void)
 
static int print_tls_error (URLContext *h, int ret)
 
static int tls_close (URLContext *h)
 
static ssize_t gnutls_url_pull (gnutls_transport_ptr_t transport, void *buf, size_t len)
 
static ssize_t gnutls_url_push (gnutls_transport_ptr_t transport, const void *buf, size_t len)
 
static int tls_open (URLContext *h, const char *uri, int flags, AVDictionary **options)
 
static int tls_read (URLContext *h, uint8_t *buf, int size)
 
static int tls_write (URLContext *h, const uint8_t *buf, int size)
 
static int tls_get_file_handle (URLContext *h)
 

Variables

static const AVOption options []
 
static const AVClass tls_class
 
const URLProtocol ff_tls_protocol
 

Macro Definition Documentation

#define GNUTLS_VERSION_NUMBER   LIBGNUTLS_VERSION_NUMBER

Definition at line 39 of file tls_gnutls.c.

Function Documentation

void ff_gnutls_init ( void  )

Definition at line 56 of file tls_gnutls.c.

Referenced by ff_tls_init(), and tls_open().

void ff_gnutls_deinit ( void  )

Definition at line 67 of file tls_gnutls.c.

Referenced by ff_tls_deinit(), and tls_close().

static int print_tls_error ( URLContext h,
int  ret 
)
static

Definition at line 74 of file tls_gnutls.c.

Referenced by tls_open(), tls_read(), and tls_write().

static int tls_close ( URLContext h)
static

Definition at line 94 of file tls_gnutls.c.

Referenced by ff_tls_close(), and tls_open().

static ssize_t gnutls_url_pull ( gnutls_transport_ptr_t  transport,
void buf,
size_t  len 
)
static

Definition at line 109 of file tls_gnutls.c.

Referenced by tls_open().

static ssize_t gnutls_url_push ( gnutls_transport_ptr_t  transport,
const void buf,
size_t  len 
)
static

Definition at line 125 of file tls_gnutls.c.

Referenced by tls_open().

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

Definition at line 141 of file tls_gnutls.c.

static int tls_read ( URLContext h,
uint8_t buf,
int  size 
)
static

Definition at line 232 of file tls_gnutls.c.

Referenced by ff_tls_read().

static int tls_write ( URLContext h,
const uint8_t buf,
int  size 
)
static

Definition at line 247 of file tls_gnutls.c.

Referenced by ff_tls_write().

static int tls_get_file_handle ( URLContext h)
static

Definition at line 262 of file tls_gnutls.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define TLS_COMMON_OPTIONS(pstruct, options_field)
Definition: tls.h:45

Definition at line 268 of file tls_gnutls.c.

const AVClass tls_class
static
Initial value:
= {
.class_name = "tls",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: tls_gnutls.c:268

Definition at line 273 of file tls_gnutls.c.

const URLProtocol ff_tls_protocol
Initial value:
= {
.name = "tls",
.url_open2 = tls_open,
.url_read = tls_read,
.url_write = tls_write,
.url_close = tls_close,
.url_get_file_handle = tls_get_file_handle,
.priv_data_size = sizeof(TLSContext),
.priv_data_class = &tls_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
static const AVClass tls_class
Definition: tls_gnutls.c:273
static int tls_read(URLContext *h, uint8_t *buf, int size)
Definition: tls_gnutls.c:232
static int tls_close(URLContext *h)
Definition: tls_gnutls.c:94
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options)
Definition: tls_gnutls.c:141
static int tls_write(URLContext *h, const uint8_t *buf, int size)
Definition: tls_gnutls.c:247
static int tls_get_file_handle(URLContext *h)
Definition: tls_gnutls.c:262

Definition at line 280 of file tls_gnutls.c.