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

Side by Side Diff: chrome/gpu/media/gpu_video_device.h

Issue 6684015: Move chrome\gpu to content\gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/gpu/media/fake_gl_video_device.cc ('k') | chrome/gpu/media/mft_angle_video_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_GPU_MEDIA_GPU_VIDEO_DEVICE_H_
6 #define CHROME_GPU_MEDIA_GPU_VIDEO_DEVICE_H_
7
8 #include <vector>
9
10 #include "media/base/video_frame.h"
11 #include "media/video/video_decode_context.h"
12
13 // A GpuVideoDevice is used by GpuVideoDecoder to allocate video frames
14 // meaningful to a corresponding VideoDecodeEngine.
15 //
16 // GpuVideoDecoder will provide a set of GL textures to this class and then
17 // GpuVideoDevice will transform the textures into a set of VideoFrame
18 // objects that can be used by VideoDecodeEngine.
19 //
20 // See text in GpuVideoDecoder for the overall flow for buffer allocation.
21 //
22 // Since all graphics commands execute on the main thread in the GPU process
23 // all the methods provided by this class are synchronous.
24 class GpuVideoDevice {
25 public:
26 virtual ~GpuVideoDevice() {}
27
28 // Get the hardware video decoding device handle.
29 virtual void* GetDevice() = 0;
30
31 // The following method is used by GpuVideoDecoder to create VideoFrame(s)
32 // associated with some GL textures.
33 //
34 // VideoFrame generated is used by VideoDecodeEngine for output buffer.
35 //
36 // |frame| will contain the VideoFrame generated.
37 //
38 // Return true if the operation was successful.
39 virtual bool CreateVideoFrameFromGlTextures(
40 size_t width, size_t height, media::VideoFrame::Format format,
41 const std::vector<media::VideoFrame::GlTexture>& textures,
42 scoped_refptr<media::VideoFrame>* frame) = 0;
43
44 // Release VideoFrame generated.
45 virtual void ReleaseVideoFrame(
46 const scoped_refptr<media::VideoFrame>& frame) = 0;
47
48 // Upload a device specific buffer to a VideoFrame object that can be used in
49 // the GPU process.
50 //
51 // Return true if successful.
52 virtual bool ConvertToVideoFrame(void* buffer,
53 scoped_refptr<media::VideoFrame> frame) = 0;
54 };
55
56 #endif // CHROME_GPU_MEDIA_GPU_VIDEO_DEVICE_H_
OLDNEW
« no previous file with comments | « chrome/gpu/media/fake_gl_video_device.cc ('k') | chrome/gpu/media/mft_angle_video_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698