summaryrefslogtreecommitdiff
path: root/chromium/media/base/audio_decoder.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:20:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:28:57 +0000
commitd17ea114e5ef69ad5d5d7413280a13e6428098aa (patch)
tree2c01a75df69f30d27b1432467cfe7c1467a498da /chromium/media/base/audio_decoder.h
parent8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (diff)
downloadqtwebengine-chromium-d17ea114e5ef69ad5d5d7413280a13e6428098aa.tar.gz
BASELINE: Update Chromium to 67.0.3396.47
Change-Id: Idcb1341782e417561a2473eeecc82642dafda5b7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/media/base/audio_decoder.h')
-rw-r--r--chromium/media/base/audio_decoder.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/chromium/media/base/audio_decoder.h b/chromium/media/base/audio_decoder.h
index da477072233..d27cd16cfa9 100644
--- a/chromium/media/base/audio_decoder.h
+++ b/chromium/media/base/audio_decoder.h
@@ -25,15 +25,19 @@ class CdmContext;
class MEDIA_EXPORT AudioDecoder {
public:
// Callback for VideoDecoder initialization.
- typedef base::Callback<void(bool success)> InitCB;
+ using InitCB = base::Callback<void(bool success)>;
// Callback for AudioDecoder to return a decoded frame whenever it becomes
// available. Only non-EOS frames should be returned via this callback.
- typedef base::Callback<void(const scoped_refptr<AudioBuffer>&)> OutputCB;
+ using OutputCB = base::Callback<void(const scoped_refptr<AudioBuffer>&)>;
// Callback for Decode(). Called after the decoder has accepted corresponding
// DecoderBuffer, indicating that the pipeline can send next buffer to decode.
- typedef base::Callback<void(DecodeStatus)> DecodeCB;
+ using DecodeCB = base::Callback<void(DecodeStatus)>;
+
+ // Callback for whenever the key needed to decrypt the stream is not
+ // available. May be called at any time after Initialize().
+ using WaitingForDecryptionKeyCB = base::RepeatingClosure;
AudioDecoder();
@@ -57,10 +61,14 @@ class MEDIA_EXPORT AudioDecoder {
// stream is not encrypted.
// |init_cb| is used to return initialization status.
// |output_cb| is called for decoded audio buffers (see Decode()).
- virtual void Initialize(const AudioDecoderConfig& config,
- CdmContext* cdm_context,
- const InitCB& init_cb,
- const OutputCB& output_cb) = 0;
+ // |waiting_for_decryption_key_cb| is called whenever the key needed to
+ // decrypt the stream is not available.
+ virtual void Initialize(
+ const AudioDecoderConfig& config,
+ CdmContext* cdm_context,
+ const InitCB& init_cb,
+ const OutputCB& output_cb,
+ const WaitingForDecryptionKeyCB& waiting_for_decryption_key_cb) = 0;
// Requests samples to be decoded. Only one decode may be in flight at any
// given time. Once the buffer is decoded the decoder calls |decode_cb|.
@@ -73,7 +81,7 @@ class MEDIA_EXPORT AudioDecoder {
// If |buffer| is an EOS buffer then the decoder must be flushed, i.e.
// |output_cb| must be called for each frame pending in the queue and
// |decode_cb| must be called after that.
- virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
+ virtual void Decode(scoped_refptr<DecoderBuffer> buffer,
const DecodeCB& decode_cb) = 0;
// Resets decoder state. All pending Decode() requests will be finished or