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

◆ GNUTLS_VERSION_NUMBER

#define GNUTLS_VERSION_NUMBER   LIBGNUTLS_VERSION_NUMBER

Definition at line 39 of file tls_gnutls.c.

Function Documentation

◆ ff_gnutls_init()

void ff_gnutls_init ( void  )

Definition at line 56 of file tls_gnutls.c.

Referenced by ff_tls_init(), and tls_open().

◆ ff_gnutls_deinit()

void ff_gnutls_deinit ( void  )

Definition at line 67 of file tls_gnutls.c.

Referenced by ff_tls_deinit(), and tls_close().

◆ print_tls_error()

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().

◆ tls_close()

static int tls_close ( URLContext h)
static

Definition at line 94 of file tls_gnutls.c.

Referenced by ff_tls_close(), and tls_open().

◆ gnutls_url_pull()

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().

◆ gnutls_url_push()

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().

◆ 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.

◆ tls_read()

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

Definition at line 237 of file tls_gnutls.c.

Referenced by ff_tls_read().

◆ tls_write()

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

Definition at line 252 of file tls_gnutls.c.

Referenced by ff_tls_write().

◆ tls_get_file_handle()

static int tls_get_file_handle ( URLContext h)
static

Definition at line 267 of file tls_gnutls.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ NULL }
}

Definition at line 273 of file tls_gnutls.c.

Referenced by tls_open().

◆ tls_class

const AVClass tls_class
static
Initial value:
= {
.class_name = "tls",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 278 of file tls_gnutls.c.

◆ ff_tls_protocol

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,
}

Definition at line 285 of file tls_gnutls.c.

TLSContext
Definition: tls_gnutls.c:48
URL_PROTOCOL_FLAG_NETWORK
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
tls_class
static const AVClass tls_class
Definition: tls_gnutls.c:278
tls_write
static int tls_write(URLContext *h, const uint8_t *buf, int size)
Definition: tls_gnutls.c:252
TLS_COMMON_OPTIONS
#define TLS_COMMON_OPTIONS(pstruct, options_field)
Definition: tls.h:45
tls_open
static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options)
Definition: tls_gnutls.c:141
tls_close
static int tls_close(URLContext *h)
Definition: tls_gnutls.c:94
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
tls_get_file_handle
static int tls_get_file_handle(URLContext *h)
Definition: tls_gnutls.c:267
options
static const AVOption options[]
Definition: tls_gnutls.c:273
tls_read
static int tls_read(URLContext *h, uint8_t *buf, int size)
Definition: tls_gnutls.c:237
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565