VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGStreamerTaskElement.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <string>
16 
17 #include <gst/gstelement.h>
18 #include <gst/app/gstappsrc.h>
19 #include <gst/app/gstappsink.h>
20 #include <gst/gstbufferpool.h>
21 
22 namespace makVrv
23 {
24  class DtVideoFrameBuffer;
25 
26 
32  {
33  public:
37 
39  virtual ~DtGStreamerTaskElement();
40 
42  virtual std::string pipelineConfiguration() const;
43 
45  virtual void setPipelineConfiguration( const std::string& config );
46 
48  virtual void setFromRecord(
49  const makArchives::DtImageTaskRecord& config );
50 
52  virtual bool configure();
53 
54  protected:
57 
59  void handleProcessFrame(DtVideoFrameBuffer* frame);
60 
62  bool buildPipeline();
63 
65  void destroyPipeline();
66 
68  GstCaps* genCaps();
69 
70  protected:
73  static void need_data( GstAppSrc *src, guint length, gpointer user_data );
74 
77  static void enough_data( GstAppSrc *src, gpointer user_data );
78 
79  protected:
80  static int theClassCount;
81 
82  protected:
83 
85 
87 
88  GstElement* myPipeline;
89  GstElement* myVideoAppSrc;
90  GstElement* myMetadataAppSrc;
91  GstAppSrcCallbacks myGstCallbacks;
92 
93  int myWidth;
94  int myHeight;
98  std::string myEncodingFormat;
100  GstBufferPool* myVideoBufferPool;
101  GstBufferPool* myMetadataBufferPool;
102  };
109  {
110  public:
112  friend class DtVideoStreamManager;
113 
116 
119 
120  protected:
122  virtual DtImageTaskElement* create(DtDe& de,
123  DtProcessImageTask* owningTask);
124  };
125 }
GstBufferPool * myMetadataBufferPool
Definition: DtGStreamerTaskElement.h:101
GstElement * myMetadataAppSrc
Definition: DtGStreamerTaskElement.h:90
GstElement * myPipeline
Definition: DtGStreamerTaskElement.h:88
GstElement * myVideoAppSrc
Definition: DtGStreamerTaskElement.h:89
GstBufferPool * myVideoBufferPool
Definition: DtGStreamerTaskElement.h:100
bool myOkToPushFrames
Definition: DtGStreamerTaskElement.h:86
bool myIsHardwareEncoded
Definition: DtGStreamerTaskElement.h:97
std::string myEncodingFormat
Definition: DtGStreamerTaskElement.h:98
Record for a sensor definition.
Definition: DtImageTaskRecord.h:20
int myRowLength
Definition: DtGStreamerTaskElement.h:96
#define DT_DLL_VRVVIDEOSTREAM
Definition: vrvVideoStream.h:20
int myPixelFormat
Definition: DtGStreamerTaskElement.h:95
DtVideoStreamManager is a singleton class that manages DtVideoStreams in VR-Vantage.
Definition: DtVideoStreamManager.h:35
The DtImageTaskElement is an abstract base class for all image task elements. It defines the common i...
Definition: DtImageTaskElement.h:25
static int theClassCount
Definition: DtGStreamerTaskElement.h:80
A DtGStreamerTaskElementCreator instance is registered with the image task element factory to create ...
Definition: DtGStreamerTaskElement.h:107
DtImageTaskElementCreator is the common base class for all image task element creators.
Definition: DtImageTaskElement.h:95
GstAppSrcCallbacks myGstCallbacks
Definition: DtGStreamerTaskElement.h:91
DtProcessImageTask creates and manages all the process image pipeline elements.
Definition: DtProcessImageTask.h:35
Contains declarations needed to initialize the freeImage library.
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
int myHeight
Definition: DtGStreamerTaskElement.h:94
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
Contains DLL export macros.
The image as initially captured from the camera is placed into a DtVideoFrameBuffer. Instances of DtVideoFrameBuffer are placed on a queue for further processing by the process image task elements.
Definition: DtVideoFrameBuffer.h:20
std::string myPipelineConfiguration
Definition: DtGStreamerTaskElement.h:84
bool myContainsMetadata
Definition: DtGStreamerTaskElement.h:99
A DtCompressFrameTaskElement instance will create a pipeline element that can compress the image bein...
Definition: DtGStreamerTaskElement.h:31
int myWidth
Definition: DtGStreamerTaskElement.h:93

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)