diff --git a/mythtv/libs/libmyth/mythcontext.h b/mythtv/libs/libmyth/mythcontext.h
index e93d0a2..ca4a835 100644
a
|
b
|
class MythContextPrivate; |
79 | 79 | F(VB_MHEG, 0x00040000, "mheg", 1, "MHEG debugging messages") \ |
80 | 80 | F(VB_UPNP, 0x00080000, "upnp", 1, "upnp debugging messages") \ |
81 | 81 | F(VB_SOCKET, 0x00100000, "socket", 1, "socket debugging messages") \ |
| 82 | F(VB_DVBCAM, 0x00200000, "dvbcam", 1, "DVB CAM debugging messages") \ |
82 | 83 | F(VB_TIMESTAMP, 0x80000000, "timestamp", 1, "Conditional data driven messages") \ |
83 | 84 | F(VB_NONE, 0x00000000, "none", 0, "NO debug output") |
84 | 85 | |
diff --git a/mythtv/libs/libmythtv/dvbcam.cpp b/mythtv/libs/libmythtv/dvbcam.cpp
index c30d417..a748202 100644
a
|
b
|
bool DVBCam::Start() |
111 | 111 | |
112 | 112 | ciThreadRunning = true; |
113 | 113 | |
114 | | VERBOSE(VB_CHANNEL, LOC + "CI handler successfully initialized!"); |
| 114 | VERBOSE(VB_DVBCAM, LOC + "CI handler successfully initialized!"); |
115 | 115 | |
116 | 116 | return true; |
117 | 117 | } |
… |
… |
void DVBCam::HandleUserIO(void) |
145 | 145 | if (enq != NULL) |
146 | 146 | { |
147 | 147 | if (enq->Text() != NULL) |
148 | | VERBOSE(VB_CHANNEL, LOC + "CAM: Received message: " + |
| 148 | VERBOSE(VB_DVBCAM, LOC + "CAM: Received message: " + |
149 | 149 | enq->Text()); |
150 | 150 | delete enq; |
151 | 151 | } |
… |
… |
void DVBCam::HandleUserIO(void) |
154 | 154 | if (menu != NULL) |
155 | 155 | { |
156 | 156 | if (menu->TitleText() != NULL) |
157 | | VERBOSE(VB_CHANNEL, LOC + "CAM: Menu Title: " + |
| 157 | VERBOSE(VB_DVBCAM, LOC + "CAM: Menu Title: " + |
158 | 158 | menu->TitleText()); |
159 | 159 | if (menu->SubTitleText() != NULL) |
160 | | VERBOSE(VB_CHANNEL, LOC + "CAM: Menu SubTitle: " + |
| 160 | VERBOSE(VB_DVBCAM, LOC + "CAM: Menu SubTitle: " + |
161 | 161 | menu->SubTitleText()); |
162 | 162 | if (menu->BottomText() != NULL) |
163 | | VERBOSE(VB_CHANNEL, LOC + "CAM: Menu BottomText: " + |
| 163 | VERBOSE(VB_DVBCAM, LOC + "CAM: Menu BottomText: " + |
164 | 164 | menu->BottomText()); |
165 | 165 | |
166 | 166 | for (int i=0; i<menu->NumEntries(); i++) |
167 | 167 | if (menu->Entry(i) != NULL) |
168 | | VERBOSE(VB_CHANNEL, LOC + "CAM: Menu Entry: " + |
| 168 | VERBOSE(VB_DVBCAM, LOC + "CAM: Menu Entry: " + |
169 | 169 | menu->Entry(i)); |
170 | 170 | |
171 | 171 | if (menu->Selectable()) |
… |
… |
void DVBCam::HandleUserIO(void) |
175 | 175 | |
176 | 176 | if (menu->NumEntries() > 0) |
177 | 177 | { |
178 | | VERBOSE(VB_CHANNEL, LOC + |
| 178 | VERBOSE(VB_DVBCAM, LOC + |
179 | 179 | "CAM: Selecting first entry"); |
180 | 180 | menu->Select(0); |
181 | 181 | } |
182 | 182 | else |
183 | 183 | { |
184 | | VERBOSE(VB_CHANNEL, LOC + "CAM: Cancelling menu"); |
| 184 | VERBOSE(VB_DVBCAM, LOC + "CAM: Cancelling menu"); |
185 | 185 | } |
186 | 186 | |
187 | 187 | delete menu; |
… |
… |
void DVBCam::HandleUserIO(void) |
190 | 190 | |
191 | 191 | void DVBCam::HandlePMT(void) |
192 | 192 | { |
193 | | VERBOSE(VB_CHANNEL, LOC + "CiHandler needs CA_PMT"); |
| 193 | VERBOSE(VB_DVBCAM, LOC + "CiHandler needs CA_PMT"); |
194 | 194 | QMutexLocker locker(&pmt_lock); |
195 | 195 | |
196 | 196 | if (pmt_sent && pmt_added && !pmt_updated) |
… |
… |
void DVBCam::HandlePMT(void) |
239 | 239 | |
240 | 240 | void DVBCam::CiHandlerLoop() |
241 | 241 | { |
242 | | VERBOSE(VB_CHANNEL, LOC + "CI handler thread running"); |
| 242 | VERBOSE(VB_DVBCAM, LOC + "CI handler thread running"); |
243 | 243 | |
244 | 244 | while (!exitCiThread) |
245 | 245 | { |
… |
… |
void DVBCam::CiHandlerLoop() |
258 | 258 | } |
259 | 259 | |
260 | 260 | ciThreadRunning = false; |
261 | | VERBOSE(VB_CHANNEL, LOC + "CiHandler thread stopped"); |
| 261 | VERBOSE(VB_DVBCAM, LOC + "CiHandler thread stopped"); |
262 | 262 | } |
263 | 263 | |
264 | 264 | void DVBCam::SetPMT(const ProgramMapTable *pmt) |
265 | 265 | { |
266 | | VERBOSE(VB_CHANNEL, LOC + "SetPMT() program num #"<<pmt->ProgramNumber()); |
| 266 | VERBOSE(VB_DVBCAM, LOC + "SetPMT() program num #"<<pmt->ProgramNumber()); |
267 | 267 | |
268 | 268 | QMutexLocker locker(&pmt_lock); |
269 | 269 | PMTList.clear(); |
… |
… |
cCiCaPmt CreateCAPMT(const ProgramMapTable&, const unsigned short*, uint); |
290 | 290 | */ |
291 | 291 | void DVBCam::SendPMT(const ProgramMapTable &pmt, uint cplm) |
292 | 292 | { |
| 293 | bool success = false; |
| 294 | |
293 | 295 | for (uint s = 0; s < (uint)ciHandler->NumSlots(); s++) |
294 | 296 | { |
295 | 297 | const unsigned short *casids = ciHandler->GetCaSystemIds(s); |
296 | 298 | |
297 | 299 | if (!casids) |
298 | 300 | { |
299 | | VERBOSE(VB_IMPORTANT, LOC_ERR + "GetCaSystemIds returned NULL! " + |
| 301 | VERBOSE(success ? VB_DVBCAM : VB_IMPORTANT, LOC_ERR + |
| 302 | "GetCaSystemIds returned NULL! " + |
300 | 303 | QString("(Slot #%1)").arg(s)); |
301 | 304 | continue; |
302 | 305 | } |
303 | 306 | |
304 | 307 | if (!casids[0]) |
305 | 308 | { |
306 | | VERBOSE(VB_IMPORTANT, LOC_ERR + "CAM supports no CA systems! " + |
| 309 | VERBOSE(success ? VB_DVBCAM : VB_IMPORTANT, LOC_ERR + "CAM supports no CA systems! " + |
307 | 310 | QString("(Slot #%1)").arg(s)); |
308 | 311 | continue; |
309 | 312 | } |
310 | 313 | |
311 | | VERBOSE(VB_CHANNEL, LOC + "Creating CA_PMT, ServiceID = " |
| 314 | VERBOSE(VB_DVBCAM, LOC + "Creating CA_PMT, ServiceID = " |
312 | 315 | << pmt.ProgramNumber()); |
313 | 316 | |
314 | 317 | cCiCaPmt capmt = CreateCAPMT(pmt, casids, cplm); |
315 | 318 | |
316 | | VERBOSE(VB_CHANNEL, LOC + |
| 319 | VERBOSE(VB_DVBCAM, LOC + |
317 | 320 | QString("Sending CA_PMT with %1 to CI slot #%2") |
318 | 321 | .arg(cplm_info[cplm]).arg(s)); |
319 | 322 | |
320 | 323 | if (!ciHandler->SetCaPmt(capmt, s)) |
321 | | VERBOSE(VB_CHANNEL, LOC + "CA_PMT send failed!"); |
| 324 | VERBOSE(success ? VB_DVBCAM : VB_IMPORTANT, LOC + "CA_PMT send failed!"); |
| 325 | else |
| 326 | success = true; |
322 | 327 | } |
323 | 328 | } |
324 | 329 | |
… |
… |
void process_desc(cCiCaPmt &capmt, |
335 | 340 | if (cad.SystemID() != casids[q]) |
336 | 341 | continue; |
337 | 342 | |
338 | | VERBOSE(VB_CHANNEL, |
| 343 | VERBOSE(VB_DVBCAM, |
339 | 344 | QString("Adding CA descriptor: " |
340 | 345 | "CASID(0x%2), ECM PID(0x%3)") |
341 | 346 | .arg(cad.SystemID(),0,16).arg(cad.PID(),0,16)); |
… |
… |
cCiCaPmt CreateCAPMT(const ProgramMapTable &pmt, |
363 | 368 | // Add elementary streams + CA descriptors |
364 | 369 | for (uint i = 0; i < pmt.StreamCount(); i++) |
365 | 370 | { |
366 | | VERBOSE(VB_CHANNEL, |
| 371 | VERBOSE(VB_DVBCAM, |
367 | 372 | QString("Adding elementary stream: %1, pid(0x%2)") |
368 | 373 | .arg(pmt.StreamDescription(i, "dvb")) |
369 | 374 | .arg(pmt.StreamPID(i),0,16)); |
diff --git a/mythtv/libs/libmythtv/dvbdev/dvbci.cpp b/mythtv/libs/libmythtv/dvbdev/dvbci.cpp
index 27c2ca0..7f9d52a 100644
a
|
b
|
|
37 | 37 | #include <unistd.h> |
38 | 38 | #include <fcntl.h> |
39 | 39 | |
| 40 | #include <qstring.h> |
| 41 | |
| 42 | #include "mythcontext.h" |
| 43 | |
40 | 44 | #ifndef MALLOC |
41 | 45 | #define MALLOC(type, size) (type *)malloc(sizeof(type) * (size)) |
42 | 46 | #endif |
43 | 47 | |
44 | | #ifndef esyslog |
45 | | static int SysLogLevel = 3; |
46 | | #define esyslog(a...) void( (SysLogLevel > 0) ? void(fprintf(stderr, a)), void(fprintf(stderr, "\n")) : void() ) |
47 | | #define isyslog(a...) void( (SysLogLevel > 1) ? void(fprintf(stderr, a)), void(fprintf(stderr, "\n")) : void() ) |
48 | | #define dsyslog(a...) void( (SysLogLevel > 2) ? void(fprintf(stderr, a)), void(fprintf(stderr, "\n")) : void() ) |
| 48 | #define esyslog(a...) VERBOSE(VB_IMPORTANT, QString().sprintf(a)) |
| 49 | #define isyslog(a...) VERBOSE(VB_DVBCAM, QString().sprintf(a)) |
| 50 | #define dsyslog(a...) VERBOSE(VB_DVBCAM, QString().sprintf(a)) |
49 | 51 | |
50 | 52 | #define LOG_ERROR esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__) |
51 | 53 | #define LOG_ERROR_STR(s) esyslog("ERROR: %s: %m", s) |
52 | 54 | |
53 | | #endif |
54 | | |
55 | 55 | |
56 | 56 | // Set these to 'true' for debug output: |
57 | 57 | static bool DumpTPDUDataTransfer = false; |