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

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

Issue 13813016: Remove reference counting from media::Demuxer and friends. (Closed) Base URL: http://git.chromium.org/chromium/src.git@vd_scoped
Patch Set: 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
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_STREAM_H_ 5 #ifndef MEDIA_BASE_DEMUXER_STREAM_H_
6 #define MEDIA_BASE_DEMUXER_STREAM_H_ 6 #define MEDIA_BASE_DEMUXER_STREAM_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/media_export.h" 10 #include "media/base/media_export.h"
11 #include "media/base/ranges.h" 11 #include "media/base/ranges.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 class AudioDecoderConfig; 15 class AudioDecoderConfig;
16 class DecoderBuffer; 16 class DecoderBuffer;
17 class VideoDecoderConfig; 17 class VideoDecoderConfig;
18 18
19 class MEDIA_EXPORT DemuxerStream 19 class MEDIA_EXPORT DemuxerStream {
20 : public base::RefCountedThreadSafe<DemuxerStream> {
21 public: 20 public:
22 enum Type { 21 enum Type {
23 UNKNOWN, 22 UNKNOWN,
24 AUDIO, 23 AUDIO,
25 VIDEO, 24 VIDEO,
26 NUM_TYPES, // Always keep this entry as the last one! 25 NUM_TYPES, // Always keep this entry as the last one!
27 }; 26 };
28 27
29 // Status returned in the Read() callback. 28 // Status returned in the Read() callback.
30 // kOk : Indicates the second parameter is Non-NULL and contains media data 29 // kOk : Indicates the second parameter is Non-NULL and contains media data
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Returns the video decoder configuration. It is an error to call this method 62 // Returns the video decoder configuration. It is an error to call this method
64 // if type() != VIDEO. 63 // if type() != VIDEO.
65 virtual const VideoDecoderConfig& video_decoder_config() = 0; 64 virtual const VideoDecoderConfig& video_decoder_config() = 0;
66 65
67 // Returns the type of stream. 66 // Returns the type of stream.
68 virtual Type type() = 0; 67 virtual Type type() = 0;
69 68
70 virtual void EnableBitstreamConverter() = 0; 69 virtual void EnableBitstreamConverter() = 0;
71 70
72 protected: 71 protected:
73 friend class base::RefCountedThreadSafe<DemuxerStream>; 72 // Only allow concrete implementations to get deleted.
74 virtual ~DemuxerStream(); 73 virtual ~DemuxerStream();
75 }; 74 };
76 75
77 } // namespace media 76 } // namespace media
78 77
79 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ 78 #endif // MEDIA_BASE_DEMUXER_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698