Index: webrtc/api/java/jni/androidvideocapturer_jni.cc |
diff --git a/webrtc/api/java/jni/androidvideocapturer_jni.cc b/webrtc/api/java/jni/androidvideocapturer_jni.cc |
index 0e8e8677ab54955ae27a341a8492d83de64d1063..b90a96f53f8633f401a73584718848f4416fea7b 100644 |
--- a/webrtc/api/java/jni/androidvideocapturer_jni.cc |
+++ b/webrtc/api/java/jni/androidvideocapturer_jni.cc |
@@ -180,10 +180,12 @@ void AndroidVideoCapturerJni::OnMemoryBufferFrame(void* video_frame, |
int crop_height; |
int crop_x; |
int crop_y; |
+ int64_t time_us; |
pthatcher1
2016/05/27 22:47:43
Can you be a little more specific about what the t
nisse-webrtc
2016/05/30 08:57:29
I changed it to translated_capture_time_us. Better
|
if (!capturer_->AdaptFrame(width, height, timestamp_ns, |
&adapted_width, &adapted_height, |
- &crop_width, &crop_height, &crop_x, &crop_y)) { |
+ &crop_width, &crop_height, &crop_x, &crop_y, |
+ &time_us)) { |
return; |
} |
@@ -236,12 +238,12 @@ void AndroidVideoCapturerJni::OnMemoryBufferFrame(void* video_frame, |
} |
buffer = scaled; |
} |
- // TODO(nisse): Use microsecond time instead. |
capturer_->OnFrame(cricket::WebRtcVideoFrame( |
- buffer, timestamp_ns, |
+ buffer, |
capturer_->apply_rotation() |
? webrtc::kVideoRotation_0 |
- : static_cast<webrtc::VideoRotation>(rotation)), |
+ : static_cast<webrtc::VideoRotation>(rotation), |
+ time_us), |
width, height); |
} |
@@ -260,10 +262,12 @@ void AndroidVideoCapturerJni::OnTextureFrame(int width, |
int crop_height; |
int crop_x; |
int crop_y; |
+ int64_t time_us; |
if (!capturer_->AdaptFrame(width, height, timestamp_ns, |
&adapted_width, &adapted_height, |
- &crop_width, &crop_height, &crop_x, &crop_y)) { |
+ &crop_width, &crop_height, &crop_x, &crop_y, |
+ &time_us)) { |
return; |
} |
@@ -282,15 +286,15 @@ void AndroidVideoCapturerJni::OnTextureFrame(int width, |
matrix.Rotate(static_cast<webrtc::VideoRotation>(rotation)); |
} |
- // TODO(nisse): Use microsecond time instead. |
capturer_->OnFrame( |
cricket::WebRtcVideoFrame( |
surface_texture_helper_->CreateTextureFrame( |
adapted_width, adapted_height, |
NativeHandleImpl(handle.oes_texture_id, matrix)), |
- timestamp_ns, capturer_->apply_rotation() |
- ? webrtc::kVideoRotation_0 |
- : static_cast<webrtc::VideoRotation>(rotation)), |
+ capturer_->apply_rotation() |
+ ? webrtc::kVideoRotation_0 |
+ : static_cast<webrtc::VideoRotation>(rotation), |
+ time_us), |
width, height); |
} |