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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix android CE Created 3 years, 8 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 RTC_DCHECK_LE(encoded_image_._length, encoded_image_._size); 696 RTC_DCHECK_LE(encoded_image_._length, encoded_image_._size);
697 697
698 CodecSpecificInfo codec_specific; 698 CodecSpecificInfo codec_specific;
699 PopulateCodecSpecific(&codec_specific, *pkt, input_image_->timestamp()); 699 PopulateCodecSpecific(&codec_specific, *pkt, input_image_->timestamp());
700 700
701 if (encoded_image_._length > 0) { 701 if (encoded_image_._length > 0) {
702 TRACE_COUNTER1("webrtc", "EncodedFrameSize", encoded_image_._length); 702 TRACE_COUNTER1("webrtc", "EncodedFrameSize", encoded_image_._length);
703 encoded_image_._timeStamp = input_image_->timestamp(); 703 encoded_image_._timeStamp = input_image_->timestamp();
704 encoded_image_.capture_time_ms_ = input_image_->render_time_ms(); 704 encoded_image_.capture_time_ms_ = input_image_->render_time_ms();
705 encoded_image_.rotation_ = input_image_->rotation(); 705 encoded_image_.rotation_ = input_image_->rotation();
706 if (codec_.mode == kScreensharing)
707 encoded_image_.content_type_ = VideoContentType::kScreenshare;
708 else
709 encoded_image_.content_type_ = VideoContentType::kDefault;
706 encoded_image_._encodedHeight = raw_->d_h; 710 encoded_image_._encodedHeight = raw_->d_h;
707 encoded_image_._encodedWidth = raw_->d_w; 711 encoded_image_._encodedWidth = raw_->d_w;
708 int qp = -1; 712 int qp = -1;
709 vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp); 713 vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp);
710 encoded_image_.qp_ = qp; 714 encoded_image_.qp_ = qp;
711 encoded_complete_callback_->OnEncodedImage(encoded_image_, &codec_specific, 715 encoded_complete_callback_->OnEncodedImage(encoded_image_, &codec_specific,
712 &frag_info); 716 &frag_info);
713 } 717 }
714 return WEBRTC_VIDEO_CODEC_OK; 718 return WEBRTC_VIDEO_CODEC_OK;
715 } 719 }
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 frame_buffer_pool_.ClearPool(); 1006 frame_buffer_pool_.ClearPool();
1003 inited_ = false; 1007 inited_ = false;
1004 return WEBRTC_VIDEO_CODEC_OK; 1008 return WEBRTC_VIDEO_CODEC_OK;
1005 } 1009 }
1006 1010
1007 const char* VP9DecoderImpl::ImplementationName() const { 1011 const char* VP9DecoderImpl::ImplementationName() const {
1008 return "libvpx"; 1012 return "libvpx";
1009 } 1013 }
1010 1014
1011 } // namespace webrtc 1015 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698