VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtVideoStreamRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
7 
8 #pragma once
9 
13 
14 namespace makArchives
15 {
18  {
19  public:
22 
25 
27  DtVideoStreamRecord& operator=( const DtVideoStreamRecord& rhs );
28 
31 
33  const std::string& windowName() const;
34 
36  void setWindowName( const std::string& windowName );
37 
39  const std::string& channelName() const;
40 
42  void setChannelName( const std::string& channelName );
43 
45  bool autoStart() const;
46 
48  void setAutoStart( bool autoStart );
49 
51  int frameRate() const;
52 
54  void setFrameRate( int frameRate );
55 
57  const std::string& dataType() const;
58 
60  void setDataType( const std::string& dataType );
61 
63  const std::string& pixelFormat() const;
64 
66  void setPixelFormat( const std::string& pixelFormat );
67 
69  int numBuffers() const;
70 
72  void setNumBuffers( int numBuffers );
73 
78  const std::string& readBuffer() const;
79 
84  void setReadBuffer( const std::string& readBuffer );
85 
87  bool useGPUForEncoding() const;
88 
90  void setUseGPUForEncoding( bool useGPU );
91 
96  const std::string& encodingFormat() const;
97 
102  void setEncodingFormat(const std::string& encodingFormat);
103 
105  const DtMetadataPublisherRecord& metadataPublisher() const;
106 
108  void setMetadataPublisher(
109  const DtMetadataPublisherRecord& metadataPublisher );
110 
112  typedef std::vector<DtImageTaskRecord> ImageTaskRecords;
113 
115  void setImageTasks( const ImageTaskRecords& recs );
116 
118  void addImageTask( const DtImageTaskRecord& imageTask );
119 
121  void removeImageTask( const DtImageTaskRecord& imageTask );
122 
124  void clearImageTasks();
125 
127  const ImageTaskRecords& imageTasks() const;
128 
130  ImageTaskRecords& imageTasks();
131 
132  protected:
133  friend class boost::serialization::access;
134 
135  template <class Archive>
136  void serialize(Archive& ar, const unsigned int version)
137  {
138  ar & BOOST_SERIALIZATION_NVP( myWindowName );
139  ar & BOOST_SERIALIZATION_NVP( myChannelName );
140  ar & BOOST_SERIALIZATION_NVP( myFrameRate );
141  ar & BOOST_SERIALIZATION_NVP( myDataType );
142  ar & BOOST_SERIALIZATION_NVP( myPixelFormat );
143  ar & BOOST_SERIALIZATION_NVP( myNumBuffers );
144  ar & BOOST_SERIALIZATION_NVP( myReadBuffer );
145  ar & BOOST_SERIALIZATION_NVP( myMetadataPublisherRecord );
146  ar & BOOST_SERIALIZATION_NVP( myImageTaskRecords );
147  if ( version >= 3 )
148  {
149  ar & BOOST_SERIALIZATION_NVP( myAutoStart );
150  }
151  if (version >= 4)
152  {
153  ar & BOOST_SERIALIZATION_NVP(myEncodingFormat);
154  }
155 
156  if (version >= 5)
157  {
158  ar & BOOST_SERIALIZATION_NVP(myUseGPUForEncoding);
159  }
160  else
161  {
162  // strip _hardware from myReadBuffer since, in VRV3.0 and greater, the
163  // myReadBuffer attribute isn't use to dictate whether or not overlays
164  // are used AND whether or not the GPU is used. Whether or no the GPU
165  // is used has been moved to a separate attribute called
166  // myUseGPUForEncoding in record versions >= 5
167 
168  size_t foundIndex = myReadBuffer.find("_hardware");
169  myUseGPUForEncoding = (foundIndex != std::string::npos);
170  if (myUseGPUForEncoding)
171  {
172  // strip '_hardware' if found
173  myReadBuffer = myReadBuffer.substr(0, foundIndex);
174  }
175  }
176  }
177 
178  std::string myWindowName;
179  std::string myChannelName;
181  std::string myDataType;
182  std::string myPixelFormat;
184  std::string myReadBuffer;
186  std::string myEncodingFormat;
190  };
191 }
193 
std::string myPixelFormat
Definition: DtVideoStreamRecord.h:182
std::string myDataType
Definition: DtVideoStreamRecord.h:181
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
DtMetadataPublisherRecord myMetadataPublisherRecord
Definition: DtVideoStreamRecord.h:187
Contains makArchives::DtDriverRecord class.
Record for a sensor definition.
Definition: DtImageTaskRecord.h:20
int myFrameRate
Definition: DtVideoStreamRecord.h:180
void serialize(Archive &ar, const unsigned int version)
Definition: DtVideoStreamRecord.h:136
Record for a metadata publisher Defines both the type and parameters.
Definition: DtMetadataPublisherRecord.h:21
std::string myEncodingFormat
Definition: DtVideoStreamRecord.h:186
bool myAutoStart
Definition: DtVideoStreamRecord.h:189
std::string myReadBuffer
Definition: DtVideoStreamRecord.h:184
Record of a collection of sensor definitions.
Definition: DtVideoStreamRecord.h:17
bool myUseGPUForEncoding
Definition: DtVideoStreamRecord.h:185
std::string myChannelName
Definition: DtVideoStreamRecord.h:179
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
std::vector< DtImageTaskRecord > ImageTaskRecords
List of image task records.
Definition: DtVideoStreamRecord.h:112
ImageTaskRecords myImageTaskRecords
Definition: DtVideoStreamRecord.h:188
std::string myWindowName
Definition: DtVideoStreamRecord.h:178
int myNumBuffers
Definition: DtVideoStreamRecord.h:183

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)