29 #define ZMQ_STRERROR zmq_strerror(zmq_errno()) 39 #define OFFSET(x) offsetof(ZMQContext, x) 40 #define D AV_OPT_FLAG_DECODING_PARAM 41 #define E AV_OPT_FLAG_ENCODING_PARAM 50 int ev = write ? ZMQ_POLLOUT : ZMQ_POLLIN;
51 zmq_pollitem_t items = { .socket =
socket, .fd = 0, .events = ev, .revents = 0 };
57 return items.revents & ev ? 0 :
AVERROR(EAGAIN);
63 int64_t wait_start = 0;
110 ret = zmq_bind(s->
socket, uri);
125 ret = zmq_setsockopt(s->
socket, ZMQ_SUBSCRIBE,
"", 0);
131 ret = zmq_connect(s->
socket, uri);
154 ret = zmq_send(s->
socket, buf, size, 0);
170 ret = zmq_recv(s->
socket, buf, size, 0);
205 .priv_data_class = &zmq_context_class,
static const AVClass zmq_context_class
#define URL_PROTOCOL_FLAG_NETWORK
static const AVOption options[]
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
int is_streamed
true if streamed (no seek possible), default = false
AVIOInterruptCB interrupt_callback
const char * av_default_item_name(void *ptr)
Return the context name.
#define AVIO_FLAG_READ
read-only
int64_t rw_timeout
maximum time to wait for (network) read/write operation completion, in mcs
#define AVIO_FLAG_WRITE
write-only
static int zmq_proto_open(URLContext *h, const char *uri, int flags)
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 int zmq_proto_wait_timeout(URLContext *h, void *socket, int write, int64_t timeout, AVIOInterruptCB *int_cb)
Callback for checking whether to abort blocking functions.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const AVIOInterruptCB int_cb
static int zmq_proto_read(URLContext *h, unsigned char *buf, int size)
static int zmq_proto_write(URLContext *h, const unsigned char *buf, int size)
const URLProtocol ff_libzmq_protocol
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
static int zmq_proto_close(URLContext *h)
int ff_check_interrupt(AVIOInterruptCB *cb)
Check if the user has requested to interrupt a blocking function associated with cb.
Describe the class of an AVClass context structure.
int64_t av_gettime_relative(void)
Get the current time in microseconds since some unspecified starting point.
#define flags(name, subs,...)
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
static int zmq_proto_wait(URLContext *h, void *socket, int write)
int max_packet_size
if non zero, the stream is packetized with this max packet size
unbuffered private I/O API
#define AVERROR_EXTERNAL
Generic error in an external library.