Changeset 1163
- Timestamp:
- 02/23/2010 04:48:16 PM (2 years ago)
- Location:
- branches/PlayerFramework/CommonMediaPlayer
- Files:
-
- 8 modified
-
Classes/CMPPlayerManager.m (modified) (3 diffs)
-
Media Players/DVD Framework/CMPDVDFrameworkLoadAction.m (modified) (1 diff)
-
Media Players/DVD Framework/CMPDVDImageAction.m (modified) (1 diff)
-
Media Players/DVD Framework/CMPDVDPlayer.h (modified) (1 diff)
-
Media Players/DVD Framework/CMPDVDPlayer.m (modified) (23 diffs)
-
Media Players/DVD Framework/CMPDVDPlayerController.m (modified) (4 diffs)
-
Media Players/DVD Framework/CMPDVDWindowCreationAction.m (modified) (2 diffs)
-
Media Players/DVD Framework/CMPISODVDPlayer.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/PlayerFramework/CommonMediaPlayer/Classes/CMPPlayerManager.m
r1159 r1163 131 131 [players addObjectsFromArray:genericPlayers]; 132 132 133 NSLog(@"List of players is %@", players);133 //NSLog(@"List of players is %@", players); 134 134 NSEnumerator *playerEnum = [players objectEnumerator]; 135 135 Class playerClass; … … 139 139 player = [[playerClass alloc] init]; 140 140 141 NSLog(@"Testing %@", player);141 //NSLog(@"Testing %@", player); 142 142 BOOL canPlay = [player canPlay:path withError:nil]; 143 NSLog(@"can play is %d", canPlay);143 //NSLog(@"can play is %d", canPlay); 144 144 if(canPlay) 145 145 { 146 146 CMPBaseMediaAsset *asset = [[CMPBaseMediaAsset alloc] initWithMediaURL:[NSURL fileURLWithPath:path]]; 147 147 canPlay &= [player setMedia:asset error:nil]; 148 NSLog(@"Set asset is %d", canPlay);148 //NSLog(@"Set asset is %d", canPlay); 149 149 [asset release]; 150 150 } 151 151 if(canPlay) 152 152 { 153 NSLog(@"Using Player");153 //NSLog(@"Using Player"); 154 154 [player retain]; 155 155 break; … … 180 180 } 181 181 182 NSLog(@"Controllers is %@", goodControllers);182 //NSLog(@"Controllers is %@", goodControllers); 183 183 184 184 //XXX Prefs -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDFrameworkLoadAction.m
r1095 r1163 182 182 BRLocalizedString(@"Failed to load DVD Framework", @"Failure to load error message"), NSLocalizedDescriptionKey, 183 183 nil]]; 184 else185 NSLog(@"Loaded framework");184 //else 185 //NSLog(@"Loaded framework"); 186 186 } 187 187 } -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDImageAction.m
r1121 r1163 124 124 { 125 125 126 NSLog( error);126 NSLog(@"%@", error); 127 127 128 128 [error release]; -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDPlayer.h
r1136 r1163 55 55 UInt32 titleDuration; 56 56 UInt32 currentElapsedTime; 57 NSTimer *stopTimer; 57 58 } 58 59 -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDPlayer.m
r1151 r1163 74 74 [asset release]; 75 75 [frameworkLoad release]; 76 [stopTimer invalidate]; 76 77 [super dealloc]; 77 78 } … … 95 96 - (BOOL)canPlay:(NSString *)path withError:(NSError **)error 96 97 { 97 NSLog(@"Testing can play");98 //NSLog(@"Testing can play"); 98 99 BOOL usable = [frameworkLoad openWithError:error]; 99 100 if(!usable) 100 101 return NO; 101 102 102 NSLog(@"Usable from %@ says %d", frameworkLoad, usable);103 //NSLog(@"Usable from %@ says %d", frameworkLoad, usable); 103 104 104 105 usable = [self initializeFrameworkWithError:error]; … … 137 138 138 139 case 2: //is volume 139 NSLog(@"%@, is a volume!", [theVolume lastPathComponent]);140 //NSLog(@"%@, is a volume!", [theVolume lastPathComponent]); 140 141 isVolume = YES; 141 142 break; 142 143 default: 143 NSLog(@"not a volume: %i, %@", fsType,[theVolume lastPathComponent]);144 //NSLog(@"not a volume: %i, %@", fsType,[theVolume lastPathComponent]); 144 145 isVolume = NO; 145 146 break; … … 197 198 if ([[mountPath lastPathComponent] isEqualToString:[theVolume lastPathComponent]]) 198 199 { 199 NSLog(@"%@ is a disc image", [theVolume lastPathComponent]);200 //NSLog(@"%@ is a disc image", [theVolume lastPathComponent]); 200 201 return YES; 201 202 } … … 251 252 NSURL *url = [NSURL URLWithString:[asset mediaURL]]; 252 253 NSString *path = [[url path] stringByAppendingPathComponent:@"VIDEO_TS"]; 253 NSLog(@"Going to play %@", path);254 //NSLog(@"Going to play %@", path); 254 255 255 256 BOOL ret = [frameworkLoad openWithError:error]; 256 NSLog(@"Framework usable is %d", ret);257 //NSLog(@"Framework usable is %d", ret); 257 258 if(!ret) 258 259 return NO; 259 260 ret = [self initializeFrameworkWithError:error]; 260 NSLog(@"Initialize is %d", ret);261 //NSLog(@"Initialize is %d", ret); 261 262 if(!ret) 262 263 return NO; … … 265 266 OSStatus resultz=[CMPDVDPlayer getFSRefAtPath:path ref:&fsRef]; 266 267 //OSStatus resultz = FSPathMakeRef((UInt8*)cPath, &fsRef, NULL); 267 NSLog(@"make path is %d", resultz);268 //NSLog(@"make path is %d", resultz); 268 269 OSStatus openError = resultz; 269 270 if(resultz == noErr) 270 271 openError = DVDOpenMediaFile(&fsRef); 271 272 272 NSLog(@"open error is %d", openError);273 //NSLog(@"open error is %d", openError); 273 274 return openError == noErr; 274 275 } … … 388 389 - (void)goToMenu 389 390 { 390 NSLog(@"Going to Menu");391 //NSLog(@"Going to Menu"); 391 392 if(DVDGoToMenu(kDVDMenuRoot) != noErr) 392 393 { … … 399 400 - (void)play 400 401 { 401 NSLog(@"Playing");402 //NSLog(@"Playing"); 402 403 DVDPlay(); 403 404 } … … 405 406 - (void)pause 406 407 { 407 NSLog(@"Pausing");408 //NSLog(@"Pausing"); 408 409 DVDPause(); 409 410 } … … 470 471 - (void)incrementScanRate 471 472 { 472 NSLog(@"Incrementing scan rate");473 //NSLog(@"Incrementing scan rate"); 473 474 //Really increment in terms of forward direction 474 475 DVDScanRate outRate; … … 476 477 477 478 DVDGetScanRate(&outRate, &outDirection); 478 NSLog(@"Scan rate in currently %d:%d", outDirection, outRate);479 //NSLog(@"Scan rate in currently %d:%d", outDirection, outRate); 479 480 DVDScanRate newRate; 480 481 if(outDirection == kDVDScanDirectionForward) … … 488 489 newRate = outRate; 489 490 } 490 NSLog(@"Scan rate in now %d:%d", outDirection, newRate);491 //NSLog(@"Scan rate in now %d:%d", outDirection, newRate); 491 492 DVDScan(newRate, outDirection); 492 493 } … … 494 495 - (void)decrementScanRate 495 496 { 496 NSLog(@"Decrementing scan rate");497 //NSLog(@"Decrementing scan rate"); 497 498 //Really decrement in terms of forward direction 498 499 DVDScanRate outRate; … … 500 501 501 502 DVDGetScanRate(&outRate, &outDirection); 502 NSLog(@"Scan rate in currently %d:%d", outDirection, outRate);503 //NSLog(@"Scan rate in currently %d:%d", outDirection, outRate); 503 504 DVDScanRate newRate; 504 505 if(outDirection == kDVDScanDirectionForward) … … 512 513 newRate = outRate; 513 514 } 514 NSLog(@"Scan rate in now %d:%d", outDirection, newRate);515 //NSLog(@"Scan rate in now %d:%d", outDirection, newRate); 515 516 DVDScan(newRate, outDirection); 516 517 } … … 625 626 - (void)nextChapter 626 627 { 627 NSLog(@"Going to next chapter");628 //NSLog(@"Going to next chapter"); 628 629 DVDNextChapter(); 629 630 } … … 631 632 - (void)previousChapter 632 633 { 633 NSLog(@"Going to previous chapter");634 //NSLog(@"Going to previous chapter"); 634 635 DVDPreviousChapter(); 635 636 } … … 689 690 //See if we can go SPDIF 690 691 OSStatus SPDIFresult = DVDGetAudioOutputModeCapabilities(&audioMode); 691 NSLog(@"SPDIF get is %d with mode %d", SPDIFresult, audioMode);692 //NSLog(@"SPDIF get is %d with mode %d", SPDIFresult, audioMode); 692 693 if(audioMode & kDVDAudioModeSPDIF) 693 694 { 694 695 //Engage the SPDIF interface 695 696 SPDIFresult = DVDSetAudioOutputMode(kDVDAudioModeSPDIF); 696 NSLog(@"Set to SPDIF with result %d", SPDIFresult);697 //NSLog(@"Set to SPDIF with result %d", SPDIFresult); 697 698 SPDIFresult = DVDSetSPDIFDataOutDevice(0); 698 NSLog(@"Set SPDIF device with result %d", SPDIFresult);699 //NSLog(@"Set SPDIF device with result %d", SPDIFresult); 699 700 } 700 701 … … 727 728 - (void)stopPlayback 728 729 { 729 NSLog(@"Stopping");730 //NSLog(@"Stopping"); 730 731 DVDUnregisterEventCallBack(eventCallbackID); 731 732 eventCallbackID = 0; … … 839 840 } 840 841 842 - (void)stopTimerFire 843 { 844 stopTimer = nil; 845 [controller playbackStopped]; 846 } 847 848 - (void)resetStopTimer 849 { 850 [stopTimer invalidate]; 851 stopTimer = [NSTimer scheduledTimerWithTimeInterval:5*60 target:self selector:@selector(stopTimerFire) userInfo:nil repeats:NO]; 852 } 853 841 854 - (void)titleChanged 842 855 { … … 847 860 - (void)titleTimeChanged 848 861 { 862 [self performSelectorOnMainThread:@selector(resetStopTimer) withObject:nil waitUntilDone:NO]; 849 863 UInt16 frames; 850 864 UInt32 time = 0; … … 1022 1036 { 1023 1037 OSStatus result = DVDInitialize(); 1024 NSLog(@"DVDInitialize: %d", result);1038 //NSLog(@"DVDInitialize: %d", result); 1025 1039 DVDEventCode eventCodes[] = { 1026 1040 kDVDEventDisplayMode, … … 1043 1057 (UInt32)self, 1044 1058 &eventCallbackID); 1045 NSLog(@"DVD Register Callbacks: %d", result);1059 //NSLog(@"DVD Register Callbacks: %d", result); 1046 1060 switch(result) 1047 1061 { -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDPlayerController.m
r1151 r1163 83 83 { 84 84 // [layer setOpaque:NO]; 85 NSLog(@"Layer is %@ with %d children", layer, [[layer sublayers] count]);85 //NSLog(@"Layer is %@ with %d children", layer, [[layer sublayers] count]); 86 86 id superlayer = [layer superlayer]; 87 87 // if(count < 6) 88 88 // [layer setOpacity:opacity]; 89 89 [layer setBackgroundColor:clear]; 90 NSLog(@"Set opacity of %d layer", count);90 //NSLog(@"Set opacity of %d layer", count); 91 91 layer = superlayer; 92 92 count++; … … 243 243 return; 244 244 CGSGetWindowBounds(cid, dvdWindow, &bounds); 245 NSLog(@"Bounds is %fx%f - %fx%f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);245 //NSLog(@"Bounds is %fx%f - %fx%f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); 246 246 // CGLGetCurrentContext() 247 247 char *bitmap = malloc(bounds.size.width *bounds.size.height * 4); … … 485 485 - (BOOL)brEventAction:(BREvent *)event 486 486 { 487 NSLog(@"Got event %@", event);487 //NSLog(@"Got event %@", event); 488 488 BREventRemoteAction action = [CMPATVVersion remoteActionForEvent:event]; 489 489 if(![player playing]) … … 495 495 BOOL inMenu = [player inMenu]; 496 496 CMPDVDState state = [player state]; 497 NSLog(@"State is %d and doing %d", state, action);497 //NSLog(@"State is %d and doing %d", state, action); 498 498 BOOL playingInSomeForm = (state == CMPDVDStatePlaying || state == CMPDVDStateScanningForward || state == CMPDVDStateScanningBackward || state == CMPDVDStatePlayingSlowForward || state == CMPDVDStatePlayingSlowBackward); 499 499 BOOL supressStateDisplay = inMenu; -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPDVDWindowCreationAction.m
r1142 r1163 162 162 NSRect frameRect; 163 163 frameRect.size = [textField frame].size; 164 NSLog(@"Size is %fx%f", frameRect.size.width, frameRect.size.height);164 //NSLog(@"Size is %fx%f", frameRect.size.width, frameRect.size.height); 165 165 float distanceFromEdge = screenRect.size.height / 15; 166 166 if(position == CMPDVDOverlayUpperLeft || position == CMPDVDOverlayUpperRight) … … 519 519 //NSLog(@"Bounds is %fx%f - %fx%f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); 520 520 // CGLGetCurrentContext() 521 NSLog(@"bounds is %fx%f-%fx%f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);521 //NSLog(@"bounds is %fx%f-%fx%f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); 522 522 CGRect imageBounds = bounds; 523 523 if(bounds.size.height > 480 || bounds.size.width > 720) -
branches/PlayerFramework/CommonMediaPlayer/Media Players/DVD Framework/CMPISODVDPlayer.m
r1124 r1163 58 58 // } 59 59 imageMount = [[CMPDVDImageAction alloc] initWithPath:path]; 60 NSLog(@"imagePath: %@", path);60 //NSLog(@"imagePath: %@", path); 61 61 if (![imageMount openWithError:nil] == YES) 62 62 { 63 NSLog(@"fail ");63 NSLog(@"failed to mount image"); 64 64 return; 65 65 } 66 66 67 NSLog(@"mountedPath = %@", [imageMount mountedPath]);67 //NSLog(@"mountedPath = %@", [imageMount mountedPath]); 68 68 NSString *mountedPath = [imageMount mountedPath]; 69 69
