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

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

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Set EncodedImage content_type from vie_encoder Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 !_encoder->SupportsNativeHandle()) { 330 !_encoder->SupportsNativeHandle()) {
331 // This module only supports software encoding. 331 // This module only supports software encoding.
332 // TODO(pbos): Offload conversion from the encoder thread. 332 // TODO(pbos): Offload conversion from the encoder thread.
333 rtc::scoped_refptr<VideoFrameBuffer> converted_buffer( 333 rtc::scoped_refptr<VideoFrameBuffer> converted_buffer(
334 converted_frame.video_frame_buffer()->NativeToI420Buffer()); 334 converted_frame.video_frame_buffer()->NativeToI420Buffer());
335 335
336 if (!converted_buffer) { 336 if (!converted_buffer) {
337 LOG(LS_ERROR) << "Frame conversion failed, dropping frame."; 337 LOG(LS_ERROR) << "Frame conversion failed, dropping frame.";
338 return VCM_PARAMETER_ERROR; 338 return VCM_PARAMETER_ERROR;
339 } 339 }
340 converted_frame = VideoFrame(converted_buffer, 340 converted_frame =
341 converted_frame.timestamp(), 341 VideoFrame(converted_buffer, converted_frame.timestamp(),
342 converted_frame.render_time_ms(), 342 converted_frame.render_time_ms(), converted_frame.rotation(),
343 converted_frame.rotation()); 343 converted_frame.content_type());
344 } 344 }
345 int32_t ret = 345 int32_t ret =
346 _encoder->Encode(converted_frame, codecSpecificInfo, next_frame_types); 346 _encoder->Encode(converted_frame, codecSpecificInfo, next_frame_types);
347 if (ret < 0) { 347 if (ret < 0) {
348 LOG(LS_ERROR) << "Failed to encode frame. Error code: " << ret; 348 LOG(LS_ERROR) << "Failed to encode frame. Error code: " << ret;
349 return ret; 349 return ret;
350 } 350 }
351 351
352 { 352 {
353 rtc::CritScope lock(&params_crit_); 353 rtc::CritScope lock(&params_crit_);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 393 }
394 394
395 int32_t VideoSender::EnableFrameDropper(bool enable) { 395 int32_t VideoSender::EnableFrameDropper(bool enable) {
396 rtc::CritScope lock(&encoder_crit_); 396 rtc::CritScope lock(&encoder_crit_);
397 frame_dropper_enabled_ = enable; 397 frame_dropper_enabled_ = enable;
398 _mediaOpt.EnableFrameDropper(enable); 398 _mediaOpt.EnableFrameDropper(enable);
399 return VCM_OK; 399 return VCM_OK;
400 } 400 }
401 } // namespace vcm 401 } // namespace vcm
402 } // namespace webrtc 402 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698