| 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; |
| 188 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; | 190 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; |
| 189 void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) override; | 191 void PutCurrentFrame() override; |
| 190 | 192 |
| 191 // Media player callback handlers. | 193 // Media player callback handlers. |
| 192 void OnMediaMetadataChanged(const base::TimeDelta& duration, int width, | 194 void OnMediaMetadataChanged(const base::TimeDelta& duration, int width, |
| 193 int height, bool success); | 195 int height, bool success); |
| 194 void OnPlaybackComplete(); | 196 void OnPlaybackComplete(); |
| 195 void OnBufferingUpdate(int percentage); | 197 void OnBufferingUpdate(int percentage); |
| 196 void OnSeekRequest(const base::TimeDelta& time_to_seek); | 198 void OnSeekRequest(const base::TimeDelta& time_to_seek); |
| 197 void OnSeekComplete(const base::TimeDelta& current_time); | 199 void OnSeekComplete(const base::TimeDelta& current_time); |
| 198 void OnMediaError(int error_type); | 200 void OnMediaError(int error_type); |
| 199 void OnVideoSizeChanged(int width, int height); | 201 void OnVideoSizeChanged(int width, int height); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 522 |
| 521 // NOTE: Weak pointers must be invalidated before all other member variables. | 523 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 522 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 524 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 523 | 525 |
| 524 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 526 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 525 }; | 527 }; |
| 526 | 528 |
| 527 } // namespace content | 529 } // namespace content |
| 528 | 530 |
| 529 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 531 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |