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;
107 ret = zmq_bind(s->
socket, uri);
122 ret = zmq_setsockopt(s->
socket, ZMQ_SUBSCRIBE,
"", 0);
128 ret = zmq_connect(s->
socket, uri);
151 ret = zmq_send(s->
socket, buf, size, 0);
167 ret = zmq_recv(s->
socket, buf, size, 0);
202 .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
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 AVERROR_EXTERNAL
Generic error in an external library.