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

Side by Side Diff: media/filters/decrypting_audio_decoder.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: const & 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_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_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 "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 kUninitialized = 0, 59 kUninitialized = 0,
60 kDecryptorRequested, 60 kDecryptorRequested,
61 kPendingDecoderInit, 61 kPendingDecoderInit,
62 kIdle, 62 kIdle,
63 kPendingDecode, 63 kPendingDecode,
64 kWaitingForKey, 64 kWaitingForKey,
65 kDecodeFinished, 65 kDecodeFinished,
66 kError 66 kError
67 }; 67 };
68 68
69 // Callback for DecryptorHost::RequestDecryptor(). 69 // Callback for DecryptorHost::RequestDecryptor(). |done_cb| is called when
70 void SetDecryptor(Decryptor* decryptor); 70 // complete.
ddorwin 2014/07/30 22:35:46 ditto
71 void SetDecryptor(Decryptor* decryptor, const base::Closure& done_cb);
ddorwin 2014/07/30 22:35:46 nit: That might also lead to a better name for |do
jrummell 2014/08/01 22:09:42 Acknowledged.
71 72
72 // Initializes the audio decoder on the |decryptor_| with |config_|. 73 // Initializes the audio decoder on the |decryptor_| with |config_|.
73 void InitializeDecoder(); 74 void InitializeDecoder();
74 75
75 // Callback for Decryptor::InitializeAudioDecoder() during initialization. 76 // Callback for Decryptor::InitializeAudioDecoder() during initialization.
76 void FinishInitialization(bool success); 77 void FinishInitialization(bool success);
77 78
78 void DecodePendingBuffer(); 79 void DecodePendingBuffer();
79 80
80 // Callback for Decryptor::DecryptAndDecodeAudio(). 81 // Callback for Decryptor::DecryptAndDecodeAudio().
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // NOTE: Weak pointers must be invalidated before all other member variables. 125 // NOTE: Weak pointers must be invalidated before all other member variables.
125 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; 126 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_;
126 base::WeakPtr<DecryptingAudioDecoder> weak_this_; 127 base::WeakPtr<DecryptingAudioDecoder> weak_this_;
127 128
128 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); 129 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder);
129 }; 130 };
130 131
131 } // namespace media 132 } // namespace media
132 133
133 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ 134 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698