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

Unified Diff: talk/app/webrtc/java/jni/androidmediaencoder_jni.cc

Issue 1291543006: Update Bind to match its comments and always capture by value. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed references to std::remove_reference (har har) Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
diff --git a/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc b/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
index 3bbf6827f52ded2a38f03c5f2bd91ce1cb1d8748..fed5746adb08e727d241f0ce9d3a0721580abb5b 100644
--- a/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
+++ b/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
@@ -119,7 +119,7 @@ class MediaCodecVideoEncoder : public webrtc::VideoEncoder,
// (makes it easier to reason about thread-safety).
int32_t InitEncodeOnCodecThread(int width, int height, int kbps, int fps);
int32_t EncodeOnCodecThread(
- const webrtc::VideoFrame& input_image,
+ const webrtc::VideoFrame* input_image,
magjed_webrtc 2015/10/23 05:17:01 Leave this unchanged - implicit copies of webrtc::
noahric 2015/10/23 06:02:16 SGTM. Done.
const std::vector<webrtc::FrameType>* frame_types);
int32_t RegisterEncodeCompleteCallbackOnCodecThread(
webrtc::EncodedImageCallback* callback);
@@ -339,7 +339,7 @@ int32_t MediaCodecVideoEncoder::Encode(
const webrtc::CodecSpecificInfo* /* codec_specific_info */,
const std::vector<webrtc::FrameType>* frame_types) {
return codec_thread_->Invoke<int32_t>(Bind(
- &MediaCodecVideoEncoder::EncodeOnCodecThread, this, frame, frame_types));
+ &MediaCodecVideoEncoder::EncodeOnCodecThread, this, &frame, frame_types));
}
int32_t MediaCodecVideoEncoder::RegisterEncodeCompleteCallback(
@@ -499,7 +499,7 @@ int32_t MediaCodecVideoEncoder::InitEncodeOnCodecThread(
}
int32_t MediaCodecVideoEncoder::EncodeOnCodecThread(
- const webrtc::VideoFrame& frame,
+ const webrtc::VideoFrame* frame,
const std::vector<webrtc::FrameType>* frame_types) {
CheckOnCodecThread();
JNIEnv* jni = AttachCurrentThreadIfNeeded();
@@ -523,10 +523,10 @@ int32_t MediaCodecVideoEncoder::EncodeOnCodecThread(
RTC_CHECK(frame_types->size() == 1) << "Unexpected stream count";
// Check framerate before spatial resolution change.
if (scale_)
- quality_scaler_.OnEncodeFrame(frame);
+ quality_scaler_.OnEncodeFrame(*frame);
const VideoFrame& input_frame =
- scale_ ? quality_scaler_.GetScaledFrame(frame) : frame;
+ scale_ ? quality_scaler_.GetScaledFrame(*frame) : *frame;
if (input_frame.width() != width_ || input_frame.height() != height_) {
ALOGD << "Frame resolution change from " << width_ << " x " << height_ <<

Powered by Google App Engine
This is Rietveld 408576698