MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrGStreamerPipeline.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #ifdef GST_ENABLED
12 
13 #include <lgrCore/lgrCore.h>
15 
16 #include <vlutil/vlString.h>
17 #include <vlutil/vlTime.h>
18 
19 #include <gst/gstelement.h>
20 #include <gst/app/gstappsrc.h>
21 
22 namespace MAKLogger
23 {
28  class DT_DLL_LGRCORE DtLgrGStreamerPipeline
29  {
30  public:
31 
32  DT_VIRTUAL_CTR(DtLgrGStreamerPipeline,())
33 
34 
35  virtual ~DtLgrGStreamerPipeline();
36 
39  virtual bool initializePipeline(const DtString& pipelineConfigurationToUse);
40 
42  virtual void setPipeline(GstElement* pipeline);
43 
45  virtual bool startPipeline();
46 
48  virtual const DtString& pipelineConfiguration() const;
49 
51  void destroyPipeline();
52 
54  virtual void tick(double currentTime);
55 
57  virtual bool isStarted() const;
58 
60  virtual void pause();
61 
63  virtual void unpause();
64 
66  virtual bool isPaused();
67 
69  virtual void setSpeed(double speed);
70 
72  virtual bool jumpToPosition(double position);
73 
75  virtual double position() const;
76 
78  virtual double duration() const;
79 
81  virtual void sendEos(bool waitForSignal) const;
82 
84  virtual void overlayVideoSink();
85 
87  virtual void exposeWindow();
88 
90  virtual void switchToInterVideoSink(const char* channel=0);
91 
92  public:
93 
95 
96  static void setMediaSpeedFactor(double mediaSpeedFactor);
97  static double mediaSpeedFactor();
99 
101 
102  static void setMediaWindowHandle(void* windowHandle);
103  static void* mediaWindowHandle();
105 
106  protected:
107 
109  virtual bool isPipelineReady();
110 
113  virtual bool sendSpeedEvent(double speed);
114 
117  virtual bool sendJumpToPosition(double position);
118 
120  virtual void printMessage(const DtString& label, GstMessage *message) const;
121 
122  protected:
123 
125  static GstBusSyncReply overlayWindowHandle(GstBus *bus, GstMessage *message, gpointer user_data);
126 
127 
128  protected:
129 
130  DtString myPipelineConfiguration;
131 
132  bool myOkToPushBuffers;
133 
134  GstBus* myBus;
135  GstElement* myPipeline;
136 
137  double mySpeed;
138  double myResendSpeedTime;
139  DtClock myClock;
140 
141  bool myOverlayVideoSink;
142  bool myPaused;
143  bool myStarted;
144 
145  int myGraphId;
146 
147  protected:
148  static double theMediaSpeedFactor;
149  static bool theGsInitialized;
150  static void* theMediaWindowHandle;
151  };
152 }
153 
154 #endif // GST_ENABLED
#define DT_VIRTUAL_CTR(CLASS_NAME, ARG_TYPES_LIST)
Declare a Virtual Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where CLASS_NAME...
Definition: virtualConstructor.h:34
Contains DT_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFAULTS DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VI...
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
Contains lgrCore library definitions.

Document ID: Generated on Thu Jul 14 15:45:33 EDT 2022 from SVN revision 244827
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)