OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/renderer/extensions/cast_streaming_native_handler.h" | 5 #include "chrome/renderer/extensions/cast_streaming_native_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 scoped_refptr<media::AudioCapturerSource> audio, | 981 scoped_refptr<media::AudioCapturerSource> audio, |
982 std::unique_ptr<media::VideoCapturerSource> video) { | 982 std::unique_ptr<media::VideoCapturerSource> video) { |
983 blink::WebMediaStream web_stream = | 983 blink::WebMediaStream web_stream = |
984 blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); | 984 blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); |
985 if (web_stream.isNull()) { | 985 if (web_stream.isNull()) { |
986 LOG(DFATAL) << "Stream not found."; | 986 LOG(DFATAL) << "Stream not found."; |
987 return; | 987 return; |
988 } | 988 } |
989 if (!content::AddAudioTrackToMediaStream( | 989 if (!content::AddAudioTrackToMediaStream( |
990 audio, params.sample_rate(), params.channel_layout(), | 990 audio, params.sample_rate(), params.channel_layout(), |
991 params.frames_per_buffer(), &web_stream)) { | 991 params.frames_per_buffer(), true, // is_remote |
| 992 true, // is_readonly |
| 993 &web_stream)) { |
992 LOG(ERROR) << "Failed to add Cast audio track to media stream."; | 994 LOG(ERROR) << "Failed to add Cast audio track to media stream."; |
993 } | 995 } |
994 if (!content::AddVideoTrackToMediaStream(std::move(video), &web_stream)) { | 996 if (!content::AddVideoTrackToMediaStream(std::move(video), true, // is_remote |
| 997 true, // is_readonly |
| 998 &web_stream)) { |
995 LOG(ERROR) << "Failed to add Cast video track to media stream."; | 999 LOG(ERROR) << "Failed to add Cast video track to media stream."; |
996 } | 1000 } |
997 } | 1001 } |
998 | 1002 |
999 } // namespace extensions | 1003 } // namespace extensions |
OLD | NEW |