Commit 67aabc73 authored by James West's avatar James West Committed by Commit Bot

[Chromecast] Always require decryption for mixer backend

Bug: internal b/77551062
Test: manual
Change-Id: I95d6caa7c2d33c682d118cfa3c4096ac307886aa
Reviewed-on: https://chromium-review.googlesource.com/998836Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Commit-Queue: James West <jameswest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548582}
parent a0c28b8a
...@@ -57,6 +57,11 @@ const int64_t kNoPendingOutput = -1; ...@@ -57,6 +57,11 @@ const int64_t kNoPendingOutput = -1;
} // namespace } // namespace
// static
bool MediaPipelineBackend::AudioDecoder::RequiresDecryption() {
return true;
}
AudioDecoderForMixer::RateShifterInfo::RateShifterInfo(float playback_rate) AudioDecoderForMixer::RateShifterInfo::RateShifterInfo(float playback_rate)
: rate(playback_rate), input_frames(0), output_frames(0) {} : rate(playback_rate), input_frames(0), output_frames(0) {}
......
...@@ -107,7 +107,9 @@ void AudioDecoderWrapper::GetStatistics(Statistics* statistics) { ...@@ -107,7 +107,9 @@ void AudioDecoderWrapper::GetStatistics(Statistics* statistics) {
} }
bool AudioDecoderWrapper::RequiresDecryption() { bool AudioDecoderWrapper::RequiresDecryption() {
return decoder_.IsUsingSoftwareDecoder(); return (MediaPipelineBackend::AudioDecoder::RequiresDecryption &&
MediaPipelineBackend::AudioDecoder::RequiresDecryption()) ||
decoder_.IsUsingSoftwareDecoder();
} }
} // namespace media } // namespace media
......
...@@ -154,6 +154,11 @@ class MediaPipelineBackend { ...@@ -154,6 +154,11 @@ class MediaPipelineBackend {
static int64_t GetMinimumBufferedTime(const AudioConfig& config) static int64_t GetMinimumBufferedTime(const AudioConfig& config)
__attribute__((__weak__)); __attribute__((__weak__));
// Returns true if the audio decoder requires that encrypted buffers be
// decrypted before being passed to PushBuffer().
CHROMECAST_EXPORT static bool RequiresDecryption()
__attribute__((__weak__));
protected: protected:
~AudioDecoder() override {} ~AudioDecoder() override {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment