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

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

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 years, 6 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/data_source.h ('k') | media/filters/ffmpeg_glue.h » ('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_DEMUXER_H_ 5 #ifndef MEDIA_BASE_DEMUXER_H_
6 #define MEDIA_BASE_DEMUXER_H_ 6 #define MEDIA_BASE_DEMUXER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "media/base/data_source.h" 10 #include "media/base/data_source.h"
11 #include "media/base/demuxer_stream.h" 11 #include "media/base/demuxer_stream.h"
12 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
13 #include "media/base/pipeline_status.h" 13 #include "media/base/pipeline_status.h"
14 14
15 namespace media { 15 namespace media {
16 16
17 class MEDIA_EXPORT DemuxerHost : public DataSourceHost { 17 class MEDIA_EXPORT DemuxerHost : public DataSourceHost {
18 public: 18 public:
19 virtual ~DemuxerHost();
20
21 // Sets the duration of the media in microseconds. 19 // Sets the duration of the media in microseconds.
22 // Duration may be kInfiniteDuration() if the duration is not known. 20 // Duration may be kInfiniteDuration() if the duration is not known.
23 virtual void SetDuration(base::TimeDelta duration) = 0; 21 virtual void SetDuration(base::TimeDelta duration) = 0;
24 22
25 // Stops execution of the pipeline due to a fatal error. Do not call this 23 // Stops execution of the pipeline due to a fatal error. Do not call this
26 // method with PIPELINE_OK. 24 // method with PIPELINE_OK.
27 virtual void OnDemuxerError(PipelineStatus error) = 0; 25 virtual void OnDemuxerError(PipelineStatus error) = 0;
26
27 protected:
28 virtual ~DemuxerHost();
28 }; 29 };
29 30
30 class MEDIA_EXPORT Demuxer : public base::RefCountedThreadSafe<Demuxer> { 31 class MEDIA_EXPORT Demuxer : public base::RefCountedThreadSafe<Demuxer> {
31 public: 32 public:
32 Demuxer(); 33 Demuxer();
33 34
34 // Completes initialization of the demuxer. 35 // Completes initialization of the demuxer.
35 // 36 //
36 // The demuxer does not own |host| as it is guaranteed to outlive the 37 // The demuxer does not own |host| as it is guaranteed to outlive the
37 // lifetime of the demuxer. Don't delete it! 38 // lifetime of the demuxer. Don't delete it!
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 friend class base::RefCountedThreadSafe<Demuxer>; 72 friend class base::RefCountedThreadSafe<Demuxer>;
72 virtual ~Demuxer(); 73 virtual ~Demuxer();
73 74
74 private: 75 private:
75 DISALLOW_COPY_AND_ASSIGN(Demuxer); 76 DISALLOW_COPY_AND_ASSIGN(Demuxer);
76 }; 77 };
77 78
78 } // namespace media 79 } // namespace media
79 80
80 #endif // MEDIA_BASE_DEMUXER_H_ 81 #endif // MEDIA_BASE_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/base/data_source.h ('k') | media/filters/ffmpeg_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698