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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual PlatformMedia platformMedia() const { return NoPlatformMedia; } | 78 virtual PlatformMedia platformMedia() const { return NoPlatformMedia; } |
79 virtual PlatformLayer* platformLayer() const { return 0; } | 79 virtual PlatformLayer* platformLayer() const { return 0; } |
80 | 80 |
81 virtual IntSize naturalSize() const { return IntSize(0, 0); } | 81 virtual IntSize naturalSize() const { return IntSize(0, 0); } |
82 | 82 |
83 virtual bool hasVideo() const { return false; } | 83 virtual bool hasVideo() const { return false; } |
84 virtual bool hasAudio() const { return false; } | 84 virtual bool hasAudio() const { return false; } |
85 | 85 |
86 virtual void setVisible(bool) { } | 86 virtual void setVisible(bool) { } |
87 | 87 |
88 virtual float duration() const { return 0; } | 88 virtual double duration() const { return 0; } |
89 | 89 |
90 virtual float currentTime() const { return 0; } | 90 virtual double currentTime() const { return 0; } |
91 virtual void seek(float) { } | 91 virtual void seek(double) { } |
92 virtual bool seeking() const { return false; } | 92 virtual bool seeking() const { return false; } |
93 | 93 |
94 virtual void setRate(float) { } | 94 virtual void setRate(double) { } |
95 virtual void setPreservesPitch(bool) { } | 95 virtual void setPreservesPitch(bool) { } |
96 virtual bool paused() const { return false; } | 96 virtual bool paused() const { return false; } |
97 | 97 |
98 virtual void setVolume(float) { } | 98 virtual void setVolume(double) { } |
99 | 99 |
100 virtual bool supportsMuting() const { return false; } | 100 virtual bool supportsMuting() const { return false; } |
101 virtual void setMuted(bool) { } | 101 virtual void setMuted(bool) { } |
102 | 102 |
103 virtual bool hasClosedCaptions() const { return false; } | 103 virtual bool hasClosedCaptions() const { return false; } |
104 virtual void setClosedCaptionsVisible(bool) { }; | 104 virtual void setClosedCaptionsVisible(bool) { }; |
105 | 105 |
106 virtual MediaPlayer::NetworkState networkState() const { return MediaPlayer:
:Empty; } | 106 virtual MediaPlayer::NetworkState networkState() const { return MediaPlayer:
:Empty; } |
107 virtual MediaPlayer::ReadyState readyState() const { return MediaPlayer::Hav
eNothing; } | 107 virtual MediaPlayer::ReadyState readyState() const { return MediaPlayer::Hav
eNothing; } |
108 | 108 |
109 virtual float maxTimeSeekable() const { return 0; } | 109 virtual double maxTimeSeekable() const { return 0; } |
110 virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create(
); } | 110 virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create(
); } |
111 | 111 |
112 virtual unsigned totalBytes() const { return 0; } | 112 virtual unsigned totalBytes() const { return 0; } |
113 virtual bool didLoadingProgress() const { return false; } | 113 virtual bool didLoadingProgress() const { return false; } |
114 | 114 |
115 virtual void setSize(const IntSize&) { } | 115 virtual void setSize(const IntSize&) { } |
116 | 116 |
117 virtual void paint(GraphicsContext*, const IntRect&) { } | 117 virtual void paint(GraphicsContext*, const IntRect&) { } |
118 | 118 |
119 virtual bool canLoadPoster() const { return false; } | 119 virtual bool canLoadPoster() const { return false; } |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 { | 454 { |
455 return m_private->addKey(keySystem.lower(), key, keyLength, initData, initDa
taLength, sessionId); | 455 return m_private->addKey(keySystem.lower(), key, keyLength, initData, initDa
taLength, sessionId); |
456 } | 456 } |
457 | 457 |
458 MediaPlayer::MediaKeyException MediaPlayer::cancelKeyRequest(const String& keySy
stem, const String& sessionId) | 458 MediaPlayer::MediaKeyException MediaPlayer::cancelKeyRequest(const String& keySy
stem, const String& sessionId) |
459 { | 459 { |
460 return m_private->cancelKeyRequest(keySystem.lower(), sessionId); | 460 return m_private->cancelKeyRequest(keySystem.lower(), sessionId); |
461 } | 461 } |
462 #endif | 462 #endif |
463 | 463 |
464 float MediaPlayer::duration() const | 464 double MediaPlayer::duration() const |
465 { | 465 { |
466 return m_private->duration(); | 466 return m_private->duration(); |
467 } | 467 } |
468 | 468 |
469 float MediaPlayer::startTime() const | 469 double MediaPlayer::startTime() const |
470 { | 470 { |
471 return m_private->startTime(); | 471 return m_private->startTime(); |
472 } | 472 } |
473 | 473 |
474 double MediaPlayer::initialTime() const | 474 double MediaPlayer::initialTime() const |
475 { | 475 { |
476 return m_private->initialTime(); | 476 return m_private->initialTime(); |
477 } | 477 } |
478 | 478 |
479 float MediaPlayer::currentTime() const | 479 double MediaPlayer::currentTime() const |
480 { | 480 { |
481 return m_private->currentTime(); | 481 return m_private->currentTime(); |
482 } | 482 } |
483 | 483 |
484 void MediaPlayer::seek(float time) | 484 void MediaPlayer::seek(double time) |
485 { | 485 { |
486 m_private->seek(time); | 486 m_private->seek(time); |
487 } | 487 } |
488 | 488 |
489 bool MediaPlayer::paused() const | 489 bool MediaPlayer::paused() const |
490 { | 490 { |
491 return m_private->paused(); | 491 return m_private->paused(); |
492 } | 492 } |
493 | 493 |
494 bool MediaPlayer::seeking() const | 494 bool MediaPlayer::seeking() const |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 MediaPlayer::NetworkState MediaPlayer::networkState() | 547 MediaPlayer::NetworkState MediaPlayer::networkState() |
548 { | 548 { |
549 return m_private->networkState(); | 549 return m_private->networkState(); |
550 } | 550 } |
551 | 551 |
552 MediaPlayer::ReadyState MediaPlayer::readyState() | 552 MediaPlayer::ReadyState MediaPlayer::readyState() |
553 { | 553 { |
554 return m_private->readyState(); | 554 return m_private->readyState(); |
555 } | 555 } |
556 | 556 |
557 float MediaPlayer::volume() const | 557 double MediaPlayer::volume() const |
558 { | 558 { |
559 return m_volume; | 559 return m_volume; |
560 } | 560 } |
561 | 561 |
562 void MediaPlayer::setVolume(float volume) | 562 void MediaPlayer::setVolume(double volume) |
563 { | 563 { |
564 m_volume = volume; | 564 m_volume = volume; |
565 | 565 |
566 if (m_private->supportsMuting() || !m_muted) | 566 if (m_private->supportsMuting() || !m_muted) |
567 m_private->setVolume(volume); | 567 m_private->setVolume(volume); |
568 } | 568 } |
569 | 569 |
570 bool MediaPlayer::muted() const | 570 bool MediaPlayer::muted() const |
571 { | 571 { |
572 return m_muted; | 572 return m_muted; |
(...skipping 12 matching lines...) Expand all Loading... |
585 bool MediaPlayer::hasClosedCaptions() const | 585 bool MediaPlayer::hasClosedCaptions() const |
586 { | 586 { |
587 return m_private->hasClosedCaptions(); | 587 return m_private->hasClosedCaptions(); |
588 } | 588 } |
589 | 589 |
590 void MediaPlayer::setClosedCaptionsVisible(bool closedCaptionsVisible) | 590 void MediaPlayer::setClosedCaptionsVisible(bool closedCaptionsVisible) |
591 { | 591 { |
592 m_private->setClosedCaptionsVisible(closedCaptionsVisible); | 592 m_private->setClosedCaptionsVisible(closedCaptionsVisible); |
593 } | 593 } |
594 | 594 |
595 float MediaPlayer::rate() const | 595 double MediaPlayer::rate() const |
596 { | 596 { |
597 return m_rate; | 597 return m_rate; |
598 } | 598 } |
599 | 599 |
600 void MediaPlayer::setRate(float rate) | 600 void MediaPlayer::setRate(double rate) |
601 { | 601 { |
602 m_rate = rate; | 602 m_rate = rate; |
603 m_private->setRate(rate); | 603 m_private->setRate(rate); |
604 } | 604 } |
605 | 605 |
606 bool MediaPlayer::preservesPitch() const | 606 bool MediaPlayer::preservesPitch() const |
607 { | 607 { |
608 return m_preservesPitch; | 608 return m_preservesPitch; |
609 } | 609 } |
610 | 610 |
611 void MediaPlayer::setPreservesPitch(bool preservesPitch) | 611 void MediaPlayer::setPreservesPitch(bool preservesPitch) |
612 { | 612 { |
613 m_preservesPitch = preservesPitch; | 613 m_preservesPitch = preservesPitch; |
614 m_private->setPreservesPitch(preservesPitch); | 614 m_private->setPreservesPitch(preservesPitch); |
615 } | 615 } |
616 | 616 |
617 PassRefPtr<TimeRanges> MediaPlayer::buffered() | 617 PassRefPtr<TimeRanges> MediaPlayer::buffered() |
618 { | 618 { |
619 return m_private->buffered(); | 619 return m_private->buffered(); |
620 } | 620 } |
621 | 621 |
622 PassRefPtr<TimeRanges> MediaPlayer::seekable() | 622 PassRefPtr<TimeRanges> MediaPlayer::seekable() |
623 { | 623 { |
624 return m_private->seekable(); | 624 return m_private->seekable(); |
625 } | 625 } |
626 | 626 |
627 float MediaPlayer::maxTimeSeekable() | 627 double MediaPlayer::maxTimeSeekable() |
628 { | 628 { |
629 return m_private->maxTimeSeekable(); | 629 return m_private->maxTimeSeekable(); |
630 } | 630 } |
631 | 631 |
632 bool MediaPlayer::didLoadingProgress() | 632 bool MediaPlayer::didLoadingProgress() |
633 { | 633 { |
634 return m_private->didLoadingProgress(); | 634 return m_private->didLoadingProgress(); |
635 } | 635 } |
636 | 636 |
637 void MediaPlayer::setSize(const IntSize& size) | 637 void MediaPlayer::setSize(const IntSize& size) |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 bool MediaPlayer::didPassCORSAccessCheck() const | 776 bool MediaPlayer::didPassCORSAccessCheck() const |
777 { | 777 { |
778 return m_private->didPassCORSAccessCheck(); | 778 return m_private->didPassCORSAccessCheck(); |
779 } | 779 } |
780 | 780 |
781 MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const | 781 MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const |
782 { | 782 { |
783 return m_private->movieLoadType(); | 783 return m_private->movieLoadType(); |
784 } | 784 } |
785 | 785 |
786 float MediaPlayer::mediaTimeForTimeValue(float timeValue) const | 786 double MediaPlayer::mediaTimeForTimeValue(double timeValue) const |
787 { | 787 { |
788 return m_private->mediaTimeForTimeValue(timeValue); | 788 return m_private->mediaTimeForTimeValue(timeValue); |
789 } | 789 } |
790 | 790 |
791 double MediaPlayer::maximumDurationToCacheMediaTime() const | 791 double MediaPlayer::maximumDurationToCacheMediaTime() const |
792 { | 792 { |
793 return m_private->maximumDurationToCacheMediaTime(); | 793 return m_private->maximumDurationToCacheMediaTime(); |
794 } | 794 } |
795 | 795 |
796 unsigned MediaPlayer::decodedFrameCount() const | 796 unsigned MediaPlayer::decodedFrameCount() const |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 if (m_mediaPlayerClient) | 874 if (m_mediaPlayerClient) |
875 m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this); | 875 m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this); |
876 } | 876 } |
877 | 877 |
878 void MediaPlayer::readyStateChanged() | 878 void MediaPlayer::readyStateChanged() |
879 { | 879 { |
880 if (m_mediaPlayerClient) | 880 if (m_mediaPlayerClient) |
881 m_mediaPlayerClient->mediaPlayerReadyStateChanged(this); | 881 m_mediaPlayerClient->mediaPlayerReadyStateChanged(this); |
882 } | 882 } |
883 | 883 |
884 void MediaPlayer::volumeChanged(float newVolume) | 884 void MediaPlayer::volumeChanged(double newVolume) |
885 { | 885 { |
886 m_volume = newVolume; | 886 m_volume = newVolume; |
887 if (m_mediaPlayerClient) | 887 if (m_mediaPlayerClient) |
888 m_mediaPlayerClient->mediaPlayerVolumeChanged(this); | 888 m_mediaPlayerClient->mediaPlayerVolumeChanged(this); |
889 } | 889 } |
890 | 890 |
891 void MediaPlayer::muteChanged(bool newMuted) | 891 void MediaPlayer::muteChanged(bool newMuted) |
892 { | 892 { |
893 m_muted = newMuted; | 893 m_muted = newMuted; |
894 if (m_mediaPlayerClient) | 894 if (m_mediaPlayerClient) |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 if (!m_private) | 1069 if (!m_private) |
1070 return; | 1070 return; |
1071 | 1071 |
1072 m_private->simulateAudioInterruption(); | 1072 m_private->simulateAudioInterruption(); |
1073 } | 1073 } |
1074 #endif | 1074 #endif |
1075 | 1075 |
1076 } | 1076 } |
1077 | 1077 |
1078 #endif | 1078 #endif |
OLD | NEW |