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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 virtual bool didPassCORSAccessCheck() const = 0; | 140 virtual bool didPassCORSAccessCheck() const = 0; |
141 | 141 |
142 virtual double mediaTimeForTimeValue(double timeValue) const = 0; | 142 virtual double mediaTimeForTimeValue(double timeValue) const = 0; |
143 | 143 |
144 virtual unsigned decodedFrameCount() const = 0; | 144 virtual unsigned decodedFrameCount() const = 0; |
145 virtual unsigned droppedFrameCount() const = 0; | 145 virtual unsigned droppedFrameCount() const = 0; |
146 virtual unsigned corruptedFrameCount() const { return 0; } | 146 virtual unsigned corruptedFrameCount() const { return 0; } |
147 virtual unsigned audioDecodedByteCount() const = 0; | 147 virtual unsigned audioDecodedByteCount() const = 0; |
148 virtual unsigned videoDecodedByteCount() const = 0; | 148 virtual unsigned videoDecodedByteCount() const = 0; |
149 | 149 |
150 // Getting/setting buffer sizes is currently only implemented for MSE. | |
ddorwin
2015/06/17 20:31:35
Is there a CL showing how this will be used? Would
servolk
2015/06/17 21:39:44
Please see the CL given in the description (https:
ddorwin
2015/06/20 01:56:40
Whether we need a uniform interface for controllin
| |
151 virtual size_t getAudioBufferSize() const = 0; | |
ddorwin
2015/06/17 20:31:35
I don't think these are "buffer" sizes. IMO, a buf
servolk
2015/06/17 21:39:44
The word "buffer" indeed has a different meaning f
ddorwin
2015/06/20 01:56:40
SourceBuffer is a very specific thing with a spec
| |
152 virtual void setAudioBufferSize(size_t) = 0; | |
ddorwin
2015/06/17 20:31:35
Does a per-player value make sense? Perhaps for Ca
servolk
2015/06/17 21:39:44
I think per-player setting gives us maximum flexib
ddorwin
2015/06/20 01:56:40
Flexibility often means complexity and can easily
| |
153 virtual size_t getVideoBufferSize() const = 0; | |
ddorwin
2015/06/17 20:31:35
"Audio" and "Video" restricts the Blink API to one
servolk
2015/06/17 21:39:44
As far as I know memory usage by embedded text tra
| |
154 virtual void setVideoBufferSize(size_t) = 0; | |
155 | |
150 virtual void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermo de::Mode) = 0; | 156 virtual void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermo de::Mode) = 0; |
151 // Do a GPU-GPU textures copy if possible. | 157 // Do a GPU-GPU textures copy if possible. |
152 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; } | 158 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; } |
153 // TODO(dshwang): Remove it after cleaning up in chromium side. crbug.com/44 3151 | 159 // TODO(dshwang): Remove it after cleaning up in chromium side. crbug.com/44 3151 |
154 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned level, unsigned internalFormat, unsigned type, bool premult iplyAlpha, bool flipY) { return false; } | 160 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned level, unsigned internalFormat, unsigned type, bool premult iplyAlpha, bool flipY) { return false; } |
155 | 161 |
156 virtual WebAudioSourceProvider* audioSourceProvider() { return nullptr; } | 162 virtual WebAudioSourceProvider* audioSourceProvider() { return nullptr; } |
157 | 163 |
158 // Returns whether keySystem is supported. If true, the result will be | 164 // Returns whether keySystem is supported. If true, the result will be |
159 // reported by an event. | 165 // reported by an event. |
160 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK eySystemNotSupported; } | 166 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK eySystemNotSupported; } |
161 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport ed; } | 167 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport ed; } |
162 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; } | 168 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; } |
163 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry ptionModuleExceptionNotSupportedError, 0, "ERROR"); } | 169 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry ptionModuleExceptionNotSupportedError, 0, "ERROR"); } |
164 | 170 |
165 // Sets the poster image URL. | 171 // Sets the poster image URL. |
166 virtual void setPoster(const WebURL& poster) { } | 172 virtual void setPoster(const WebURL& poster) { } |
167 | 173 |
168 // Instruct WebMediaPlayer to enter/exit fullscreen. | 174 // Instruct WebMediaPlayer to enter/exit fullscreen. |
169 virtual void enterFullscreen() { } | 175 virtual void enterFullscreen() { } |
170 | 176 |
171 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { } | 177 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { } |
172 // |selectedTrackId| is null if no track is selected. | 178 // |selectedTrackId| is null if no track is selected. |
173 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } | 179 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } |
174 }; | 180 }; |
175 | 181 |
176 } // namespace blink | 182 } // namespace blink |
177 | 183 |
178 #endif | 184 #endif |
OLD | NEW |