MattsProjects / pylon_gstreamer

A robust integration of Basler's Pylon API with GStreamer. Delivers applications as ready-to-run standalone compiled executables (gst-launch-1.0 is not needed). Designed for reliability and easy access to performance optimizations. Note: This is not a plugin. It is an intergration using GStreamer's GstAppSrc element.
Apache License 2.0
29 stars 18 forks source link

Using Pylon with GStreamer: The InstantCameraAppSrc class

Architecture

|<--------------- Camera Acquisition & Pylon Grabbing ------------------->|<---------------------------------------- GStreamer Pipeline ------------------------->|
|<------------------------------------------------------------- CInstantCameraAppSrc --------------------------------------->|    
+-------------------------------------------------------------------------+--------------------------------------------------+    +----------+    +---------------+
|                                                       GetGstAppSrc()---------> sourceBin element                           |    |  other   |    | sink element  |
|                                                                         |                                                  |    | elements |    |               |
|                                    RetrieveImage()<---cb_need_data()<---------"need-data" signal                           |    |          |    |               |
|            ------------------> --> 1. RetrieveResult()                  |                                                  |    |          |    |               |
|            | LatestImageOnly |     2. Convert to RGB if color           |                                                  |    |          |    |               |
|            <------------------     3. Put into a [pylonimage]           | +-------------+ +------------+ +------------+    |    |          |    |               |
| [Camera]-->[Pylon Grab Engine]     4. Wrap in a gst buffer              | |             | |            | |            |    |    |          |    |               |
| -------->                          5. "push-buffer" signal-------------------->AppSrc-------->Rescale------->Rotate------>src--sink       src--sink             |
| |freerun|                                                               | |             | |            | |            |    |    |          |    |               |
| <--------                                                               | +-------------+ +------------+ +------------+    |    |          |    |               |
+-------------------------------------------------------------------------+--------------------------------------------------+    +----------+    +---------------+

Sample Programs

Requirements

Note about GStreamer Plugins (elements)