Ticket #3162: nzmheg.patch
File nzmheg.patch, 9.7 KB (added by , 17 years ago) |
---|
-
keys.txt
75 75 - F7 Toggle Background on/off 76 76 - F8 Reveal hidden text. 77 77 78 When in MHEG ITV Menu mode:78 When MHEG ITV is enabled: 79 79 - F2-F5 Menu Red, Green, Yellow, or Blue, respectively 80 - F6 Exit ITV Menu 81 - F7 Toggle Menu Text 80 - F6 Exit key, exits from interactive mode on some channels 81 - F7 Text key, enters interactive mode on some channels 82 - F12 EPG key, enters EPG mode (New Zealand only). 83 The effect of these keys depends on what is being displayed. The arrow, 84 Enter, and 0-9 keys may also be used. 82 85 83 86 Without the stickykeys option selected: 84 87 -
libs/libmythtv/tv_play.cpp
417 417 REG_KEY("ITV Menu", "MENUBLUE", "Menu Blue", "F5"); 418 418 REG_KEY("ITV Menu", "TEXTEXIT", "Menu Exit", "F6"); 419 419 REG_KEY("ITV Menu", "MENUTEXT", "Menu Text", "F7"); 420 REG_KEY("ITV Menu", "MENUEPG", "Menu EPG", "F12"); 420 421 /* 421 422 keys already used: 422 423 … … 441 442 Global: F1, 442 443 Playback: F7,F8,F9,F10,F11 443 444 Teletext F2,F3,F4,F5,F6,F7,F8 444 ITV F2,F3,F4,F5,F6,F7 445 ITV F2,F3,F4,F5,F6,F7,F12 445 446 446 447 Playback: Ctrl-B,Ctrl-G 447 448 */ -
libs/libmythtv/mhi.h
101 101 void DrawImage(int x, int y, const QRect &rect, const QImage &image); 102 102 103 103 virtual int GetChannelIndex(const QString &str); 104 /// Get netId etc from the channel index. 105 virtual bool GetServiceInfo(int channelId, int &netId, int &origNetId, 106 int &transportId, int &serviceId); 104 107 virtual bool TuneTo(int channel); 105 108 106 109 /// Begin playing audio from the specified stream -
libs/libmythtv/mhi.cpp
327 327 int action = 0; 328 328 QMutexLocker locker(&m_keyLock); 329 329 330 // This supports the UK and NZ key profile registers. 331 // The UK uses 3, 4 and 5 and NZ 13, 14 and 15. These are 332 // similar but the NZ profile also provides an EPG key. 333 330 334 if (key == "UP") 331 335 { 332 if (m_keyProfile == 4 || m_keyProfile == 5) 336 if (m_keyProfile == 4 || m_keyProfile == 5 || 337 m_keyProfile == 14 || m_keyProfile == 15) 333 338 action = 1; 334 339 } 335 340 else if (key == "DOWN") 336 341 { 337 if (m_keyProfile == 4 || m_keyProfile == 5) 342 if (m_keyProfile == 4 || m_keyProfile == 5 || 343 m_keyProfile == 14 || m_keyProfile == 15) 338 344 action = 2; 339 345 } 340 346 else if (key == "LEFT") 341 347 { 342 if (m_keyProfile == 4 || m_keyProfile == 5) 348 if (m_keyProfile == 4 || m_keyProfile == 5 || 349 m_keyProfile == 14 || m_keyProfile == 15) 343 350 action = 3; 344 351 } 345 352 else if (key == "RIGHT") 346 353 { 347 if (m_keyProfile == 4 || m_keyProfile == 5) 354 if (m_keyProfile == 4 || m_keyProfile == 5 || 355 m_keyProfile == 14 || m_keyProfile == 15) 348 356 action = 4; 349 357 } 350 358 else if (key == "0" || key == "1" || key == "2" || … … 352 360 key == "6" || key == "7" || key == "8" || 353 361 key == "9") 354 362 { 355 if (m_keyProfile == 4 )363 if (m_keyProfile == 4 || m_keyProfile == 14) 356 364 action = key.toInt() + 5; 357 365 } 358 366 else if (key == "SELECT") 359 367 { 360 if (m_keyProfile == 4 || m_keyProfile == 5) 368 if (m_keyProfile == 4 || m_keyProfile == 5 || 369 m_keyProfile == 14 || m_keyProfile == 15) 361 370 action = 15; 362 371 } 363 372 else if (key == "TEXTEXIT") … … 371 380 else if (key == "MENUBLUE") 372 381 action = 103; 373 382 else if (key == "MENUTEXT") 374 action = 104; 383 action = m_keyProfile > 12 ? 105 : 104; 384 else if (key == "MENUEPG") 385 action = m_keyProfile > 12 ? 300 : 0; 375 386 376 387 if (action != 0) 377 388 { … … 573 584 if (query.exec() && query.isActive() && query.next()) 574 585 return query.value(0).toInt(); 575 586 } 576 else if (str == "rec://svc/cur" )587 else if (str == "rec://svc/cur" || str == "rec://svc/def") 577 588 return m_currentChannel; 578 589 else if (str.startsWith("rec://")) 579 590 { … … 581 592 return -1; 582 593 } 583 594 595 // Get netId etc from the channel index. This is the inverse of GetChannelIndex. 596 bool MHIContext::GetServiceInfo(int channelId, int &netId, int &origNetId, 597 int &transportId, int &serviceId) 598 { 599 MSqlQuery query(MSqlQuery::InitCon()); 600 query.prepare("SELECT networkid, transportid, serviceid " 601 "FROM channel, dtv_multiplex " 602 "WHERE chanid = :CHANID AND " 603 " channel.mplexid = dtv_multiplex.mplexid"); 604 query.bindValue(":CHANID", channelId); 605 if (query.exec() && query.isActive() && query.next()) 606 { 607 netId = query.value(0).toInt(); 608 origNetId = netId; // We don't have this in the database. 609 transportId = query.value(1).toInt(); 610 serviceId = query.value(2).toInt(); 611 return true; 612 } 613 else return false; 614 } 615 584 616 bool MHIContext::TuneTo(int channel) 585 617 { 586 618 if (!m_isLive) -
libs/libmythfreemheg/freemheg.h
116 116 117 117 // Tuning. Get the index corresponding to a given channel. 118 118 virtual int GetChannelIndex(const QString &str) = 0; 119 // Get netId etc from the channel index. 120 virtual bool GetServiceInfo(int channelId, int &netId, int &origNetId, 121 int &transportId, int &serviceId) = 0; 119 122 // Tune to an index returned by GetChannelIndex 120 123 virtual bool TuneTo(int channel) = 0; 121 124 -
libs/libmythfreemheg/Programs.cpp
389 389 // Indicates whether to perform a subsequent TIn quietly or normally. 390 390 MHERROR("SI_TuneIndexInfo ResidentProgram is not implemented"); 391 391 } 392 392 393 else if (m_Name.Equal("BSI")) { // SI_GetBasicSI 393 394 // Returns basic SI information about the service indicated by an index 394 395 // returned by GSI. 395 396 // Returns networkID, origNetworkID, transportStreamID, serviceID 396 MHERROR("SI_GetBasicSI ResidentProgram is not implemented"); 397 if (args.Size() == 5) { 398 int channelId = GetInt(args.GetAt(0), engine); 399 int netId, origNetId, transportId, serviceId; 400 // Look the information up in the database. 401 bool res = engine->GetContext()->GetServiceInfo(channelId, netId, origNetId, 402 transportId, serviceId); 403 if (res) 404 { 405 engine->FindObject(*(args.GetAt(1)->GetReference()))->SetVariableValue(netId); 406 engine->FindObject(*(args.GetAt(2)->GetReference()))->SetVariableValue(origNetId); 407 engine->FindObject(*(args.GetAt(3)->GetReference()))->SetVariableValue(transportId); 408 engine->FindObject(*(args.GetAt(4)->GetReference()))->SetVariableValue(serviceId); 409 } 410 SetSuccessFlag(success, res, engine); 411 } 412 else SetSuccessFlag(success, false, engine); 397 413 } 414 398 415 else if (m_Name.Equal("GBI")) { // GetBootInfo 399 416 // Gets the NB_info field. 400 417 MHERROR("GetBootInfo ResidentProgram is not implemented"); 401 418 } 419 402 420 else if (m_Name.Equal("CCR")) { // CheckContentRef 403 421 // Sees if an item with a particular content reference is available 404 // in the carousel. 405 MHERROR("CheckContentRef ResidentProgram is not implemented"); 422 // in the carousel. This looks like it should block until the file 423 // is available. The profile recommends that this should be forked 424 // rather than called. 425 if (args.Size() == 3) { 426 MHUnion un; 427 un.GetValueFrom(*(args.GetAt(0)), engine); 428 un.CheckType(MHUnion::U_ContentRef); 429 MHContentRef fileName; 430 fileName.Copy(un.m_ContentRefVal); 431 QString csPath = engine->GetPathName(fileName.m_ContentRef); 432 bool result = false; 433 QByteArray text; 434 // Try to load the object. 435 if (! csPath.isEmpty()) 436 result = engine->GetContext()->GetCarouselData(csPath, text); 437 // Set the result variable. 438 MHParameter *pResFlag = args.GetAt(1); 439 engine->FindObject(*(pResFlag->GetReference()))->SetVariableValue(result); 440 MHParameter *pResCR = args.GetAt(2); 441 // Copy the file name to the resulting content ref. 442 engine->FindObject(*(pResCR->GetReference()))->SetVariableValue(fileName); 443 SetSuccessFlag(success, true, engine); 444 } 445 else SetSuccessFlag(success, false, engine); 406 446 } 447 407 448 else if (m_Name.Equal("CGR")) { // CheckGroupIDRef 408 449 // Sees if an application or scene with a particular group id 409 450 // is available in the carousel.