Explorar el Código

macosx/framework: Back in business.

Pierre d'Herbemont hace 16 años
padre
commit
f46fc89061

+ 1 - 2
Pre-Compile.sh

@@ -153,8 +153,7 @@ if test "${ACTION}" = "build"; then
         esac
     done
 
-    #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}libvlc.dylib" ${target_lib} "library"
     install_library "${VLC_BUILD_DIR}/src/${prefix}libvlccore.dylib" ${target_lib} "library"
 
     ##########################

+ 4 - 2
Sources/VLCLibrary.m

@@ -91,8 +91,10 @@ void * DestroySharedLibraryAtExit( void )
         libvlc_exception_init( &ex );
         
         const char * lib_vlc_params[] = { 
-            "-I", "dummy", "--vout=opengllayer", 
-            "--no-video-title-show", "--no-sout-keep", "--ignore-config"
+            "-I", "dummy", "--vout=minimal_macosx", 
+            "--no-video-title-show", "--no-sout-keep", "--ignore-config",
+			"--opengl-provider=minimal_macosx",
+			"-verbose=-1"
             //, "--control=motion", "--motion-use-rotate", "--video-filter=rotate"
         };
         

+ 4 - 6
Sources/VLCMediaPlayer.m

@@ -63,7 +63,6 @@ static void HandleMediaInstanceVolumeChanged(const libvlc_event_t * event, void
 static void HandleMediaTimeChanged(const libvlc_event_t * event, void * self)
 {
     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
     [[VLCEventManager sharedManager] callOnMainThreadObject:self 
                                                  withMethod:@selector(mediaPlayerTimeChanged:) 
                                        withArgumentAsObject:[NSNumber numberWithLongLong:event->u.media_player_time_changed.new_time]];
@@ -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.
     libvlc_exception_t ex;
     libvlc_exception_init( &ex );
-    libvlc_media_player_set_drawable ((libvlc_media_player_t *)instance, 
-                                        (libvlc_drawable_t)aDrawable, 
+    libvlc_media_player_set_nsobject ((libvlc_media_player_t *)instance, 
+                                        aDrawable, 
                                         &ex);
     catch_exception( &ex );
 }
@@ -664,15 +663,14 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
     [self willChangeValueForKey:@"time"];
     [cachedTime release];
     cachedTime = [[VLCTime timeWithNumber:newTime] retain];
+
     [self didChangeValueForKey:@"time"];
 }
 
 - (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"];
-    position = ((float)((int)([newPosition floatValue]*1000)))/1000.;
+    position = [newPosition floatValue];
     [self didChangeValueForKey:@"position"];
 }
 

+ 2 - 1
Sources/VLCStreamSession.m

@@ -63,7 +63,7 @@
     [self play];
 }
 
-- (void)play;
+- (BOOL)play;
 {
     NSString * libvlcArgs;
     if( self.drawable )
@@ -81,6 +81,7 @@
         [super setMedia: self.media];
     }
     [super play];
+	return YES;
 }
 
 + (NSSet *)keyPathsForValuesAffectingDescription

+ 2 - 2
Sources/VLCTime.m

@@ -75,7 +75,7 @@
     if (value)
     {
         long long duration = [value longLongValue] / 1000000;
-        return [NSString stringWithFormat:@"%02d:%02d:%02d",
+        return [NSString stringWithFormat:@"%01d:%02d:%02d",
             (long) (duration / 3600),
             (long)((duration / 60) % 60),
             (long) (duration % 60)];
@@ -83,7 +83,7 @@
     else
     {
         // Return a string that represents an undefined time.
-        return @"--:--:--";
+        return @"-:--:--";
     }
 }
 

+ 1 - 1
VLCKit.xcodeproj/project.pbxproj

@@ -571,7 +571,7 @@
 				INFOPLIST_FILE = Resources/Info.plist;
 				INSTALL_PATH = "@loader_path/../Frameworks";
 				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";
 				LIBRARY_SEARCH_PATHS = "$(VLC_FRAMEWORK)/lib";
 				OTHER_LDFLAGS = (