OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 rate_observer_(rate_observer), | 102 rate_observer_(rate_observer), |
103 vcm_encoded_frame_callback_(encoded_frame_callback), | 103 vcm_encoded_frame_callback_(encoded_frame_callback), |
104 internal_source_(internalSource), | 104 internal_source_(internalSource), |
105 encoder_params_({0, 0, 0, 0}), | 105 encoder_params_({0, 0, 0, 0}), |
106 rotation_(kVideoRotation_0), | 106 rotation_(kVideoRotation_0), |
107 is_screenshare_(false) {} | 107 is_screenshare_(false) {} |
108 | 108 |
109 VCMGenericEncoder::~VCMGenericEncoder() {} | 109 VCMGenericEncoder::~VCMGenericEncoder() {} |
110 | 110 |
111 int32_t VCMGenericEncoder::Release() { | 111 int32_t VCMGenericEncoder::Release() { |
| 112 TRACE_EVENT0("webrtc", "VCMGenericEncoder::Release"); |
112 return encoder_->Release(); | 113 return encoder_->Release(); |
113 } | 114 } |
114 | 115 |
115 int32_t VCMGenericEncoder::InitEncode(const VideoCodec* settings, | 116 int32_t VCMGenericEncoder::InitEncode(const VideoCodec* settings, |
116 int32_t numberOfCores, | 117 int32_t numberOfCores, |
117 size_t maxPayloadSize) { | 118 size_t maxPayloadSize) { |
118 TRACE_EVENT0("webrtc", "VCMGenericEncoder::InitEncode"); | 119 TRACE_EVENT0("webrtc", "VCMGenericEncoder::InitEncode"); |
119 { | 120 { |
120 rtc::CritScope lock(¶ms_lock_); | 121 rtc::CritScope lock(¶ms_lock_); |
121 encoder_params_.target_bitrate = settings->startBitrate * 1000; | 122 encoder_params_.target_bitrate = settings->startBitrate * 1000; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 _mediaOpt = mediaOpt; | 303 _mediaOpt = mediaOpt; |
303 } | 304 } |
304 | 305 |
305 void VCMEncodedFrameCallback::SignalLastEncoderImplementationUsed( | 306 void VCMEncodedFrameCallback::SignalLastEncoderImplementationUsed( |
306 const char* implementation_name) { | 307 const char* implementation_name) { |
307 if (send_callback_) | 308 if (send_callback_) |
308 send_callback_->OnEncoderImplementationName(implementation_name); | 309 send_callback_->OnEncoderImplementationName(implementation_name); |
309 } | 310 } |
310 | 311 |
311 } // namespace webrtc | 312 } // namespace webrtc |
OLD | NEW |