Commit 1f540b87 authored by Faustino Osuna's avatar Faustino Osuna

MacOSX/Framework/Examples/test: Don't waste time getting the length of the...

MacOSX/Framework/Examples/test: Don't waste time getting the length of the video while we're doing a drag & drop operation.
parent 7587b631
...@@ -75,7 +75,10 @@ static void *sleepForMe(void) ...@@ -75,7 +75,10 @@ static void *sleepForMe(void)
{ {
[self setMediaIndex:mediaIndex+1]; [self setMediaIndex:mediaIndex+1];
if (![player isPlaying]) if (![player isPlaying])
{
NSLog(@"%@ length = %@", [playlist mediaAtIndex:mediaIndex], [[playlist mediaAtIndex:mediaIndex] lengthWaitUntilDate:[NSDate dateWithTimeIntervalSinceNow:60]]);
[player play]; [player play];
}
} }
- (void)pause:(id)sender - (void)pause:(id)sender
...@@ -119,7 +122,6 @@ static void *sleepForMe(void) ...@@ -119,7 +122,6 @@ static void *sleepForMe(void)
{ {
NSString * filename = [droppedItems objectAtIndex:i]; NSString * filename = [droppedItems objectAtIndex:i];
VLCMedia * media = [VLCMedia mediaWithURL:[NSURL fileURLWithPath:filename]]; VLCMedia * media = [VLCMedia mediaWithURL:[NSURL fileURLWithPath:filename]];
NSLog(@"%@ length = %@", media, [media lengthWaitUntilDate:[NSDate dateWithTimeIntervalSinceNow:60]]);
[playlist addMedia:media]; [playlist addMedia:media];
} }
return YES; return YES;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment