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. 轻松加减你的NSDate值

    废话不多,先上github链接:https://github.com/codegefluester/CGFDateModifier 然后上使用方法代码: NSDate *oneWeekFromNow ...

  2. 键盘弹出后上提view隐藏后下拉view还原并修改scroll过程中旋转屏幕到竖屏view显示错误

    1,注册键盘相应事件 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillSho ...

  3. 使用virtualenv, uwsgi, nginx来布署django

    http://blog.csdn.net/lihao21/article/details/47731903 http://www.cnblogs.com/lxg226/p/3468558.html h ...

  4. MySQL开发36条军规

    转载地址:http://blog.itpub.net/22664653/viewspace-723506/ 写在前面的话: 总是在灾难发生后,才想起容灾的重要性: 总是在吃过亏后,才记得曾经有人提醒过 ...

  5. GCC编译笔记

    需要移植一个vs2008的项目到linux上,代码比较复杂,重新写比较困难,于是开始折腾 首先移植到codeblocks上,sprints_s这类的vs函数都要改,windows调用要改 编译通过 c ...

  6. 获取类路径中含有beans.xml的jar包名称

    获取类路径中含有beans.xml的jar包名称 package com.stono; import java.io.File; import java.io.IOException; import ...

  7. 导出excel(利用工具类导出excel)

    /** * 添加导出功能 * @param creditPageResult * @param request * @param response */ @RequestMapping(value = ...

  8. java 中 instanceof 和 isInstance区别

    两者的功能是等价的.区别: 1.instanceof 是一个操作符(类似new, ==等): 使用方法: if (ins instanceof String) { //logic } 2.isInst ...

  9. IIS配置asp.net网站

    http://wenku.baidu.com/view/f8ce6c14767f5acfa0c7cd36.html

  10. U盘EFI分区删不掉怎么办

    方法/步骤 将U盘查到电脑上 点击[开始]找到并打开[Windows系统]的下拉按钮,找到[命令提示符] 在“命令提示符”上右键>[更多]>[以管理员身份运行]打开“管理员:命令提示符”窗 ...