Go to the documentation of this file.
56 return TLS_WANT_POLLIN;
59 return ret >= 0 ?
ret : -1;
67 return TLS_WANT_POLLOUT;
70 return ret >= 0 ?
ret : -1;
77 struct tls_config *cfg =
NULL;
80 if (tls_init() == -1) {
88 p->
ctx = !
c->listen ? tls_client() : tls_server();
94 cfg = tls_config_new();
99 if (tls_config_set_protocols(cfg, TLS_PROTOCOLS_ALL) == -1)
103 if (tls_config_set_ciphers(cfg,
"compat") == -1)
105 if (
c->ca_file && tls_config_set_ca_file(cfg,
c->ca_file) == -1)
107 if (
c->cert_file && tls_config_set_cert_file(cfg,
c->cert_file) == -1)
109 if (
c->key_file && tls_config_set_key_file(cfg,
c->key_file) == -1)
112 tls_config_insecure_noverifycert(cfg);
113 tls_config_insecure_noverifyname(cfg);
114 tls_config_insecure_noverifytime(cfg);
116 if (tls_configure(p->
ctx, cfg) == -1)
135 tls_config_free(cfg);
147 tls_config_free(cfg);
161 else if (
ret == TLS_WANT_POLLIN ||
ret == TLS_WANT_POLLOUT)
176 else if (
ret == TLS_WANT_POLLIN ||
ret == TLS_WANT_POLLOUT)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define URL_PROTOCOL_FLAG_NETWORK
#define AVERROR_EOF
End of file.
static int ff_tls_close(URLContext *h)
static int tls_write(URLContext *h, const uint8_t *buf, int size)
static int ff_tls_read(URLContext *h, uint8_t *buf, int size)
#define TLS_COMMON_OPTIONS(pstruct, options_field)
static int ff_tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options)
static const AVClass tls_class
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int tls_get_file_handle(URLContext *h)
static int tls_close(URLContext *h)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
static const AVOption options[]
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static int tls_get_short_seek(URLContext *h)
const URLProtocol ff_tls_protocol
int ffurl_get_short_seek(URLContext *h)
Return the current short seek threshold value for this URL.
int ffurl_closep(URLContext **hh)
Close the resource accessed by the URLContext h, and free the memory used by it.
int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static ssize_t tls_write_callback(struct tls *ctx, const void *buf, size_t buflen, void *cb_arg)
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.
int ffurl_write(URLContext *h, const unsigned char *buf, int size)
Write size bytes from buf to the resource accessed by h.
static int tls_read(URLContext *h, uint8_t *buf, int size)
#define flags(name, subs,...)
static int ff_tls_write(URLContext *h, const uint8_t *buf, int size)
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
int ffurl_get_file_handle(URLContext *h)
Return the file descriptor associated with this URL.
static ssize_t tls_read_callback(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)