OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Provide statistics. | 178 // Provide statistics. |
179 virtual unsigned decodedFrameCount() const; | 179 virtual unsigned decodedFrameCount() const; |
180 virtual unsigned droppedFrameCount() const; | 180 virtual unsigned droppedFrameCount() const; |
181 virtual unsigned audioDecodedByteCount() const; | 181 virtual unsigned audioDecodedByteCount() const; |
182 virtual unsigned videoDecodedByteCount() const; | 182 virtual unsigned videoDecodedByteCount() const; |
183 | 183 |
184 // cc::VideoFrameProvider implementation. These methods are running on the | 184 // cc::VideoFrameProvider implementation. These methods are running on the |
185 // compositor thread. | 185 // compositor thread. |
186 void SetVideoFrameProviderClient( | 186 void SetVideoFrameProviderClient( |
187 cc::VideoFrameProvider::Client* client) override; | 187 cc::VideoFrameProvider::Client* client) override; |
188 bool UpdateCurrentFrame(base::TimeTicks deadline_min, | |
189 base::TimeTicks deadline_max) override; | |
190 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; | 188 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; |
191 void PutCurrentFrame() override; | 189 void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) override; |
192 | 190 |
193 // Media player callback handlers. | 191 // Media player callback handlers. |
194 void OnMediaMetadataChanged(const base::TimeDelta& duration, int width, | 192 void OnMediaMetadataChanged(const base::TimeDelta& duration, int width, |
195 int height, bool success); | 193 int height, bool success); |
196 void OnPlaybackComplete(); | 194 void OnPlaybackComplete(); |
197 void OnBufferingUpdate(int percentage); | 195 void OnBufferingUpdate(int percentage); |
198 void OnSeekRequest(const base::TimeDelta& time_to_seek); | 196 void OnSeekRequest(const base::TimeDelta& time_to_seek); |
199 void OnSeekComplete(const base::TimeDelta& current_time); | 197 void OnSeekComplete(const base::TimeDelta& current_time); |
200 void OnMediaError(int error_type); | 198 void OnMediaError(int error_type); |
201 void OnVideoSizeChanged(int width, int height); | 199 void OnVideoSizeChanged(int width, int height); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 520 |
523 // NOTE: Weak pointers must be invalidated before all other member variables. | 521 // NOTE: Weak pointers must be invalidated before all other member variables. |
524 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 522 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
525 | 523 |
526 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 524 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
527 }; | 525 }; |
528 | 526 |
529 } // namespace content | 527 } // namespace content |
530 | 528 |
531 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 529 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |