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简介的更多相关文章

  1. ASP.NET Core 1.1 简介

    ASP.NET Core 1.1 于2016年11月16日发布.这个版本包括许多伟大的新功能以及许多错误修复和一般的增强.这个版本包含了多个新的中间件组件.针对Windows的WebListener服 ...

  2. MVVM模式和在WPF中的实现(一)MVVM模式简介

    MVVM模式解析和在WPF中的实现(一) MVVM模式简介 系列目录: MVVM模式解析和在WPF中的实现(一)MVVM模式简介 MVVM模式解析和在WPF中的实现(二)数据绑定 MVVM模式解析和在 ...

  3. Cassandra简介

    在前面的一篇文章<图形数据库Neo4J简介>中,我们介绍了一种非常流行的图形数据库Neo4J的使用方法.而在本文中,我们将对另外一种类型的NoSQL数据库——Cassandra进行简单地介 ...

  4. REST简介

    一说到REST,我想大家的第一反应就是“啊,就是那种前后台通信方式.”但是在要求详细讲述它所提出的各个约束,以及如何开始搭建REST服务时,却很少有人能够清晰地说出它到底是什么,需要遵守什么样的准则. ...

  5. Microservice架构模式简介

    在2014年,Sam Newman,Martin Fowler在ThoughtWorks的一位同事,出版了一本新书<Building Microservices>.该书描述了如何按照Mic ...

  6. const,static,extern 简介

    const,static,extern 简介 一.const与宏的区别: const简介:之前常用的字符串常量,一般是抽成宏,但是苹果不推荐我们抽成宏,推荐我们使用const常量. 执行时刻:宏是预编 ...

  7. HTTPS简介

    一.简单总结 1.HTTPS概念总结 HTTPS 就是对HTTP进行了TLS或SSL加密. 应用层的HTTP协议通过传输层的TCP协议来传输,HTTPS 在 HTTP和 TCP中间加了一层TLS/SS ...

  8. 【Machine Learning】机器学习及其基础概念简介

    机器学习及其基础概念简介 作者:白宁超 2016年12月23日21:24:51 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现的深入理解.本系列文章是作者结 ...

  9. Cesium简介以及离线部署运行

    Cesium简介 cesium是国外一个基于JavaScript编写的使用WebGL的地图引擎,一款开源3DGIS的js库.cesium支持3D,2D,2.5D形式的地图展示,可以自行绘制图形,高亮区 ...

随机推荐

  1. devicemapper: Error running deviceCreate (ActivateDevice) dm_task_run failed

    在一台新机子上面,docker处理完lvs数据卷之后,启动docker服务时,出现了启动失败,失败信息如下: [root@hxin221 ~]# systemctl status docker ● d ...

  2. xamarin.ios 本地通知推送

    由于ios10版本以后UILocalNotification被标为弃用了,所以要添加新的本地通知推送功能,下面提供一些代码参考. 一.先在AppDelegate.cs上注册本地通知推送功能. publ ...

  3. selinue引起的ssh连接错误

    在客户端执行ssh依然报错: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). 在这个页面不小心看到了原因: http://ser ...

  4. ASP.NET Web API路由规则(二) 【转】

    http://www.cnblogs.com/liulun/archive/2012/06/20/2556556.html 默认的规则 在ASP.NET MVC4中 global.asax.cs代码中 ...

  5. Predicate与filter

    转: http://blog.csdn.net/michaellufhl/article/details/6329823 怎么根据某些条件来过滤Collection的元素?我们可以在循环里面判断元素是 ...

  6. WPF自定义依赖集合属性无法触发更新的问题

    通常WPF中通过继承UserControl的来快速创建自定义控件,最近项目上需要设计一个卫星星图显示控件,最终效果如下图所示.完成过程中遇到了自定义集合依赖属性无法触发更新通知的问题,在此记录一下,方 ...

  7. Spring Cloud(十三):Spring Cloud Sleuth服务链路追踪(zipkin)(转)

    这篇文章主要讲述服务追踪组件zipkin,Spring Cloud Sleuth集成了zipkin组件. 一.简介 Spring Cloud Sleuth 主要功能就是在分布式系统中提供追踪解决方案, ...

  8. POJ 2253 Frogger(最小最大距离)

    题意  给你n个点的坐标  求第1个点到第2个点的全部路径中两点间最大距离的最小值 非常水的floyd咯 #include<cstdio> #include<cmath> #i ...

  9. Android 逐帧动画( Drawable 动画),这一篇就够了

    前言 作为 Android 最常见的两种动画形式,逐帧动画( Drawable 动画),有着极其广泛的应用,它的原理与早起的电影以及 GIF 类似,就是把一张的图,按顺序快速切换,这样一来看上去就好像 ...

  10. servletResponse outputStream输出数据

    package response; import java.io.IOException;import java.io.OutputStream; import javax.servlet.Servl ...