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

Side by Side Diff: media/filters/decrypting_demuxer_stream.h

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ 5 #ifndef MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_
6 #define MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ 6 #define MEDIA_FILTERS_DECRYPTING_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 "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending 42 // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending
43 // operation to finish before satisfying |closure|. Sets the state to 43 // operation to finish before satisfying |closure|. Sets the state to
44 // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise. 44 // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise.
45 void Reset(const base::Closure& closure); 45 void Reset(const base::Closure& closure);
46 46
47 // DemuxerStream implementation. 47 // DemuxerStream implementation.
48 void Read(const ReadCB& read_cb) override; 48 void Read(const ReadCB& read_cb) override;
49 AudioDecoderConfig audio_decoder_config() override; 49 AudioDecoderConfig audio_decoder_config() override;
50 VideoDecoderConfig video_decoder_config() override; 50 VideoDecoderConfig video_decoder_config() override;
51 Type type() override; 51 Type type() override;
52 Liveness liveness() override;
52 void EnableBitstreamConverter() override; 53 void EnableBitstreamConverter() override;
53 bool SupportsConfigChanges() override; 54 bool SupportsConfigChanges() override;
54 VideoRotation video_rotation() override; 55 VideoRotation video_rotation() override;
55 56
56 private: 57 private:
57 // For a detailed state diagram please see this link: http://goo.gl/8jAok 58 // For a detailed state diagram please see this link: http://goo.gl/8jAok
58 // TODO(xhwang): Add a ASCII state diagram in this file after this class 59 // TODO(xhwang): Add a ASCII state diagram in this file after this class
59 // stabilizes. 60 // stabilizes.
60 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream. 61 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream.
61 enum State { 62 enum State {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // NOTE: Weak pointers must be invalidated before all other member variables. 128 // NOTE: Weak pointers must be invalidated before all other member variables.
128 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; 129 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_;
129 base::WeakPtr<DecryptingDemuxerStream> weak_this_; 130 base::WeakPtr<DecryptingDemuxerStream> weak_this_;
130 131
131 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); 132 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream);
132 }; 133 };
133 134
134 } // namespace media 135 } // namespace media
135 136
136 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ 137 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698