VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtVideoStream.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrvCore/DtDe.h>
15 
16 #include <vrvUtil/DtUnicode.h>
17 
19 
20 #include <boost/signal.hpp>
21 
22 namespace makVrv
23 {
24  class DtReadFramebufferCallback;
25  class DtVideoStreamManager;
26  class DtOsgChannel;
27  class DtChannelManager;
28  class DtChannel;
29 
34  {
35  public:
36 
38  {
46  Unavailable
47  };
49  friend class DtVideoStreamCreator;
50 
52  friend class DtVideoStreamManager;
53 
55  virtual ~DtVideoStream();
56 
58  virtual DtUnicode instanceName() const;
59 
64  virtual DtUnicode className() const;
65 
67  virtual bool start();
68 
73  virtual void notifyOtherStreamStarted( const DtVideoStream& startedStream );
74 
76  virtual bool stop();
77 
80  virtual void setAutoStart( bool autoStart );
81 
83  virtual bool autoStart() const;
84 
89  virtual void notifyOtherStreamStopped( const DtVideoStream& stoppedStream );
90 
92  virtual VideoStreamStatus status() const;
93 
95  virtual void setFromRecord(
96  const makArchives::DtVideoStreamRecord& vsRecord );
97 
99  virtual void setFromVideoStream( const DtVideoStream& stream );
100 
102 
106  virtual int channelWidth() const;
107 
109  virtual int channelHeight() const;
110 
112  virtual int channelX() const;
113 
115  virtual int channelY() const;
116 
118  virtual double horizontalFov() const;
119 
121  virtual double verticalFov() const;
123 
125 
130  virtual void setWindowName( const DtUnicode& windowName );
131 
133  virtual DtUnicode windowName() const;
134 
137  virtual void setChannelName( const DtUnicode& channelName );
138 
140  virtual DtUnicode channelName() const;
141 
149  virtual void setDataType( const DtUnicode& dataType );
150 
152  virtual DtUnicode dataType() const;
153 
155  virtual void setFrameRate( int frameRate );
156 
158  virtual int frameRate() const;
159 
167  virtual void setPixelFormat( const DtUnicode& pixelFormat );
168 
170  virtual DtUnicode pixelFormat() const;
171 
173  virtual void setNumBuffers( int numBuffers );
174 
176  virtual int numBuffers() const;
177 
183  virtual void setReadBuffer( const DtUnicode& readBuffer );
184 
191  void setEncodingFormat(const DtUnicode& encodingFormat);
192 
199  DtUnicode encodingFormat() const;
200 
206  virtual DtUnicode readBuffer() const;
207 
211  virtual void addImageTask(
212  const makArchives::DtImageTaskRecord& imageTask );
213 
216  virtual void removeImageTask(
217  const makArchives::DtImageTaskRecord& imageTask );
218 
223  virtual void setImageTask( int index,
224  const makArchives::DtImageTaskRecord& imageTask );
225 
227  virtual void setImageTasks(
229 
232  imageTasks() const;
233 
236 
239  virtual void setParameterInt( int taskElementIndex,
240  const DtUnicode& parameterName, int value );
241 
244  virtual void setParameterDouble( int taskElementIndex,
245  const DtUnicode& parameterName, double value );
246 
249  virtual void setParameterBool( int taskElementIndex,
250  const DtUnicode& parameterName, bool value );
251 
254  virtual void setParameterString( int taskElementIndex,
255  const DtUnicode& parameterName, const DtUnicode& value );
256 
259  virtual void setMetadataPublisher(
260  const makArchives::DtMetadataPublisherRecord& pubRecord );
261 
264  virtual void setMetadataPublisherType( const DtUnicode& pubType );
265 
268  virtual void setMetadataPublisherObserverName(
269  const DtUnicode& observer );
270 
272  virtual void setMetadataPublisherParameters(
273  const makArchives::DtNameValueLists& parameters );
274 
276  virtual const makArchives::DtMetadataPublisherRecord& metadataPublisher()
277  const;
279 
281  virtual void swapImageTasks( int index1, int index2 );
282 
284  virtual bool saveVideoStream( const DtUnicode& filePath ) const;
285 
287  virtual bool loadVideoStream( const DtUnicode& filePath );
288 
291  virtual void reportFramebufferCallbackFailure();
292 
294 
299  boost::signal<void ( const DtUnicode& )> signal_windowNameChanged;
300 
302  boost::signal<void ( const DtUnicode& )> signal_channelNameChanged;
303 
306  boost::signal<void ( const DtUnicode& )> signal_dataTypeChanged;
307 
309  boost::signal<void ( int )> signal_frameRateChanged;
310 
313  boost::signal<void ( const DtUnicode& )> signal_pixelFormatChanged;
314 
316  boost::signal<void ( int )> signal_numBuffersChanged;
317 
319  boost::signal<void ( const DtUnicode& )> signal_readBufferChanged;
320 
322  boost::signal<void(const DtUnicode&)> signal_encodingFormatChanged;
323 
325  boost::signal<void ( const makArchives::DtImageTaskRecord& )>
327 
329  boost::signal<void ( const makArchives::DtImageTaskRecord& )>
331 
333  boost::signal<void ( int imageTaskIndex )> signal_imageTaskRemoved;
334 
336  boost::signal<void (
339 
341  boost::signal<void ( int index, const makArchives::DtImageTaskRecord& )>
343 
345  boost::signal<void ( const makArchives::DtMetadataPublisherRecord& )>
347 
349  boost::signal<void ( const DtUnicode& )>
351 
353  boost::signal<void ( const DtUnicode& )>
355 
357  boost::signal<void ( const makArchives::DtNameValueLists& )>
359 
361  boost::signal<void ( int index1, int index2 )> signal_imageTasksSwapped;
362 
364  boost::signal<void ( VideoStreamStatus )> signal_videoStreamStatusChanged;
365 
367  boost::signal< void ( bool )> signal_videoStreamAutoStartChanged;
368 
371  boost::signal<void (
372  int taskIndex, const DtUnicode& parameter, int value )>
374 
377  boost::signal<void (
378  int taskIndex, const DtUnicode& parameter, double value )>
380 
383  boost::signal<void (
384  int taskIndex, const DtUnicode& parameter, bool value )>
386 
389  boost::signal<void (
390  int taskIndex, const DtUnicode& parameter, const DtUnicode& value )>
393 
394  protected:
395 
399  const DtUnicode& className, const DtUnicode& instanceName );
400 
402  virtual DtReadFramebufferCallback* createFramebufferReadback();
403 
405  virtual void updateFov();
406 
408  virtual void updateChannelWidthAndHeight();
409 
413  virtual bool installFramebufferCallback();
414 
417  virtual void removeFrameReadback();
418 
420  virtual void slot_channelConfigurationModified(const std::string& displayName,
421  const std::string& windowName, const std::string& channelName );
422 
424  virtual void slot_windowConfigurationModified(const std::string& displayName,
425  const std::string& windowName );
426 
429  virtual void slot_channelToBeDestroyed(DtChannelManager* mgr, DtChannel* channel);
430 
431  virtual void slot_updateReadFramebufferCallbackIfNeeded();
432 
434  virtual void cleanChannel(DtOsgChannel* channel);
435 
436  private:
437 
439  DtVideoStream();
440 
442  DtVideoStream( const DtVideoStream& rhs );
443 
445  DtVideoStream& operator=( const DtVideoStream& rhs );
446 
447  protected:
462  };
463 
467  {
468  public:
470  friend class DtVideoStreamManager;
471 
474 
476  virtual ~DtVideoStreamCreator();
477 
478  protected:
480  virtual DtVideoStream* create( DtDe& de, DtVideoStreamManager& mgr,
481  const DtUnicode& className, const DtUnicode& instanceName ) const;
482  };
483 }
A DtVideoStream instance will create a single streaming video pipeline on the channel indicated by wi...
Definition: DtVideoStream.h:33
DtDe & myDe
Definition: DtVideoStream.h:452
boost::signal< void(const DtUnicode &)> signal_encodingFormatChanged
emitted when the encoding format changes
Definition: DtVideoStream.h:322
Creator class for the Standard Video Stream.
Definition: DtVideoStream.h:466
A DtReadFramebufferCallback instance is installed as the draw callback of the camera attached to the ...
Definition: DtReadFramebufferCallback.h:32
A unicode string.
Definition: DtUnicode.h:33
DtUnicode myClassName
Definition: DtVideoStream.h:454
VideoStreamStatus
Definition: DtVideoStream.h:37
boost::signal< void(VideoStreamStatus)> signal_videoStreamStatusChanged
emitted when the video stream&#39;s status changes
Definition: DtVideoStream.h:364
DtOsgChannel * myChannel
Definition: DtVideoStream.h:451
int myChannelX
Definition: DtVideoStream.h:457
boost::signal< void(const DtUnicode &)> signal_metadataPublisherObserverNameChanged
emitted when the observer tracked by a metadata publisher changes
Definition: DtVideoStream.h:354
int myChannelHeight
Definition: DtVideoStream.h:456
boost::signal< void(bool)> signal_videoStreamAutoStartChanged
emitted when the video stream&#39;s autoStart parameter is changed
Definition: DtVideoStream.h:367
boost::signal< void(int index, const makArchives::DtImageTaskRecord &)> signal_imageTaskChanged
emitted when the image task at index has changed
Definition: DtVideoStream.h:342
boost::signal< void(const DtUnicode &)> signal_readBufferChanged
emitted when the read buffer type changes
Definition: DtVideoStream.h:319
Record for a sensor definition.
Definition: DtImageTaskRecord.h:20
#define DT_DLL_VRVVIDEOSTREAM
Definition: vrvVideoStream.h:20
Contains makVrv::DtDe class.
boost::signal< void(const makArchives::DtMetadataPublisherRecord &)> signal_metadataPublisherChanged
emitted when the metadata publisher changes
Definition: DtVideoStream.h:346
boost::signal< void(const DtUnicode &)> signal_metadataPublisherTypeChanged
emitted when the metadata publisher type has changed
Definition: DtVideoStream.h:350
Record for a metadata publisher Defines both the type and parameters.
Definition: DtMetadataPublisherRecord.h:21
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:75
double myHorizontalFov
Definition: DtVideoStream.h:459
boost::signal< void(int taskIndex, const DtUnicode &parameter, bool value)> signal_boolTaskParameterChanged
emitted when the specified boolean parameter/value is changed for the image task at task index ...
Definition: DtVideoStream.h:385
boost::signal< void(const makArchives::DtImageTaskRecord &)> signal_imageTaskAdded
emitted when an process image task element is added
Definition: DtVideoStream.h:326
The abstract Channel Class.
Definition: DtChannel.h:29
DtVideoStreamManager is a singleton class that manages DtVideoStreams in VR-Vantage.
Definition: DtVideoStreamManager.h:35
makArchives::DtVideoStreamRecord myVideoStreamRecord
Definition: DtVideoStream.h:448
VideoStreamStatus myStatus
Definition: DtVideoStream.h:461
boost::signal< void(int taskIndex, const DtUnicode &parameter, int value)> signal_intTaskParameterChanged
emitted when the specified integer parameter/value is changed for the image task at task index ...
Definition: DtVideoStream.h:373
double myVerticalFov
Definition: DtVideoStream.h:460
stream is started but global video processing is disabled
Definition: DtVideoStream.h:44
DtReadFramebufferCallback * myChannelReadback
Definition: DtVideoStream.h:450
voidpf stream
Definition: ioapi.h:39
boost::signal< void(const makArchives::DtNameValueLists &)> signal_metadataPublisherParametersChanged
emitted when metadatapublisher type-specific parameters change
Definition: DtVideoStream.h:358
boost::signal< void(int)> signal_numBuffersChanged
emitted when the number of pixel buffer objects changes
Definition: DtVideoStream.h:316
Base class for handling DtChannels.
Definition: DtChannelManager.h:35
boost::signal< void(int taskIndex, const DtUnicode &parameter, const DtUnicode &value)> signal_stringTaskParameterChanged
emitted when the specified string parameter/value is changed for the image task at task index ...
Definition: DtVideoStream.h:391
Record of a collection of sensor definitions.
Definition: DtVideoStreamRecord.h:17
boost::signal< void(int imageTaskIndex)> signal_imageTaskRemoved
emitted after a process image task element has been removed
Definition: DtVideoStream.h:333
boost::signal< void(const DtUnicode &)> signal_channelNameChanged
emitted when the channel that should be streamed changes
Definition: DtVideoStream.h:302
boost::signal< void(int)> signal_frameRateChanged
emitted when the the capture frame rate changes
Definition: DtVideoStream.h:309
int myChannelWidth
Definition: DtVideoStream.h:455
DtVideoStreamManager & myVideoStreamManager
Definition: DtVideoStream.h:449
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
stream is started and global video processing is enabled
Definition: DtVideoStream.h:42
Contains DLL export macros.
boost::signal< void(int taskIndex, const DtUnicode &parameter, double value)> signal_doubleTaskParameterChanged
emitted when the specified double parameter/value is changed for the image task at task index ...
Definition: DtVideoStream.h:379
DtUnicode myInstanceName
Definition: DtVideoStream.h:453
boost::signal< void(const makArchives::DtImageTaskRecord &)> signal_imageTaskToBeRemoved
emitted when a process image task element is about to be removed
Definition: DtVideoStream.h:330
boost::signal< void(const DtUnicode &)> signal_dataTypeChanged
emitted when the data type of the osg::image used to capture a frame changes
Definition: DtVideoStream.h:306
Inherit this is you need a list of name/value pairs.
Definition: DtNameValueLists.h:21
std::vector< DtImageTaskRecord > ImageTaskRecords
List of image task records.
Definition: DtVideoStreamRecord.h:114
stream is stopped
Definition: DtVideoStream.h:40
boost::signal< void(int index1, int index2)> signal_imageTasksSwapped
emitted when the order of two tasks are swapped
Definition: DtVideoStream.h:361
boost::signal< void(const makArchives::DtVideoStreamRecord::ImageTaskRecords &)> signal_imageTasksChanged
emitted when all image tasks have been replaced
Definition: DtVideoStream.h:338
int myChannelY
Definition: DtVideoStream.h:458
boost::signal< void(const DtUnicode &)> signal_pixelFormatChanged
emitted when the pixel format of the osg::image used to capture a frame changes
Definition: DtVideoStream.h:313
boost::signal< void(const DtUnicode &)> signal_windowNameChanged
Signals raised when changes are made to the video stream configuration.
Definition: DtVideoStream.h:299

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)