Explorar o código

MacOSX/Framework/Examples/test: Don't waste time getting the length of the video while we're doing a drag & drop operation.

Faustino Osuna %!s(int64=17) %!d(string=hai) anos
pai
achega
bb6d596281
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Examples/test/Controller.m

+ 3 - 1
Examples/test/Controller.m

@@ -75,7 +75,10 @@ static void *sleepForMe(void)
 {
     [self setMediaIndex:mediaIndex+1];
     if (![player isPlaying])
+    {
+		NSLog(@"%@ length = %@", [playlist mediaAtIndex:mediaIndex], [[playlist mediaAtIndex:mediaIndex] lengthWaitUntilDate:[NSDate dateWithTimeIntervalSinceNow:60]]);
 		[player play];
+    }
 }
 
 - (void)pause:(id)sender
@@ -119,7 +122,6 @@ static void *sleepForMe(void)
     {
         NSString * filename = [droppedItems objectAtIndex:i];
 		VLCMedia * media = [VLCMedia mediaWithURL:[NSURL fileURLWithPath:filename]];
-		NSLog(@"%@ length = %@", media, [media lengthWaitUntilDate:[NSDate dateWithTimeIntervalSinceNow:60]]);
 		[playlist addMedia:media];
     }
     return YES;