FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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_gnutls_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 93 of file tls_gnutls.c.

Referenced by tls_open().

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

Definition at line 108 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 121 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 134 of file tls_gnutls.c.

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

Definition at line 223 of file tls_gnutls.c.

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

Definition at line 234 of file tls_gnutls.c.

static int tls_get_file_handle ( URLContext h)
static

Definition at line 245 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:47

Definition at line 251 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:86
av_default_item_name
static const AVOption options[]
Definition: tls_gnutls.c:251

Definition at line 256 of file tls_gnutls.c.

const URLProtocol ff_tls_gnutls_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:256
static int flags
Definition: log.c:57
static int tls_read(URLContext *h, uint8_t *buf, int size)
Definition: tls_gnutls.c:223
static int tls_close(URLContext *h)
Definition: tls_gnutls.c:93
static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options)
Definition: tls_gnutls.c:134
static int tls_write(URLContext *h, const uint8_t *buf, int size)
Definition: tls_gnutls.c:234
static int tls_get_file_handle(URLContext *h)
Definition: tls_gnutls.c:245

Definition at line 263 of file tls_gnutls.c.