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) 1992-2026 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 {
24 
25  class DtLgrPlaybackDriver;
30  class DT_DLL_LGRCORE DtLgrGStreamerPipeline
31  {
32  public:
33 
34  DT_VIRTUAL_CTR(DtLgrGStreamerPipeline,())
35 
36 
37  virtual ~DtLgrGStreamerPipeline();
38 
41  virtual bool initializePipeline(const DtString& pipelineConfigurationToUse);
42 
44  virtual void setPipeline(GstElement* pipeline);
45 
47  virtual bool startPipeline();
48 
51  virtual bool waitForStateChange(double timeoutSeconds);
52 
54  virtual const DtString& pipelineConfiguration() const;
55 
57  void destroyPipeline();
58 
60  virtual void tick(double currentTime);
61 
63  virtual bool isStarted() const;
64 
66  virtual void pause();
67 
69  virtual void unpause();
70 
72  virtual bool isPaused();
73 
75  virtual void setSpeed(double speed);
76 
78  virtual bool jumpToPosition(double position);
79 
81  virtual double position() const;
82 
84  virtual double duration() const;
85 
87  virtual bool hasReachedEnd() const;
88 
90  virtual void sendEos(bool waitForSignal) const;
91 
93  virtual void overlayVideoSink();
94 
96  virtual void exposeWindow();
97 
99  virtual void switchToInterVideoSink(const char* channel=0);
100 
101  public:
102 
104 
105  static void setMediaSpeedFactor(double mediaSpeedFactor);
106  static double mediaSpeedFactor();
108 
110 
111  static void setMediaWindowHandle(void* windowHandle);
112  static void* mediaWindowHandle();
114 
115 
116  virtual void setDriver(DtLgrPlaybackDriver* driver);
117 
118  protected:
119 
121  virtual bool isPipelineReady();
122 
125  virtual bool sendSpeedEvent(double speed);
126 
129  virtual bool sendJumpToPosition(double position);
130 
132  virtual void printMessage(const DtString& label, GstMessage *message) const;
133 
134  protected:
135 
137  static GstBusSyncReply overlayWindowHandle(GstBus *bus, GstMessage *message, gpointer user_data);
138 
139  protected:
140 
141  DtString myPipelineConfiguration;
142 
143  bool myOkToPushBuffers;
144 
145  GstBus* myBus;
146  GstElement* myPipeline;
147 
148  double mySpeed;
149  double myResendSpeedTime;
150  DtClock myClock;
151 
152  bool myOverlayVideoSink;
153  bool myPaused;
154  bool myStarted;
155  bool myAtEnd;
156 
157  int myGraphId;
158 
159  DtLgrPlaybackDriver* myDriver;
160 
161  protected:
162  static double theMediaSpeedFactor;
163  static bool theGsInitialized;
164  static void* theMediaWindowHandle;
165  };
166 }
167 
168 #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 Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)