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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 output->assign(reinterpret_cast<const char*>(&bytes[0]), bytes.size()); | 64 output->assign(reinterpret_cast<const char*>(&bytes[0]), bytes.size()); |
65 return true; | 65 return true; |
66 } | 66 } |
67 } // namespace | 67 } // namespace |
68 | 68 |
69 bool ToCastRtpPayloadParamsOrThrow(v8::Isolate* isolate, | 69 bool ToCastRtpPayloadParamsOrThrow(v8::Isolate* isolate, |
70 const RtpPayloadParams& ext_params, | 70 const RtpPayloadParams& ext_params, |
71 CastRtpPayloadParams* cast_params) { | 71 CastRtpPayloadParams* cast_params) { |
72 cast_params->payload_type = ext_params.payload_type; | 72 cast_params->payload_type = ext_params.payload_type; |
73 cast_params->max_latency_ms = ext_params.max_latency; | 73 cast_params->max_latency_ms = ext_params.max_latency; |
| 74 cast_params->min_latency_ms = |
| 75 ext_params.min_latency ? *ext_params.min_latency : ext_params.max_latency; |
74 cast_params->codec_name = ext_params.codec_name; | 76 cast_params->codec_name = ext_params.codec_name; |
75 cast_params->ssrc = ext_params.ssrc; | 77 cast_params->ssrc = ext_params.ssrc; |
76 cast_params->feedback_ssrc = ext_params.feedback_ssrc; | 78 cast_params->feedback_ssrc = ext_params.feedback_ssrc; |
77 cast_params->clock_rate = ext_params.clock_rate ? *ext_params.clock_rate : 0; | 79 cast_params->clock_rate = ext_params.clock_rate ? *ext_params.clock_rate : 0; |
78 cast_params->min_bitrate = | 80 cast_params->min_bitrate = |
79 ext_params.min_bitrate ? *ext_params.min_bitrate : 0; | 81 ext_params.min_bitrate ? *ext_params.min_bitrate : 0; |
80 cast_params->max_bitrate = | 82 cast_params->max_bitrate = |
81 ext_params.max_bitrate ? *ext_params.max_bitrate : 0; | 83 ext_params.max_bitrate ? *ext_params.max_bitrate : 0; |
82 cast_params->channels = ext_params.channels ? *ext_params.channels : 0; | 84 cast_params->channels = ext_params.channels ? *ext_params.channels : 0; |
83 cast_params->max_frame_rate = | 85 cast_params->max_frame_rate = |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 transport_id); | 609 transport_id); |
608 if (iter != udp_transport_map_.end()) | 610 if (iter != udp_transport_map_.end()) |
609 return iter->second.get(); | 611 return iter->second.get(); |
610 v8::Isolate* isolate = context()->v8_context()->GetIsolate(); | 612 v8::Isolate* isolate = context()->v8_context()->GetIsolate(); |
611 isolate->ThrowException(v8::Exception::RangeError( | 613 isolate->ThrowException(v8::Exception::RangeError( |
612 v8::String::NewFromUtf8(isolate, kUdpTransportNotFound))); | 614 v8::String::NewFromUtf8(isolate, kUdpTransportNotFound))); |
613 return NULL; | 615 return NULL; |
614 } | 616 } |
615 | 617 |
616 } // namespace extensions | 618 } // namespace extensions |
OLD | NEW |