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

Side by Side Diff: chrome/gpu/media/fake_gl_video_decode_engine.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/gpu_watchdog_thread.cc ('k') | chrome/gpu/media/fake_gl_video_decode_engine.cc » ('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_FAKE_GL_VIDEO_DECODE_ENGINE_H_
6 #define CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DECODE_ENGINE_H_
7
8 #include <queue>
9 #include <vector>
10
11 #include "base/scoped_ptr.h"
12 #include "media/base/pipeline.h"
13 #include "media/video/video_decode_engine.h"
14
15 namespace media {
16 class VideoDecodeContext;
17 class VideoFrame;
18 } // namespace media
19
20 class FakeGlVideoDecodeEngine : public media::VideoDecodeEngine {
21 public:
22 FakeGlVideoDecodeEngine();
23 virtual ~FakeGlVideoDecodeEngine();
24
25 virtual void Initialize(
26 MessageLoop* message_loop,
27 media::VideoDecodeEngine::EventHandler* event_handler,
28 media::VideoDecodeContext* context,
29 const media::VideoCodecConfig& config);
30
31 virtual void Uninitialize();
32 virtual void Flush();
33 virtual void Seek();
34 virtual void ConsumeVideoSample(scoped_refptr<media::Buffer> buffer);
35 virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> frame);
36
37 private:
38 // This method is called when video frames allocation is completed by
39 // VideoDecodeContext.
40 void AllocationCompleteTask();
41
42 // This method is called by VideoDecodeContext when uploading to a VideoFrame
43 // has completed.
44 void UploadCompleteTask(scoped_refptr<media::VideoFrame> frame);
45
46 int width_;
47 int height_;
48 media::VideoDecodeEngine::EventHandler* handler_;
49 media::VideoDecodeContext* context_;
50
51 // Internal video frame that is to be uploaded through VideoDecodeContext.
52 scoped_refptr<media::VideoFrame> internal_frame_;
53
54 // VideoFrame(s) allocated through VideoDecodeContext. These frames are
55 // opaque to us. And we need an extra upload step.
56 std::vector<scoped_refptr<media::VideoFrame> > external_frames_;
57
58 // These are the video frames that are waiting for input buffer to generate
59 // fake pattern in them.
60 std::queue<scoped_refptr<media::VideoFrame> > pending_frames_;
61
62 // Dummy statistics.
63 media::PipelineStatistics dummy_stats_;
64
65 DISALLOW_COPY_AND_ASSIGN(FakeGlVideoDecodeEngine);
66 };
67
68 #endif // CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DECODE_ENGINE_H_
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_watchdog_thread.cc ('k') | chrome/gpu/media/fake_gl_video_decode_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698