MythTV master
v2capture.h
Go to the documentation of this file.
1
2// Program Name: capture.h
3// Created : Sep. 21, 2011
4//
5// Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
6//
7// This program is free software; you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation; either version 2 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20//
21// You should have received a copy of the GNU General Public License
22// along with this program. If not, see <http://www.gnu.org/licenses/>.
23//
25
26#ifndef V2CAPTURE_H
27#define V2CAPTURE_H
28
30#include "v2captureCardList.h"
31#include "v2recordingProfile.h"
32
33#define CAPTURE_SERVICE QString("/Capture/")
34#define CAPTURE_HANDLE QString("Capture")
35
37{
38 Q_OBJECT
39 Q_CLASSINFO("Version", "1.6")
40 Q_CLASSINFO("RemoveAllCaptureCards", "methods=POST;name=bool")
41 Q_CLASSINFO("RemoveCaptureCard", "methods=POST;name=bool")
42 Q_CLASSINFO("AddCaptureCard", "methods=POST;name=int")
43 Q_CLASSINFO("UpdateCaptureCard", "methods=POST;name=bool")
44 Q_CLASSINFO("RemoveCardInput", "methods=POST;name=bool")
45 Q_CLASSINFO("AddCardInput", "methods=POST;name=int")
46 Q_CLASSINFO("UpdateCardInput", "methods=POST;name=bool")
47 Q_CLASSINFO("AddUserInputGroup", "methods=POST;name=int")
48 Q_CLASSINFO("LinkInputGroup", "methods=POST;name=bool")
49 Q_CLASSINFO("UnlinkInputGroup", "methods=POST;name=bool")
50 Q_CLASSINFO("SetInputMaxRecordings", "methods=POST;name=bool")
51 Q_CLASSINFO("AddDiseqcTree", "methods=POST")
52 Q_CLASSINFO("UpdateDiseqcTree", "methods=POST")
53 Q_CLASSINFO("RemoveDiseqcTree", "methods=POST")
54 Q_CLASSINFO("AddDiseqcConfig", "methods=POST")
55 Q_CLASSINFO("RemoveDiseqcConfig", "methods=POST")
56 Q_CLASSINFO("AddRecProfile", "methods=POST")
57 Q_CLASSINFO("DeleteRecProfile", "methods=POST")
58 Q_CLASSINFO("UpdateRecProfile", "methods=POST")
59 Q_CLASSINFO("UpdateRecProfileParam", "methods=POST")
60
61 public:
62 V2Capture();
63 ~V2Capture() override = default;
64 static void RegisterCustomTypes();
65
66 public slots:
67 static V2CaptureCardList* GetCaptureCardList ( const QString &HostName,
68 const QString &CardType );
69
70 static V2CaptureCard* GetCaptureCard ( int CardId );
71
72 static V2CardSubType* GetCardSubType ( int CardId );
73
74 static bool RemoveAllCaptureCards ( void );
75
76 static bool RemoveCaptureCard ( int CardId );
77
78 static int AddCaptureCard ( const QString &VideoDevice,
79 const QString &AudioDevice,
80 const QString &VBIDevice,
81 const QString &CardType,
83 const QString &HostName,
84 uint DVBSWFilter,
85 uint DVBSatType,
86 bool DVBWaitForSeqStart,
87 bool SkipBTAudio,
88 bool DVBOnDemand,
89 uint DVBDiSEqCType,
91 const QString &FirewireModel,
99 uint Hue,
100 uint DiSEqCId,
101 bool DVBEITScan);
102
103 static bool UpdateCaptureCard ( int CardId,
104 const QString &Setting,
105 const QString &Value );
106
107 // Card Inputs
108
109 static bool RemoveCardInput ( int CardInputId);
110
111 static int AddCardInput ( uint CardId,
112 uint SourceId,
113 const QString &InputName,
114 const QString &ExternalCommand,
115 const QString &ChangerDevice,
116 const QString &ChangerModel,
117 const QString &HostName,
118 const QString &TuneChan,
119 const QString &StartChan,
120 const QString &DisplayName,
121 bool DishnetEIT,
122 uint RecPriority,
123 uint Quicktune,
124 uint SchedOrder,
126
127 static bool UpdateCardInput ( int CardInputId,
128 const QString &Setting,
129 const QString &Value );
130
132
133 static int AddUserInputGroup ( const QString & Name );
134
135 static bool LinkInputGroup ( uint InputId,
136 uint InputGroupId );
137
138 static bool UnlinkInputGroup ( uint InputId,
139 uint InputGroupId );
140
141 static bool SetInputMaxRecordings ( uint InputId,
142 uint Max );
143
144 static V2CardTypeList* GetCardTypeList ( void );
145
146 static V2CaptureDeviceList* GetCaptureDeviceList ( const QString &CardType );
147
148 static V2DiseqcTreeList* GetDiseqcTreeList ( void );
149
150 static int AddDiseqcTree ( uint ParentId,
151 uint Ordinal,
152 const QString& Type,
153 const QString& SubType,
154 const QString& Description,
155 uint SwitchPorts,
156 float RotorHiSpeed,
157 float RotorLoSpeed,
158 const QString& RotorPositions,
159 int LnbLofSwitch,
160 int LnbLofHi,
161 int LnbLofLo,
162 int CmdRepeat,
163 bool LnbPolInv,
164 int Address,
165 uint ScrUserband,
166 uint ScrFrequency,
167 int ScrPin);
168
169 static bool UpdateDiseqcTree ( uint DiSEqCId,
170 uint ParentId,
171 uint Ordinal,
172 const QString& Type,
173 const QString& SubType,
174 const QString& Description,
175 uint SwitchPorts,
176 float RotorHiSpeed,
177 float RotorLoSpeed,
178 const QString& RotorPositions,
179 int LnbLofSwitch,
180 int LnbLofHi,
181 int LnbLofLo,
182 int CmdRepeat,
183 bool LnbPolInv,
184 int Address,
185 uint ScrUserband,
186 uint ScrFrequency,
187 int ScrPin);
188
189 static bool RemoveDiseqcTree ( uint DiSEqCId) ;
190
192
193 static bool AddDiseqcConfig ( uint CardId,
194 uint DiSEqCId,
195 const QString& Value);
196
197 static bool RemoveDiseqcConfig ( uint CardId);
198
200 uint ProfileId,
201 bool OnlyInUse );
202
203 static int AddRecProfile ( uint GroupId,
204 const QString& ProfileName,
205 const QString& VideoCodec,
206 const QString& AudioCodec );
207
208 static bool DeleteRecProfile (uint ProfileId);
209
210 static bool UpdateRecProfile ( uint ProfileId,
211 const QString& VideoCodec,
212 const QString& AudioCodec );
213
214 static bool UpdateRecProfileParam ( uint ProfileId,
215 const QString& Name,
216 const QString& Value);
217
218 private:
219 Q_DISABLE_COPY(V2Capture)
220
221};
222
223
224#endif
static bool UpdateCardInput(int CardInputId, const QString &Setting, const QString &Value)
Definition: v2capture.cpp:439
static int AddUserInputGroup(const QString &Name)
Definition: v2capture.cpp:550
static bool LinkInputGroup(uint InputId, uint InputGroupId)
Definition: v2capture.cpp:567
static bool UpdateCaptureCard(int CardId, const QString &Setting, const QString &Value)
Definition: v2capture.cpp:384
static void RegisterCustomTypes()
static bool RemoveCaptureCard(int CardId)
Definition: v2capture.cpp:327
static V2RecProfileGroupList * GetRecProfileGroupList(uint GroupId, uint ProfileId, bool OnlyInUse)
Definition: v2capture.cpp:1176
~V2Capture() override=default
static V2CaptureCardList * GetCaptureCardList(const QString &HostName, const QString &CardType)
Definition: v2capture.cpp:83
static int AddCaptureCard(const QString &VideoDevice, const QString &AudioDevice, const QString &VBIDevice, const QString &CardType, uint AudioRateLimit, const QString &HostName, uint DVBSWFilter, uint DVBSatType, bool DVBWaitForSeqStart, bool SkipBTAudio, bool DVBOnDemand, uint DVBDiSEqCType, uint FirewireSpeed, const QString &FirewireModel, uint FirewireConnection, uint SignalTimeout, uint ChannelTimeout, uint DVBTuningDelay, uint Contrast, uint Brightness, uint Colour, uint Hue, uint DiSEqCId, bool DVBEITScan)
Definition: v2capture.cpp:341
static V2CardSubType * GetCardSubType(int CardId)
Definition: v2capture.cpp:276
static V2CardTypeList * GetCardTypeList(void)
Definition: v2capture.cpp:449
static bool UpdateDiseqcTree(uint DiSEqCId, uint ParentId, uint Ordinal, const QString &Type, const QString &SubType, const QString &Description, uint SwitchPorts, float RotorHiSpeed, float RotorLoSpeed, const QString &RotorPositions, int LnbLofSwitch, int LnbLofHi, int LnbLofLo, int CmdRepeat, bool LnbPolInv, int Address, uint ScrUserband, uint ScrFrequency, int ScrPin)
Definition: v2capture.cpp:978
static bool RemoveDiseqcConfig(uint CardId)
Definition: v2capture.cpp:1161
static int AddCardInput(uint CardId, uint SourceId, const QString &InputName, const QString &ExternalCommand, const QString &ChangerDevice, const QString &ChangerModel, const QString &HostName, const QString &TuneChan, const QString &StartChan, const QString &DisplayName, bool DishnetEIT, uint RecPriority, uint Quicktune, uint SchedOrder, uint LiveTVOrder)
Definition: v2capture.cpp:406
static bool UnlinkInputGroup(uint InputId, uint InputGroupId)
Definition: v2capture.cpp:577
static bool RemoveCardInput(int CardInputId)
Definition: v2capture.cpp:396
static bool DeleteRecProfile(uint ProfileId)
Definition: v2capture.cpp:1369
static int AddDiseqcTree(uint ParentId, uint Ordinal, const QString &Type, const QString &SubType, const QString &Description, uint SwitchPorts, float RotorHiSpeed, float RotorLoSpeed, const QString &RotorPositions, int LnbLofSwitch, int LnbLofHi, int LnbLofLo, int CmdRepeat, bool LnbPolInv, int Address, uint ScrUserband, uint ScrFrequency, int ScrPin)
Definition: v2capture.cpp:878
static V2CaptureDeviceList * GetCaptureDeviceList(const QString &CardType)
Definition: v2capture.cpp:638
static V2CaptureCard * GetCaptureCard(int CardId)
Definition: v2capture.cpp:188
static bool RemoveDiseqcTree(uint DiSEqCId)
Definition: v2capture.cpp:1061
static int AddRecProfile(uint GroupId, const QString &ProfileName, const QString &VideoCodec, const QString &AudioCodec)
Definition: v2capture.cpp:1270
static V2DiseqcConfigList * GetDiseqcConfigList(void)
Definition: v2capture.cpp:1094
static V2InputGroupList * GetUserInputGroupList(void)
Definition: v2capture.cpp:519
static bool UpdateRecProfileParam(uint ProfileId, const QString &Name, const QString &Value)
Definition: v2capture.cpp:1397
static bool SetInputMaxRecordings(uint InputId, uint Max)
Definition: v2capture.cpp:586
static bool RemoveAllCaptureCards(void)
Definition: v2capture.cpp:322
static bool UpdateRecProfile(uint ProfileId, const QString &VideoCodec, const QString &AudioCodec)
Definition: v2capture.cpp:1324
static V2DiseqcTreeList * GetDiseqcTreeList(void)
Definition: v2capture.cpp:808
static bool AddDiseqcConfig(uint CardId, uint DiSEqCId, const QString &Value)
Definition: v2capture.cpp:1132
unsigned int uint
Definition: freesurround.h:24
QMap< QString, bool > Setting