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形式的地图展示,可以自行绘制图形,高亮区 ...
随机推荐
- Copy Records From One Data Block To Another Data Block In Oracle Forms
In this tutorial you will learn to copy the records from one data block to another data block on sam ...
- Flutter开发记录part2
(1)文本超出折叠:child: Text('跑马灯dddd的范德萨范德萨放多少范德萨范德萨范德萨范德萨范德萨发',maxLines: 1,overflow: TextOverflow.ellipsi ...
- Android - 显示手机执行的Activity
显示手机执行的Activity 本文地址:http://blog.csdn.net/caroline_wendy 手机中,须要调试程序的界面,能够高速进行定位,使用Android开发工具ADB(And ...
- 【GLSL教程】(三)在OpenGL中向shader传递信息 【转】
http://blog.csdn.net/racehorse/article/details/6634830 引言 一个OpenGL程序可以用多种方式和shader通信.注意这种通信是单向的,因为sh ...
- Git相关命令教程
一.在GitHub上创建新项目 (1)在GitHub首页 “New repository”,创建新版本库“test” (2)在本地使用GitBash,将repository clone到本地 git ...
- django orm高级查询 F表达式和Q表达式以及分组annotate
1.关联关系映射及查询1.1django默认开启延迟加载所有多对1和1对1如果不使用select_related(),需要会延迟加载获取到相关对象,因为延迟可能会造成n+1次查询的问题,所以便有了se ...
- wait和notify实现的生产者消费者线程交互
public class ProductTest { public static void main(String args[]) { Repertory repertory=new Repertor ...
- p90x 涵盖了全部方式的健身方式美国经典训练DVD
http://baike.baidu.com/view/2602721.htm p90x是美国经典训练DVD, 涵盖了全部方式的健身方式13张Beachbody P90X DVD全集,90天魔鬼训练 ...
- Linux下Nginx安全证书ssl配置方法
分享下我是如何一步步在Nginx上配置SSL的.首先,确保安装了OpenSSL库,并且安装Nginx时使用了–with-http_ssl_module参数. 初学者或者菜鸟建议使用LNMP进行一键安装 ...
- OpenGL研究3.0 多边形区域填充
OpenGL研究3.0 多边形区域填充 DionysosLai(906391500@qq.com)2014-06-22 所谓多边形区域填充.就是将多边形内部区域,所有已相同色块填充.注意:这里讨论的多 ...