MythTV  master
v2captureCard.h
Go to the documentation of this file.
1 // Program Name: captureCard.h
3 // Created : Sep. 21, 2011
4 //
5 // Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef V2CAPTURECARD_H_
12 #define V2CAPTURECARD_H_
13 
14 #include <QString>
15 
17 #include "libmythtv/cardutil.h"
18 
20 
21 class V2CaptureCard : public QObject
22 {
23  Q_OBJECT
24  Q_CLASSINFO( "Version" , "1.2" );
25 
26 
27  SERVICE_PROPERTY2( uint , CardId )
28  SERVICE_PROPERTY2( uint , ParentId )
29  SERVICE_PROPERTY2( QString , VideoDevice )
30  SERVICE_PROPERTY2( QString , AudioDevice )
31  SERVICE_PROPERTY2( QString , VBIDevice )
32  SERVICE_PROPERTY2( QString , CardType )
33  SERVICE_PROPERTY2( QString , DefaultInput )
35  SERVICE_PROPERTY2( QString , HostName )
36  SERVICE_PROPERTY2( uint , DVBSWFilter )
37  SERVICE_PROPERTY2( uint , DVBSatType )
38  SERVICE_PROPERTY2( bool , DVBWaitForSeqStart)
39  SERVICE_PROPERTY2( bool , SkipBTAudio )
41  SERVICE_PROPERTY2( uint , DVBDiSEqCType )
43  SERVICE_PROPERTY2( QString , FirewireModel )
52  SERVICE_PROPERTY2( uint , DiSEqCId )
54  SERVICE_PROPERTY2( QString , InputName )
55  SERVICE_PROPERTY2( uint , SourceId )
56  SERVICE_PROPERTY2( QString , ExternalCommand )
57  SERVICE_PROPERTY2( QString , ChangerDevice )
58  SERVICE_PROPERTY2( QString , ChangerModel )
59  SERVICE_PROPERTY2( QString , TuneChannel )
60  SERVICE_PROPERTY2( QString , StartChannel )
61  SERVICE_PROPERTY2( QString , DisplayName )
62  SERVICE_PROPERTY2( bool , DishnetEit )
63  SERVICE_PROPERTY2( int , RecPriority )
65  SERVICE_PROPERTY2( uint , SchedOrder )
67  SERVICE_PROPERTY2( uint , RecLimit )
68  SERVICE_PROPERTY2( bool , SchedGroup );
69 
70  public:
71 
72  Q_INVOKABLE V2CaptureCard(QObject *parent = nullptr)
73  : QObject ( parent ),
74  m_SignalTimeout ( 1000 ),
75  m_ChannelTimeout ( 3000 ),
76  m_DVBEITScan ( true )
77  {
78  }
79 
80  void Copy( const V2CaptureCard *src )
81  {
82  m_CardId = src->m_CardId;
83  m_ParentId = src->m_ParentId;
84  m_VideoDevice = src->m_VideoDevice;
85  m_AudioDevice = src->m_AudioDevice;
86  m_CardType = src->m_CardType;
87  m_DefaultInput = src->m_DefaultInput;
88  m_AudioRateLimit = src->m_AudioRateLimit;
89  m_HostName = src->m_HostName;
90  m_DVBSWFilter = src->m_DVBSWFilter;
91  m_DVBSatType = src->m_DVBSatType;
92  m_DVBWaitForSeqStart = src->m_DVBWaitForSeqStart;
93  m_SkipBTAudio = src->m_SkipBTAudio;
94  m_DVBOnDemand = src->m_DVBOnDemand;
95  m_DVBDiSEqCType = src->m_DVBDiSEqCType;
96  m_FirewireSpeed = src->m_FirewireSpeed;
97  m_FirewireModel = src->m_FirewireModel;
98  m_FirewireConnection = src->m_FirewireConnection;
99  m_SignalTimeout = src->m_SignalTimeout;
100  m_ChannelTimeout = src->m_ChannelTimeout;
101  m_DVBTuningDelay = src->m_DVBTuningDelay;
102  m_Contrast = src->m_Contrast;
103  m_Brightness = src->m_Brightness;
104  m_Colour = src->m_Colour;
105  m_Hue = src->m_Hue;
106  m_DiSEqCId = src->m_DiSEqCId;
107  m_DVBEITScan = src->m_DVBEITScan;
108  m_InputName = src->m_InputName;
109  m_SourceId = src->m_SourceId;
110  m_ExternalCommand = src->m_ExternalCommand;
111  m_ChangerDevice = src->m_ChangerDevice;
112  m_ChangerModel = src->m_ChangerModel;
113  m_TuneChannel = src->m_TuneChannel;
114  m_StartChannel = src->m_StartChannel;
115  m_DisplayName = src->m_DisplayName;
116  m_DishnetEit = src->m_DishnetEit;
117  m_RecPriority = src->m_RecPriority;
118  m_QuickTune = src->m_QuickTune;
119  m_SchedOrder = src->m_SchedOrder;
120  m_LiveTVOrder = src->m_LiveTVOrder;
121  m_RecLimit = src->m_RecLimit;
122  m_SchedGroup = src->m_SchedGroup;
123  }
124 
125  private:
127 };
128 
130 
131 class V2CardType : public QObject
132 {
133  Q_OBJECT
134  Q_CLASSINFO( "Version" , "1.0" );
135 
136  SERVICE_PROPERTY2( QString , CardType )
137  SERVICE_PROPERTY2( QString , Description )
138 
139  public:
140 
141  Q_INVOKABLE V2CardType(QObject *parent = nullptr)
142  : QObject ( parent )
143  {
144  }
145 
146  void Copy( const V2CardType *src )
147  {
148  m_CardType = src->m_CardType;
149  m_Description = src->m_Description;
150  }
151 
152  private:
153  Q_DISABLE_COPY(V2CardType);
154 };
155 
157 
158 class V2CaptureDevice : public QObject
159 {
160  Q_OBJECT
161  Q_CLASSINFO( "Version" , "1.0" );
162 
163  SERVICE_PROPERTY2( QString , CardType )
164  SERVICE_PROPERTY2( QString , SubType )
165  SERVICE_PROPERTY2( QString , VideoDevice )
166  SERVICE_PROPERTY2( QString , VideoDevicePrompt )
167  SERVICE_PROPERTY2( QStringList, AudioDevices )
168  SERVICE_PROPERTY2( QString , FrontendName )
169  SERVICE_PROPERTY2( QStringList, InputNames )
170  SERVICE_PROPERTY2( QString , DefaultInputName )
171  SERVICE_PROPERTY2( QString , Description )
172  SERVICE_PROPERTY2( QString , FirewireModel )
173  SERVICE_PROPERTY2( QString , IPAddress )
174  SERVICE_PROPERTY2( QString , TunerType )
175  SERVICE_PROPERTY2( uint , TunerNumber )
178  SERVICE_PROPERTY2( uint , TuningDelay )
179 
180  public:
181 
182  Q_INVOKABLE V2CaptureDevice(QObject *parent = nullptr)
183  : QObject ( parent ),
184  m_SignalTimeout ( 1000 ),
185  m_ChannelTimeout ( 3000 )
186  {
187  }
188 
189  // Copy is not needed
190  // void Copy( const V2CaptureDevice *src )
191  // {
192  // m_CardType = src->m_CardType;
193  // m_VideoDevice = src->m_VideoDevice ;
194  // m_FrontendName = src->m_FrontendName ;
195  // m_InputName = src->m_InputName ;
196  // m_SignalTimeout = src->m_SignalTimeout ;
197  // m_ChannelTimeout = src->m_ChannelTimeout;
198  // }
199 
200  private:
201  Q_DISABLE_COPY(V2CaptureDevice);
202 };
203 
205 
206 
207 class V2InputGroup : public QObject
208 {
209  Q_OBJECT
210  Q_CLASSINFO( "Version" , "1.0" );
211 
212  SERVICE_PROPERTY2( uint , CardInputId )
213  SERVICE_PROPERTY2( uint , InputGroupId )
214  SERVICE_PROPERTY2( QString , InputGroupName )
215 
216  public:
217 
218  Q_INVOKABLE V2InputGroup(QObject *parent = nullptr)
219  : QObject ( parent )
220  , m_InputGroupName ( "Unknown" )
221 
222  {
223  }
224 
225 #if 0
226  void Copy( const V2InputGroup *src )
227  {
228  m_CardInputId = src->m_CardInputId;
229  m_InputGroupId = src->m_InputGroupId;
230  m_InputGroupName = src->m_InputGroupName;
231  }
232 #endif
233 
234  private:
235  Q_DISABLE_COPY(V2InputGroup);
236 };
237 
239 
240 
241 class V2DiseqcTree : public QObject
242 {
243  Q_OBJECT
244  Q_CLASSINFO( "Version" , "1.0" );
245 
246  SERVICE_PROPERTY2( uint , DiSEqCId )
247  SERVICE_PROPERTY2( uint , ParentId )
248  SERVICE_PROPERTY2( uint , Ordinal )
249  SERVICE_PROPERTY2( QString , Type )
250  SERVICE_PROPERTY2( QString , SubType )
251  SERVICE_PROPERTY2( QString , Description )
252  SERVICE_PROPERTY2( uint , SwitchPorts )
253  SERVICE_PROPERTY2( float , RotorHiSpeed )
254  SERVICE_PROPERTY2( float , RotorLoSpeed )
255  SERVICE_PROPERTY2( QString , RotorPositions )
256  SERVICE_PROPERTY2( int , LnbLofSwitch )
257  SERVICE_PROPERTY2( int , LnbLofHi )
258  SERVICE_PROPERTY2( int , LnbLofLo )
259  SERVICE_PROPERTY2( int , CmdRepeat )
260  SERVICE_PROPERTY2( bool , LnbPolInv )
261  SERVICE_PROPERTY2( int , Address )
262  SERVICE_PROPERTY2( uint , ScrUserband )
263  SERVICE_PROPERTY2( uint , ScrFrequency )
264  SERVICE_PROPERTY2( int , ScrPin )
265 
266  public:
267 
268  Q_INVOKABLE V2DiseqcTree(QObject *parent = nullptr)
269  : QObject ( parent ),
270  m_CmdRepeat ( 1 ),
271  m_ScrFrequency ( 1400 ),
272  m_ScrPin ( -1 )
273  {
274  }
275 
276  private:
277  Q_DISABLE_COPY(V2DiseqcTree);
278 
279 };
280 
282 
283 
284 class V2DiseqcConfig : public QObject
285 {
286  Q_OBJECT
287  Q_CLASSINFO( "Version" , "1.0" );
288 
289  SERVICE_PROPERTY2( uint , CardId )
290  SERVICE_PROPERTY2( uint , DiSEqCId )
291  SERVICE_PROPERTY2( QString , Value )
292 
293  public:
294 
295  Q_INVOKABLE V2DiseqcConfig(QObject *parent = nullptr)
296  : QObject ( parent )
297  {
298  }
299 
300  private:
301  Q_DISABLE_COPY(V2DiseqcConfig);
302 
303 };
304 
306 
307 class V2CardSubType :public QObject
308 {
309  Q_OBJECT
310  Q_CLASSINFO( "Version" , "1.0" );
311 
312  SERVICE_PROPERTY2( uint , CardId )
313  SERVICE_PROPERTY2( QString , SubType )
314  SERVICE_PROPERTY2( QString , InputType )
315  SERVICE_PROPERTY2( bool , HDHRdoesDVBC )
316  SERVICE_PROPERTY2( bool , HDHRdoesDVB )
317 
318  public:
319 
320  Q_INVOKABLE V2CardSubType(QObject *parent = nullptr)
321  : QObject ( parent )
322  {
323  }
324 
325  private:
326  Q_DISABLE_COPY(V2CardSubType);
327 };
328 
330 
331 #endif
V2CardType::Copy
void Copy(const V2CardType *src)
Definition: v2captureCard.h:146
InputName
Definition: videosource.cpp:2787
Brightness
Definition: channelsettings.cpp:524
Hue
Definition: channelsettings.cpp:546
V2InputGroup
Definition: v2captureCard.h:207
V2InputGroup::V2InputGroup
Q_INVOKABLE V2InputGroup(QObject *parent=nullptr)
Definition: v2captureCard.h:218
VideoDevice
Definition: videosource.cpp:789
VBIDevice
Definition: videosource.cpp:902
Colour
Definition: channelsettings.cpp:535
V2CardType
Definition: v2captureCard.h:131
V2CaptureCard::V2CaptureCard
Q_INVOKABLE V2CaptureCard(QObject *parent=nullptr)
Definition: v2captureCard.h:72
V2CaptureDevice
Definition: v2captureCard.h:158
true
VERBOSE_PREAMBLE Most true
Definition: verbosedefs.h:95
AudioRateLimit
Definition: videosource.cpp:1073
QuickTune
Definition: videosource.cpp:3015
DVBEITScan
Definition: videosource.cpp:1233
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2CardSubType::V2CardSubType
Q_INVOKABLE V2CardSubType(QObject *parent=nullptr)
Definition: v2captureCard.h:320
V2DiseqcConfig::V2DiseqcConfig
Q_INVOKABLE V2DiseqcConfig(QObject *parent=nullptr)
Definition: v2captureCard.h:295
V2CaptureCard::Copy
void Copy(const V2CaptureCard *src)
Definition: v2captureCard.h:80
SERVICE_PROPERTY2
#define SERVICE_PROPERTY2(Type, Name)
Definition: mythhttpservice.h:72
V2DiseqcTree::V2DiseqcTree
Q_INVOKABLE V2DiseqcTree(QObject *parent=nullptr)
Definition: v2captureCard.h:268
AudioDevice
Definition: videosource.cpp:1001
FirewireConnection
Definition: videosource.cpp:1343
V2CaptureCard
Definition: v2captureCard.h:21
V2CardType::V2CardType
Q_INVOKABLE V2CardType(QObject *parent=nullptr)
Definition: v2captureCard.h:141
V2DiseqcConfig
Definition: v2captureCard.h:284
LiveTVOrder
Definition: videosource.cpp:3139
FirewireSpeed
Definition: videosource.cpp:1356
Contrast
Definition: channelsettings.cpp:513
uint
unsigned int uint
Definition: compat.h:81
V2CaptureCard::SERVICE_PROPERTY2
SERVICE_PROPERTY2(bool, SchedGroup)
DVBTuningDelay
Definition: videosource.cpp:1249
FirewireModel
Definition: videosource.h:694
CardType
Definition: videosource.h:326
mythhttpservice.h
DVBOnDemand
Definition: videosource.cpp:1218
V2CaptureCard::Q_CLASSINFO
Q_CLASSINFO("Version", "1.2")
cardutil.h
V2CaptureDevice::V2CaptureDevice
Q_INVOKABLE V2CaptureDevice(QObject *parent=nullptr)
Definition: v2captureCard.h:182
V2DiseqcTree
Definition: v2captureCard.h:241
V2CardSubType
Definition: v2captureCard.h:307
SchedGroup
Definition: videosource.cpp:191
InputNames
QMap< int, QString > InputNames
Definition: cardutil.h:22
SignalTimeout
Definition: videosource.cpp:1024
V2CaptureCard::Q_DISABLE_COPY
Q_DISABLE_COPY(V2CaptureCard)
ChannelTimeout
Definition: videosource.cpp:1049