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

#define ZMQ_STRERROR   zmq_strerror(zmq_errno())

Definition at line 29 of file libzmq.c.

Referenced by zmq_proto_open(), zmq_proto_read(), zmq_proto_wait(), and zmq_proto_write().

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

Definition at line 39 of file libzmq.c.

Definition at line 40 of file libzmq.c.

Definition at line 41 of file libzmq.c.

Function Documentation

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

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

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

Definition at line 80 of file libzmq.c.

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

Definition at line 138 of file libzmq.c.

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

Definition at line 154 of file libzmq.c.

static int zmq_proto_close ( URLContext h)
static

Definition at line 175 of file libzmq.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "pkt_size", "Maximum send/read packet size", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = 32768 }, -1, INT_MAX, .flags = D | E },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: libzmq.c:39
#define E
Definition: libzmq.c:41
#define D
Definition: libzmq.c:40

Definition at line 42 of file libzmq.c.

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

Definition at line 183 of file libzmq.c.

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,
}
static const AVClass zmq_context_class
Definition: libzmq.c:183
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
static int zmq_proto_open(URLContext *h, const char *uri, int flags)
Definition: libzmq.c:80
static int zmq_proto_read(URLContext *h, unsigned char *buf, int size)
Definition: libzmq.c:154
static int zmq_proto_write(URLContext *h, const unsigned char *buf, int size)
Definition: libzmq.c:138
static int zmq_proto_close(URLContext *h)
Definition: libzmq.c:175
#define flags(name, subs,...)
Definition: cbs_av1.c:561

Definition at line 190 of file libzmq.c.