diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-08-12 10:59:37 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-08-14 12:00:35 +0200 |
commit | 271ddb116c8a3e0f2a34cedbb906a2883b5289b1 (patch) | |
tree | 01713b5b7e337401957b7818874183fe8be12970 /libavfilter/avfilter.h | |
parent | 67a804b9ac12efbb8e1c84c6716dec77c9120bd1 (diff) | |
download | ffmpeg-271ddb116c8a3e0f2a34cedbb906a2883b5289b1.tar.gz |
lavfi: use min_perms and rej_perms for out pads.
There are several reasons for doing that:
1. It documents the code for the reader and helps find
inconsistencies and bugs.
2. For rej_perms, it guarantees the change will be done
even if the output reference can be created by several
code paths.
3. It can be used to predict cases where a copy will,
or will not happen and optimize buffer allocation
(for example not request a rare direct-rendering buffer
from a device sink if it will be copied anyway).
Note that a filter is still allowed to manage the permissions
on its own without using these fields.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r-- | libavfilter/avfilter.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 07bc5a986b..9891a72227 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -240,22 +240,29 @@ struct AVFilterPad { enum AVMediaType type; /** + * Input pads: * Minimum required permissions on incoming buffers. Any buffer with * insufficient permissions will be automatically copied by the filter * system to a new buffer which provides the needed access permissions. * - * Input pads only. + * Output pads: + * Guaranteed permissions on outgoing buffers. Any buffer pushed on the + * link must have at least these permissions; this fact is checked by + * asserts. It can be used to optimize buffer allocation. */ int min_perms; /** + * Input pads: * Permissions which are not accepted on incoming buffers. Any buffer * which has any of these permissions set will be automatically copied * by the filter system to a new buffer which does not have those * permissions. This can be used to easily disallow buffers with * AV_PERM_REUSE. * - * Input pads only. + * Output pads: + * Permissions which are automatically removed on outgoing buffers. It + * can be used to optimize buffer allocation. */ int rej_perms; |