Go to the documentation of this file.
43 #define OFFSET(x) offsetof(ZMQContext, x)
44 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
55 zmq->
zmq = zmq_ctx_new();
58 "Could not create ZMQ context: %s\n", zmq_strerror(errno));
65 "Could not create ZMQ socket: %s\n", zmq_strerror(errno));
71 "Could not bind ZMQ socket to address '%s': %s\n",
85 zmq_ctx_destroy(zmq->
zmq);
92 #define SPACES " \f\t\n\r"
96 const char **buf = &command_str;
101 "No target specified in command '%s'\n", command_str);
108 "No command specified in command '%s'\n", command_str);
122 if (zmq_msg_init(&msg) == -1) {
124 "Could not initialize receive message: %s\n", zmq_strerror(errno));
128 if (zmq_msg_recv(&msg, zmq->
responder, ZMQ_DONTWAIT) == -1) {
131 "Could not receive message: %s\n", zmq_strerror(errno));
136 *buf_size = zmq_msg_size(&msg) + 1;
142 memcpy(*buf, zmq_msg_data(&msg), *buf_size - 1);
143 (*buf)[*buf_size-1] = 0;
157 char *recv_buf, *send_buf;
175 "Processing command #%d target:%s command:%s arg:%s\n",
179 cmd_buf,
sizeof(cmd_buf),
188 "Sending command reply for command #%d:\n%s\n",
190 if (zmq_send(zmq->
responder, send_buf, strlen(send_buf), 0) == -1)
208 #if CONFIG_ZMQ_FILTER
227 .description =
NULL_IF_CONFIG_SMALL(
"Receive commands through ZMQ and broker them to filters."),
233 .priv_class = &zmq_class,
238 #if CONFIG_AZMQ_FILTER
257 .description =
NULL_IF_CONFIG_SMALL(
"Receive commands through ZMQ and broker them to filters."),
258 .priv_class = &zmq_class,
#define AVFILTER_CMD_FLAG_ONE
Stop once a filter understood the command (for target=all for example), fast filters are favored auto...
#define AV_LOG_WARNING
Something somehow does not look correct.
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
char * av_get_token(const char **buf, const char *term)
Unescape the given string until a non escaped terminating char, and return the token corresponding to...
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
char * av_asprintf(const char *fmt,...)
This structure describes decoded (raw) audio or video data.
static const AVOption options[]
#define AV_LOG_VERBOSE
Detailed information.
const AVFilter ff_af_azmq
const char * name
Filter name.
A link between two filters.
static int parse_command(Command *cmd, const char *command_str, void *log_ctx)
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
#define FILTER_INPUTS(array)
Describe the class of an AVClass context structure.
static void av_cold uninit(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
static int recv_msg(AVFilterContext *ctx, char **buf, int *buf_size)
#define AVERROR_EXTERNAL
Generic error in an external library.
const char * name
Pad name.
static int ref[MAX_W *MAX_W]
static av_cold int init(AVFilterContext *ctx)
#define FILTER_OUTPUTS(array)
int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags)
Send a command to one or more filter instances.
AVFILTER_DEFINE_CLASS_EXT(zmq, "(a)zmq", options)