GstInterpipe: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
mNo edit summary
Line 1: Line 1:
= Introduction =
= Introduction =


== Overview ==
GstInterpipe is a Gstreamer plug-in that allows communication between two independent pipelines. The plug-in consists of two elements:
GstInterpipe is a Gstreamer plug-in that allows communication between two independent pipelines. The plug-in consists of two elements:
* interpipesink
* interpipesink
Line 12: Line 13:
Various sink pipelines may listen to it by:
Various sink pipelines may listen to it by:
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
interpipesrc name=live_preview listen-to=video_src ! xvimagesink
interpipesrc listen-to=video_src ! xvimagesink
interpipesrc name=snapshot listen-to-video_src num-buffers=1 ! jpegenc ! filesink location=snapshot.jpeg  
interpipesrc listen-to-video_src num-buffers=1 ! jpegenc ! filesink location=snapshot.jpeg  
</pre>  
</pre>  


The state of each pipeline is independent, each one can manage events by their own and
The state of each pipeline is independent, each one can manage events by their own and can be attached or detached at any moment.
 
 


The concept behind the Interpipes Project is to simplify the construction of GStreamer applications, which often has the complexity of requiring dynamic pipelines. It transforms the construction process from low level pad probe manipulation to the higher level setting an element's parameter value.  Application developers don't get mired down in stalled pipelines because one branch of a complex pipeline changed state.
The concept behind the Interpipes Project is to simplify the construction of GStreamer applications, which often has the complexity of requiring dynamic pipelines. It transforms the construction process from low level pad probe manipulation to the higher level setting an element's parameter value.  Application developers don't get mired down in stalled pipelines because one branch of a complex pipeline changed state.
Line 32: Line 31:
This way the stream flow in a complex pipeline is reduced to simply set the correct listeners in the interpipe elements taking away the complexity of re-configuring pads or some other complex and error-prone logic.
This way the stream flow in a complex pipeline is reduced to simply set the correct listeners in the interpipe elements taking away the complexity of re-configuring pads or some other complex and error-prone logic.


== Features and Limitations ==
The GstInterpipe project exposes the following characteristics:


* Inspired by intervideosrc/intervideosink
* Uses appsrc and appsink as a base
* Generic data handling
* Multiple dynamic interpipesink - interpipesrc connections
* Replace tee and selector elements allowing dynamic pipeline flow control with GStreamer Daemon


== GStreamer Plug-In ==
Features:


The Interpipe plug-in
The current release exposes the following limitations and known bugs:
;Specialized clocks
:At the time being, pipelines negotiate their clock independently. If a pipeline uses a special clock (i.e.: GstAudioSinkClock), the associated pipes (being independent) may negotiate different clocks, typically GstSystemClock. This could be a big problem if, for example, synchronization between streams is required. It is currently responsibility of the application to set the special clock in all the involved pipes by calling [https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPipeline.html#gst-pipeline-set-clock gst_pipeline_set_clock].


= Getting the Software =
= Getting the Software =

Revision as of 16:05, 27 April 2016

Introduction

Overview

GstInterpipe is a Gstreamer plug-in that allows communication between two independent pipelines. The plug-in consists of two elements:

  • interpipesink
  • interpipesrc

Generally speaking, the idea is that given a source pipeline:

v4l2src ! interpipesink name=video_src

Various sink pipelines may listen to it by:

interpipesrc listen-to=video_src ! xvimagesink
interpipesrc listen-to-video_src num-buffers=1 ! jpegenc ! filesink location=snapshot.jpeg 

The state of each pipeline is independent, each one can manage events by their own and can be attached or detached at any moment.

The concept behind the Interpipes Project is to simplify the construction of GStreamer applications, which often has the complexity of requiring dynamic pipelines. It transforms the construction process from low level pad probe manipulation to the higher level setting an element's parameter value. Application developers don't get mired down in stalled pipelines because one branch of a complex pipeline changed state.

For example, take a look in a complex pipeline like the one in the figure 1:

Figure 1: Complex Pipeline

The complex pipeline of figure 1 can be constructed into smaller, independent pipelines using interpipe elements as it is illustrated in the figure 2:

Figure 2: Pipeline using Interpipes

This way the stream flow in a complex pipeline is reduced to simply set the correct listeners in the interpipe elements taking away the complexity of re-configuring pads or some other complex and error-prone logic.

Features and Limitations

The GstInterpipe project exposes the following characteristics:

  • Inspired by intervideosrc/intervideosink
  • Uses appsrc and appsink as a base
  • Generic data handling
  • Multiple dynamic interpipesink - interpipesrc connections
  • Replace tee and selector elements allowing dynamic pipeline flow control with GStreamer Daemon

Features:

The current release exposes the following limitations and known bugs:

Specialized clocks
At the time being, pipelines negotiate their clock independently. If a pipeline uses a special clock (i.e.: GstAudioSinkClock), the associated pipes (being independent) may negotiate different clocks, typically GstSystemClock. This could be a big problem if, for example, synchronization between streams is required. It is currently responsibility of the application to set the special clock in all the involved pipes by calling gst_pipeline_set_clock.

Getting the Software

GstInterpipe is an open source project and can be downloaded from GitHub. The project is hosted at:

TODO

As with every open source project, there's an open invitation to provide feedback to the maintainers as bug reports, feature requests and even source code collaborations. The following table summarizes the recommended methods to collaborate with RidgeRun:

Collaboration Method
Bug report GitHub's issue tracker
Feature request GitHub's issue tracker
Patch Submission Pull request

Installation Guide

Dependencies

GStreamer 1.0.0

Building the project

Installing the plugin

User Guide

Features

Buffer Forwarding

Dynamic Switching

Caps Negotiation

Event Forwarding

Timestamp Synchronization

Properties

GstInterPipeSink

GstInterPipeSrc

==

Releases