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

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

Issue 10918172: Remove VideoDecoder::PrepareForShutdownHack() and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/pipeline.cc ('k') | media/base/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_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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // Stop decoder and set it to an uninitialized state. Note that a VideoDecoder 58 // Stop decoder and set it to an uninitialized state. Note that a VideoDecoder
59 // should/could not be re-initialized after it has been stopped. 59 // should/could not be re-initialized after it has been stopped.
60 virtual void Stop(const base::Closure& closure) = 0; 60 virtual void Stop(const base::Closure& closure) = 0;
61 61
62 // Returns true if the output format has an alpha channel. Most formats do not 62 // Returns true if the output format has an alpha channel. Most formats do not
63 // have alpha so the default is false. Override and return true for decoders 63 // have alpha so the default is false. Override and return true for decoders
64 // that return formats with an alpha channel. 64 // that return formats with an alpha channel.
65 virtual bool HasAlpha() const; 65 virtual bool HasAlpha() const;
66 66
67 // Prepare decoder for shutdown. This is a HACK needed because
68 // PipelineImpl::Stop() goes through a Pause/Flush/Stop dance to all its
69 // filters, waiting for each state transition to complete before starting the
70 // next, but WebMediaPlayerImpl::Destroy() holds the renderer loop hostage for
71 // the duration. Default implementation does nothing; derived decoders may
72 // override as needed. http://crbug.com/110228 tracks removing this.
73 virtual void PrepareForShutdownHack();
74
75 protected: 67 protected:
76 friend class base::RefCountedThreadSafe<VideoDecoder>; 68 friend class base::RefCountedThreadSafe<VideoDecoder>;
77 virtual ~VideoDecoder(); 69 virtual ~VideoDecoder();
78 VideoDecoder(); 70 VideoDecoder();
79 71
80 DISALLOW_COPY_AND_ASSIGN(VideoDecoder); 72 DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
81 }; 73 };
82 74
83 } // namespace media 75 } // namespace media
84 76
85 #endif // MEDIA_BASE_VIDEO_DECODER_H_ 77 #endif // MEDIA_BASE_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/pipeline.cc ('k') | media/base/video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698