| 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 <functional> | 7 #include <functional> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 &cast_codec_params); | 104 &cast_codec_params); |
| 105 cast_params->codec_specific_params.push_back(cast_codec_params); | 105 cast_params->codec_specific_params.push_back(cast_codec_params); |
| 106 } | 106 } |
| 107 return true; | 107 return true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 void FromCastRtpPayloadParams(const CastRtpPayloadParams& cast_params, | 110 void FromCastRtpPayloadParams(const CastRtpPayloadParams& cast_params, |
| 111 RtpPayloadParams* ext_params) { | 111 RtpPayloadParams* ext_params) { |
| 112 ext_params->payload_type = cast_params.payload_type; | 112 ext_params->payload_type = cast_params.payload_type; |
| 113 ext_params->max_latency = cast_params.max_latency_ms; | 113 ext_params->max_latency = cast_params.max_latency_ms; |
| 114 ext_params->min_latency.reset(new int(cast_params.min_latency_ms)); |
| 114 ext_params->codec_name = cast_params.codec_name; | 115 ext_params->codec_name = cast_params.codec_name; |
| 115 ext_params->ssrc = cast_params.ssrc; | 116 ext_params->ssrc = cast_params.ssrc; |
| 116 ext_params->feedback_ssrc = cast_params.feedback_ssrc; | 117 ext_params->feedback_ssrc = cast_params.feedback_ssrc; |
| 117 if (cast_params.clock_rate) | 118 if (cast_params.clock_rate) |
| 118 ext_params->clock_rate.reset(new int(cast_params.clock_rate)); | 119 ext_params->clock_rate.reset(new int(cast_params.clock_rate)); |
| 119 if (cast_params.min_bitrate) | 120 if (cast_params.min_bitrate) |
| 120 ext_params->min_bitrate.reset(new int(cast_params.min_bitrate)); | 121 ext_params->min_bitrate.reset(new int(cast_params.min_bitrate)); |
| 121 if (cast_params.max_bitrate) | 122 if (cast_params.max_bitrate) |
| 122 ext_params->max_bitrate.reset(new int(cast_params.max_bitrate)); | 123 ext_params->max_bitrate.reset(new int(cast_params.max_bitrate)); |
| 123 if (cast_params.channels) | 124 if (cast_params.channels) |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 transport_id); | 610 transport_id); |
| 610 if (iter != udp_transport_map_.end()) | 611 if (iter != udp_transport_map_.end()) |
| 611 return iter->second.get(); | 612 return iter->second.get(); |
| 612 v8::Isolate* isolate = context()->v8_context()->GetIsolate(); | 613 v8::Isolate* isolate = context()->v8_context()->GetIsolate(); |
| 613 isolate->ThrowException(v8::Exception::RangeError( | 614 isolate->ThrowException(v8::Exception::RangeError( |
| 614 v8::String::NewFromUtf8(isolate, kUdpTransportNotFound))); | 615 v8::String::NewFromUtf8(isolate, kUdpTransportNotFound))); |
| 615 return NULL; | 616 return NULL; |
| 616 } | 617 } |
| 617 | 618 |
| 618 } // namespace extensions | 619 } // namespace extensions |
| OLD | NEW |