Move androidvideotracksource from api under api/android/jni.

This file fits there more naturally since it has dependencies to jni.

BUG=None

Review-Url: https://codereview.webrtc.org/2514383002
Cr-Commit-Position: refs/heads/master@{#15179}
This commit is contained in:
sakal 2016-11-22 01:26:16 -08:00 committed by Commit bot
parent f72331205d
commit 0ce6aafc32
7 changed files with 18 additions and 22 deletions

View File

@ -179,6 +179,8 @@ if (is_android && !build_with_chromium) {
"android/jni/androidmetrics_jni.cc",
"android/jni/androidnetworkmonitor_jni.cc",
"android/jni/androidnetworkmonitor_jni.h",
"android/jni/androidvideotracksource.cc",
"android/jni/androidvideotracksource.h",
"android/jni/androidvideotracksource_jni.cc",
"android/jni/classreferenceholder.cc",
"android/jni/classreferenceholder.h",
@ -189,8 +191,6 @@ if (is_android && !build_with_chromium) {
"android/jni/peerconnection_jni.cc",
"android/jni/surfacetexturehelper_jni.cc",
"android/jni/surfacetexturehelper_jni.h",
"androidvideotracksource.cc",
"androidvideotracksource.h",
]
configs += [ ":libjingle_peerconnection_jni_warnings_config" ]

View File

@ -7,8 +7,6 @@ tkchin@webrtc.org
tommi@webrtc.org
deadbeef@webrtc.org
per-file androidvideotracksource.*=sakal@webrtc.org
per-file androidvideotracksource.*=magjed@webrtc.org
per-file rtcstats*=hbos@webrtc.org
per-file rtcstats*=hta@webrtc.org

View File

@ -1,2 +1,3 @@
per-file androidmetrics_jni.cc=sakal@webrtc.org
per-file androidvideotracksource.*=sakal@webrtc.org
per-file androidvideotracksource_jni.cc=sakal@webrtc.org

View File

@ -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;
}

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_API_ANDROIDVIDEOTRACKSOURCE_H_
#define WEBRTC_API_ANDROIDVIDEOTRACKSOURCE_H_
#ifndef WEBRTC_API_ANDROID_JNI_ANDROIDVIDEOTRACKSOURCE_H_
#define WEBRTC_API_ANDROID_JNI_ANDROIDVIDEOTRACKSOURCE_H_
#include "webrtc/api/android/jni/native_handle_impl.h"
#include "webrtc/api/android/jni/surfacetexturehelper_jni.h"
@ -81,4 +81,4 @@ class AndroidVideoTrackSource : public rtc::AdaptedVideoTrackSource {
} // namespace webrtc
#endif // WEBRTC_API_ANDROIDVIDEOTRACKSOURCE_H_
#endif // WEBRTC_API_ANDROID_JNI_ANDROIDVIDEOTRACKSOURCE_H_

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/api/android/jni/androidvideotracksource.h"
#include "webrtc/api/android/jni/classreferenceholder.h"
#include "webrtc/api/androidvideotracksource.h"
#include "webrtc/api/videosourceproxy.h"
// Identifiers are over 80 characters long so this is needed to fit them on one

View File

@ -45,10 +45,10 @@
#include "third_party/libyuv/include/libyuv/convert_from.h"
#include "third_party/libyuv/include/libyuv/scale.h"
#include "webrtc/api/androidvideotracksource.h"
#include "webrtc/api/android/jni/androidmediadecoder_jni.h"
#include "webrtc/api/android/jni/androidmediaencoder_jni.h"
#include "webrtc/api/android/jni/androidnetworkmonitor_jni.h"
#include "webrtc/api/android/jni/androidvideotracksource.h"
#include "webrtc/api/android/jni/classreferenceholder.h"
#include "webrtc/api/android/jni/jni_helpers.h"
#include "webrtc/api/android/jni/native_handle_impl.h"