MAK Data Logger API Documentation for DIS
 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-2025 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 
50  virtual const DtString& pipelineConfiguration() const;
51 
53  void destroyPipeline();
54 
56  virtual void tick(double currentTime);
57 
59  virtual bool isStarted() const;
60 
62  virtual void pause();
63 
65  virtual void unpause();
66 
68  virtual bool isPaused();
69 
71  virtual void setSpeed(double speed);
72 
74  virtual bool jumpToPosition(double position);
75 
77  virtual double position() const;
78 
80  virtual double duration() const;
81 
83  virtual void sendEos(bool waitForSignal) const;
84 
86  virtual void overlayVideoSink();
87 
89  virtual void exposeWindow();
90 
92  virtual void switchToInterVideoSink(const char* channel=0);
93 
94  public:
95 
97 
98  static void setMediaSpeedFactor(double mediaSpeedFactor);
99  static double mediaSpeedFactor();
101 
103 
104  static void setMediaWindowHandle(void* windowHandle);
105  static void* mediaWindowHandle();
107 
108 
109  virtual void setDriver(DtLgrPlaybackDriver* driver);
110 
111  protected:
112 
114  virtual bool isPipelineReady();
115 
118  virtual bool sendSpeedEvent(double speed);
119 
122  virtual bool sendJumpToPosition(double position);
123 
125  virtual void printMessage(const DtString& label, GstMessage *message) const;
126 
127  protected:
128 
130  static GstBusSyncReply overlayWindowHandle(GstBus *bus, GstMessage *message, gpointer user_data);
131 
132  protected:
133 
134  DtString myPipelineConfiguration;
135 
136  bool myOkToPushBuffers;
137 
138  GstBus* myBus;
139  GstElement* myPipeline;
140 
141  double mySpeed;
142  double myResendSpeedTime;
143  DtClock myClock;
144 
145  bool myOverlayVideoSink;
146  bool myPaused;
147  bool myStarted;
148 
149  int myGraphId;
150 
151  DtLgrPlaybackDriver* myDriver;
152 
153  protected:
154  static double theMediaSpeedFactor;
155  static bool theGsInitialized;
156  static void* theMediaWindowHandle;
157  };
158 }
159 
160 #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 Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)