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

Side by Side Diff: media/base/video_decoder.h

Issue 13585003: GpuVideoDecoder not to use DemuxerStream after it's stopped. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments resolved Created 7 years, 8 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 | « no previous file | media/filters/gpu_video_decoder.cc » ('j') | media/filters/gpu_video_decoder.cc » ('J')
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_BASE_VIDEO_DECODER_H_ 5 #ifndef MEDIA_BASE_VIDEO_DECODER_H_
6 #define MEDIA_BASE_VIDEO_DECODER_H_ 6 #define MEDIA_BASE_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/pipeline_status.h" 10 #include "media/base/pipeline_status.h"
(...skipping 11 matching lines...) Expand all
22 // Status codes for read operations on VideoDecoder. 22 // Status codes for read operations on VideoDecoder.
23 enum Status { 23 enum Status {
24 kOk, // Everything went as planned. 24 kOk, // Everything went as planned.
25 kDecodeError, // Decoding error happened. 25 kDecodeError, // Decoding error happened.
26 kDecryptError // Decrypting error happened. 26 kDecryptError // Decrypting error happened.
27 }; 27 };
28 28
29 // Initializes a VideoDecoder with the given DemuxerStream, executing the 29 // Initializes a VideoDecoder with the given DemuxerStream, executing the
30 // |status_cb| upon completion. 30 // |status_cb| upon completion.
31 // |statistics_cb| is used to update the global pipeline statistics. 31 // |statistics_cb| is used to update the global pipeline statistics.
32 // Note: No VideoDecoder calls should be made before |status_cb| is executed. 32 // Note:
33 // 1) No VideoDecoder calls should be made before |status_cb| is executed.
34 // 2) DemuxerStream should not be accessed after the VideoDecoder is stopped.
33 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 35 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
34 const PipelineStatusCB& status_cb, 36 const PipelineStatusCB& status_cb,
35 const StatisticsCB& statistics_cb) = 0; 37 const StatisticsCB& statistics_cb) = 0;
36 38
37 // Requests a frame to be decoded. The status of the decoder and decoded frame 39 // Requests a frame to be decoded. The status of the decoder and decoded frame
38 // are returned via the provided callback. Only one read may be in flight at 40 // are returned via the provided callback. Only one read may be in flight at
39 // any given time. 41 // any given time.
40 // 42 //
41 // Implementations guarantee that the callback will not be called from within 43 // Implementations guarantee that the callback will not be called from within
42 // this method. 44 // this method.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 friend class base::RefCountedThreadSafe<VideoDecoder>; 81 friend class base::RefCountedThreadSafe<VideoDecoder>;
80 virtual ~VideoDecoder(); 82 virtual ~VideoDecoder();
81 VideoDecoder(); 83 VideoDecoder();
82 84
83 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); 85 DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
84 }; 86 };
85 87
86 } // namespace media 88 } // namespace media
87 89
88 #endif // MEDIA_BASE_VIDEO_DECODER_H_ 90 #endif // MEDIA_BASE_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/gpu_video_decoder.cc » ('j') | media/filters/gpu_video_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698