OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 virtual PlatformLayer* platformLayer() const { return 0; } | 104 virtual PlatformLayer* platformLayer() const { return 0; } |
105 #endif | 105 #endif |
106 | 106 |
107 virtual IntSize naturalSize() const { return IntSize(0, 0); } | 107 virtual IntSize naturalSize() const { return IntSize(0, 0); } |
108 | 108 |
109 virtual bool hasVideo() const { return false; } | 109 virtual bool hasVideo() const { return false; } |
110 virtual bool hasAudio() const { return false; } | 110 virtual bool hasAudio() const { return false; } |
111 | 111 |
112 virtual void setVisible(bool) { } | 112 virtual void setVisible(bool) { } |
113 | 113 |
114 virtual float duration() const { return 0; } | 114 virtual double duration() const { return 0; } |
115 | 115 |
116 virtual float currentTime() const { return 0; } | 116 virtual double currentTime() const { return 0; } |
117 virtual void seek(float) { } | 117 virtual void seek(double) { } |
118 virtual bool seeking() const { return false; } | 118 virtual bool seeking() const { return false; } |
119 | 119 |
120 virtual void setRate(float) { } | 120 virtual void setRate(double) { } |
121 virtual void setPreservesPitch(bool) { } | 121 virtual void setPreservesPitch(bool) { } |
122 virtual bool paused() const { return false; } | 122 virtual bool paused() const { return false; } |
123 | 123 |
124 virtual void setVolume(float) { } | 124 virtual void setVolume(double) { } |
125 | 125 |
126 virtual bool supportsMuting() const { return false; } | 126 virtual bool supportsMuting() const { return false; } |
127 virtual void setMuted(bool) { } | 127 virtual void setMuted(bool) { } |
128 | 128 |
129 virtual bool hasClosedCaptions() const { return false; } | 129 virtual bool hasClosedCaptions() const { return false; } |
130 virtual void setClosedCaptionsVisible(bool) { }; | 130 virtual void setClosedCaptionsVisible(bool) { }; |
131 | 131 |
132 virtual MediaPlayer::NetworkState networkState() const { return MediaPlayer:
:Empty; } | 132 virtual MediaPlayer::NetworkState networkState() const { return MediaPlayer:
:Empty; } |
133 virtual MediaPlayer::ReadyState readyState() const { return MediaPlayer::Hav
eNothing; } | 133 virtual MediaPlayer::ReadyState readyState() const { return MediaPlayer::Hav
eNothing; } |
134 | 134 |
135 virtual float maxTimeSeekable() const { return 0; } | 135 virtual double maxTimeSeekable() const { return 0; } |
136 virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create(
); } | 136 virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create(
); } |
137 | 137 |
138 virtual unsigned totalBytes() const { return 0; } | 138 virtual unsigned totalBytes() const { return 0; } |
139 virtual bool didLoadingProgress() const { return false; } | 139 virtual bool didLoadingProgress() const { return false; } |
140 | 140 |
141 virtual void setSize(const IntSize&) { } | 141 virtual void setSize(const IntSize&) { } |
142 | 142 |
143 virtual void paint(GraphicsContext*, const IntRect&) { } | 143 virtual void paint(GraphicsContext*, const IntRect&) { } |
144 | 144 |
145 virtual bool canLoadPoster() const { return false; } | 145 virtual bool canLoadPoster() const { return false; } |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 { | 495 { |
496 return m_private->addKey(keySystem.lower(), key, keyLength, initData, initDa
taLength, sessionId); | 496 return m_private->addKey(keySystem.lower(), key, keyLength, initData, initDa
taLength, sessionId); |
497 } | 497 } |
498 | 498 |
499 MediaPlayer::MediaKeyException MediaPlayer::cancelKeyRequest(const String& keySy
stem, const String& sessionId) | 499 MediaPlayer::MediaKeyException MediaPlayer::cancelKeyRequest(const String& keySy
stem, const String& sessionId) |
500 { | 500 { |
501 return m_private->cancelKeyRequest(keySystem.lower(), sessionId); | 501 return m_private->cancelKeyRequest(keySystem.lower(), sessionId); |
502 } | 502 } |
503 #endif | 503 #endif |
504 | 504 |
505 float MediaPlayer::duration() const | 505 double MediaPlayer::duration() const |
506 { | 506 { |
507 return m_private->duration(); | 507 return m_private->duration(); |
508 } | 508 } |
509 | 509 |
510 float MediaPlayer::startTime() const | 510 double MediaPlayer::startTime() const |
511 { | 511 { |
512 return m_private->startTime(); | 512 return m_private->startTime(); |
513 } | 513 } |
514 | 514 |
515 double MediaPlayer::initialTime() const | 515 double MediaPlayer::initialTime() const |
516 { | 516 { |
517 return m_private->initialTime(); | 517 return m_private->initialTime(); |
518 } | 518 } |
519 | 519 |
520 float MediaPlayer::currentTime() const | 520 double MediaPlayer::currentTime() const |
521 { | 521 { |
522 return m_private->currentTime(); | 522 return m_private->currentTime(); |
523 } | 523 } |
524 | 524 |
525 void MediaPlayer::seek(float time) | 525 void MediaPlayer::seek(double time) |
526 { | 526 { |
527 m_private->seek(time); | 527 m_private->seek(time); |
528 } | 528 } |
529 | 529 |
530 bool MediaPlayer::paused() const | 530 bool MediaPlayer::paused() const |
531 { | 531 { |
532 return m_private->paused(); | 532 return m_private->paused(); |
533 } | 533 } |
534 | 534 |
535 bool MediaPlayer::seeking() const | 535 bool MediaPlayer::seeking() const |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 MediaPlayer::NetworkState MediaPlayer::networkState() | 590 MediaPlayer::NetworkState MediaPlayer::networkState() |
591 { | 591 { |
592 return m_private->networkState(); | 592 return m_private->networkState(); |
593 } | 593 } |
594 | 594 |
595 MediaPlayer::ReadyState MediaPlayer::readyState() | 595 MediaPlayer::ReadyState MediaPlayer::readyState() |
596 { | 596 { |
597 return m_private->readyState(); | 597 return m_private->readyState(); |
598 } | 598 } |
599 | 599 |
600 float MediaPlayer::volume() const | 600 double MediaPlayer::volume() const |
601 { | 601 { |
602 return m_volume; | 602 return m_volume; |
603 } | 603 } |
604 | 604 |
605 void MediaPlayer::setVolume(float volume) | 605 void MediaPlayer::setVolume(double volume) |
606 { | 606 { |
607 m_volume = volume; | 607 m_volume = volume; |
608 | 608 |
609 if (m_private->supportsMuting() || !m_muted) | 609 if (m_private->supportsMuting() || !m_muted) |
610 m_private->setVolume(volume); | 610 m_private->setVolume(volume); |
611 } | 611 } |
612 | 612 |
613 bool MediaPlayer::muted() const | 613 bool MediaPlayer::muted() const |
614 { | 614 { |
615 return m_muted; | 615 return m_muted; |
(...skipping 12 matching lines...) Expand all Loading... |
628 bool MediaPlayer::hasClosedCaptions() const | 628 bool MediaPlayer::hasClosedCaptions() const |
629 { | 629 { |
630 return m_private->hasClosedCaptions(); | 630 return m_private->hasClosedCaptions(); |
631 } | 631 } |
632 | 632 |
633 void MediaPlayer::setClosedCaptionsVisible(bool closedCaptionsVisible) | 633 void MediaPlayer::setClosedCaptionsVisible(bool closedCaptionsVisible) |
634 { | 634 { |
635 m_private->setClosedCaptionsVisible(closedCaptionsVisible); | 635 m_private->setClosedCaptionsVisible(closedCaptionsVisible); |
636 } | 636 } |
637 | 637 |
638 float MediaPlayer::rate() const | 638 double MediaPlayer::rate() const |
639 { | 639 { |
640 return m_rate; | 640 return m_rate; |
641 } | 641 } |
642 | 642 |
643 void MediaPlayer::setRate(float rate) | 643 void MediaPlayer::setRate(double rate) |
644 { | 644 { |
645 m_rate = rate; | 645 m_rate = rate; |
646 m_private->setRate(rate); | 646 m_private->setRate(rate); |
647 } | 647 } |
648 | 648 |
649 bool MediaPlayer::preservesPitch() const | 649 bool MediaPlayer::preservesPitch() const |
650 { | 650 { |
651 return m_preservesPitch; | 651 return m_preservesPitch; |
652 } | 652 } |
653 | 653 |
654 void MediaPlayer::setPreservesPitch(bool preservesPitch) | 654 void MediaPlayer::setPreservesPitch(bool preservesPitch) |
655 { | 655 { |
656 m_preservesPitch = preservesPitch; | 656 m_preservesPitch = preservesPitch; |
657 m_private->setPreservesPitch(preservesPitch); | 657 m_private->setPreservesPitch(preservesPitch); |
658 } | 658 } |
659 | 659 |
660 PassRefPtr<TimeRanges> MediaPlayer::buffered() | 660 PassRefPtr<TimeRanges> MediaPlayer::buffered() |
661 { | 661 { |
662 return m_private->buffered(); | 662 return m_private->buffered(); |
663 } | 663 } |
664 | 664 |
665 PassRefPtr<TimeRanges> MediaPlayer::seekable() | 665 PassRefPtr<TimeRanges> MediaPlayer::seekable() |
666 { | 666 { |
667 return m_private->seekable(); | 667 return m_private->seekable(); |
668 } | 668 } |
669 | 669 |
670 float MediaPlayer::maxTimeSeekable() | 670 double MediaPlayer::maxTimeSeekable() |
671 { | 671 { |
672 return m_private->maxTimeSeekable(); | 672 return m_private->maxTimeSeekable(); |
673 } | 673 } |
674 | 674 |
675 bool MediaPlayer::didLoadingProgress() | 675 bool MediaPlayer::didLoadingProgress() |
676 { | 676 { |
677 return m_private->didLoadingProgress(); | 677 return m_private->didLoadingProgress(); |
678 } | 678 } |
679 | 679 |
680 void MediaPlayer::setSize(const IntSize& size) | 680 void MediaPlayer::setSize(const IntSize& size) |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 bool MediaPlayer::didPassCORSAccessCheck() const | 835 bool MediaPlayer::didPassCORSAccessCheck() const |
836 { | 836 { |
837 return m_private->didPassCORSAccessCheck(); | 837 return m_private->didPassCORSAccessCheck(); |
838 } | 838 } |
839 | 839 |
840 MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const | 840 MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const |
841 { | 841 { |
842 return m_private->movieLoadType(); | 842 return m_private->movieLoadType(); |
843 } | 843 } |
844 | 844 |
845 float MediaPlayer::mediaTimeForTimeValue(float timeValue) const | 845 double MediaPlayer::mediaTimeForTimeValue(double timeValue) const |
846 { | 846 { |
847 return m_private->mediaTimeForTimeValue(timeValue); | 847 return m_private->mediaTimeForTimeValue(timeValue); |
848 } | 848 } |
849 | 849 |
850 double MediaPlayer::maximumDurationToCacheMediaTime() const | 850 double MediaPlayer::maximumDurationToCacheMediaTime() const |
851 { | 851 { |
852 return m_private->maximumDurationToCacheMediaTime(); | 852 return m_private->maximumDurationToCacheMediaTime(); |
853 } | 853 } |
854 | 854 |
855 unsigned MediaPlayer::decodedFrameCount() const | 855 unsigned MediaPlayer::decodedFrameCount() const |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 if (m_mediaPlayerClient) | 933 if (m_mediaPlayerClient) |
934 m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this); | 934 m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this); |
935 } | 935 } |
936 | 936 |
937 void MediaPlayer::readyStateChanged() | 937 void MediaPlayer::readyStateChanged() |
938 { | 938 { |
939 if (m_mediaPlayerClient) | 939 if (m_mediaPlayerClient) |
940 m_mediaPlayerClient->mediaPlayerReadyStateChanged(this); | 940 m_mediaPlayerClient->mediaPlayerReadyStateChanged(this); |
941 } | 941 } |
942 | 942 |
943 void MediaPlayer::volumeChanged(float newVolume) | 943 void MediaPlayer::volumeChanged(double newVolume) |
944 { | 944 { |
945 m_volume = newVolume; | 945 m_volume = newVolume; |
946 if (m_mediaPlayerClient) | 946 if (m_mediaPlayerClient) |
947 m_mediaPlayerClient->mediaPlayerVolumeChanged(this); | 947 m_mediaPlayerClient->mediaPlayerVolumeChanged(this); |
948 } | 948 } |
949 | 949 |
950 void MediaPlayer::muteChanged(bool newMuted) | 950 void MediaPlayer::muteChanged(bool newMuted) |
951 { | 951 { |
952 m_muted = newMuted; | 952 m_muted = newMuted; |
953 if (m_mediaPlayerClient) | 953 if (m_mediaPlayerClient) |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 if (!m_private) | 1138 if (!m_private) |
1139 return; | 1139 return; |
1140 | 1140 |
1141 m_private->simulateAudioInterruption(); | 1141 m_private->simulateAudioInterruption(); |
1142 } | 1142 } |
1143 #endif | 1143 #endif |
1144 | 1144 |
1145 } | 1145 } |
1146 | 1146 |
1147 #endif | 1147 #endif |
OLD | NEW |