Ticket #6422: 0.23.diff
File 0.23.diff, 26.1 KB (added by , 13 years ago) |
---|
-
mythtv/filters/yadif/yadif.pro
diff --git a/mythtv/filters/yadif/yadif.pro b/mythtv/filters/yadif/yadif.pro index ec45a0a..9011d54 100644
a b contains(ARCH_X86, yes) { 12 12 } 13 13 14 14 macx:debug:DEFINES -= MMX 15 16 macx { 17 CC = gcc-4.0 18 CXX = g++-4.0 19 } -
mythtv/libs/libavcodec/libavcodec.pro
diff --git a/mythtv/libs/libavcodec/libavcodec.pro b/mythtv/libs/libavcodec/libavcodec.pro index d91e57a..7e0677a 100644
a b contains( HAVE_VIS, yes ) { 677 677 678 678 macx { 679 679 QMAKE_LFLAGS_SHLIB += -read_only_relocs warning 680 contains( HAVE_MMX, yes ) : QMAKE_CFLAGS_RELEASE += -mdynamic-no-pic 680 681 } 681 682 682 683 # TODO: generate hardcoded tables -
mythtv/libs/libmythtv/decoderbase.h
diff --git a/mythtv/libs/libmythtv/decoderbase.h b/mythtv/libs/libmythtv/decoderbase.h index 8748e75..325f122 100644
a b class RingBuffer; 17 17 class TeletextViewer; 18 18 class NuppelVideoPlayer; 19 19 20 const int kDecoderProbeBufferSize = 1024 * 1024;20 const int kDecoderProbeBufferSize = 65536; 21 21 22 22 /// Track types 23 23 typedef enum TrackTypes -
mythtv/libs/libmythui/AppleRemote.cpp
diff --git a/mythtv/libs/libmythui/AppleRemote.cpp b/mythtv/libs/libmythui/AppleRemote.cpp index 3996c18..4311036 100644
a b 6 6 #include <stdlib.h> 7 7 #include <ctype.h> 8 8 #include <sys/errno.h> 9 #include <sys/sysctl.h> 9 10 #include <sysexits.h> 10 11 #include <mach/mach.h> 11 12 #include <mach/mach_error.h> … … 14 15 #include <IOKit/hid/IOHIDLib.h> 15 16 #include <IOKit/hid/IOHIDKeys.h> 16 17 #include <CoreFoundation/CoreFoundation.h> 18 #include <CoreServices/CoreServices.h> 17 19 18 20 #include <sstream> 21 #include <QTimer> 22 23 19 24 20 25 #include "mythverbose.h" 21 26 22 27 AppleRemote* AppleRemote::_instance = 0; 23 const char* const AppleRemote::AppleRemoteDeviceName = "AppleIRController";24 28 const int AppleRemote::REMOTE_SWITCH_COOKIE = 19; 29 // For ATV v2.3 onwards 30 const int LONG_PRESS_COUNT = 10; 31 const int KEY_RESPONSE_TIME = 150; // msecs before we send a key up event 25 32 26 33 const QString LOC = "AppleRemote::"; 27 34 35 typedef struct _ATV_IR_EVENT { 36 UInt32 time_ms32; 37 UInt32 time_ls32; // units of microsecond 38 UInt32 unknown1; 39 UInt32 keycode; 40 UInt32 unknown2; 41 } ATV_IR_EVENT; 42 43 static io_object_t _findAppleRemoteDevice(const char *devName); 44 28 45 AppleRemote::Listener::~Listener() 29 46 { 30 47 } … … AppleRemote * AppleRemote::Get() 40 57 AppleRemote::~AppleRemote() 41 58 { 42 59 stopListening(); 60 if (usingNewAtv) 61 delete mCallbackTimer; 43 62 } 44 63 45 64 bool AppleRemote::isListeningToRemote() … … void AppleRemote::startListening() 56 75 { 57 76 if (queue != NULL) // already listening 58 77 return; 59 60 io_object_t hidDevice = _findAppleRemoteDevice();61 78 62 if (hidDevice == 0) goto error; 63 if (!_createDeviceInterface(hidDevice)) goto error; 64 if (!_initCookies()) goto error; 65 if (!_openDevice()) goto error; 66 goto cleanup; 79 io_object_t hidDevice = _findAppleRemoteDevice("AppleIRController"); 67 80 68 error: 69 stopListening(); 81 if (!hidDevice) 82 hidDevice = _findAppleRemoteDevice("AppleTVIRReceiver"); 83 84 if (!hidDevice || 85 !_createDeviceInterface(hidDevice) || 86 !_initCookies() || !_openDevice()) 87 { 88 VERBOSE(VB_IMPORTANT, LOC + "startListening() failed"); 89 stopListening(); 90 return; 91 } 70 92 71 cleanup:72 93 IOObjectRelease(hidDevice); 73 94 } 74 95 … … AppleRemote::AppleRemote() : openInExclusiveMode(true), 105 126 hidDeviceInterface(0), 106 127 queue(0), 107 128 remoteId(0), 108 _listener(0) 129 _listener(0), 130 usingNewAtv(false), 131 mLastEvent(AppleRemote::Undefined), 132 mEventCount(0), 133 mKeyIsDown(false) 109 134 { 135 SInt32 macVersion; 136 size_t len = 512; 137 char hw_model[512] = "unknown"; 138 139 // Figure out if we're running on the Apple TV, past version 2.3 140 Gestalt(gestaltSystemVersion, &macVersion); 141 142 143 if (macVersion < 0x1050) // OSX 10.4 / AppleTV 144 { 145 sysctlbyname("hw.model", &hw_model, &len, NULL, 0); 146 147 if ( strstr(hw_model,"AppleTV1,1") ) 148 { 149 FILE* inpipe; 150 151 //Find the build version of the AppleTV OS 152 inpipe = popen("sw_vers -buildVersion", "r"); 153 char linebuf[1000]; 154 if (inpipe) 155 { 156 if ( fgets(linebuf, sizeof(linebuf) - 1, inpipe) ) 157 { 158 if ( !( strstr(linebuf,"8N5107") || // v1.0 159 strstr(linebuf,"8N5239") || // v1.1 160 strstr(linebuf,"8N5400") || // v2.0 161 strstr(linebuf,"8N5455") || // v2.01 162 strstr(linebuf,"8N5461") || // v2.02 163 strstr(linebuf,"8N5519") || // v2.1 164 strstr(linebuf,"8N5622") )) // v2.2 165 { 166 VERBOSE(VB_IMPORTANT, LOC + "::AppleRemote detected Apple TV > v2.3"); 167 usingNewAtv = true; 168 mCallbackTimer = new QTimer(this); 169 connect(mCallbackTimer, SIGNAL(timeout()), this, SLOT(TimeoutHandler())); 170 mCallbackTimer->setSingleShot(true); 171 mCallbackTimer->setInterval(KEY_RESPONSE_TIME); 172 } 173 } 174 } 175 pclose(inpipe); 176 } 177 } 110 178 _initCookieMap(); 111 179 } 112 180 113 // private 181 /// Apple keeps changing the "interface" between the remote and the OS. 182 /// This initialises a table that stores those mappings. 183 /// 184 /// The white plastic remote has a Play+Pause button in the middle of the 185 /// navigation ring, but for menu navigation, we send an "enter" event instead. 186 /// Ideally we would remap that for TV/videos, but MythTV can't easily do that. 187 /// 188 /// The new Aluminium remote has separate Select and Play+Pause buttons. 189 /// 114 190 void AppleRemote::_initCookieMap() 115 191 { 116 // 10.4 sequences: 117 cookieToButtonMapping["14_12_11_6_5_"] = VolumePlus; 118 cookieToButtonMapping["14_13_11_6_5_"] = VolumeMinus; 119 cookieToButtonMapping["14_7_6_5_14_7_6_5_"] = Menu; 120 cookieToButtonMapping["14_8_6_5_14_8_6_5_"] = Play; 121 cookieToButtonMapping["14_9_6_5_14_9_6_5_"] = Right; 122 cookieToButtonMapping["14_10_6_5_14_10_6_5_"] = Left; 123 cookieToButtonMapping["14_6_5_4_2_"] = RightHold; 124 cookieToButtonMapping["14_6_5_3_2_"] = LeftHold; 125 cookieToButtonMapping["14_6_5_14_6_5_"] = MenuHold; 126 cookieToButtonMapping["18_14_6_5_18_14_6_5_"] = PlaySleep; 127 cookieToButtonMapping["19_"] = ControlSwitched; 128 129 // 10.5 sequences: 130 cookieToButtonMapping["31_29_28_18_"] = VolumePlus; 131 cookieToButtonMapping["31_30_28_18_"] = VolumeMinus; 132 cookieToButtonMapping["31_20_18_31_20_18_"] = Menu; 133 cookieToButtonMapping["31_21_18_31_21_18_"] = Play; 134 cookieToButtonMapping["31_22_18_31_22_18_"] = Right; 135 cookieToButtonMapping["31_23_18_31_23_18_"] = Left; 136 cookieToButtonMapping["31_18_4_2_"] = RightHold; 137 cookieToButtonMapping["31_18_3_2_"] = LeftHold; 138 cookieToButtonMapping["31_18_31_18_"] = MenuHold; 139 cookieToButtonMapping["35_31_18_35_31_18_"] = PlaySleep; 140 cookieToButtonMapping["39_"] = ControlSwitched; 192 if (!usingNewAtv) 193 { 194 // 10.4 sequences: 195 cookieToButtonMapping["14_12_11_6_5_"] = Up; 196 cookieToButtonMapping["14_13_11_6_5_"] = Down; 197 cookieToButtonMapping["14_7_6_5_14_7_6_5_"] = Menu; 198 cookieToButtonMapping["14_8_6_5_14_8_6_5_"] = Select; 199 cookieToButtonMapping["14_9_6_5_14_9_6_5_"] = Right; 200 cookieToButtonMapping["14_10_6_5_14_10_6_5_"] = Left; 201 cookieToButtonMapping["14_6_5_4_2_"] = RightHold; 202 cookieToButtonMapping["14_6_5_3_2_"] = LeftHold; 203 cookieToButtonMapping["14_6_5_14_6_5_"] = MenuHold; 204 cookieToButtonMapping["18_14_6_5_18_14_6_5_"] = PlayHold; 205 cookieToButtonMapping["19_"] = ControlSwitched; 206 207 // 10.5 sequences: 208 cookieToButtonMapping["31_29_28_18_"] = Up; 209 cookieToButtonMapping["31_30_28_18_"] = Down; 210 cookieToButtonMapping["31_20_18_31_20_18_"] = Menu; 211 cookieToButtonMapping["31_21_18_31_21_18_"] = Select; 212 cookieToButtonMapping["31_22_18_31_22_18_"] = Right; 213 cookieToButtonMapping["31_23_18_31_23_18_"] = Left; 214 cookieToButtonMapping["31_18_4_2_"] = RightHold; 215 cookieToButtonMapping["31_18_3_2_"] = LeftHold; 216 cookieToButtonMapping["31_18_31_18_"] = MenuHold; 217 cookieToButtonMapping["35_31_18_35_31_18_"] = PlayHold; 218 cookieToButtonMapping["39_"] = ControlSwitched; 219 220 // ATV 1.0, 2.0-2.02 221 cookieToButtonMapping["14_12_11_6_"] = Up; 222 cookieToButtonMapping["14_13_11_6_"] = Down; 223 cookieToButtonMapping["14_7_6_14_7_6_"] = Menu; 224 cookieToButtonMapping["14_8_6_14_8_6_"] = Select; 225 cookieToButtonMapping["14_9_6_14_9_6_"] = Right; 226 cookieToButtonMapping["14_10_6_14_10_6_"] = Left; 227 cookieToButtonMapping["14_6_4_2_"] = RightHold; 228 cookieToButtonMapping["14_6_3_2_"] = LeftHold; 229 cookieToButtonMapping["14_6_14_6_"] = MenuHold; 230 cookieToButtonMapping["18_14_6_18_14_6_"] = PlayHold; 231 232 // ATV 1.0, 2.1-2.2 233 cookieToButtonMapping["15_13_12_"] = Up; 234 cookieToButtonMapping["15_14_12_"] = Down; 235 cookieToButtonMapping["15_8_15_8_"] = Menu; 236 cookieToButtonMapping["15_9_15_9_"] = Select; 237 cookieToButtonMapping["15_10_15_10_"] = Right; 238 cookieToButtonMapping["15_11_15_11_"] = Left; 239 cookieToButtonMapping["15_5_3_"] = RightHold; 240 cookieToButtonMapping["15_4_3_"] = LeftHold; 241 cookieToButtonMapping["15_6_15_6_"] = MenuHold; 242 cookieToButtonMapping["19_15_19_15_"] = PlayHold; 243 244 // 10.6 sequences: 245 cookieToButtonMapping["33_31_30_21_20_2_"] = Up; 246 cookieToButtonMapping["33_32_30_21_20_2_"] = Down; 247 cookieToButtonMapping["33_22_21_20_2_33_22_21_20_2_"] = Menu; 248 cookieToButtonMapping["33_23_21_20_2_33_23_21_20_2_"] = Select; 249 cookieToButtonMapping["33_24_21_20_2_33_24_21_20_2_"] = Right; 250 cookieToButtonMapping["33_25_21_20_2_33_25_21_20_2_"] = Left; 251 cookieToButtonMapping["33_21_20_14_12_2_"] = RightHold; 252 cookieToButtonMapping["33_21_20_13_12_2_"] = LeftHold; 253 cookieToButtonMapping["33_21_20_2_33_21_20_2_"] = MenuHold; 254 cookieToButtonMapping["37_33_21_20_2_37_33_21_20_2_"] = PlayHold; 255 256 // Aluminium remote which has an extra button: 257 cookieToButtonMapping["33_21_20_8_2_33_21_20_8_2_"] = PlayPause; 258 cookieToButtonMapping["33_21_20_3_2_33_21_20_3_2_"] = Select; 259 cookieToButtonMapping["33_21_20_11_2_33_21_20_11_2_"] = PlayHold; 260 } 261 else 262 { 263 // ATV 2.30 264 cookieToButtonMapping["17_9_280_80"] = Up; 265 cookieToButtonMapping["17_9_280_48"] = Down; 266 cookieToButtonMapping["17_9_280_64"] = Menu; 267 cookieToButtonMapping["17_9_280_32"] = Select; 268 cookieToButtonMapping["17_9_280_96"] = Right; 269 cookieToButtonMapping["17_9_280_16"] = Left; 270 } 141 271 } 142 272 143 // private 144 io_object_t AppleRemote::_findAppleRemoteDevice() 273 static io_object_t _findAppleRemoteDevice(const char *devName) 145 274 { 146 275 CFMutableDictionaryRef hidMatchDictionary = 0; 147 276 io_iterator_t hidObjectIterator = 0; … … io_object_t AppleRemote::_findAppleRemoteDevice() 149 278 IOReturn ioReturnValue; 150 279 151 280 152 hidMatchDictionary = IOServiceMatching( AppleRemoteDeviceName);281 hidMatchDictionary = IOServiceMatching(devName); 153 282 154 283 // check for matching devices 155 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault, 156 hidMatchDictionary, 284 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault, 285 hidMatchDictionary, 157 286 &hidObjectIterator); 158 287 159 288 if ((ioReturnValue == kIOReturnSuccess) && (hidObjectIterator != 0)) 160 289 hidDevice = IOIteratorNext(hidObjectIterator); 290 else 291 VERBOSE(VB_IMPORTANT, (LOC + "_findAppleRemoteDevice(%1) failed") 292 .arg(devName)); 161 293 162 294 // IOServiceGetMatchingServices consumes a reference to the dictionary, 163 295 // so we don't need to release the dictionary ref. … … bool AppleRemote::_openDevice() 265 397 if (result != S_OK || !queue) 266 398 VERBOSE(VB_IMPORTANT, LOC + "_openDevice() - error creating queue"); 267 399 268 for (std::vector<int>::iterator iter = cookies.begin(); 400 for (std::vector<int>::iterator iter = cookies.begin(); 269 401 iter != cookies.end(); 270 402 ++iter) 271 403 { … … bool AppleRemote::_openDevice() 296 428 return true; 297 429 } 298 430 299 void AppleRemote::QueueCallbackFunction(void* target, IOReturn result, 431 void AppleRemote::QueueCallbackFunction(void* target, IOReturn result, 300 432 void* refcon, void* sender) 301 433 { 302 434 AppleRemote* remote = static_cast<AppleRemote*>(target); … … void AppleRemote::_queueCallbackFunction(IOReturn result, 311 443 SInt32 sumOfValues = 0; 312 444 std::stringstream cookieString; 313 445 314 while (result == kIOReturnSuccess)446 if (!usingNewAtv) 315 447 { 316 IOHIDEventStruct event; 448 while (result == kIOReturnSuccess) 449 { 450 IOHIDEventStruct event; 451 452 result = (*queue)->getNextEvent(queue, &event, zeroTime, 0); 453 if (result != kIOReturnSuccess) 454 break; 455 456 if (REMOTE_SWITCH_COOKIE == (int)event.elementCookie) 457 { 458 remoteId=event.value; 459 _handleEventWithCookieString("19_",0); 460 } 461 else 462 { 463 sumOfValues+=event.value; 464 cookieString << std::dec << (int)event.elementCookie << "_"; 465 } 466 } 467 _handleEventWithCookieString(cookieString.str(), sumOfValues); 468 } 469 else // AppleTV from v2.3 onwards 470 { 471 if (mCallbackTimer->isActive()) 472 { 473 mCallbackTimer->stop(); 474 } 317 475 318 result = (*queue)->getNextEvent(queue, &event, zeroTime, 0); 319 if (result != kIOReturnSuccess) 320 break; 476 IOHIDEventStruct event; 477 UInt32 key_code = 0; 321 478 322 if (REMOTE_SWITCH_COOKIE == (int)event.elementCookie)479 while (result == kIOReturnSuccess) 323 480 { 324 remoteId=event.value; 325 _handleEventWithCookieString("19_",0); 481 result = (*queue)->getNextEvent(queue, &event, zeroTime, 0); 482 if (result != kIOReturnSuccess) { 483 continue; 484 } 485 486 if ( ((int)event.elementCookie == 280) && (event.longValueSize == 20)) { 487 ATV_IR_EVENT* atv_ir_event = (ATV_IR_EVENT*)event.longValue; 488 key_code = atv_ir_event->keycode; 489 } 490 491 if (((int)event.elementCookie) != 5 ) { 492 sumOfValues += event.value; 493 cookieString << std::dec << (int)event.elementCookie << "_"; 494 } 326 495 } 327 else 328 { 329 sumOfValues+=event.value; 330 cookieString << std::dec << (int)event.elementCookie << "_"; 496 char endCode[10] = "17_9_280_"; 497 if (strcmp(cookieString.str().c_str(), endCode) == 0) { 498 499 cookieString << std::dec << (int) ( (key_code & 0x00007F00) >> 8); 500 501 sumOfValues = 1; 502 _handleEventWithCookieString(cookieString.str(), sumOfValues); 331 503 } 332 504 } 333 334 _handleEventWithCookieString(cookieString.str(), sumOfValues);335 505 } 336 506 337 void AppleRemote::_handleEventWithCookieString(std::string cookieString, 338 SInt32 sumOfValues)507 void AppleRemote::_handleEventWithCookieString(std::string cookieString, 508 SInt32 sumOfValues) 339 509 { 340 510 std::map<std::string,AppleRemote::Event>::iterator ii; 341 511 342 512 ii = cookieToButtonMapping.find(cookieString); 343 if (ii != cookieToButtonMapping.end() && _listener) 513 514 515 if (ii != cookieToButtonMapping.end() ) 516 { 517 AppleRemote::Event event = ii->second; 518 519 if (!usingNewAtv) { 520 if (_listener) 521 { 522 _listener->appleRemoteButton(event, sumOfValues>0); 523 } 524 } 525 else 526 { 527 // With the ATV from 2.3 onwards, we just get IR events. We need to simulate the 528 // key up and hold events 529 530 if (mLastEvent == Undefined) // new event 531 { 532 mEventCount = 1; 533 // Need to figure out if this is a long press or a short press, 534 // so can't just send a key down event right now. It will be 535 // scheduled to run 536 } 537 else if (event != mLastEvent) // a new event, faster than timer 538 { 539 mEventCount = 1; 540 mKeyIsDown = true; 541 542 if (_listener) 543 { 544 // Only send key up events for events that have separateRelease 545 // defined as true in AppleRemoteListener.cpp 546 if (mLastEvent == Up || mLastEvent == Down || 547 mLastEvent == LeftHold || mLastEvent == RightHold) 548 { 549 _listener->appleRemoteButton(mLastEvent, /*pressedDown*/false); 550 } 551 _listener->appleRemoteButton(event, mKeyIsDown); 552 } 553 } 554 else // Same event again 555 { 556 mEventCount+=1; 557 AppleRemote::Event newEvent = Undefined; 558 559 // Can the event have a hold state? 560 switch (event) 561 { 562 case Right: 563 newEvent = RightHold; 564 break; 565 case Left: 566 newEvent = LeftHold; 567 break; 568 case Menu: 569 newEvent = MenuHold; 570 break; 571 case Select: 572 newEvent = PlayHold; 573 break; 574 default: 575 newEvent = event; 576 } 577 578 if (newEvent == event) // Doesn't have a long press 579 { 580 if (mKeyIsDown) 581 { 582 if (_listener) 583 { 584 // Only send key up events for events that have separateRelease 585 // defined as true in AppleRemoteListener.cpp 586 if (mLastEvent == Up || mLastEvent == Down || 587 mLastEvent == LeftHold || mLastEvent == RightHold) 588 { 589 _listener->appleRemoteButton(mLastEvent, /*pressedDown*/false); 590 } 591 } 592 } 593 594 mKeyIsDown = true; 595 if (_listener) 596 { 597 _listener->appleRemoteButton(newEvent, mKeyIsDown); 598 } 599 } 600 else if (mEventCount == LONG_PRESS_COUNT) 601 { 602 mKeyIsDown = true; 603 if (_listener) 604 { 605 _listener->appleRemoteButton(newEvent, mKeyIsDown); 606 } 607 } 608 } 609 610 mLastEvent = event; 611 mCallbackTimer->start(); 612 } 613 } 614 } 615 616 // Calls key down / up events on the ATV > v2.3 617 void AppleRemote::TimeoutHandler() 618 { 619 if (_listener) 620 { 621 _listener->appleRemoteButton(mLastEvent, !mKeyIsDown); 622 } 623 624 mKeyIsDown = !mKeyIsDown; 625 626 if (!mKeyIsDown) 627 { 628 mEventCount = 0; 629 mLastEvent = Undefined; 630 } 631 else 344 632 { 345 AppleRemote::Event buttonid = ii->second; 346 if (_listener) 347 _listener->appleRemoteButton(buttonid, sumOfValues>0); 633 // Schedule a key up event for events that have separateRelease 634 // defined as true in AppleRemoteListener.cpp 635 636 if (mLastEvent == Up || mLastEvent == Down || 637 mLastEvent == LeftHold || mLastEvent == RightHold) 638 { 639 mCallbackTimer->start(); 640 } 641 else 642 { 643 mKeyIsDown = false; 644 mEventCount = 0; 645 mLastEvent = Undefined; 646 } 647 348 648 } 349 649 } -
mythtv/libs/libmythui/AppleRemote.h
diff --git a/mythtv/libs/libmythui/AppleRemote.h b/mythtv/libs/libmythui/AppleRemote.h index 596abfc..419e5e5 100644
a b 5 5 #include <vector> 6 6 #include <map> 7 7 #include <QThread> 8 #include <QTimer> 8 9 9 10 #include <IOKit/IOKitLib.h> 10 11 #include <IOKit/IOCFPlugIn.h> … … 14 15 15 16 class AppleRemote : public QThread 16 17 { 18 Q_OBJECT 17 19 public: 18 enum Event { 19 VolumePlus = 0, 20 VolumeMinus, 20 enum Event 21 { // label/meaning on White ... and Aluminium remote 22 Up = 0, // VolumePlus Up 23 Down, // VolumeMinus Down 21 24 Menu, 22 Play,25 Select, // Play Select 23 26 Right, 24 27 Left, 25 28 RightHold, 26 29 LeftHold, 27 30 MenuHold, 28 PlaySleep, 29 ControlSwitched 31 PlayHold, // was PlaySleep 32 ControlSwitched, 33 PlayPause, // Play or Pause 34 Undefined // Used to handle the Apple TV > v2.3 30 35 }; 31 36 32 class Listener { 37 class Listener 38 { 33 39 public: 34 40 virtual ~Listener(); 35 41 virtual void appleRemoteButton(Event button, bool pressedDown) = 0; … … protected: 51 57 AppleRemote(); // will be a singleton class 52 58 53 59 static AppleRemote* _instance; 54 static const char* const AppleRemoteDeviceName;55 60 static const int REMOTE_SWITCH_COOKIE; 56 61 57 62 … … private: 64 69 int remoteId; 65 70 Listener* _listener; 66 71 72 bool usingNewAtv; 73 AppleRemote::Event mLastEvent; 74 int mEventCount; 75 bool mKeyIsDown; 76 QTimer* mCallbackTimer; 77 67 78 void _initCookieMap(); 68 io_object_t _findAppleRemoteDevice();69 79 bool _initCookies(); 70 80 bool _createDeviceInterface(io_object_t hidDevice); 71 81 bool _openDevice(); 72 82 73 static void QueueCallbackFunction(void* target, IOReturn result, 83 static void QueueCallbackFunction(void* target, IOReturn result, 74 84 void* refcon, void* sender); 75 85 void _queueCallbackFunction(IOReturn result, 76 86 void* refcon, void* sender); 77 87 void _handleEventWithCookieString(std::string cookieString, 78 88 SInt32 sumOfValues); 89 90 private slots: 91 // Key event handling on the ATV v2.3 and above 92 void TimeoutHandler(); 93 79 94 }; 80 95 81 96 #endif // APPLEREMOTE -
mythtv/libs/libmythui/AppleRemoteListener.cpp
diff --git a/mythtv/libs/libmythui/AppleRemoteListener.cpp b/mythtv/libs/libmythui/AppleRemoteListener.cpp index d8543e8..e5406ab 100644
a b void AppleRemoteListener::appleRemoteButton(AppleRemote::Event button, 18 18 19 19 switch (button) 20 20 { 21 case AppleRemote:: VolumePlus:21 case AppleRemote::Up: 22 22 code="Up"; 23 23 separateRelease=true; 24 24 break; 25 case AppleRemote:: VolumeMinus:25 case AppleRemote::Down: 26 26 code="Down"; 27 27 separateRelease=true; 28 28 break; 29 29 case AppleRemote::Menu: 30 30 code="Esc"; 31 31 break; 32 case AppleRemote:: Play:32 case AppleRemote::Select: 33 33 code="Enter"; 34 34 break; 35 35 case AppleRemote::Right: … … void AppleRemoteListener::appleRemoteButton(AppleRemote::Event button, 49 49 case AppleRemote::MenuHold: 50 50 code="M"; 51 51 break; 52 case AppleRemote::PlaySleep: 52 case AppleRemote::PlayPause: 53 case AppleRemote::PlayHold: 53 54 code="P"; 54 55 break; 55 56 case AppleRemote::ControlSwitched: … … void AppleRemoteListener::appleRemoteButton(AppleRemote::Event button, 69 70 QCoreApplication::postEvent(mainWindow, new LircKeycodeEvent( 70 71 QEvent::KeyRelease, keycode, Qt::NoModifier, code, code)); 71 72 } 72 73 73 74 } -
mythtv/libs/libmythui/libmythui.pro
diff --git a/mythtv/libs/libmythui/libmythui.pro b/mythtv/libs/libmythui/libmythui.pro index ee76855..363a941 100644
a b include ( ../../settings.pro ) 2 2 3 3 TEMPLATE = lib 4 4 TARGET = mythui-$$LIBVERSION 5 CONFIG += thread dll5 CONFIG += qt thread dll 6 6 target.path = $${LIBDIR} 7 7 INSTALLS = target 8 8 -
mythtv/libs/libswscale/libswscale.pro
diff --git a/mythtv/libs/libswscale/libswscale.pro b/mythtv/libs/libswscale/libswscale.pro index 9c86ee3..0cf5076 100644
a b contains( HAVE_ALTIVEC, yes ) { 70 70 71 71 macx { 72 72 QMAKE_LFLAGS_SHLIB += -read_only_relocs warning 73 contains( HAVE_MMX, yes ) : QMAKE_CFLAGS_RELEASE += -mdynamic-no-pic 73 74 } 74 75 75 76 include ( ../libs-targetfix.pro )