GstAppSink简介
Description
Appsink is a sink plugin that supports many different methods for making the application get a handle on the GStreamer data in a pipeline. Unlike most GStreamer elements, Appsink provides external API functions.appsink can be used by linking to the gstappsink.h header file to access the methods or by using the appsink action signals and properties.
AppsInk是一个槽插件,它提供了多种供应用程序处理GStreamer管道数据流的方法。不同于大多数的GStreamer元件。Appsink提供额外的API函数。添加gstappsink.h头文件后获取appsink的方法(函数)或者使用appsink的响应信号和属性。
The normal way of retrieving samples from appsink is by using the gst_app_sink_pull_sample() and gst_app_sink_pull_preroll()methods. These methods block until a sample becomes available in the sink or when the sink is shut down or reaches EOS.There are also timed variants of these methods, gst_app_sink_try_pull_sample() and gst_app_sink_try_pull_preroll(), which accept a timeout parameter to limit the amount of time to wait.
常用的从appsink获取采样数据的方法是使用gst_app_sink_pull_sample函数和gst_app_sink_pull_preroll函数。这两个函数都是阻塞的,直到在槽中可获取到一个采样数据或者当槽被关闭或者结束信号到来。这两个方法也都有时间上的变体函数,gst_app_sink_try_pull_sample函数和gst_app_sink_pull_preroll函数,这两个函数接受一个超时参数来限制函数等待时间。
Appsink will internally use a queue to collect buffers from the streaming thread. If the application is not pulling samples fast enough, this queue will consume a lot of memory over time. The "max-buffers" property can be used to limit the queue size. The "drop" property controls whether the streaming thread blocks or if older buffers are dropped when the maximum queue size is reached. Note that blocking the streaming thread can negatively affect real-time performance and should be avoided.
Appsink将在内部使用一个队列来收集从流线程中获取的缓存。如果应用程序没有足够快的拉取(pull)采样数据,随着时间消逝,这个队列将消耗大量的内存。Appsink的max-buffers属性可以用来限制内部队列的大小。AppSink的drop属性控制当流线程阻塞、缓存到达了队列最大个数之后是否掉先前的缓存数据。注意,阻塞流线程将对实时性能有负面影响,应当避免。
If a blocking behaviour is not desirable, setting the "emit-signals" property to TRUE will make appsink emit the "new-sample" and "new-preroll" signals when a sample can be pulled without blocking.The "caps" property on appsink can be used to control the formats that appsink can receive. This property can contain non-fixed caps, the format of the pulled samples can be obtained by getting the sample caps.
如果阻塞式行为不可取,那么设置Appsink的emit-signals属性为TRUE,让appsink在采样数据可以被非阻塞式拉取的时候发送“new-sample”信号和“new-preroll”信号。Appsink的caps属性可以用来控制appsink能够接收的缓存数据格式。该数据可以包含不固定的caps,拉取采样数据的格式可以通过获取采样caps获知。
If one of the pull-preroll or pull-sample methods return NULL, the appsink is stopped or in the EOS state. You can check for the EOS state with the "eos" property or with the gst_app_sink_is_eos() method.The eos signal can also be used to be informed when the EOS state is reached to avoid polling.
如果pull-preroll方法或者pull-sample方法返回NULL,那么appsink被停止了或者处于EOS(结束)状态。可以通过Appsink的eos属性或者gst_app_sink_is_eos函数来检查Appsink是否处于EOS状态。eos信号也可以用来通知应用程序避免拉取数据,当Appsink到达了EOS状态。
GstAppSink简介的更多相关文章
- ASP.NET Core 1.1 简介
ASP.NET Core 1.1 于2016年11月16日发布.这个版本包括许多伟大的新功能以及许多错误修复和一般的增强.这个版本包含了多个新的中间件组件.针对Windows的WebListener服 ...
- MVVM模式和在WPF中的实现(一)MVVM模式简介
MVVM模式解析和在WPF中的实现(一) MVVM模式简介 系列目录: MVVM模式解析和在WPF中的实现(一)MVVM模式简介 MVVM模式解析和在WPF中的实现(二)数据绑定 MVVM模式解析和在 ...
- Cassandra简介
在前面的一篇文章<图形数据库Neo4J简介>中,我们介绍了一种非常流行的图形数据库Neo4J的使用方法.而在本文中,我们将对另外一种类型的NoSQL数据库——Cassandra进行简单地介 ...
- REST简介
一说到REST,我想大家的第一反应就是“啊,就是那种前后台通信方式.”但是在要求详细讲述它所提出的各个约束,以及如何开始搭建REST服务时,却很少有人能够清晰地说出它到底是什么,需要遵守什么样的准则. ...
- Microservice架构模式简介
在2014年,Sam Newman,Martin Fowler在ThoughtWorks的一位同事,出版了一本新书<Building Microservices>.该书描述了如何按照Mic ...
- const,static,extern 简介
const,static,extern 简介 一.const与宏的区别: const简介:之前常用的字符串常量,一般是抽成宏,但是苹果不推荐我们抽成宏,推荐我们使用const常量. 执行时刻:宏是预编 ...
- HTTPS简介
一.简单总结 1.HTTPS概念总结 HTTPS 就是对HTTP进行了TLS或SSL加密. 应用层的HTTP协议通过传输层的TCP协议来传输,HTTPS 在 HTTP和 TCP中间加了一层TLS/SS ...
- 【Machine Learning】机器学习及其基础概念简介
机器学习及其基础概念简介 作者:白宁超 2016年12月23日21:24:51 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现的深入理解.本系列文章是作者结 ...
- Cesium简介以及离线部署运行
Cesium简介 cesium是国外一个基于JavaScript编写的使用WebGL的地图引擎,一款开源3DGIS的js库.cesium支持3D,2D,2.5D形式的地图展示,可以自行绘制图形,高亮区 ...
随机推荐
- dml语句就是你常写的sql语句,增删改查
dml语句就是你常写的sql语句,增删改查
- supervisor启动sqlmapapi失败 sqlmapapi: ERROR (file is not executable)
问题:在使用supervisor管理sqlmapapi的时候,启动的时候报错: sqlmapapi: ERROR (file is not executable) 解决办法:sudo supervis ...
- from: Java开发必须要知道的知识体系
from: https://zhuanlan.zhihu.com/p/21895647 作者:靳洪飞链接:https://zhuanlan.zhihu.com/p/21895647来源:知乎著作权归 ...
- 127.0.0.1和localhost和本机IP三者的区别
1,什么是环回地址??与127.0.0.1的区别呢?? 环回地址是主机用于向自身发送通信的一个特殊地址(也就是一个特殊的目的地址). 可以这么说:同一台主机上的两项服务若使用环回地址而非分配的主机地址 ...
- C++PE文件格式解析类(轻松制作自己的PE文件解析器)
PE是Portable Executable File Format(可移植的运行体)简写,它是眼下Windows平台上的主流可运行文件格式. PE文件里包括的内容非常多,详细我就不在这解释了,有兴趣 ...
- tp框架where条件查询数据库
tp框架where条件查询数据库 Where 条件表达式格式为: $map['字段名'] = array('表达式', '操作条件'); 其中 $map 是一个普通的数组变量,可以根据自己需求而命名. ...
- objc_msgSend 报错
NSMutableArray * mutableArray = [NSMutableArray arrayWithArray:array]; objc_msgSend(mutableArray,@se ...
- 上门洗车APP --- Androidclient开发 之 网络框架封装介绍(二)
上门洗车APP --- Androidclient开发 之 网络框架封装介绍(二) 前几篇博文中给大家介绍了一下APP中的基本业务及开发本项目使用的网络架构: 上门洗车APP --- Androidc ...
- JQuery利用选择器定位动态id?
假如我们需要去定位一个动态生成的div,我们需要为它指定一个动态的id 例如: 前台使用EL进行迭代LIST生成div,为其添加动态的id,生成之后变成下面样式 <div id="tz ...
- 15 nginx反向代理实现nginx+apache动静分离
一:nginx反向代理实现nginx+apache动静分离-------------概念--------------------------- nginx反向代理服务器+负载均衡 用nginx做反向代 ...