OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 virtual bool supportsSave() const { return false; } | 59 virtual bool supportsSave() const { return false; } |
60 virtual bool supportsScanning() const { return false; } | 60 virtual bool supportsScanning() const { return false; } |
61 | 61 |
62 virtual IntSize naturalSize() const = 0; | 62 virtual IntSize naturalSize() const = 0; |
63 | 63 |
64 virtual bool hasVideo() const = 0; | 64 virtual bool hasVideo() const = 0; |
65 virtual bool hasAudio() const = 0; | 65 virtual bool hasAudio() const = 0; |
66 | 66 |
67 virtual void setVisible(bool) = 0; | 67 virtual void setVisible(bool) = 0; |
68 | 68 |
69 virtual float duration() const = 0; | 69 virtual double duration() const { return 0; } |
70 | 70 |
71 virtual float currentTime() const = 0; | 71 virtual double currentTime() const { return 0; } |
72 virtual void seek(float time) = 0; | 72 |
| 73 virtual void seek(double) { } |
| 74 |
73 virtual bool seeking() const = 0; | 75 virtual bool seeking() const = 0; |
74 | 76 |
75 virtual float startTime() const { return 0; } | 77 virtual double startTime() const { return 0; } |
76 | |
77 virtual double initialTime() const { return 0; } | 78 virtual double initialTime() const { return 0; } |
78 | 79 |
79 virtual void setRate(float) = 0; | 80 virtual void setRate(double) { } |
| 81 |
80 virtual void setPreservesPitch(bool) { } | 82 virtual void setPreservesPitch(bool) { } |
81 | 83 |
82 virtual bool paused() const = 0; | 84 virtual bool paused() const = 0; |
83 | 85 |
84 virtual void setVolume(float) = 0; | 86 virtual void setVolume(double) { } |
85 | 87 |
86 virtual bool supportsMuting() const { return false; } | 88 virtual bool supportsMuting() const { return false; } |
87 virtual void setMuted(bool) { } | 89 virtual void setMuted(bool) { } |
88 | 90 |
89 virtual bool hasClosedCaptions() const { return false; } | 91 virtual bool hasClosedCaptions() const { return false; } |
90 virtual void setClosedCaptionsVisible(bool) { } | 92 virtual void setClosedCaptionsVisible(bool) { } |
91 | 93 |
92 virtual MediaPlayer::NetworkState networkState() const = 0; | 94 virtual MediaPlayer::NetworkState networkState() const = 0; |
93 virtual MediaPlayer::ReadyState readyState() const = 0; | 95 virtual MediaPlayer::ReadyState readyState() const = 0; |
94 | 96 |
95 virtual PassRefPtr<TimeRanges> seekable() const { return maxTimeSeekable() ?
TimeRanges::create(0, maxTimeSeekable()) : TimeRanges::create(); } | 97 virtual PassRefPtr<TimeRanges> seekable() const { return maxTimeSeekable() ?
TimeRanges::create(0, maxTimeSeekable()) : TimeRanges::create(); } |
96 virtual float maxTimeSeekable() const = 0; | 98 virtual double maxTimeSeekable() const { return 0; } |
97 virtual PassRefPtr<TimeRanges> buffered() const = 0; | 99 virtual PassRefPtr<TimeRanges> buffered() const = 0; |
98 | 100 |
99 virtual bool didLoadingProgress() const = 0; | 101 virtual bool didLoadingProgress() const = 0; |
100 | 102 |
101 virtual void setSize(const IntSize&) = 0; | 103 virtual void setSize(const IntSize&) = 0; |
102 | 104 |
103 virtual void paint(GraphicsContext*, const IntRect&) = 0; | 105 virtual void paint(GraphicsContext*, const IntRect&) = 0; |
104 | 106 |
105 virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r
) { paint(c, r); } | 107 virtual void paintCurrentFrameInContext(GraphicsContext* c, const IntRect& r
) { paint(c, r); } |
106 virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3
DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) { return false; } | 108 virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3
DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) { return false; } |
(...skipping 28 matching lines...) Expand all Loading... |
135 virtual bool hasSingleSecurityOrigin() const { return false; } | 137 virtual bool hasSingleSecurityOrigin() const { return false; } |
136 | 138 |
137 virtual bool didPassCORSAccessCheck() const { return false; } | 139 virtual bool didPassCORSAccessCheck() const { return false; } |
138 | 140 |
139 virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlaye
r::Unknown; } | 141 virtual MediaPlayer::MovieLoadType movieLoadType() const { return MediaPlaye
r::Unknown; } |
140 | 142 |
141 virtual void prepareForRendering() { } | 143 virtual void prepareForRendering() { } |
142 | 144 |
143 // Time value in the movie's time scale. It is only necessary to override th
is if the media | 145 // Time value in the movie's time scale. It is only necessary to override th
is if the media |
144 // engine uses rational numbers to represent media time. | 146 // engine uses rational numbers to represent media time. |
145 virtual float mediaTimeForTimeValue(float timeValue) const { return timeValu
e; } | 147 virtual double mediaTimeForTimeValue(double timeValue) const { return timeVa
lue; } |
146 | 148 |
147 // Overide this if it is safe for HTMLMediaElement to cache movie time and r
eport | 149 // Overide this if it is safe for HTMLMediaElement to cache movie time and r
eport |
148 // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum w
all time | 150 // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum w
all time |
149 // it is OK to calculate movie time before refreshing the cached time. | 151 // it is OK to calculate movie time before refreshing the cached time. |
150 virtual double maximumDurationToCacheMediaTime() const { return 0; } | 152 virtual double maximumDurationToCacheMediaTime() const { return 0; } |
151 | 153 |
152 virtual unsigned decodedFrameCount() const { return 0; } | 154 virtual unsigned decodedFrameCount() const { return 0; } |
153 virtual unsigned droppedFrameCount() const { return 0; } | 155 virtual unsigned droppedFrameCount() const { return 0; } |
154 virtual unsigned audioDecodedByteCount() const { return 0; } | 156 virtual unsigned audioDecodedByteCount() const { return 0; } |
155 virtual unsigned videoDecodedByteCount() const { return 0; } | 157 virtual unsigned videoDecodedByteCount() const { return 0; } |
(...skipping 28 matching lines...) Expand all Loading... |
184 | 186 |
185 #if USE(GSTREAMER) | 187 #if USE(GSTREAMER) |
186 virtual void simulateAudioInterruption() { } | 188 virtual void simulateAudioInterruption() { } |
187 #endif | 189 #endif |
188 }; | 190 }; |
189 | 191 |
190 } | 192 } |
191 | 193 |
192 #endif | 194 #endif |
193 #endif | 195 #endif |
OLD | NEW |