]> git.sesse.net Git - vlc/commitdiff
macosx/framework: Back in business.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sat, 11 Apr 2009 17:33:06 +0000 (10:33 -0700)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sat, 11 Apr 2009 19:37:58 +0000 (12:37 -0700)
projects/macosx/framework/Pre-Compile.sh
projects/macosx/framework/Sources/VLCLibrary.m
projects/macosx/framework/Sources/VLCMediaPlayer.m
projects/macosx/framework/Sources/VLCStreamSession.m
projects/macosx/framework/Sources/VLCTime.m
projects/macosx/framework/VLCKit.xcodeproj/project.pbxproj

index 6a23dc2005ee86b1d6afc2c4b20ec9f8b527fd58..3a4b485ca6c939e98fa2194276b42dca6e0df1e2 100644 (file)
@@ -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"
 
     ##########################
index 8e6467e569f124a8e044d7759648ece17c44bc8e..237414186cdf6966ed8e37318ed6b0d3b4346cd5 100644 (file)
@@ -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"
         };
         
index 71887604118382cb84f7ad2b3e51b8a37481031d..be11560c8b8803ea418aa0265253c357822e7fa3 100644 (file)
@@ -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"];
 }
 
index 97ff22656d819f4edebc7c8b9e8f0a61ef172467..d4884ce7e257738936b018e68360e340a704d124 100644 (file)
@@ -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
index d79fa06d054d6154e2126208338bb7232e271861..360a01dda39ab2ebed2ed4b4cdab6beeff1ff792 100644 (file)
@@ -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 @"-:--:--";
     }
 }
 
index 7dcf61fc65583d2390bdd60fbfeec9617060e06b..ba54d8ab799970c2e3c667b86a907f6c13f58b5f 100644 (file)
                                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 = (