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

Unified Diff: webrtc/api/android/jni/androidvideotracksource.cc

Issue 2514383002: Move androidvideotracksource from api under api/android/jni. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/android/jni/androidvideotracksource.cc
diff --git a/webrtc/api/androidvideotracksource.cc b/webrtc/api/android/jni/androidvideotracksource.cc
similarity index 89%
rename from webrtc/api/androidvideotracksource.cc
rename to webrtc/api/android/jni/androidvideotracksource.cc
index 947311a83ea586bb7930572cd842e593b91175c8..4f708a6b4f7cb5d9d1bb59a957c0c4f4bc7c6f8b 100644
--- a/webrtc/api/androidvideotracksource.cc
+++ b/webrtc/api/android/jni/androidvideotracksource.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/api/androidvideotracksource.h"
+#include "webrtc/api/android/jni/androidvideotracksource.h"
#include <utility>
@@ -63,9 +63,9 @@ void AndroidVideoTrackSource::OnByteBufferFrameCaptured(const void* frame_data,
int crop_x;
int crop_y;
- if (!AdaptFrame(width, height, camera_time_us,
- &adapted_width, &adapted_height, &crop_width, &crop_height,
- &crop_x, &crop_y)) {
+ if (!AdaptFrame(width, height, camera_time_us, &adapted_width,
+ &adapted_height, &crop_width, &crop_height, &crop_x,
+ &crop_y)) {
return;
}
@@ -86,14 +86,11 @@ void AndroidVideoTrackSource::OnByteBufferFrameCaptured(const void* frame_data,
buffer_pool_.CreateBuffer(adapted_width, adapted_height);
nv12toi420_scaler_.NV12ToI420Scale(
- y_plane, width,
- uv_plane, uv_width * 2,
- crop_width, crop_height,
+ y_plane, width, uv_plane, uv_width * 2, crop_width, crop_height,
buffer->MutableDataY(), buffer->StrideY(),
// Swap U and V, since we have NV21, not NV12.
- buffer->MutableDataV(), buffer->StrideV(),
- buffer->MutableDataU(), buffer->StrideU(),
- buffer->width(), buffer->height());
+ buffer->MutableDataV(), buffer->StrideV(), buffer->MutableDataU(),
+ buffer->StrideU(), buffer->width(), buffer->height());
OnFrame(VideoFrame(buffer, static_cast<webrtc::VideoRotation>(rotation),
translated_camera_time_us));
@@ -120,9 +117,9 @@ void AndroidVideoTrackSource::OnTextureFrameCaptured(
int crop_x;
int crop_y;
- if (!AdaptFrame(width, height, camera_time_us,
- &adapted_width, &adapted_height, &crop_width, &crop_height,
- &crop_x, &crop_y)) {
+ if (!AdaptFrame(width, height, camera_time_us, &adapted_width,
+ &adapted_height, &crop_width, &crop_height, &crop_x,
+ &crop_y)) {
surface_texture_helper_->ReturnTextureFrame();
return;
}
« no previous file with comments | « webrtc/api/android/jni/androidvideotracksource.h ('k') | webrtc/api/android/jni/androidvideotracksource_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698