VR-Vantage API Documentation
DtVideoStream.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 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 
32  {
33  public:
34 
36  {
44  Unavailable
45  };
47  friend class DtVideoStreamCreator;
48 
50  friend class DtVideoStreamManager;
51 
53  virtual ~DtVideoStream();
54 
56  virtual DtUnicode instanceName() const;
57 
62  virtual DtUnicode className() const;
63 
65  virtual bool start();
66 
71  virtual void notifyOtherStreamStarted( const DtVideoStream& startedStream );
72 
74  virtual bool stop();
75 
78  virtual void setAutoStart( bool autoStart );
79 
81  virtual bool autoStart() const;
82 
87  virtual void notifyOtherStreamStopped( const DtVideoStream& stoppedStream );
88 
90  virtual VideoStreamStatus status() const;
91 
93  virtual void setFromRecord(
94  const makArchives::DtVideoStreamRecord& vsRecord );
95 
97  virtual void setFromVideoStream( const DtVideoStream& stream );
98 
100 
101 
102 
104  virtual int channelWidth() const;
105 
107  virtual int channelHeight() const;
108 
110  virtual int channelX() const;
111 
113  virtual int channelY() const;
114 
116  virtual double horizontalFov() const;
117 
119  virtual double verticalFov() const;
121 
123 
124 
125 
126 
128  virtual void setWindowName( const DtUnicode& windowName );
129 
131  virtual DtUnicode windowName() const;
132 
135  virtual void setChannelName( const DtUnicode& channelName );
136 
138  virtual DtUnicode channelName() const;
139 
147  virtual void setDataType( const DtUnicode& dataType );
148 
150  virtual DtUnicode dataType() const;
151 
153  virtual void setFrameRate( int frameRate );
154 
156  virtual int frameRate() const;
157 
165  virtual void setPixelFormat( const DtUnicode& pixelFormat );
166 
168  virtual DtUnicode pixelFormat() const;
169 
171  virtual void setNumBuffers( int numBuffers );
172 
174  virtual int numBuffers() const;
175 
179  virtual void setReadBuffer( const DtUnicode& readBuffer );
180 
182  virtual DtUnicode readBuffer() const;
183 
187  virtual void addImageTask(
188  const makArchives::DtImageTaskRecord& imageTask );
189 
192  virtual void removeImageTask(
193  const makArchives::DtImageTaskRecord& imageTask );
194 
199  virtual void setImageTask( int index,
200  const makArchives::DtImageTaskRecord& imageTask );
201 
203  virtual void setImageTasks(
205 
208  imageTasks() const;
209 
212 
215  virtual void setParameterInt( int taskElementIndex,
216  const DtUnicode& parameterName, int value );
217 
220  virtual void setParameterDouble( int taskElementIndex,
221  const DtUnicode& parameterName, double value );
222 
225  virtual void setParameterBool( int taskElementIndex,
226  const DtUnicode& parameterName, bool value );
227 
230  virtual void setParameterString( int taskElementIndex,
231  const DtUnicode& parameterName, const DtUnicode& value );
232 
235  virtual void setMetadataPublisher(
236  const makArchives::DtMetadataPublisherRecord& pubRecord );
237 
240  virtual void setMetadataPublisherType( const DtUnicode& pubType );
241 
244  virtual void setMetadataPublisherObserverName(
245  const DtUnicode& observer );
246 
248  virtual void setMetadataPublisherParameters(
249  const makArchives::DtNameValueLists& parameters );
250 
252  virtual const makArchives::DtMetadataPublisherRecord& metadataPublisher()
253  const;
255 
257  virtual void swapImageTasks( int index1, int index2 );
258 
260  virtual bool saveVideoStream( const DtUnicode& filePath ) const;
261 
263  virtual bool loadVideoStream( const DtUnicode& filePath );
264 
267  virtual void reportFramebufferCallbackFailure();
268 
270 
271 
272 
275  boost::signal<void ( const DtUnicode& )> signal_windowNameChanged;
276 
278  boost::signal<void ( const DtUnicode& )> signal_channelNameChanged;
279 
282  boost::signal<void ( const DtUnicode& )> signal_dataTypeChanged;
283 
285  boost::signal<void ( int )> signal_frameRateChanged;
286 
289  boost::signal<void ( const DtUnicode& )> signal_pixelFormatChanged;
290 
292  boost::signal<void ( int )> signal_numBuffersChanged;
293 
295  boost::signal<void ( const DtUnicode& )> signal_readBufferChanged;
296 
298  boost::signal<void ( const makArchives::DtImageTaskRecord& )>
300 
302  boost::signal<void ( const makArchives::DtImageTaskRecord& )>
304 
306  boost::signal<void ( int imageTaskIndex )> signal_imageTaskRemoved;
307 
309  boost::signal<void (
312 
314  boost::signal<void ( int index, const makArchives::DtImageTaskRecord& )>
316 
318  boost::signal<void ( const makArchives::DtMetadataPublisherRecord& )>
320 
322  boost::signal<void ( const DtUnicode& )>
324 
326  boost::signal<void ( const DtUnicode& )>
328 
330  boost::signal<void ( const makArchives::DtNameValueLists& )>
332 
334  boost::signal<void ( int index1, int index2 )> signal_imageTasksSwapped;
335 
337  boost::signal<void ( VideoStreamStatus )> signal_videoStreamStatusChanged;
338 
340  boost::signal< void ( bool )> signal_videoStreamAutoStartChanged;
341 
344  boost::signal<void (
345  int taskIndex, const DtUnicode& parameter, int value )>
347 
350  boost::signal<void (
351  int taskIndex, const DtUnicode& parameter, double value )>
353 
356  boost::signal<void (
357  int taskIndex, const DtUnicode& parameter, bool value )>
359 
362  boost::signal<void (
363  int taskIndex, const DtUnicode& parameter, const DtUnicode& value )>
366 
367  protected:
368 
372  const DtUnicode& className, const DtUnicode& instanceName );
373 
375  virtual DtReadFramebufferCallback* createFramebufferReadback();
376 
378  virtual void updateFov();
379 
381  virtual void updateChannelWidthAndHeight();
382 
386  virtual bool installFramebufferCallback();
387 
390  virtual void removeFrameReadback();
391 
393  virtual void slot_channelConfigurationModified(const std::string& displayName,
394  const std::string& windowName, const std::string& channelName );
395 
397  virtual void slot_windowConfigurationModified(const std::string& displayName,
398  const std::string& windowName );
399 
400  private:
401 
403  DtVideoStream();
404 
406  DtVideoStream( const DtVideoStream& rhs );
407 
409  DtVideoStream& operator=( const DtVideoStream& rhs );
410 
411  protected:
426  };
427 
431  {
432  public:
434  friend class DtVideoStreamManager;
435 
438 
440  virtual ~DtVideoStreamCreator();
441 
442  protected:
444  virtual DtVideoStream* create( DtDe& de, DtVideoStreamManager& mgr,
445  const DtUnicode& className, const DtUnicode& instanceName ) const;
446  };
447 }


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)