ffmpeg 1.0 filter模块AVFilterPad结构的权限属性min_perms/rej_perms分析
来源:互联网 发布:linux下zip版本 编辑:程序博客网 时间:2024/06/05 12:41
2014 10 19
ffmpeg 1.0 filter模块AVFilterPad结构的权限属性min_perms/rej_perms分析:
1.注释翻译
输入pad:
输入buffer最小权限要求.
如果buffer权限不够,则filter系统自动将其copy到一个能提供相应权限的新buffer
输出pad:
将要输出的buffer的保护权限.
任何想要在link上输出的buffer必须具备这些权限.
这些使用assert来检查的。这可以优化buffer分配。
/**
* 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.
*
* 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;
输入pad:如果输入buffer有这些权限,则输入pad拒绝。如果buffer有这些拒绝权限,
则filter系统自动将其copy到一个没有这些权限的新buffer。
输出pad:输出buffer自动删除这些拒绝权限。这可以用来优化buffer分配。
/**
* 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.
*
* Output pads:
* Permissions which are automatically removed on outgoing buffers. It
* can be used to optimize buffer allocation.
*/
int rej_perms;
2.实现
在video.c文件ff_start_frame函数里实现:
min_perms[输出]://任何想要在link上输出的buffer必须具备这些权限
av_assert1((picref->perms & src->min_perms) == src->min_perms);
rej_perms[输出]://输出buffer自动删除这些拒绝权限
picref->perms &= ~ src->rej_perms;
min_perms[输入]/rej_perms[输入]:
//min_perms:输入buffer最小权限要求. 如果buffer权限不够,则filter系统自动将其copy到一个能提供相应权限的新buffer
//min_perms:如果输入buffer有这些权限,则输入pad拒绝。如果buffer有这些拒绝权限,则filter系统自动将其copy到一个没有这些权限的新buffer
if ((dst->min_perms & perms) != dst->min_perms || dst->rej_perms & perms) {
- ffmpeg 1.0 filter模块AVFilterPad结构的权限属性min_perms/rej_perms分析
- ffmpeg的filter分析
- ffmpeg 1.0 filter的picref流程分析
- Ffmpeg 1.0 Filter format流程分析
- FFMPEG中结构体的分析
- ffmpeg-添加新模块分析
- Android RIl模块的结构分析
- FFMPEG complex filter的流程
- 利用ffmpeg的filter混音
- 利用ffmpeg的filter混音
- FFMPEG complex filter的流程
- FFMPEG添加新的Filter
- ffmpeg 1.0 filter模块Buffersrc/ vf_format文件在format转换中的作用
- 模块结构分析
- FFMPEG结构体分析:AVFrame
- FFMPEG结构体分析:AVFormatContext
- FFMPEG结构体分析:AVCodecContext
- FFMPEG结构体分析:AVIOContext
- 常用博客
- 谷歌设计师的Material Design实践心得
- strcpy/strcmp/memcpy/memcmp/strstr/ 的内部实现(转载)
- 浅谈sql server索引结构
- hdu 4424 Conquer a New Region (并查集)
- ffmpeg 1.0 filter模块AVFilterPad结构的权限属性min_perms/rej_perms分析
- 2015百度移动端研发面试小记
- RequestDispatcher ----- getRequestDispatcher()与sendRedirect()的区别
- Maven和 Sonatype Nexus私服的安装、配置及使用入门
- 第七章 7.2节练习
- STL之Input & Output Iterator
- 不要羡慕别人
- 用bytecode来看try-catch-finally和return
- 远程SSH连接Putty失败解决办法