Foundations 基础
This chapter of the guide introduces the basic concepts of GStreamer. Understanding these concepts will help you grok the issues involved in extending GStreamer. Many of these concepts are explained in greater detail in the GStreamer Application Development Manual; the basic concepts presented here serve mainly to refresh your memory.
本章介绍GStreamer的基本概念。理解这些概念将有助于您理解扩展GStreamer所涉及的问题。在《GStreamer应用程序开发手册》中对这些概念进行了更详细的解释;这里介绍的基本概念主要是为了简单的回顾。
Elements and Plugins 元素和插件
Elements are at the core of GStreamer. In the context of plugin development, an element is an object derived from the GstElement class. Elements provide some sort of functionality when linked with other elements: For example, a source element provides data to a stream, and a filter element acts on the data in a stream. Without elements, GStreamer is just a bunch of conceptual pipe fittings with nothing to link. A large number of elements ship with GStreamer, but extra elements can also be written.
元素是GStreamer的核心。在插件开发的上下文中,元素是从GstElement类派生出来的对象。元素在与其他元素链接时提供某种功能:例如,源source 元素向数据流提供数据,而筛选器filter元素作用于流中的数据。如果没有元素,GStreamer只是一堆概念性的管道配件,没有什么可以把他们关联起来。GStreamer本身就附带了大量的元素,但是也可以编写其它新的元素。
Just writing a new element is not entirely enough, however: You will need to encapsulate your element in a plugin to enable GStreamer to use it. A plugin is essentially a loadable block of code, usually called a shared object file or a dynamically linked library. A single plugin may contain the implementation of several elements, or just a single one. For simplicity, this guide concentrates primarily on plugins containing one element.
然而,仅仅编写一个新元素是不够的:您需要将您的元素封装在一个插件中,以便GStreamer能够使用它。插件本质上是一个可加载的代码块,通常称为共享目标文件或动态链接库。一个插件可以包含一个或多个元素的实现。为简单起见,本指南主要关注包含一个元素的插件。
A filter is an important type of element that processes a stream of data. Producers and consumers of data are called source and sink elements, respectively. Bin elements contain other elements. One type of bin is responsible for synchronization of the elements that they contain so that data flows smoothly. Another type of bin, called autoplugger elements, automatically add other elements to the bin and links them together so that they act as a filter between two arbitrary stream types.
过滤器是处理数据流的一种重要元素类型。数据的生产者和消费者分别称为source 源元素和sink输出元素。Bin元素是把其他元素打包形成一个元素。一种类型的bin负责它们所包含的元素的同步,以便数据平稳流动。另一种类型的容器,称为自动插入元素,自动将其他元素添加到容器中,并将它们链接在一起,以便它们充当两种任意流类型之间的过滤器。
The plugin mechanism is used everywhere in GStreamer, even if only the standard packages are being used. A few very basic functions reside in the core library, and all others are implemented in plugins. A plugin registry is used to store the details of the plugin

本文介绍了GStreamer的核心概念,如元素与插件的作用,数据流中的pads、缓冲与事件处理,以及基本类型和媒体类型。重点讲解了元素、插件的开发原理,展示了pad在数据交互中的关键角色和不同类型的缓冲管理策略。
最低0.47元/天 解锁文章
2845

被折叠的 条评论
为什么被折叠?



