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

Unified Diff: media/cast/receiver/audio_decoder.cc

Issue 308043006: [Cast] Clean-up: Merge RtpReceiver+AudioReceiver+VideoReceiver-->FrameReceiver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed hclam's comments. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/receiver/audio_decoder.h ('k') | media/cast/receiver/audio_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/receiver/audio_decoder.cc
diff --git a/media/cast/audio_receiver/audio_decoder.cc b/media/cast/receiver/audio_decoder.cc
similarity index 95%
rename from media/cast/audio_receiver/audio_decoder.cc
rename to media/cast/receiver/audio_decoder.cc
index e4e9a1453eb68d71b96cb90a560de9698e97e874..de6ced56984454ad4949ed84e0e0d3a68157560b 100644
--- a/media/cast/audio_receiver/audio_decoder.cc
+++ b/media/cast/receiver/audio_decoder.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "media/cast/audio_receiver/audio_decoder.h"
+#include "media/cast/receiver/audio_decoder.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -200,18 +200,16 @@ class AudioDecoder::Pcm16Impl : public AudioDecoder::ImplBase {
AudioDecoder::AudioDecoder(
const scoped_refptr<CastEnvironment>& cast_environment,
- const FrameReceiverConfig& audio_config)
+ int channels,
+ int sampling_rate,
+ transport::AudioCodec codec)
: cast_environment_(cast_environment) {
- switch (audio_config.codec.audio) {
+ switch (codec) {
case transport::kOpus:
- impl_ = new OpusImpl(cast_environment,
- audio_config.channels,
- audio_config.frequency);
+ impl_ = new OpusImpl(cast_environment, channels, sampling_rate);
break;
case transport::kPcm16:
- impl_ = new Pcm16Impl(cast_environment,
- audio_config.channels,
- audio_config.frequency);
+ impl_ = new Pcm16Impl(cast_environment, channels, sampling_rate);
break;
default:
NOTREACHED() << "Unknown or unspecified codec.";
« no previous file with comments | « media/cast/receiver/audio_decoder.h ('k') | media/cast/receiver/audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698