FFmpeg
Data Structures | Macros | Functions | Variables
libzmq.c File Reference
#include <zmq.h>
#include "url.h"
#include "network.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"

Go to the source code of this file.

Data Structures

struct  ZMQContext
 

Macros

#define ZMQ_STRERROR   zmq_strerror(zmq_errno())
 
#define OFFSET(x)   offsetof(ZMQContext, x)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int zmq_proto_wait (URLContext *h, void *socket, int write)
 
static int zmq_proto_wait_timeout (URLContext *h, void *socket, int write, int64_t timeout, AVIOInterruptCB *int_cb)
 
static int zmq_proto_open (URLContext *h, const char *uri, int flags)
 
static int zmq_proto_write (URLContext *h, const unsigned char *buf, int size)
 
static int zmq_proto_read (URLContext *h, unsigned char *buf, int size)
 
static int zmq_proto_close (URLContext *h)
 

Variables

static const AVOption options []
 
static const AVClass zmq_context_class
 
const URLProtocol ff_libzmq_protocol
 

Macro Definition Documentation

◆ ZMQ_STRERROR

#define ZMQ_STRERROR   zmq_strerror(zmq_errno())

Definition at line 29 of file libzmq.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(ZMQContext, x)

Definition at line 39 of file libzmq.c.

◆ D

Definition at line 40 of file libzmq.c.

◆ E

Definition at line 41 of file libzmq.c.

Function Documentation

◆ zmq_proto_wait()

static int zmq_proto_wait ( URLContext h,
void *  socket,
int  write 
)
static

Definition at line 47 of file libzmq.c.

Referenced by zmq_proto_wait_timeout().

◆ zmq_proto_wait_timeout()

static int zmq_proto_wait_timeout ( URLContext h,
void *  socket,
int  write,
int64_t  timeout,
AVIOInterruptCB int_cb 
)
static

Definition at line 60 of file libzmq.c.

Referenced by zmq_proto_read(), and zmq_proto_write().

◆ zmq_proto_open()

static int zmq_proto_open ( URLContext h,
const char *  uri,
int  flags 
)
static

Definition at line 80 of file libzmq.c.

◆ zmq_proto_write()

static int zmq_proto_write ( URLContext h,
const unsigned char *  buf,
int  size 
)
static

Definition at line 143 of file libzmq.c.

◆ zmq_proto_read()

static int zmq_proto_read ( URLContext h,
unsigned char *  buf,
int  size 
)
static

Definition at line 159 of file libzmq.c.

◆ zmq_proto_close()

static int zmq_proto_close ( URLContext h)
static

Definition at line 180 of file libzmq.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "pkt_size", "Maximum send/read packet size", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = 131072 }, -1, INT_MAX, .flags = D | E },
{ NULL }
}

Definition at line 42 of file libzmq.c.

◆ zmq_context_class

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

Definition at line 188 of file libzmq.c.

◆ ff_libzmq_protocol

const URLProtocol ff_libzmq_protocol
Initial value:
= {
.name = "zmq",
.url_close = zmq_proto_close,
.url_open = zmq_proto_open,
.url_read = zmq_proto_read,
.url_write = zmq_proto_write,
.priv_data_size = sizeof(ZMQContext),
.priv_data_class = &zmq_context_class,
}

Definition at line 195 of file libzmq.c.

URL_PROTOCOL_FLAG_NETWORK
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
E
#define E
Definition: libzmq.c:41
ZMQContext
Definition: f_zmq.c:35
zmq_proto_close
static int zmq_proto_close(URLContext *h)
Definition: libzmq.c:180
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
zmq_proto_write
static int zmq_proto_write(URLContext *h, const unsigned char *buf, int size)
Definition: libzmq.c:143
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
zmq_proto_open
static int zmq_proto_open(URLContext *h, const char *uri, int flags)
Definition: libzmq.c:80
options
static const AVOption options[]
Definition: libzmq.c:42
zmq_context_class
static const AVClass zmq_context_class
Definition: libzmq.c:188
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
D
#define D
Definition: libzmq.c:40
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
zmq_proto_read
static int zmq_proto_read(URLContext *h, unsigned char *buf, int size)
Definition: libzmq.c:159
OFFSET
#define OFFSET(x)
Definition: libzmq.c:39