| Index: chrome/renderer/extensions/cast_streaming_native_handler.cc
|
| diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.cc b/chrome/renderer/extensions/cast_streaming_native_handler.cc
|
| index 72bf8059c1c19c28ef501d705914fc307db6dafc..23ff219654c86eb48896a41f7e47423b95d36ea7 100644
|
| --- a/chrome/renderer/extensions/cast_streaming_native_handler.cc
|
| +++ b/chrome/renderer/extensions/cast_streaming_native_handler.cc
|
| @@ -802,9 +802,10 @@
|
|
|
| media::AudioParameters params(
|
| media::AudioParameters::AUDIO_PCM_LINEAR,
|
| - media::GuessChannelLayout(audio_config.channels),
|
| + media::CHANNEL_LAYOUT_STEREO,
|
| audio_config.rtp_timebase, // sampling rate
|
| - 16, audio_config.rtp_timebase / audio_config.target_frame_rate);
|
| + 16,
|
| + audio_config.rtp_timebase / audio_config.target_frame_rate);
|
|
|
| if (!params.IsValid()) {
|
| args.GetIsolate()->ThrowException(v8::Exception::TypeError(
|
| @@ -862,24 +863,8 @@
|
| const media::AudioParameters& params,
|
| scoped_refptr<media::AudioCapturerSource> audio,
|
| scoped_ptr<media::VideoCapturerSource> video) {
|
| - blink::WebMediaStream web_stream =
|
| - blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url));
|
| - if (web_stream.isNull()) {
|
| - LOG(DFATAL) << "Stream not found.";
|
| - return;
|
| - }
|
| - if (!content::AddAudioTrackToMediaStream(
|
| - audio, params.sample_rate(), params.channel_layout(),
|
| - params.frames_per_buffer(), true, // is_remote
|
| - true, // is_readonly
|
| - &web_stream)) {
|
| - LOG(ERROR) << "Failed to add Cast audio track to media stream.";
|
| - }
|
| - if (!content::AddVideoTrackToMediaStream(std::move(video), true, // is_remote
|
| - true, // is_readonly
|
| - &web_stream)) {
|
| - LOG(ERROR) << "Failed to add Cast video track to media stream.";
|
| - }
|
| + content::AddAudioTrackToMediaStream(audio, params, true, true, url);
|
| + content::AddVideoTrackToMediaStream(std::move(video), true, true, url);
|
| }
|
|
|
| } // namespace extensions
|
|
|