OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 virtual double mediaTimeForTimeValue(double timeValue) const = 0; | 174 virtual double mediaTimeForTimeValue(double timeValue) const = 0; |
175 | 175 |
176 virtual unsigned decodedFrameCount() const = 0; | 176 virtual unsigned decodedFrameCount() const = 0; |
177 virtual unsigned droppedFrameCount() const = 0; | 177 virtual unsigned droppedFrameCount() const = 0; |
178 virtual unsigned corruptedFrameCount() const { return 0; } | 178 virtual unsigned corruptedFrameCount() const { return 0; } |
179 virtual size_t audioDecodedByteCount() const = 0; | 179 virtual size_t audioDecodedByteCount() const = 0; |
180 virtual size_t videoDecodedByteCount() const = 0; | 180 virtual size_t videoDecodedByteCount() const = 0; |
181 | 181 |
182 virtual void paint(WebCanvas*, const WebRect&, SkPaint&) = 0; | 182 virtual void paint(WebCanvas*, const WebRect&, SkPaint&) = 0; |
183 | 183 |
184 // TODO(dshwang): remove non-|target| version. crbug.com/349871 | 184 // TODO(kbr): remove non-|target| version. crbug.com/349871 |
| 185 // |
| 186 // Do a GPU-GPU texture copy of the natural size of the current |
| 187 // video frame to |texture|. Caller is responsible for allocating |
| 188 // |texture| with the appropriate size. If the copy is impossible or |
| 189 // fails, it returns false. |
185 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, | 190 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, |
186 unsigned texture, | 191 unsigned texture, |
187 unsigned internalFormat, | |
188 unsigned type, | |
189 bool premultiplyAlpha, | 192 bool premultiplyAlpha, |
190 bool flipY) { | 193 bool flipY) { |
191 return false; | 194 return false; |
192 } | 195 } |
193 | 196 |
| 197 // TODO(kbr): when updating calling code to use this, remove the |
| 198 // |internalFormat| and |type| parameters. crbug.com/349871 |
194 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns | 199 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it returns |
195 // false. | 200 // false. |
196 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, | 201 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, |
197 unsigned target, | 202 unsigned target, |
198 unsigned texture, | 203 unsigned texture, |
199 unsigned internalFormat, | 204 unsigned internalFormat, |
200 unsigned type, | 205 unsigned type, |
201 int level, | 206 int level, |
202 bool premultiplyAlpha, | 207 bool premultiplyAlpha, |
203 bool flipY) { | 208 bool flipY) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 274 |
270 virtual void enabledAudioTracksChanged( | 275 virtual void enabledAudioTracksChanged( |
271 const WebVector<TrackId>& enabledTrackIds) {} | 276 const WebVector<TrackId>& enabledTrackIds) {} |
272 // |selectedTrackId| is null if no track is selected. | 277 // |selectedTrackId| is null if no track is selected. |
273 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) {} | 278 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) {} |
274 }; | 279 }; |
275 | 280 |
276 } // namespace blink | 281 } // namespace blink |
277 | 282 |
278 #endif | 283 #endif |
OLD | NEW |