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

Side by Side Diff: chrome/renderer/media/ipc_video_decoder.h

Issue 3335014: Added FakeGlVideoDecodeEngine to exercise the IPC protocol for hardware video decoding (Closed)
Patch Set: compile man... Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_ 5 #ifndef CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_
6 #define CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_ 6 #define CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_
7 7
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "chrome/renderer/gpu_video_service_host.h" 9 #include "chrome/renderer/gpu_video_service_host.h"
10 #include "media/base/pts_heap.h" 10 #include "media/base/pts_heap.h"
(...skipping 30 matching lines...) Expand all
41 virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame); 41 virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame);
42 42
43 // GpuVideoDecoderHost::EventHandler. 43 // GpuVideoDecoderHost::EventHandler.
44 virtual void OnInitializeDone(bool success, 44 virtual void OnInitializeDone(bool success,
45 const GpuVideoDecoderInitDoneParam& param); 45 const GpuVideoDecoderInitDoneParam& param);
46 virtual void OnUninitializeDone(); 46 virtual void OnUninitializeDone();
47 virtual void OnFlushDone(); 47 virtual void OnFlushDone();
48 virtual void OnEmptyBufferDone(scoped_refptr<media::Buffer> buffer); 48 virtual void OnEmptyBufferDone(scoped_refptr<media::Buffer> buffer);
49 virtual void OnFillBufferDone(scoped_refptr<media::VideoFrame> frame); 49 virtual void OnFillBufferDone(scoped_refptr<media::VideoFrame> frame);
50 virtual void OnDeviceError(); 50 virtual void OnDeviceError();
51
52 virtual bool ProvidesBuffer(); 51 virtual bool ProvidesBuffer();
53 52
54 private: 53 private:
55 enum DecoderState { 54 enum DecoderState {
56 kUnInitialized, 55 kUnInitialized,
57 kPlaying, 56 kPlaying,
58 kFlushing, 57 kFlushing,
59 kPausing, 58 kPausing,
60 kFlushCodec, 59 kFlushCodec,
61 kEnded, 60 kEnded,
(...skipping 24 matching lines...) Expand all
86 scoped_refptr<media::DemuxerStream> demuxer_stream_; 85 scoped_refptr<media::DemuxerStream> demuxer_stream_;
87 86
88 MessageLoop* renderer_thread_message_loop_; 87 MessageLoop* renderer_thread_message_loop_;
89 88
90 // A context for allocating textures and issuing GLES2 commands. 89 // A context for allocating textures and issuing GLES2 commands.
91 // TODO(hclam): A ggl::Context lives on the Render Thread while this object 90 // TODO(hclam): A ggl::Context lives on the Render Thread while this object
92 // lives on the Video Decoder Thread, we need to take care of context lost 91 // lives on the Video Decoder Thread, we need to take care of context lost
93 // and destruction of the context. 92 // and destruction of the context.
94 ggl::Context* ggl_context_; 93 ggl::Context* ggl_context_;
95 94
95 // Handle to the hardware video decoder. This object will use IPC to
96 // communicate with the decoder in the GPU process.
96 scoped_refptr<GpuVideoDecoderHost> gpu_video_decoder_host_; 97 scoped_refptr<GpuVideoDecoderHost> gpu_video_decoder_host_;
97 98
99 // Texture that contains the video frame.
100 // TODO(hclam): Instead of one texture, we should have a set of textures
101 // as requested by the hardware video decode engine in the GPU process.
102 unsigned int texture_;
103
98 DISALLOW_COPY_AND_ASSIGN(IpcVideoDecoder); 104 DISALLOW_COPY_AND_ASSIGN(IpcVideoDecoder);
99 }; 105 };
100 106
101 #endif // CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_ 107 #endif // CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698