Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/protocol/webrtc_transport.h" | 5 #include "remoting/protocol/webrtc_transport.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 // frames to webrtc. | 73 // frames to webrtc. |
| 74 if (sdp_message->has_video() && | 74 if (sdp_message->has_video() && |
| 75 !sdp_message->AddCodecParameter( | 75 !sdp_message->AddCodecParameter( |
| 76 "VP8", "x-google-min-bitrate=1000; x-google-max-bitrate=100000")) { | 76 "VP8", "x-google-min-bitrate=1000; x-google-max-bitrate=100000")) { |
| 77 if (incoming) { | 77 if (incoming) { |
| 78 LOG(WARNING) << "VP8 not found in an incoming SDP."; | 78 LOG(WARNING) << "VP8 not found in an incoming SDP."; |
| 79 } else { | 79 } else { |
| 80 LOG(FATAL) << "VP8 not found in SDP generated by WebRTC."; | 80 LOG(FATAL) << "VP8 not found in SDP generated by WebRTC."; |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 if (sdp_message->has_video() && | |
| 84 !sdp_message->AddCodecParameter( | |
| 85 "VP9", "x-google-min-bitrate=1000; x-google-max-bitrate=100000")) { | |
| 86 if (incoming) { | |
| 87 LOG(WARNING) << "VP9 not found in an incoming SDP."; | |
|
Sergey Ulanov
2017/03/31 19:23:11
I think we should log this message only of neither
Yuwei
2017/04/03 22:29:10
Done.
| |
| 88 } else { | |
| 89 LOG(FATAL) << "VP9 not found in SDP generated by WebRTC."; | |
| 90 } | |
| 91 } | |
| 83 | 92 |
| 84 // Update SDP format to use 160kbps stereo for opus codec. | 93 // Update SDP format to use 160kbps stereo for opus codec. |
| 85 if (sdp_message->has_audio() && | 94 if (sdp_message->has_audio() && |
| 86 !sdp_message->AddCodecParameter("opus", | 95 !sdp_message->AddCodecParameter("opus", |
| 87 "stereo=1; maxaveragebitrate=163840")) { | 96 "stereo=1; maxaveragebitrate=163840")) { |
| 88 if (incoming) { | 97 if (incoming) { |
| 89 LOG(WARNING) << "Opus not found in an incoming SDP."; | 98 LOG(WARNING) << "Opus not found in an incoming SDP."; |
| 90 } else { | 99 } else { |
| 91 LOG(FATAL) << "Opus not found in SDP generated by WebRTC."; | 100 LOG(FATAL) << "Opus not found in SDP generated by WebRTC."; |
| 92 } | 101 } |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 714 // the stack and so it must be destroyed later. | 723 // the stack and so it must be destroyed later. |
| 715 base::ThreadTaskRunnerHandle::Get()->DeleteSoon( | 724 base::ThreadTaskRunnerHandle::Get()->DeleteSoon( |
| 716 FROM_HERE, peer_connection_wrapper_.release()); | 725 FROM_HERE, peer_connection_wrapper_.release()); |
| 717 | 726 |
| 718 if (error != OK) | 727 if (error != OK) |
| 719 event_handler_->OnWebrtcTransportError(error); | 728 event_handler_->OnWebrtcTransportError(error); |
| 720 } | 729 } |
| 721 | 730 |
| 722 } // namespace protocol | 731 } // namespace protocol |
| 723 } // namespace remoting | 732 } // namespace remoting |
| OLD | NEW |