VR-Forces 5.0.2 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;
103  };
110  {
111  public:
113  friend class DtVideoStreamManager;
114 
117 
120 
121  protected:
123  virtual DtImageTaskElement* create(DtDe& de,
124  DtProcessImageTask* owningTask);
125  };
126 }
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:108
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.
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:70
makVrv::DtDe & myDe
Definition: DtGStreamerTaskElement.h:102
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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)