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

Unified Diff: media/base/video_decoder.h

Issue 395703002: Fold {Audio|Video}Decoder::Stop() into the dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/mock_filters.h ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »
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 e7d7ad628785c134ae281342a2d61c71890bb365..edca238e784a03c04233db1e0f66c89a0d445b16 100644
--- a/media/base/video_decoder.h
+++ b/media/base/video_decoder.h
@@ -39,6 +39,11 @@ class MEDIA_EXPORT VideoDecoder {
typedef base::Callback<void(Status status)> DecodeCB;
VideoDecoder();
+
+ // Fires any pending callbacks, stops and destroys the decoder.
+ // Note: Since this is a destructor, |this| will be destroyed after this call.
+ // Make sure the callbacks fired from this call doesn't post any task that
+ // depends on |this|.
virtual ~VideoDecoder();
// Initializes a VideoDecoder with the given |config|, executing the
@@ -48,9 +53,8 @@ class MEDIA_EXPORT VideoDecoder {
// Note:
// 1) The VideoDecoder will be reinitialized if it was initialized before.
// Upon reinitialization, all internal buffered frames will be dropped.
- // 2) This method should not be called during pending decode, reset or stop.
- // 3) No VideoDecoder calls except for Stop() should be made before
- // |status_cb| is executed.
+ // 2) This method should not be called during pending decode or reset.
+ // 3) No VideoDecoder calls should be made before |status_cb| is executed.
virtual void Initialize(const VideoDecoderConfig& config,
bool low_delay,
const PipelineStatusCB& status_cb,
@@ -83,13 +87,6 @@ class MEDIA_EXPORT VideoDecoder {
// Note: No VideoDecoder calls should be made before |closure| is executed.
virtual void Reset(const base::Closure& closure) = 0;
- // 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() is pending or has finished successfully, Stop()
- // must be called before destructing the decoder.
- virtual void Stop() = 0;
-
// Returns true if the decoder needs bitstream conversion before decoding.
virtual bool NeedsBitstreamConversion() const;
« no previous file with comments | « media/base/mock_filters.h ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698