MacOSX/Framework/Examples/test: Don't waste time getting the length of the video...
authorFaustino Osuna <riquedafreak@videolan.org>
Sat, 5 Jan 2008 01:09:14 +0000 (01:09 +0000)
committerFaustino Osuna <riquedafreak@videolan.org>
Sat, 5 Jan 2008 01:09:14 +0000 (01:09 +0000)
extras/MacOSX/Framework/Examples/test/Controller.m

index be49acd..2c669a8 100644 (file)
@@ -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;