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

Side by Side Diff: webkit/media/webmediaplayer_impl.h

Issue 12412007: Add a new API in WebMediaPlayer to do a GPU-GPU textures copy if possible (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months 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 | « no previous file | webkit/media/webmediaplayer_impl.cc » ('j') | webkit/media/webmediaplayer_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains Pipeline which is the actual media player pipeline, it glues 6 // It contains Pipeline which is the actual media player pipeline, it glues
7 // the media player pipeline, data source, audio renderer and renderer. 7 // the media player pipeline, data source, audio renderer and renderer.
8 // Pipeline would creates multiple threads and access some public methods 8 // Pipeline would creates multiple threads and access some public methods
9 // of this class, so we need to be extra careful about concurrent access of 9 // of this class, so we need to be extra careful about concurrent access of
10 // methods and members. 10 // methods and members.
(...skipping 14 matching lines...) Expand all
25 #include "base/memory/ref_counted.h" 25 #include "base/memory/ref_counted.h"
26 #include "base/memory/scoped_ptr.h" 26 #include "base/memory/scoped_ptr.h"
27 #include "base/memory/weak_ptr.h" 27 #include "base/memory/weak_ptr.h"
28 #include "base/threading/thread.h" 28 #include "base/threading/thread.h"
29 #include "googleurl/src/gurl.h" 29 #include "googleurl/src/gurl.h"
30 #include "media/base/audio_renderer_sink.h" 30 #include "media/base/audio_renderer_sink.h"
31 #include "media/base/decryptor.h" 31 #include "media/base/decryptor.h"
32 #include "media/base/pipeline.h" 32 #include "media/base/pipeline.h"
33 #include "media/filters/skcanvas_video_renderer.h" 33 #include "media/filters/skcanvas_video_renderer.h"
34 #include "skia/ext/platform_canvas.h" 34 #include "skia/ext/platform_canvas.h"
35 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h" 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h"
36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
38 #include "webkit/media/crypto/key_systems.h" 39 #include "webkit/media/crypto/key_systems.h"
39 #include "webkit/media/crypto/proxy_decryptor.h" 40 #include "webkit/media/crypto/proxy_decryptor.h"
40 41
41 class RenderAudioSourceProvider; 42 class RenderAudioSourceProvider;
42 43
43 namespace WebKit { 44 namespace WebKit {
44 class WebFrame; 45 class WebFrame;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 virtual float mediaTimeForTimeValue(float timeValue) const; 134 virtual float mediaTimeForTimeValue(float timeValue) const;
134 135
135 virtual unsigned decodedFrameCount() const; 136 virtual unsigned decodedFrameCount() const;
136 virtual unsigned droppedFrameCount() const; 137 virtual unsigned droppedFrameCount() const;
137 virtual unsigned audioDecodedByteCount() const; 138 virtual unsigned audioDecodedByteCount() const;
138 virtual unsigned videoDecodedByteCount() const; 139 virtual unsigned videoDecodedByteCount() const;
139 140
140 virtual WebKit::WebVideoFrame* getCurrentFrame(); 141 virtual WebKit::WebVideoFrame* getCurrentFrame();
141 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); 142 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame);
142 143
144 // Query if GPU-accelerated video decode is in use to check if it is possible to use video texture at GPU side
145 // without readback to system memory.
146 virtual bool videoDecodeAcceleratedByGpu();
147 // Do the GPU-GPU texture copy using CHROMIUM_copy_texture extension
148 virtual bool copyVideoTextureToPlatformTexture(WebKit::WebGraphicsContext3D* w ebGraphicsContext, unsigned int texture, unsigned int internalFormat);
149
143 virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); 150 virtual WebKit::WebAudioSourceProvider* audioSourceProvider();
144 151
145 virtual AddIdStatus sourceAddId( 152 virtual AddIdStatus sourceAddId(
146 const WebKit::WebString& id, 153 const WebKit::WebString& id,
147 const WebKit::WebString& type, 154 const WebKit::WebString& type,
148 const WebKit::WebVector<WebKit::WebString>& codecs); 155 const WebKit::WebVector<WebKit::WebString>& codecs);
149 virtual bool sourceRemoveId(const WebKit::WebString& id); 156 virtual bool sourceRemoveId(const WebKit::WebString& id);
150 virtual WebKit::WebTimeRanges sourceBuffered(const WebKit::WebString& id); 157 virtual WebKit::WebTimeRanges sourceBuffered(const WebKit::WebString& id);
151 virtual bool sourceAppend(const WebKit::WebString& id, 158 virtual bool sourceAppend(const WebKit::WebString& id,
152 const unsigned char* data, 159 const unsigned char* data,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 media::SkCanvasVideoRenderer skcanvas_video_renderer_; 347 media::SkCanvasVideoRenderer skcanvas_video_renderer_;
341 scoped_refptr<media::VideoFrame> current_frame_; 348 scoped_refptr<media::VideoFrame> current_frame_;
342 bool pending_repaint_; 349 bool pending_repaint_;
343 350
344 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 351 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
345 }; 352 };
346 353
347 } // namespace webkit_media 354 } // namespace webkit_media
348 355
349 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 356 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/media/webmediaplayer_impl.cc » ('j') | webkit/media/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698