Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: webrtc/modules/video_coding/generic_encoder.cc

Issue 1642863003: Replace const-reference with pointer in SendData. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/include/video_coding_defines.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 RTPVideoHeader rtpVideoHeader; 279 RTPVideoHeader rtpVideoHeader;
280 memset(&rtpVideoHeader, 0, sizeof(RTPVideoHeader)); 280 memset(&rtpVideoHeader, 0, sizeof(RTPVideoHeader));
281 RTPVideoHeader* rtpVideoHeaderPtr = &rtpVideoHeader; 281 RTPVideoHeader* rtpVideoHeaderPtr = &rtpVideoHeader;
282 if (codecSpecificInfo) { 282 if (codecSpecificInfo) {
283 CopyCodecSpecific(codecSpecificInfo, rtpVideoHeaderPtr); 283 CopyCodecSpecific(codecSpecificInfo, rtpVideoHeaderPtr);
284 } 284 }
285 rtpVideoHeader.rotation = _rotation; 285 rtpVideoHeader.rotation = _rotation;
286 286
287 int32_t callbackReturn = send_callback_->SendData( 287 int32_t callbackReturn = send_callback_->SendData(
288 _payloadType, encoded_image, *fragmentationHeader, rtpVideoHeaderPtr); 288 _payloadType, encoded_image, fragmentationHeader, rtpVideoHeaderPtr);
289 if (callbackReturn < 0) { 289 if (callbackReturn < 0) {
290 return callbackReturn; 290 return callbackReturn;
291 } 291 }
292 292
293 if (_mediaOpt != NULL) { 293 if (_mediaOpt != NULL) {
294 _mediaOpt->UpdateWithEncodedData(encoded_image); 294 _mediaOpt->UpdateWithEncodedData(encoded_image);
295 if (_internalSource) 295 if (_internalSource)
296 return _mediaOpt->DropFrame(); // Signal to encoder to drop next frame. 296 return _mediaOpt->DropFrame(); // Signal to encoder to drop next frame.
297 } 297 }
298 return VCM_OK; 298 return VCM_OK;
299 } 299 }
300 300
301 void VCMEncodedFrameCallback::SetMediaOpt( 301 void VCMEncodedFrameCallback::SetMediaOpt(
302 media_optimization::MediaOptimization* mediaOpt) { 302 media_optimization::MediaOptimization* mediaOpt) {
303 _mediaOpt = mediaOpt; 303 _mediaOpt = mediaOpt;
304 } 304 }
305 305
306 void VCMEncodedFrameCallback::SignalLastEncoderImplementationUsed( 306 void VCMEncodedFrameCallback::SignalLastEncoderImplementationUsed(
307 const char* implementation_name) { 307 const char* implementation_name) {
308 if (send_callback_) 308 if (send_callback_)
309 send_callback_->OnEncoderImplementationName(implementation_name); 309 send_callback_->OnEncoderImplementationName(implementation_name);
310 } 310 }
311 311
312 } // namespace webrtc 312 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/include/video_coding_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698