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

Side by Side Diff: media/filters/gpu_video_decoder.h

Issue 10669022: Add status parameter to DemuxerStream::ReadCB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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 | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
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 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 11
12 #include "media/base/pipeline_status.h" 12 #include "media/base/pipeline_status.h"
13 #include "media/base/demuxer_stream.h"
13 #include "media/base/video_decoder.h" 14 #include "media/base/video_decoder.h"
14 #include "media/video/video_decode_accelerator.h" 15 #include "media/video/video_decode_accelerator.h"
15 16
16 class MessageLoop; 17 class MessageLoop;
17 template <class T> class scoped_refptr; 18 template <class T> class scoped_refptr;
18 namespace base { 19 namespace base {
19 class MessageLoopProxy; 20 class MessageLoopProxy;
20 class SharedMemory; 21 class SharedMemory;
21 } 22 }
22 23
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // enough). 95 // enough).
95 kDrainingDecoder, 96 kDrainingDecoder,
96 kDecoderDrained, 97 kDecoderDrained,
97 }; 98 };
98 99
99 // If no demuxer read is in flight and no bitstream buffers are in the 100 // If no demuxer read is in flight and no bitstream buffers are in the
100 // decoder, kick some off demuxing/decoding. 101 // decoder, kick some off demuxing/decoding.
101 void EnsureDemuxOrDecode(); 102 void EnsureDemuxOrDecode();
102 103
103 // Callback to pass to demuxer_stream_->Read() for receiving encoded bits. 104 // Callback to pass to demuxer_stream_->Read() for receiving encoded bits.
104 void RequestBufferDecode(const scoped_refptr<DecoderBuffer>& buffer); 105 void RequestBufferDecode(DemuxerStream::Status status,
106 const scoped_refptr<DecoderBuffer>& buffer);
105 107
106 // Enqueue a frame for later delivery (or drop it on the floor if a 108 // Enqueue a frame for later delivery (or drop it on the floor if a
107 // vda->Reset() is in progress) and trigger out-of-line delivery of the oldest 109 // vda->Reset() is in progress) and trigger out-of-line delivery of the oldest
108 // ready frame to the client if there is a pending read. A NULL |frame| 110 // ready frame to the client if there is a pending read. A NULL |frame|
109 // merely triggers delivery, and requires the ready_video_frames_ queue not be 111 // merely triggers delivery, and requires the ready_video_frames_ queue not be
110 // empty. 112 // empty.
111 void EnqueueFrameAndTriggerFrameDelivery( 113 void EnqueueFrameAndTriggerFrameDelivery(
112 const scoped_refptr<VideoFrame>& frame); 114 const scoped_refptr<VideoFrame>& frame);
113 115
114 // Indicate the picturebuffer can be reused by the decoder. 116 // Indicate the picturebuffer can be reused by the decoder.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 219
218 // Indicates decoding error occurred. 220 // Indicates decoding error occurred.
219 bool error_occured_; 221 bool error_occured_;
220 222
221 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); 223 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
222 }; 224 };
223 225
224 } // namespace media 226 } // namespace media
225 227
226 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ 228 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698