Changeset 72117 in webkit
- Timestamp:
- Nov 16, 2010 10:28:22 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r72116 r72117 1 2010-11-16 Eric Carlson <eric.carlson@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Rename QTKit based media engine class name 6 https://bugs.webkit.org/show_bug.cgi?id=36663 7 8 No new tests as this just renames a class and restructures existing code. 9 10 * platform/graphics/MediaPlayer.cpp: 11 (WebCore::installedMediaEngines): Use a macro with the platform media player class name to reduce the 12 number of #ifs in the code. 13 14 * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Rename MediaPlayerPrivate to MediaPlayerPrivateQTKit. 15 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: 16 (WebCore::MediaPlayerPrivateQTKit::create): 17 (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): 18 (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): 19 (WebCore::MediaPlayerPrivateQTKit::~MediaPlayerPrivateQTKit): 20 (WebCore::MediaPlayerPrivateQTKit::createQTMovie): 21 (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): 22 (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): 23 (WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer): 24 (WebCore::MediaPlayerPrivateQTKit::destroyQTVideoRenderer): 25 (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer): 26 (WebCore::MediaPlayerPrivateQTKit::destroyQTMovieLayer): 27 (WebCore::MediaPlayerPrivateQTKit::currentRenderingMode): 28 (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode): 29 (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering): 30 (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering): 31 (WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering): 32 (WebCore::MediaPlayerPrivateQTKit::createQTTime): 33 (WebCore::MediaPlayerPrivateQTKit::resumeLoad): 34 (WebCore::MediaPlayerPrivateQTKit::load): 35 (WebCore::MediaPlayerPrivateQTKit::loadInternal): 36 (WebCore::MediaPlayerPrivateQTKit::prepareToPlay): 37 (WebCore::MediaPlayerPrivateQTKit::platformMedia): 38 (WebCore::MediaPlayerPrivateQTKit::platformLayer): 39 (WebCore::MediaPlayerPrivateQTKit::play): 40 (WebCore::MediaPlayerPrivateQTKit::pause): 41 (WebCore::MediaPlayerPrivateQTKit::duration): 42 (WebCore::MediaPlayerPrivateQTKit::currentTime): 43 (WebCore::MediaPlayerPrivateQTKit::seek): 44 (WebCore::MediaPlayerPrivateQTKit::doSeek): 45 (WebCore::MediaPlayerPrivateQTKit::cancelSeek): 46 (WebCore::MediaPlayerPrivateQTKit::seekTimerFired): 47 (WebCore::MediaPlayerPrivateQTKit::paused): 48 (WebCore::MediaPlayerPrivateQTKit::seeking): 49 (WebCore::MediaPlayerPrivateQTKit::naturalSize): 50 (WebCore::MediaPlayerPrivateQTKit::hasVideo): 51 (WebCore::MediaPlayerPrivateQTKit::hasAudio): 52 (WebCore::MediaPlayerPrivateQTKit::supportsFullscreen): 53 (WebCore::MediaPlayerPrivateQTKit::setVolume): 54 (WebCore::MediaPlayerPrivateQTKit::hasClosedCaptions): 55 (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible): 56 (WebCore::MediaPlayerPrivateQTKit::setRate): 57 (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch): 58 (WebCore::MediaPlayerPrivateQTKit::buffered): 59 (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): 60 (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): 61 (WebCore::MediaPlayerPrivateQTKit::bytesLoaded): 62 (WebCore::MediaPlayerPrivateQTKit::totalBytes): 63 (WebCore::MediaPlayerPrivateQTKit::cancelLoad): 64 (WebCore::MediaPlayerPrivateQTKit::cacheMovieScale): 65 (WebCore::MediaPlayerPrivateQTKit::isReadyForVideoSetup): 66 (WebCore::MediaPlayerPrivateQTKit::prepareForRendering): 67 (WebCore::MediaPlayerPrivateQTKit::updateStates): 68 (WebCore::MediaPlayerPrivateQTKit::loadStateChanged): 69 (WebCore::MediaPlayerPrivateQTKit::rateChanged): 70 (WebCore::MediaPlayerPrivateQTKit::sizeChanged): 71 (WebCore::MediaPlayerPrivateQTKit::timeChanged): 72 (WebCore::MediaPlayerPrivateQTKit::didEnd): 73 (WebCore::MediaPlayerPrivateQTKit::setSize): 74 (WebCore::MediaPlayerPrivateQTKit::setVisible): 75 (WebCore::MediaPlayerPrivateQTKit::hasAvailableVideoFrame): 76 (WebCore::MediaPlayerPrivateQTKit::repaint): 77 (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext): 78 (WebCore::MediaPlayerPrivateQTKit::paint): 79 (WebCore::MediaPlayerPrivateQTKit::getSupportedTypes): 80 (WebCore::MediaPlayerPrivateQTKit::supportsType): 81 (WebCore::MediaPlayerPrivateQTKit::isAvailable): 82 (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): 83 (WebCore::MediaPlayerPrivateQTKit::sawUnsupportedTracks): 84 (WebCore::MediaPlayerPrivateQTKit::supportsAcceleratedRendering): 85 (WebCore::MediaPlayerPrivateQTKit::acceleratedRenderingStateChanged): 86 (WebCore::MediaPlayerPrivateQTKit::hasSingleSecurityOrigin): 87 (WebCore::MediaPlayerPrivateQTKit::movieLoadType): 88 (WebCore::MediaPlayerPrivateQTKit::setPreload): 89 (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): 90 (-[WebCoreMovieObserver initWithCallback:]): 91 1 92 2010-11-16 Alexey Proskuryakov <ap@apple.com> 2 93 -
trunk/WebCore/platform/graphics/MediaPlayer.cpp
r71824 r72117 48 48 #if PLATFORM(MAC) 49 49 #include "MediaPlayerPrivateQTKit.h" 50 #define PlatformMediaEngineClassName MediaPlayerPrivateQTKit 50 51 #elif OS(WINCE) && !PLATFORM(QT) 51 52 #include "MediaPlayerPrivateWinCE.h" 53 #define PlatformMediaEngineClassName MediaPlayerPrivate 52 54 #elif PLATFORM(WIN) 53 55 #include "MediaPlayerPrivateQuickTimeVisualContext.h" 54 # include "MediaPlayerPrivateQuicktimeWin.h"56 #define PlatformMediaEngineClassName MediaPlayerPrivateQuickTimeVisualContext 55 57 #elif PLATFORM(QT) 56 58 #if USE(QT_MULTIMEDIA) 57 59 #include "MediaPlayerPrivateQt.h" 60 #define PlatformMediaEngineClassName MediaPlayerPrivateQt 58 61 #else 59 62 #include "MediaPlayerPrivatePhonon.h" 63 #define PlatformMediaEngineClassName MediaPlayerPrivatePhonon 60 64 #endif 61 65 #elif PLATFORM(CHROMIUM) 62 66 #include "MediaPlayerPrivateChromium.h" 67 #define PlatformMediaEngineClassName MediaPlayerPrivate 63 68 #endif 64 69 … … 166 171 if (!enginesQueried) { 167 172 enginesQueried = true; 173 168 174 #if USE(GSTREAMER) 169 175 MediaPlayerPrivateGStreamer::registerMediaEngine(addMediaEngine); 170 176 #endif 171 172 #if PLATFORM(WIN) 173 MediaPlayerPrivateQuickTimeVisualContext::registerMediaEngine(addMediaEngine); 174 #elif PLATFORM(QT) 175 #if USE(QT_MULTIMEDIA) 176 MediaPlayerPrivateQt::registerMediaEngine(addMediaEngine); 177 #else 178 MediaPlayerPrivatePhonon::registerMediaEngine(addMediaEngine); 179 #endif 180 #elif !PLATFORM(GTK) && !PLATFORM(EFL) 181 // FIXME: currently all the MediaEngines are named 182 // MediaPlayerPrivate. This code will need an update when bug 183 // 36663 is adressed. 184 MediaPlayerPrivate::registerMediaEngine(addMediaEngine); 185 #endif 186 187 // register additional engines here 177 PlatformMediaEngineClassName::registerMediaEngine(addMediaEngine); 188 178 } 189 179 -
trunk/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
r71824 r72117 56 56 namespace WebCore { 57 57 58 class MediaPlayerPrivate : public MediaPlayerPrivateInterface {58 class MediaPlayerPrivateQTKit : public MediaPlayerPrivateInterface { 59 59 public: 60 60 static void registerMediaEngine(MediaEngineRegistrar); … … 68 68 69 69 private: 70 MediaPlayerPrivate (MediaPlayer*);71 ~MediaPlayerPrivate ();70 MediaPlayerPrivateQTKit(MediaPlayer*); 71 ~MediaPlayerPrivateQTKit(); 72 72 73 73 // engine support … … 164 164 void doSeek(); 165 165 void cancelSeek(); 166 void seekTimerFired(Timer<MediaPlayerPrivate >*);166 void seekTimerFired(Timer<MediaPlayerPrivateQTKit>*); 167 167 float maxTimeLoaded() const; 168 168 void disableUnsupportedTracks(); … … 185 185 String m_movieURL; 186 186 float m_seekTo; 187 Timer<MediaPlayerPrivate > m_seekTimer;187 Timer<MediaPlayerPrivateQTKit> m_seekTimer; 188 188 MediaPlayer::NetworkState m_networkState; 189 189 MediaPlayer::ReadyState m_readyState; -
trunk/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
r72017 r72117 165 165 @interface WebCoreMovieObserver : NSObject 166 166 { 167 MediaPlayerPrivate * m_callback;167 MediaPlayerPrivateQTKit* m_callback; 168 168 NSView* m_view; 169 169 BOOL m_delayCallbacks; 170 170 } 171 -(id)initWithCallback:(MediaPlayerPrivate *)callback;171 -(id)initWithCallback:(MediaPlayerPrivateQTKit*)callback; 172 172 -(void)disconnect; 173 173 -(void)setView:(NSView*)view; … … 193 193 194 194 195 MediaPlayerPrivateInterface* MediaPlayerPrivate ::create(MediaPlayer* player)195 MediaPlayerPrivateInterface* MediaPlayerPrivateQTKit::create(MediaPlayer* player) 196 196 { 197 return new MediaPlayerPrivate (player);198 } 199 200 void MediaPlayerPrivate ::registerMediaEngine(MediaEngineRegistrar registrar)197 return new MediaPlayerPrivateQTKit(player); 198 } 199 200 void MediaPlayerPrivateQTKit::registerMediaEngine(MediaEngineRegistrar registrar) 201 201 { 202 202 if (isAvailable()) … … 204 204 } 205 205 206 MediaPlayerPrivate ::MediaPlayerPrivate(MediaPlayer* player)206 MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit(MediaPlayer* player) 207 207 : m_player(player) 208 208 , m_objcObserver(AdoptNS, [[WebCoreMovieObserver alloc] initWithCallback:this]) 209 209 , m_seekTo(-1) 210 , m_seekTimer(this, &MediaPlayerPrivate ::seekTimerFired)210 , m_seekTimer(this, &MediaPlayerPrivateQTKit::seekTimerFired) 211 211 , m_networkState(MediaPlayer::Empty) 212 212 , m_readyState(MediaPlayer::HaveNothing) … … 233 233 } 234 234 235 MediaPlayerPrivate ::~MediaPlayerPrivate()235 MediaPlayerPrivateQTKit::~MediaPlayerPrivateQTKit() 236 236 { 237 237 tearDownVideoRendering(); … … 241 241 } 242 242 243 void MediaPlayerPrivate ::createQTMovie(const String& url)243 void MediaPlayerPrivateQTKit::createQTMovie(const String& url) 244 244 { 245 245 NSURL *cocoaURL = KURL(ParsedURLString, url); … … 321 321 } 322 322 323 void MediaPlayerPrivate ::createQTMovie(NSURL *url, NSDictionary *movieAttributes)323 void MediaPlayerPrivateQTKit::createQTMovie(NSURL *url, NSDictionary *movieAttributes) 324 324 { 325 325 disableComponentsOnce(); … … 404 404 } 405 405 406 void MediaPlayerPrivate ::createQTMovieView()406 void MediaPlayerPrivateQTKit::createQTMovieView() 407 407 { 408 408 detachQTMovieView(); … … 449 449 } 450 450 451 void MediaPlayerPrivate ::detachQTMovieView()451 void MediaPlayerPrivateQTKit::detachQTMovieView() 452 452 { 453 453 if (m_qtMovieView) { … … 464 464 } 465 465 466 void MediaPlayerPrivate ::createQTVideoRenderer(QTVideoRendererMode rendererMode)466 void MediaPlayerPrivateQTKit::createQTVideoRenderer(QTVideoRendererMode rendererMode) 467 467 { 468 468 destroyQTVideoRenderer(); … … 484 484 } 485 485 486 void MediaPlayerPrivate ::destroyQTVideoRenderer()486 void MediaPlayerPrivateQTKit::destroyQTVideoRenderer() 487 487 { 488 488 if (!m_qtVideoRenderer) … … 500 500 } 501 501 502 void MediaPlayerPrivate ::createQTMovieLayer()502 void MediaPlayerPrivateQTKit::createQTMovieLayer() 503 503 { 504 504 #if USE(ACCELERATED_COMPOSITING) … … 522 522 } 523 523 524 void MediaPlayerPrivate ::destroyQTMovieLayer()524 void MediaPlayerPrivateQTKit::destroyQTMovieLayer() 525 525 { 526 526 #if USE(ACCELERATED_COMPOSITING) … … 534 534 } 535 535 536 MediaPlayerPrivate ::MediaRenderingMode MediaPlayerPrivate::currentRenderingMode() const536 MediaPlayerPrivateQTKit::MediaRenderingMode MediaPlayerPrivateQTKit::currentRenderingMode() const 537 537 { 538 538 if (m_qtMovieView) … … 548 548 } 549 549 550 MediaPlayerPrivate ::MediaRenderingMode MediaPlayerPrivate::preferredRenderingMode() const550 MediaPlayerPrivateQTKit::MediaRenderingMode MediaPlayerPrivateQTKit::preferredRenderingMode() const 551 551 { 552 552 if (!m_player->frameView() || !m_qtMovie) … … 564 564 } 565 565 566 void MediaPlayerPrivate ::setUpVideoRendering()566 void MediaPlayerPrivateQTKit::setUpVideoRendering() 567 567 { 568 568 if (!isReadyForVideoSetup()) … … 595 595 } 596 596 597 void MediaPlayerPrivate ::tearDownVideoRendering()597 void MediaPlayerPrivateQTKit::tearDownVideoRendering() 598 598 { 599 599 if (m_qtMovieView) … … 605 605 } 606 606 607 bool MediaPlayerPrivate ::hasSetUpVideoRendering() const607 bool MediaPlayerPrivateQTKit::hasSetUpVideoRendering() const 608 608 { 609 609 return m_qtMovieView … … 612 612 } 613 613 614 QTTime MediaPlayerPrivate ::createQTTime(float time) const614 QTTime MediaPlayerPrivateQTKit::createQTTime(float time) const 615 615 { 616 616 if (!metaDataAvailable()) … … 620 620 } 621 621 622 void MediaPlayerPrivate ::resumeLoad()622 void MediaPlayerPrivateQTKit::resumeLoad() 623 623 { 624 624 m_delayingLoad = false; … … 628 628 } 629 629 630 void MediaPlayerPrivate ::load(const String& url)630 void MediaPlayerPrivateQTKit::load(const String& url) 631 631 { 632 632 m_movieURL = url; … … 642 642 } 643 643 644 void MediaPlayerPrivate ::loadInternal(const String& url)644 void MediaPlayerPrivateQTKit::loadInternal(const String& url) 645 645 { 646 646 if (m_networkState != MediaPlayer::Loading) { … … 663 663 } 664 664 665 void MediaPlayerPrivate ::prepareToPlay()665 void MediaPlayerPrivateQTKit::prepareToPlay() 666 666 { 667 667 if (!m_qtMovie || m_delayingLoad) … … 669 669 } 670 670 671 PlatformMedia MediaPlayerPrivate ::platformMedia() const671 PlatformMedia MediaPlayerPrivateQTKit::platformMedia() const 672 672 { 673 673 PlatformMedia pm; … … 678 678 679 679 #if USE(ACCELERATED_COMPOSITING) 680 PlatformLayer* MediaPlayerPrivate ::platformLayer() const680 PlatformLayer* MediaPlayerPrivateQTKit::platformLayer() const 681 681 { 682 682 return m_qtVideoLayer.get(); … … 684 684 #endif 685 685 686 void MediaPlayerPrivate ::play()686 void MediaPlayerPrivateQTKit::play() 687 687 { 688 688 if (!metaDataAvailable()) … … 697 697 } 698 698 699 void MediaPlayerPrivate ::pause()699 void MediaPlayerPrivateQTKit::pause() 700 700 { 701 701 if (!metaDataAvailable()) … … 710 710 } 711 711 712 float MediaPlayerPrivate ::duration() const712 float MediaPlayerPrivateQTKit::duration() const 713 713 { 714 714 if (!metaDataAvailable()) … … 724 724 } 725 725 726 float MediaPlayerPrivate ::currentTime() const726 float MediaPlayerPrivateQTKit::currentTime() const 727 727 { 728 728 if (!metaDataAvailable()) … … 732 732 } 733 733 734 void MediaPlayerPrivate ::seek(float time)734 void MediaPlayerPrivateQTKit::seek(float time) 735 735 { 736 736 // Nothing to do if we are already in the middle of a seek to the same time. … … 753 753 } 754 754 755 void MediaPlayerPrivate ::doSeek()755 void MediaPlayerPrivateQTKit::doSeek() 756 756 { 757 757 QTTime qttime = createQTTime(m_seekTo); … … 773 773 } 774 774 775 void MediaPlayerPrivate ::cancelSeek()775 void MediaPlayerPrivateQTKit::cancelSeek() 776 776 { 777 777 m_seekTo = -1; … … 779 779 } 780 780 781 void MediaPlayerPrivate ::seekTimerFired(Timer<MediaPlayerPrivate>*)781 void MediaPlayerPrivateQTKit::seekTimerFired(Timer<MediaPlayerPrivateQTKit>*) 782 782 { 783 783 if (!metaDataAvailable()|| !seeking() || currentTime() == m_seekTo) { … … 800 800 } 801 801 802 bool MediaPlayerPrivate ::paused() const802 bool MediaPlayerPrivateQTKit::paused() const 803 803 { 804 804 if (!metaDataAvailable()) … … 807 807 } 808 808 809 bool MediaPlayerPrivate ::seeking() const809 bool MediaPlayerPrivateQTKit::seeking() const 810 810 { 811 811 if (!metaDataAvailable()) … … 814 814 } 815 815 816 IntSize MediaPlayerPrivate ::naturalSize() const816 IntSize MediaPlayerPrivateQTKit::naturalSize() const 817 817 { 818 818 if (!metaDataAvailable()) … … 830 830 } 831 831 832 bool MediaPlayerPrivate ::hasVideo() const832 bool MediaPlayerPrivateQTKit::hasVideo() const 833 833 { 834 834 if (!metaDataAvailable()) … … 837 837 } 838 838 839 bool MediaPlayerPrivate ::hasAudio() const839 bool MediaPlayerPrivateQTKit::hasAudio() const 840 840 { 841 841 if (!m_qtMovie) … … 844 844 } 845 845 846 bool MediaPlayerPrivate ::supportsFullscreen() const846 bool MediaPlayerPrivateQTKit::supportsFullscreen() const 847 847 { 848 848 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) … … 854 854 } 855 855 856 void MediaPlayerPrivate ::setVolume(float volume)856 void MediaPlayerPrivateQTKit::setVolume(float volume) 857 857 { 858 858 if (m_qtMovie) … … 860 860 } 861 861 862 bool MediaPlayerPrivate ::hasClosedCaptions() const862 bool MediaPlayerPrivateQTKit::hasClosedCaptions() const 863 863 { 864 864 if (!metaDataAvailable()) … … 867 867 } 868 868 869 void MediaPlayerPrivate ::setClosedCaptionsVisible(bool closedCaptionsVisible)869 void MediaPlayerPrivateQTKit::setClosedCaptionsVisible(bool closedCaptionsVisible) 870 870 { 871 871 if (metaDataAvailable()) { … … 881 881 } 882 882 883 void MediaPlayerPrivate ::setRate(float rate)883 void MediaPlayerPrivateQTKit::setRate(float rate) 884 884 { 885 885 if (m_qtMovie) … … 887 887 } 888 888 889 void MediaPlayerPrivate ::setPreservesPitch(bool preservesPitch)889 void MediaPlayerPrivateQTKit::setPreservesPitch(bool preservesPitch) 890 890 { 891 891 if (!m_qtMovie) … … 905 905 } 906 906 907 PassRefPtr<TimeRanges> MediaPlayerPrivate ::buffered() const907 PassRefPtr<TimeRanges> MediaPlayerPrivateQTKit::buffered() const 908 908 { 909 909 RefPtr<TimeRanges> timeRanges = TimeRanges::create(); … … 914 914 } 915 915 916 float MediaPlayerPrivate ::maxTimeSeekable() const916 float MediaPlayerPrivateQTKit::maxTimeSeekable() const 917 917 { 918 918 if (!metaDataAvailable()) … … 926 926 } 927 927 928 float MediaPlayerPrivate ::maxTimeLoaded() const928 float MediaPlayerPrivateQTKit::maxTimeLoaded() const 929 929 { 930 930 if (!metaDataAvailable()) … … 933 933 } 934 934 935 unsigned MediaPlayerPrivate ::bytesLoaded() const935 unsigned MediaPlayerPrivateQTKit::bytesLoaded() const 936 936 { 937 937 float dur = duration(); … … 941 941 } 942 942 943 unsigned MediaPlayerPrivate ::totalBytes() const943 unsigned MediaPlayerPrivateQTKit::totalBytes() const 944 944 { 945 945 if (!metaDataAvailable()) … … 948 948 } 949 949 950 void MediaPlayerPrivate ::cancelLoad()950 void MediaPlayerPrivateQTKit::cancelLoad() 951 951 { 952 952 // FIXME: Is there a better way to check for this? … … 960 960 } 961 961 962 void MediaPlayerPrivate ::cacheMovieScale()962 void MediaPlayerPrivateQTKit::cacheMovieScale() 963 963 { 964 964 NSSize initialSize = NSZeroSize; … … 985 985 } 986 986 987 bool MediaPlayerPrivate ::isReadyForVideoSetup() const987 bool MediaPlayerPrivateQTKit::isReadyForVideoSetup() const 988 988 { 989 989 return m_readyState >= MediaPlayer::HaveMetadata && m_player->visible(); 990 990 } 991 991 992 void MediaPlayerPrivate ::prepareForRendering()992 void MediaPlayerPrivateQTKit::prepareForRendering() 993 993 { 994 994 if (m_isAllowedToRender) … … 1005 1005 } 1006 1006 1007 void MediaPlayerPrivate ::updateStates()1007 void MediaPlayerPrivateQTKit::updateStates() 1008 1008 { 1009 1009 MediaPlayer::NetworkState oldNetworkState = m_networkState; … … 1120 1120 } 1121 1121 1122 void MediaPlayerPrivate ::loadStateChanged()1122 void MediaPlayerPrivateQTKit::loadStateChanged() 1123 1123 { 1124 1124 if (!m_hasUnsupportedTracks) … … 1126 1126 } 1127 1127 1128 void MediaPlayerPrivate ::rateChanged()1128 void MediaPlayerPrivateQTKit::rateChanged() 1129 1129 { 1130 1130 if (m_hasUnsupportedTracks) … … 1135 1135 } 1136 1136 1137 void MediaPlayerPrivate ::sizeChanged()1137 void MediaPlayerPrivateQTKit::sizeChanged() 1138 1138 { 1139 1139 if (!m_hasUnsupportedTracks) … … 1141 1141 } 1142 1142 1143 void MediaPlayerPrivate ::timeChanged()1143 void MediaPlayerPrivateQTKit::timeChanged() 1144 1144 { 1145 1145 if (m_hasUnsupportedTracks) … … 1157 1157 } 1158 1158 1159 void MediaPlayerPrivate ::didEnd()1159 void MediaPlayerPrivateQTKit::didEnd() 1160 1160 { 1161 1161 if (m_hasUnsupportedTracks) … … 1179 1179 } 1180 1180 1181 void MediaPlayerPrivate ::setSize(const IntSize&)1181 void MediaPlayerPrivateQTKit::setSize(const IntSize&) 1182 1182 { 1183 1183 // Don't resize the view now because [view setFrame] also resizes the movie itself, and because … … 1190 1190 } 1191 1191 1192 void MediaPlayerPrivate ::setVisible(bool b)1192 void MediaPlayerPrivateQTKit::setVisible(bool b) 1193 1193 { 1194 1194 if (m_visible != b) { … … 1201 1201 } 1202 1202 1203 bool MediaPlayerPrivate ::hasAvailableVideoFrame() const1203 bool MediaPlayerPrivateQTKit::hasAvailableVideoFrame() const 1204 1204 { 1205 1205 // When using a QTMovieLayer return true as soon as the movie reaches QTMovieLoadStatePlayable … … 1215 1215 } 1216 1216 1217 void MediaPlayerPrivate ::repaint()1217 void MediaPlayerPrivateQTKit::repaint() 1218 1218 { 1219 1219 if (m_hasUnsupportedTracks) … … 1233 1233 } 1234 1234 1235 void MediaPlayerPrivate ::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& r)1235 void MediaPlayerPrivateQTKit::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& r) 1236 1236 { 1237 1237 id qtVideoRenderer = m_qtVideoRenderer.get(); … … 1247 1247 } 1248 1248 1249 void MediaPlayerPrivate ::paint(GraphicsContext* context, const IntRect& r)1249 void MediaPlayerPrivateQTKit::paint(GraphicsContext* context, const IntRect& r) 1250 1250 { 1251 1251 if (context->paintingDisabled() || m_hasUnsupportedTracks) … … 1384 1384 } 1385 1385 1386 void MediaPlayerPrivate ::getSupportedTypes(HashSet<String>& supportedTypes)1386 void MediaPlayerPrivateQTKit::getSupportedTypes(HashSet<String>& supportedTypes) 1387 1387 { 1388 1388 supportedTypes = mimeModernTypesCache(); … … 1397 1397 } 1398 1398 1399 MediaPlayer::SupportsType MediaPlayerPrivate ::supportsType(const String& type, const String& codecs)1399 MediaPlayer::SupportsType MediaPlayerPrivateQTKit::supportsType(const String& type, const String& codecs) 1400 1400 { 1401 1401 // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an … … 1409 1409 } 1410 1410 1411 bool MediaPlayerPrivate ::isAvailable()1411 bool MediaPlayerPrivateQTKit::isAvailable() 1412 1412 { 1413 1413 #ifdef BUILDING_ON_TIGER … … 1430 1430 } 1431 1431 1432 void MediaPlayerPrivate ::disableUnsupportedTracks()1432 void MediaPlayerPrivateQTKit::disableUnsupportedTracks() 1433 1433 { 1434 1434 if (!m_qtMovie) { … … 1520 1520 } 1521 1521 1522 void MediaPlayerPrivate ::sawUnsupportedTracks()1522 void MediaPlayerPrivateQTKit::sawUnsupportedTracks() 1523 1523 { 1524 1524 m_hasUnsupportedTracks = true; … … 1527 1527 1528 1528 #if USE(ACCELERATED_COMPOSITING) 1529 bool MediaPlayerPrivate ::supportsAcceleratedRendering() const1529 bool MediaPlayerPrivateQTKit::supportsAcceleratedRendering() const 1530 1530 { 1531 1531 // Also don't claim to support accelerated rendering when in the media document, as we will then render … … 1534 1534 } 1535 1535 1536 void MediaPlayerPrivate ::acceleratedRenderingStateChanged()1536 void MediaPlayerPrivateQTKit::acceleratedRenderingStateChanged() 1537 1537 { 1538 1538 // Set up or change the rendering path if necessary. … … 1541 1541 #endif 1542 1542 1543 bool MediaPlayerPrivate ::hasSingleSecurityOrigin() const1543 bool MediaPlayerPrivateQTKit::hasSingleSecurityOrigin() const 1544 1544 { 1545 1545 // We tell quicktime to disallow resources that come from different origins … … 1548 1548 } 1549 1549 1550 MediaPlayer::MovieLoadType MediaPlayerPrivate ::movieLoadType() const1550 MediaPlayer::MovieLoadType MediaPlayerPrivateQTKit::movieLoadType() const 1551 1551 { 1552 1552 if (!m_qtMovie) … … 1562 1562 } 1563 1563 1564 void MediaPlayerPrivate ::setPreload(MediaPlayer::Preload preload)1564 void MediaPlayerPrivateQTKit::setPreload(MediaPlayer::Preload preload) 1565 1565 { 1566 1566 m_preload = preload; … … 1569 1569 } 1570 1570 1571 float MediaPlayerPrivate ::mediaTimeForTimeValue(float timeValue) const1571 float MediaPlayerPrivateQTKit::mediaTimeForTimeValue(float timeValue) const 1572 1572 { 1573 1573 if (!metaDataAvailable()) … … 1582 1582 @implementation WebCoreMovieObserver 1583 1583 1584 - (id)initWithCallback:(MediaPlayerPrivate *)callback1584 - (id)initWithCallback:(MediaPlayerPrivateQTKit*)callback 1585 1585 { 1586 1586 m_callback = callback;
Note: See TracChangeset
for help on using the changeset viewer.