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

Unified Diff: webrtc/api/java/jni/androidmediaencoder_jni.cc

Issue 1881953002: Delete method webrtc::VideoFrame::native_handle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Delete the native_handle method. Created 4 years, 8 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: webrtc/api/java/jni/androidmediaencoder_jni.cc
diff --git a/webrtc/api/java/jni/androidmediaencoder_jni.cc b/webrtc/api/java/jni/androidmediaencoder_jni.cc
index 99419e0f5ab6c68657fcdbcd69a880a8a99d0069..63aeb097ffacf0d8ee2b3028794b75892e1b078a 100644
--- a/webrtc/api/java/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
@@ -669,7 +669,7 @@ int32_t MediaCodecVideoEncoder::EncodeOnCodecThread(
quality_scaler_.GetScaledResolution();
if (scaled_resolution.width != frame.width() ||
scaled_resolution.height != frame.height()) {
- if (frame.native_handle() != nullptr) {
+ if (frame.video_frame_buffer()->native_handle() != nullptr) {
rtc::scoped_refptr<webrtc::VideoFrameBuffer> scaled_buffer(
static_cast<AndroidTextureBuffer*>(
frame.video_frame_buffer().get())->ScaleAndRotate(
@@ -694,7 +694,7 @@ int32_t MediaCodecVideoEncoder::EncodeOnCodecThread(
const bool key_frame =
frame_types->front() != webrtc::kVideoFrameDelta || send_key_frame;
bool encode_status = true;
- if (!input_frame.native_handle()) {
+ if (!input_frame.video_frame_buffer()->native_handle()) {
int j_input_buffer_index = jni->CallIntMethod(*j_media_codec_video_encoder_,
j_dequeue_input_buffer_method_);
CHECK_EXCEPTION(jni);
@@ -744,7 +744,8 @@ bool MediaCodecVideoEncoder::MaybeReconfigureEncoderOnCodecThread(
const webrtc::VideoFrame& frame) {
RTC_DCHECK(codec_thread_checker_.CalledOnValidThread());
- const bool is_texture_frame = frame.native_handle() != nullptr;
+ const bool is_texture_frame =
+ frame.video_frame_buffer()->native_handle() != nullptr;
const bool reconfigure_due_to_format = is_texture_frame != use_surface_;
const bool reconfigure_due_to_size =
frame.width() != width_ || frame.height() != height_;
@@ -805,8 +806,8 @@ bool MediaCodecVideoEncoder::EncodeTextureOnCodecThread(JNIEnv* jni,
bool key_frame, const webrtc::VideoFrame& frame) {
RTC_DCHECK(codec_thread_checker_.CalledOnValidThread());
RTC_CHECK(use_surface_);
- NativeHandleImpl* handle =
- static_cast<NativeHandleImpl*>(frame.native_handle());
+ NativeHandleImpl* handle = static_cast<NativeHandleImpl*>(
+ frame.video_frame_buffer()->native_handle());
jfloatArray sampling_matrix = jni->NewFloatArray(16);
jni->SetFloatArrayRegion(sampling_matrix, 0, 16, handle->sampling_matrix);
@@ -1259,4 +1260,3 @@ void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
}
} // namespace webrtc_jni
-
« no previous file with comments | « no previous file | webrtc/common_video/i420_video_frame_unittest.cc » ('j') | webrtc/video/video_capture_input_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698