Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: content/renderer/media/webmediaplayer_ms.h

Issue 1531073002: Revert of Unit test for WebMediaPlayerMS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/webmediaplayer_ms.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "content/common/content_export.h"
15 #include "content/public/renderer/render_frame_observer.h" 14 #include "content/public/renderer/render_frame_observer.h"
16 #include "media/blink/webmediaplayer_util.h" 15 #include "media/blink/webmediaplayer_util.h"
17 #include "media/renderers/gpu_video_accelerator_factories.h" 16 #include "media/renderers/gpu_video_accelerator_factories.h"
18 #include "media/renderers/skcanvas_video_renderer.h" 17 #include "media/renderers/skcanvas_video_renderer.h"
19 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 18 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
20 #include "url/origin.h" 19 #include "url/origin.h"
21 20
22 namespace blink { 21 namespace blink {
23 class WebFrame; 22 class WebFrame;
24 class WebGraphicsContext3D; 23 class WebGraphicsContext3D;
(...skipping 25 matching lines...) Expand all
50 // All calls to WebMediaPlayerMS methods must be from the main thread of 49 // All calls to WebMediaPlayerMS methods must be from the main thread of
51 // Renderer process. 50 // Renderer process.
52 // 51 //
53 // WebMediaPlayerMS works with multiple objects, the most important ones are: 52 // WebMediaPlayerMS works with multiple objects, the most important ones are:
54 // 53 //
55 // VideoFrameProvider 54 // VideoFrameProvider
56 // provides video frames for rendering. 55 // provides video frames for rendering.
57 // 56 //
58 // blink::WebMediaPlayerClient 57 // blink::WebMediaPlayerClient
59 // WebKit client of this media player object. 58 // WebKit client of this media player object.
60 class CONTENT_EXPORT WebMediaPlayerMS 59 class WebMediaPlayerMS
61 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), 60 : public blink::WebMediaPlayer,
62 public NON_EXPORTED_BASE(base::SupportsWeakPtr<WebMediaPlayerMS>), 61 public base::SupportsWeakPtr<WebMediaPlayerMS>,
63 public NON_EXPORTED_BASE(RenderFrameObserver) { 62 public RenderFrameObserver {
64 public: 63 public:
65 // Construct a WebMediaPlayerMS with reference to the client, and 64 // Construct a WebMediaPlayerMS with reference to the client, and
66 // a MediaStreamClient which provides VideoFrameProvider. 65 // a MediaStreamClient which provides VideoFrameProvider.
67 WebMediaPlayerMS( 66 WebMediaPlayerMS(
68 blink::WebFrame* frame, 67 blink::WebFrame* frame,
69 blink::WebMediaPlayerClient* client, 68 blink::WebMediaPlayerClient* client,
70 base::WeakPtr<media::WebMediaPlayerDelegate> delegate, 69 base::WeakPtr<media::WebMediaPlayerDelegate> delegate,
71 media::MediaLog* media_log, 70 media::MediaLog* media_log,
72 scoped_ptr<MediaStreamRendererFactory> factory, 71 scoped_ptr<MediaStreamRendererFactory> factory,
73 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 72 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 140
142 bool copyVideoTextureToPlatformTexture( 141 bool copyVideoTextureToPlatformTexture(
143 blink::WebGraphicsContext3D* web_graphics_context, 142 blink::WebGraphicsContext3D* web_graphics_context,
144 unsigned int texture, 143 unsigned int texture,
145 unsigned int internal_format, 144 unsigned int internal_format,
146 unsigned int type, 145 unsigned int type,
147 bool premultiply_alpha, 146 bool premultiply_alpha,
148 bool flip_y) override; 147 bool flip_y) override;
149 148
150 private: 149 private:
151 friend class WebMediaPlayerMSTest;
152
153 // The callback for VideoFrameProvider to signal a new frame is available. 150 // The callback for VideoFrameProvider to signal a new frame is available.
154 void OnFrameAvailable(const scoped_refptr<media::VideoFrame>& frame); 151 void OnFrameAvailable(const scoped_refptr<media::VideoFrame>& frame);
155 // Need repaint due to state change. 152 // Need repaint due to state change.
156 void RepaintInternal(); 153 void RepaintInternal();
157 154
158 // The callback for source to report error. 155 // The callback for source to report error.
159 void OnSourceError(); 156 void OnSourceError();
160 157
161 // Helpers that set the network/ready state and notifies the client if 158 // Helpers that set the network/ready state and notifies the client if
162 // they've changed. 159 // they've changed.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 205
209 const std::string initial_audio_output_device_id_; 206 const std::string initial_audio_output_device_id_;
210 const url::Origin initial_security_origin_; 207 const url::Origin initial_security_origin_;
211 208
212 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); 209 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS);
213 }; 210 };
214 211
215 } // namespace content 212 } // namespace content
216 213
217 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 214 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/webmediaplayer_ms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698