[FFmpeg-devel] [PATCH 1/4] lavfi: add filter messages infrastructure.
u at pkh.me
Tue Jul 29 10:33:17 CEST 2014
On Thu, Jul 24, 2014 at 03:39:42PM +0200, Nicolas George wrote:
> Messaages are passed as frames with a negative format code,
> only to filter that declare supporting them.
> The only message for now is EOF; this mechanism augments
> the current mechanism based on request_frame() returning
> AVERROR_EOF, with the advantage that the EOF message carries
> a timestamp.
What other kind of messages do you have in mind?
"messages" sounds very user specific though. Like, it makes almost believe
that it's similar to the command system, and that we could maybe introduce
stuff like seeking through this. Said differently, it's just extremely
confusing to get the purpose.
> The messages are a purely internal API and do not leak to
> the application.
> Signed-off-by: Nicolas George <george at nsup.org>
> libavfilter/avfilter.c | 68 ++++++++++++++++++++++++++++++++++++++++++++------
> libavfilter/internal.h | 34 +++++++++++++++++++++++++
> 2 files changed, 95 insertions(+), 7 deletions(-)
> diff --git a/libavfilter/internal.h b/libavfilter/internal.h
> index 308b115..de249a4 100644
> --- a/libavfilter/internal.h
> +++ b/libavfilter/internal.h
> @@ -374,4 +374,38 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name);
> void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter);
> + * The filter can accept messages.
> + */
> +#define FF_FILTER_FLAG_SUPPORT_MESSAGES (1 << 24)
> + * Types of messages that can be passer to a filter.
> + * Messages are passed as AVFrame structures with a negative format field.
> + * The framework will take default actions based on the message type.
> + * The destination filter is allowed to reset the type to inhibit the
> + * default actions.
> + */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 473 bytes
Desc: not available
More information about the ffmpeg-devel