2010-04-02 Jer Noble <jer.noble@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Apr 2010 23:30:31 +0000 (23:30 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Apr 2010 23:30:31 +0000 (23:30 +0000)
        Reviewed by Eric Carlson.

        Configure multi-language movies: when QuickTime has sufficiently loaded
        the movie, call into wkQTMovieSelectPreferredAlternates to select the
        movie's alternate tracks according to the user's language preferences.

        https://bugs.webkit.org/show_bug.cgi?id=36624

        * WebCore.base.exp:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::updateStates): If the movie is sufficiently loaded,
        call wkQTMovieSelectPreferredAlternates to set up the alternate tracks.
        * platform/mac/WebCoreSystemInterface.h: Declare WKQTMovieSelectPreferredAlternates.
        * platform/mac/WebCoreSystemInterface.mm: Add WKQTMovieSelectPreferredAlternates.

2010-04-02  Jer Noble  <jer.noble@apple.com>

        Reviewed by Eric Carlson.

        https://bugs.webkit.org/show_bug.cgi?id=36624

        Update WebKitSystemInterface

        * WebKitSystemInterface.h: add WKQTMovieSelectPreferredAlternates.
        * libWebKitSystemInterfaceLeopard.a:
        * libWebKitSystemInterfaceSnowLeopard.a:
        * libWebKitSystemInterfaceTiger.a:

2010-04-02  Jer Noble  <jer.noble@apple.com>

        Reviewed by Eric Carlson.

        https://bugs.webkit.org/show_bug.cgi?id=36624
        Add an INIT macro for the WebKitSystemInterface function wkQTMovieSelectPreferredAlternates.

        * WebCoreSupport/WebSystemInterface.m:
        (InitWebCoreSystemInterface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
WebCore/platform/mac/WebCoreSystemInterface.h
WebCore/platform/mac/WebCoreSystemInterface.mm
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebSystemInterface.m
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/libWebKitSystemInterfaceTiger.a

index 1ea169f5658701aed5c043de8cf33c126c5e89d2..0b36877030ba12d55ea6b0513283661317559ff6 100644 (file)
@@ -1,3 +1,20 @@
+2010-04-02  Jer Noble  <jer.noble@apple.com>
+
+        Reviewed by Eric Carlson.
+
+        Configure multi-language movies: when QuickTime has sufficiently loaded
+        the movie, call into wkQTMovieSelectPreferredAlternates to select the
+        movie's alternate tracks according to the user's language preferences.
+
+        https://bugs.webkit.org/show_bug.cgi?id=36624
+
+        * WebCore.base.exp:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: 
+        (WebCore::MediaPlayerPrivate::updateStates): If the movie is sufficiently loaded,
+        call wkQTMovieSelectPreferredAlternates to set up the alternate tracks.
+        * platform/mac/WebCoreSystemInterface.h: Declare WKQTMovieSelectPreferredAlternates.
+        * platform/mac/WebCoreSystemInterface.mm: Add WKQTMovieSelectPreferredAlternates.
+
 2010-04-02  James Robinson  <jamesr@chromium.org>
 
         Reviewed by Darin Adler.
index 67fa24b26af228b02c2665f11818591d09d1914b..980d417f9105f473c2db0e1f857059f80725edbe 100644 (file)
@@ -1071,6 +1071,7 @@ _wkQTMovieMaxTimeLoaded
 _wkQTMovieMaxTimeLoadedChangeNotification
 _wkQTMovieMaxTimeSeekable
 _wkQTMovieSetShowClosedCaptions
+_wkQTMovieSelectPreferredAlternates
 _wkQTMovieViewSetDrawSynchronously
 _wkSetCGFontRenderingMode
 _wkSetCONNECTProxyAuthorizationForStream
index 964669997fff3370eeed0483465fce9791ffc875..c837b51cffd7553360d6287231d80c5ba49a4d71 100644 (file)
@@ -939,6 +939,7 @@ void MediaPlayerPrivate::updateStates()
             loadState = QTMovieLoadStateError;
 
         if (loadState != QTMovieLoadStateError) {
+            wkQTMovieSelectPreferredAlternates(m_qtMovie.get());
             cacheMovieScale();
             MediaPlayer::MovieLoadType movieType = movieLoadType();
             m_isStreaming = movieType == MediaPlayer::StoredStream || movieType == MediaPlayer::LiveStream;
index f289ee4706243155f33977779b039a688d7ad345..e7522a8675aa3803bcd3bf939f98ed463603c78d 100644 (file)
@@ -126,9 +126,10 @@ extern int (*wkQTMovieDataRate)(QTMovie*);
 extern float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
 extern NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
 extern float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
-extern int (*wkQTMovieGetType)(QTMovie* movie);
-extern BOOL (*wkQTMovieHasClosedCaptions)(QTMovie* movie);
-extern void (*wkQTMovieSetShowClosedCaptions)(QTMovie* movie, BOOL showClosedCaptions);
+extern int (*wkQTMovieGetType)(QTMovie*);
+extern BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*);
+extern void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
+extern void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
 extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
 extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
 extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
index b27646734f81f927452b6168ad3cbc53aace0876..5379686a8a3046cf4bf0cfd0f3a0cb5a7746b165 100644 (file)
@@ -58,9 +58,10 @@ int (*wkQTMovieDataRate)(QTMovie*);
 float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
 NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
 float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
-int (*wkQTMovieGetType)(QTMovie* movie);
-BOOL (*wkQTMovieHasClosedCaptions)(QTMovie* movie);
-void (*wkQTMovieSetShowClosedCaptions)(QTMovie* movie, BOOL showClosedCaptions);
+int (*wkQTMovieGetType)(QTMovie*);
+BOOL (*wkQTMovieHasClosedCaptions)(QTMovie*);
+void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
+void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
 void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
 void (*wkSetDragImage)(NSImage*, NSPoint offset);
index f8ed21919eb55a82fce61881751fd3cd3c23366b..5abe761bc8d84888a940afb4918d57c55b95bfa9 100644 (file)
@@ -1,3 +1,13 @@
+2010-04-02  Jer Noble  <jer.noble@apple.com>
+
+        Reviewed by Eric Carlson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=36624
+        Add an INIT macro for the WebKitSystemInterface function wkQTMovieSelectPreferredAlternates.
+
+        * WebCoreSupport/WebSystemInterface.m:
+        (InitWebCoreSystemInterface):
+
 2010-04-02  Alexey Proskuryakov  <ap@apple.com>
 
         Reviewed by Darin Adler.
index 7f4effdb4f1bf4af03d3f33051a8eed913176d00..46138e520df39f1a4f7c0d6b1890507b1945a1cb 100644 (file)
@@ -89,6 +89,7 @@ void InitWebCoreSystemInterface(void)
     INIT(QTMovieGetType);
     INIT(QTMovieHasClosedCaptions);
     INIT(QTMovieSetShowClosedCaptions);
+    INIT(QTMovieSelectPreferredAlternates);
     INIT(QTMovieViewSetDrawSynchronously);
 
 #ifndef BUILDING_ON_TIGER
index bd0ab542776ca7e84c37a918ad2c41a02593fb68..aa25b81061f436bc20c61366f123529ab2b53207 100644 (file)
@@ -1,3 +1,16 @@
+2010-04-02  Jer Noble  <jer.noble@apple.com>
+
+        Reviewed by Eric Carlson.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=36624
+
+        Update WebKitSystemInterface
+
+        * WebKitSystemInterface.h: add WKQTMovieSelectPreferredAlternates.
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * libWebKitSystemInterfaceTiger.a:
+
 2010-04-01  Kinuko Yasuda  <kinuko@chromium.org>
 
         Reviewed by Dmitry Titov.
index 66bd2fb436d7f1720b35531ebbe776f394587500..8ead4ec11d1a2ab1a4ebefc0da1c3a97e359adcf 100644 (file)
@@ -191,6 +191,8 @@ int WKQTMovieGetType(QTMovie* movie);
 
 BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
 void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
+void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
+void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
 
 unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
 int WKQTMovieDataRate(QTMovie* movie);
index 96f536fd777045f6ea1bd61cb93c776ca63ef49e..41fcba3f4dfeeaf82c50923d288891eec4df6d17 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index b604fb0a2628d65fd5188faf3e95c13f21c3acb8..18c12466ac6da91d55e464cb00856a2516ec3b75 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index 5e31b7955c485721a0d0796a4439929932a86ef3..9256abf20b094ecab2d787bdf5f47c7bab03cb68 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceTiger.a and b/WebKitLibraries/libWebKitSystemInterfaceTiger.a differ