VR-Forces 4.7 Class Documentation
 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 
13 
15 
16 #include <string>
17 
18 #include <gst/gstelement.h>
19 #include <gst/app/gstappsrc.h>
20 #include <gst/app/gstappsink.h>
21 #include <gst/gstbufferpool.h>
22 
23 namespace makVrv
24 {
25  class DtVideoFrameBuffer;
26 
27 
33  {
34  public:
38 
40  virtual ~DtGStreamerTaskElement();
41 
43  virtual std::string pipelineConfiguration() const;
44 
46  virtual void setPipelineConfiguration( const std::string& config );
47 
49  virtual void setFromRecord(
50  const makArchives::DtImageTaskRecord& config );
51 
53  virtual bool configure();
54 
55  protected:
58 
60  void handleProcessFrame(DtVideoFrameBuffer* frame);
61 
63  bool buildPipeline();
64 
66  void destroyPipeline();
67 
69  GstCaps* genCaps();
70 
71  protected:
74  static void need_data( GstAppSrc *src, guint length, gpointer user_data );
75 
78  static void enough_data( GstAppSrc *src, gpointer user_data );
79 
80  protected:
81  static int theClassCount;
82 
83  protected:
84 
86 
88 
89  GstElement* myPipeline;
90  GstElement* myVideoAppSrc;
91  GstElement* myMetadataAppSrc;
92  GstAppSrcCallbacks myGstCallbacks;
93 
94  int myWidth;
95  int myHeight;
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 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)