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

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

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + android tweaks Created 6 years, 4 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_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream. 60 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream.
61 enum State { 61 enum State {
62 kUninitialized = 0, 62 kUninitialized = 0,
63 kDecryptorRequested, 63 kDecryptorRequested,
64 kIdle, 64 kIdle,
65 kPendingDemuxerRead, 65 kPendingDemuxerRead,
66 kPendingDecrypt, 66 kPendingDecrypt,
67 kWaitingForKey 67 kWaitingForKey
68 }; 68 };
69 69
70 // Callback for DecryptorHost::RequestDecryptor(). 70 // Callback for DecryptorHost::RequestDecryptor(). |decryptor_attached_cb| is
71 void SetDecryptor(Decryptor* decryptor); 71 // called when the decryptor has been completely attached to the pipeline.
72 void SetDecryptor(Decryptor* decryptor,
73 const DecryptorAttachedCB& decryptor_attached_cb);
72 74
73 // Callback for DemuxerStream::Read(). 75 // Callback for DemuxerStream::Read().
74 void DecryptBuffer(DemuxerStream::Status status, 76 void DecryptBuffer(DemuxerStream::Status status,
75 const scoped_refptr<DecoderBuffer>& buffer); 77 const scoped_refptr<DecoderBuffer>& buffer);
76 78
77 void DecryptPendingBuffer(); 79 void DecryptPendingBuffer();
78 80
79 // Callback for Decryptor::Decrypt(). 81 // Callback for Decryptor::Decrypt().
80 void DeliverBuffer(Decryptor::Status status, 82 void DeliverBuffer(Decryptor::Status status,
81 const scoped_refptr<DecoderBuffer>& decrypted_buffer); 83 const scoped_refptr<DecoderBuffer>& decrypted_buffer);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // NOTE: Weak pointers must be invalidated before all other member variables. 127 // NOTE: Weak pointers must be invalidated before all other member variables.
126 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; 128 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_;
127 base::WeakPtr<DecryptingDemuxerStream> weak_this_; 129 base::WeakPtr<DecryptingDemuxerStream> weak_this_;
128 130
129 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); 131 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream);
130 }; 132 };
131 133
132 } // namespace media 134 } // namespace media
133 135
134 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ 136 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_
OLDNEW
« no previous file with comments | « media/filters/decrypting_audio_decoder_unittest.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698