Commit 6b67d828 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Back in business.

parent 21ad64a8
...@@ -153,8 +153,7 @@ if test "${ACTION}" = "build"; then ...@@ -153,8 +153,7 @@ if test "${ACTION}" = "build"; then
esac esac
done done
#install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc.dylib" ${target_lib} "library" install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc.dylib" ${target_lib} "library"
install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc.2.dylib" ${target_lib} "library"
install_library "${VLC_BUILD_DIR}/src/${prefix}libvlccore.dylib" ${target_lib} "library" install_library "${VLC_BUILD_DIR}/src/${prefix}libvlccore.dylib" ${target_lib} "library"
########################## ##########################
......
...@@ -91,8 +91,10 @@ void * DestroySharedLibraryAtExit( void ) ...@@ -91,8 +91,10 @@ void * DestroySharedLibraryAtExit( void )
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
const char * lib_vlc_params[] = { const char * lib_vlc_params[] = {
"-I", "dummy", "--vout=opengllayer", "-I", "dummy", "--vout=minimal_macosx",
"--no-video-title-show", "--no-sout-keep", "--ignore-config" "--no-video-title-show", "--no-sout-keep", "--ignore-config",
"--opengl-provider=minimal_macosx",
"-verbose=-1"
//, "--control=motion", "--motion-use-rotate", "--video-filter=rotate" //, "--control=motion", "--motion-use-rotate", "--video-filter=rotate"
}; };
......
...@@ -63,7 +63,6 @@ static void HandleMediaInstanceVolumeChanged(const libvlc_event_t * event, void ...@@ -63,7 +63,6 @@ static void HandleMediaInstanceVolumeChanged(const libvlc_event_t * event, void
static void HandleMediaTimeChanged(const libvlc_event_t * event, void * self) static void HandleMediaTimeChanged(const libvlc_event_t * event, void * self)
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[[VLCEventManager sharedManager] callOnMainThreadObject:self [[VLCEventManager sharedManager] callOnMainThreadObject:self
withMethod:@selector(mediaPlayerTimeChanged:) withMethod:@selector(mediaPlayerTimeChanged:)
withArgumentAsObject:[NSNumber numberWithLongLong:event->u.media_player_time_changed.new_time]]; withArgumentAsObject:[NSNumber numberWithLongLong:event->u.media_player_time_changed.new_time]];
...@@ -224,8 +223,8 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -224,8 +223,8 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
// Make sure that this instance has been associated with the drawing canvas. // Make sure that this instance has been associated with the drawing canvas.
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
libvlc_media_player_set_drawable ((libvlc_media_player_t *)instance, libvlc_media_player_set_nsobject ((libvlc_media_player_t *)instance,
(libvlc_drawable_t)aDrawable, aDrawable,
&ex); &ex);
catch_exception( &ex ); catch_exception( &ex );
} }
...@@ -664,15 +663,14 @@ static const VLCMediaPlayerState libvlc_to_local_state[] = ...@@ -664,15 +663,14 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
[self willChangeValueForKey:@"time"]; [self willChangeValueForKey:@"time"];
[cachedTime release]; [cachedTime release];
cachedTime = [[VLCTime timeWithNumber:newTime] retain]; cachedTime = [[VLCTime timeWithNumber:newTime] retain];
[self didChangeValueForKey:@"time"]; [self didChangeValueForKey:@"time"];
} }
- (void)mediaPlayerPositionChanged:(NSNumber *)newPosition - (void)mediaPlayerPositionChanged:(NSNumber *)newPosition
{ {
if( [newPosition floatValue] - position < 0.005 && position - [newPosition floatValue] < 0.005 )
return; /* Forget that, this is too much precision for our uses */
[self willChangeValueForKey:@"position"]; [self willChangeValueForKey:@"position"];
position = ((float)((int)([newPosition floatValue]*1000)))/1000.; position = [newPosition floatValue];
[self didChangeValueForKey:@"position"]; [self didChangeValueForKey:@"position"];
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
[self play]; [self play];
} }
- (void)play; - (BOOL)play;
{ {
NSString * libvlcArgs; NSString * libvlcArgs;
if( self.drawable ) if( self.drawable )
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
[super setMedia: self.media]; [super setMedia: self.media];
} }
[super play]; [super play];
return YES;
} }
+ (NSSet *)keyPathsForValuesAffectingDescription + (NSSet *)keyPathsForValuesAffectingDescription
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
if (value) if (value)
{ {
long long duration = [value longLongValue] / 1000000; long long duration = [value longLongValue] / 1000000;
return [NSString stringWithFormat:@"%02d:%02d:%02d", return [NSString stringWithFormat:@"%01d:%02d:%02d",
(long) (duration / 3600), (long) (duration / 3600),
(long)((duration / 60) % 60), (long)((duration / 60) % 60),
(long) (duration % 60)]; (long) (duration % 60)];
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
else else
{ {
// Return a string that represents an undefined time. // Return a string that represents an undefined time.
return @"--:--:--"; return @"-:--:--";
} }
} }
......
...@@ -571,7 +571,7 @@ ...@@ -571,7 +571,7 @@
INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_FILE = Resources/Info.plist;
INSTALL_PATH = "@loader_path/../Frameworks"; INSTALL_PATH = "@loader_path/../Frameworks";
LD_FLAGS_LIBINTL = "-dylib_file @loader_path/../lib/vlc_libintl.dylib:$(VLC_FRAMEWORK)/lib/vlc_libintl.dylib"; LD_FLAGS_LIBINTL = "-dylib_file @loader_path/../lib/vlc_libintl.dylib:$(VLC_FRAMEWORK)/lib/vlc_libintl.dylib";
LD_FLAGS_LIBVLC = "-dylib_file @loader_path/lib/libvlc.dylib:$(VLC_FRAMEWORK)/lib/libvlc.dylib -dylib_file @loader_path/../lib/libvlc.dylib:$(VLC_FRAMEWORK)/lib/libvlc.dylib"; LD_FLAGS_LIBVLC = "-dylib_file @loader_path/lib/libvlc.dylib:$(VLC_FRAMEWORK)/lib/libvlc.dylib";
LD_FLAGS_LIBVLC_CONTROL = "-dylib_file @loader_path/lib/libvlc-control.dylib:$(VLC_FRAMEWORK)/lib/libvlc-control.dylib"; LD_FLAGS_LIBVLC_CONTROL = "-dylib_file @loader_path/lib/libvlc-control.dylib:$(VLC_FRAMEWORK)/lib/libvlc-control.dylib";
LIBRARY_SEARCH_PATHS = "$(VLC_FRAMEWORK)/lib"; LIBRARY_SEARCH_PATHS = "$(VLC_FRAMEWORK)/lib";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
......
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