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

Side by Side Diff: talk/app/webrtc/java/jni/androidmediaencoder_jni.cc

Issue 1426033002: MediaCodecVideoEncoder: Add number of quality resolution downscales to Encoded callback. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | 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 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 if (callback_) { 765 if (callback_) {
766 scoped_ptr<webrtc::EncodedImage> image( 766 scoped_ptr<webrtc::EncodedImage> image(
767 new webrtc::EncodedImage(payload, payload_size, payload_size)); 767 new webrtc::EncodedImage(payload, payload_size, payload_size));
768 image->_encodedWidth = width_; 768 image->_encodedWidth = width_;
769 image->_encodedHeight = height_; 769 image->_encodedHeight = height_;
770 image->_timeStamp = output_timestamp_; 770 image->_timeStamp = output_timestamp_;
771 image->capture_time_ms_ = output_render_time_ms_; 771 image->capture_time_ms_ = output_render_time_ms_;
772 image->_frameType = 772 image->_frameType =
773 (key_frame ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta); 773 (key_frame ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta);
774 image->_completeFrame = true; 774 image->_completeFrame = true;
775 image->adapt_reason_.quality_resolution_downscales =
776 scale_ ? quality_scaler_.downscale_shift() : -1;
775 777
776 webrtc::CodecSpecificInfo info; 778 webrtc::CodecSpecificInfo info;
777 memset(&info, 0, sizeof(info)); 779 memset(&info, 0, sizeof(info));
778 info.codecType = codecType_; 780 info.codecType = codecType_;
779 if (codecType_ == kVideoCodecVP8) { 781 if (codecType_ == kVideoCodecVP8) {
780 info.codecSpecific.VP8.pictureId = picture_id_; 782 info.codecSpecific.VP8.pictureId = picture_id_;
781 info.codecSpecific.VP8.nonReference = false; 783 info.codecSpecific.VP8.nonReference = false;
782 info.codecSpecific.VP8.simulcastIdx = 0; 784 info.codecSpecific.VP8.simulcastIdx = 0;
783 info.codecSpecific.VP8.temporalIdx = webrtc::kNoTemporalIdx; 785 info.codecSpecific.VP8.temporalIdx = webrtc::kNoTemporalIdx;
784 info.codecSpecific.VP8.layerSync = false; 786 info.codecSpecific.VP8.layerSync = false;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 958 }
957 959
958 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( 960 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
959 webrtc::VideoEncoder* encoder) { 961 webrtc::VideoEncoder* encoder) {
960 ALOGD << "Destroy video encoder."; 962 ALOGD << "Destroy video encoder.";
961 delete encoder; 963 delete encoder;
962 } 964 }
963 965
964 } // namespace webrtc_jni 966 } // namespace webrtc_jni
965 967
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698