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

Unified Diff: media/base/video_decoder.h

Issue 10990039: Enforce Stop() is always called before dtor in FFmepgVideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check more in dtor Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/filters/ffmpeg_video_decoder.h » ('j') | media/filters/ffmpeg_video_decoder_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_decoder.h
diff --git a/media/base/video_decoder.h b/media/base/video_decoder.h
index b22b14438d7c7add198a778cbc0aaf1443f9454f..4c8621752d8a99b41f587f76bd5d078c9e4d801e 100644
--- a/media/base/video_decoder.h
+++ b/media/base/video_decoder.h
@@ -26,9 +26,9 @@ class MEDIA_EXPORT VideoDecoder
kDecryptError // Decrypting error happened.
};
- // Initialize a VideoDecoder with the given DemuxerStream, executing the
- // callback upon completion.
- // statistics_cb is used to update global pipeline statistics.
+ // Initializes a VideoDecoder with the given DemuxerStream, executing the
+ // |status_cb| upon completion.
+ // |statistics_cb| is used to update global pipeline statistics.
virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
const PipelineStatusCB& status_cb,
const StatisticsCB& statistics_cb) = 0;
@@ -50,13 +50,16 @@ class MEDIA_EXPORT VideoDecoder
typedef base::Callback<void(Status, const scoped_refptr<VideoFrame>&)> ReadCB;
virtual void Read(const ReadCB& read_cb) = 0;
- // Reset decoder state, fulfilling all pending ReadCB and dropping extra
+ // Resets decoder state, fulfilling all pending ReadCB and dropping extra
// queued decoded data. After this call, the decoder is back to an initialized
// clean state.
virtual void Reset(const base::Closure& closure) = 0;
- // Stop decoder and set it to an uninitialized state. Note that a VideoDecoder
- // should/could not be re-initialized after it has been stopped.
+ // Stops decoder, fires any pending callbacks and sets the decoder to an
+ // uninitialized state. A VideoDecoder cannot be re-initialized after it has
+ // been stopped.
+ // Note that if Initialize() has been called, Stop() must be called and
+ // complete before deleting the decoder.
virtual void Stop(const base::Closure& closure) = 0;
// Returns true if the output format has an alpha channel. Most formats do not
« no previous file with comments | « no previous file | media/filters/ffmpeg_video_decoder.h » ('j') | media/filters/ffmpeg_video_decoder_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698