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

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

Issue 3215008: Connect GpuVideoDecodeServiceHost with ggl::Context and CommandBufferProxy (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fixed comments 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const GpuVideoDecoderInitDoneParam& param); 43 const GpuVideoDecoderInitDoneParam& param);
44 virtual void OnUninitializeDone(); 44 virtual void OnUninitializeDone();
45 virtual void OnFlushDone(); 45 virtual void OnFlushDone();
46 virtual void OnEmptyBufferDone(scoped_refptr<Buffer> buffer); 46 virtual void OnEmptyBufferDone(scoped_refptr<Buffer> buffer);
47 virtual void OnFillBufferDone(scoped_refptr<VideoFrame> frame); 47 virtual void OnFillBufferDone(scoped_refptr<VideoFrame> frame);
48 virtual void OnDeviceError(); 48 virtual void OnDeviceError();
49 49
50 virtual bool ProvidesBuffer(); 50 virtual bool ProvidesBuffer();
51 51
52 private: 52 private:
53 void OnSeekComplete(FilterCallback* callback);
54 void OnReadComplete(Buffer* buffer);
55 void ReadCompleteTask(scoped_refptr<Buffer> buffer);
56
57 private:
58 friend class FilterFactoryImpl2<IpcVideoDecoder, 53 friend class FilterFactoryImpl2<IpcVideoDecoder,
59 VideoDecodeEngine*, 54 VideoDecodeEngine*,
60 MessageLoop*>; 55 MessageLoop*>;
61 56
62 private:
63 int32 width_;
64 int32 height_;
65 MediaFormat media_format_;
66
67 scoped_ptr<FilterCallback> flush_callback_;
68 scoped_ptr<FilterCallback> initialize_callback_;
69 scoped_ptr<FilterCallback> stop_callback_;
70
71 enum DecoderState { 57 enum DecoderState {
72 kUnInitialized, 58 kUnInitialized,
73 kPlaying, 59 kPlaying,
74 kFlushing, 60 kFlushing,
75 kPausing, 61 kPausing,
76 kFlushCodec, 62 kFlushCodec,
77 kEnded, 63 kEnded,
78 kStopped, 64 kStopped,
79 }; 65 };
66
67 void OnSeekComplete(FilterCallback* callback);
68 void OnReadComplete(Buffer* buffer);
69 void ReadCompleteTask(scoped_refptr<Buffer> buffer);
70
71 int32 width_;
72 int32 height_;
73 MediaFormat media_format_;
74
75 scoped_ptr<FilterCallback> flush_callback_;
76 scoped_ptr<FilterCallback> initialize_callback_;
77 scoped_ptr<FilterCallback> stop_callback_;
78
80 DecoderState state_; 79 DecoderState state_;
81 80
82 // Tracks the number of asynchronous reads issued to |demuxer_stream_|. 81 // Tracks the number of asynchronous reads issued to |demuxer_stream_|.
83 // Using size_t since it is always compared against deque::size(). 82 // Using size_t since it is always compared against deque::size().
84 size_t pending_reads_; 83 size_t pending_reads_;
85 // Tracks the number of asynchronous reads issued from renderer. 84 // Tracks the number of asynchronous reads issued from renderer.
86 size_t pending_requests_; 85 size_t pending_requests_;
87 86
88 // Pointer to the demuxer stream that will feed us compressed buffers. 87 // Pointer to the demuxer stream that will feed us compressed buffers.
89 scoped_refptr<DemuxerStream> demuxer_stream_; 88 scoped_refptr<DemuxerStream> demuxer_stream_;
90 89
91 MessageLoop* renderer_thread_message_loop_; 90 MessageLoop* renderer_thread_message_loop_;
92 scoped_refptr<GpuVideoDecoderHost> gpu_video_decoder_host_; 91 scoped_refptr<GpuVideoDecoderHost> gpu_video_decoder_host_;
93 92
94 DISALLOW_COPY_AND_ASSIGN(IpcVideoDecoder); 93 DISALLOW_COPY_AND_ASSIGN(IpcVideoDecoder);
95 }; 94 };
96 95
97 } // namespace media 96 } // namespace media
98 97
99 #endif // CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_ 98 #endif // CHROME_RENDERER_MEDIA_IPC_VIDEO_DECODER_H_
100
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698