mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user