| 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_WEBMEDIAPLAYER_MS_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 virtual bool didPassCORSAccessCheck() const; | 107 virtual bool didPassCORSAccessCheck() const; |
| 108 | 108 |
| 109 virtual double mediaTimeForTimeValue(double timeValue) const; | 109 virtual double mediaTimeForTimeValue(double timeValue) const; |
| 110 | 110 |
| 111 virtual unsigned decodedFrameCount() const; | 111 virtual unsigned decodedFrameCount() const; |
| 112 virtual unsigned droppedFrameCount() const; | 112 virtual unsigned droppedFrameCount() const; |
| 113 virtual unsigned audioDecodedByteCount() const; | 113 virtual unsigned audioDecodedByteCount() const; |
| 114 virtual unsigned videoDecodedByteCount() const; | 114 virtual unsigned videoDecodedByteCount() const; |
| 115 | 115 |
| 116 // VideoFrameProvider implementation. | 116 // VideoFrameProvider implementation. |
| 117 virtual void SetVideoFrameProviderClient( | 117 void SetVideoFrameProviderClient( |
| 118 cc::VideoFrameProvider::Client* client) override; | 118 cc::VideoFrameProvider::Client* client) override; |
| 119 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() override; | 119 scoped_refptr<media::VideoFrame> GetCurrentFrame() override; |
| 120 virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) | 120 void PutCurrentFrame(const scoped_refptr<media::VideoFrame>& frame) override; |
| 121 override; | |
| 122 | 121 |
| 123 private: | 122 private: |
| 124 // The callback for VideoFrameProvider to signal a new frame is available. | 123 // The callback for VideoFrameProvider to signal a new frame is available. |
| 125 void OnFrameAvailable(const scoped_refptr<media::VideoFrame>& frame); | 124 void OnFrameAvailable(const scoped_refptr<media::VideoFrame>& frame); |
| 126 // Need repaint due to state change. | 125 // Need repaint due to state change. |
| 127 void RepaintInternal(); | 126 void RepaintInternal(); |
| 128 | 127 |
| 129 // The callback for source to report error. | 128 // The callback for source to report error. |
| 130 void OnSourceError(); | 129 void OnSourceError(); |
| 131 | 130 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 scoped_refptr<media::MediaLog> media_log_; | 187 scoped_refptr<media::MediaLog> media_log_; |
| 189 | 188 |
| 190 scoped_ptr<MediaStreamRendererFactory> renderer_factory_; | 189 scoped_ptr<MediaStreamRendererFactory> renderer_factory_; |
| 191 | 190 |
| 192 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); | 191 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); |
| 193 }; | 192 }; |
| 194 | 193 |
| 195 } // namespace content | 194 } // namespace content |
| 196 | 195 |
| 197 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ | 196 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ |
| OLD | NEW |