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

Side by Side Diff: webrtc/common_video/corevideo_frame_buffer.cc

Issue 2065733003: Delete unused and almost unused frame-related methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Eliminate call to set_video_frame_buffer. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 28 matching lines...) Expand all
39 new rtc::RefCountedObject<webrtc::I420Buffer>(width, height); 39 new rtc::RefCountedObject<webrtc::I420Buffer>(width, height);
40 CVPixelBufferLockBaseAddress(pixel_buffer_, kCVPixelBufferLock_ReadOnly); 40 CVPixelBufferLockBaseAddress(pixel_buffer_, kCVPixelBufferLock_ReadOnly);
41 const uint8_t* src_y = static_cast<const uint8_t*>( 41 const uint8_t* src_y = static_cast<const uint8_t*>(
42 CVPixelBufferGetBaseAddressOfPlane(pixel_buffer_, 0)); 42 CVPixelBufferGetBaseAddressOfPlane(pixel_buffer_, 0));
43 int src_y_stride = CVPixelBufferGetBytesPerRowOfPlane(pixel_buffer_, 0); 43 int src_y_stride = CVPixelBufferGetBytesPerRowOfPlane(pixel_buffer_, 0);
44 const uint8_t* src_uv = static_cast<const uint8_t*>( 44 const uint8_t* src_uv = static_cast<const uint8_t*>(
45 CVPixelBufferGetBaseAddressOfPlane(pixel_buffer_, 1)); 45 CVPixelBufferGetBaseAddressOfPlane(pixel_buffer_, 1));
46 int src_uv_stride = CVPixelBufferGetBytesPerRowOfPlane(pixel_buffer_, 1); 46 int src_uv_stride = CVPixelBufferGetBytesPerRowOfPlane(pixel_buffer_, 1);
47 int ret = libyuv::NV12ToI420( 47 int ret = libyuv::NV12ToI420(
48 src_y, src_y_stride, src_uv, src_uv_stride, 48 src_y, src_y_stride, src_uv, src_uv_stride,
49 buffer->MutableData(webrtc::kYPlane), buffer->stride(webrtc::kYPlane), 49 buffer->MutableDataY(), buffer->StrideY(),
50 buffer->MutableData(webrtc::kUPlane), buffer->stride(webrtc::kUPlane), 50 buffer->MutableDataU(), buffer->StrideU(),
51 buffer->MutableData(webrtc::kVPlane), buffer->stride(webrtc::kVPlane), 51 buffer->MutableDataV(), buffer->StrideV(),
52 width, height); 52 width, height);
53 CVPixelBufferUnlockBaseAddress(pixel_buffer_, kCVPixelBufferLock_ReadOnly); 53 CVPixelBufferUnlockBaseAddress(pixel_buffer_, kCVPixelBufferLock_ReadOnly);
54 if (ret) { 54 if (ret) {
55 LOG(LS_ERROR) << "Error converting NV12 to I420: " << ret; 55 LOG(LS_ERROR) << "Error converting NV12 to I420: " << ret;
56 return nullptr; 56 return nullptr;
57 } 57 }
58 return buffer; 58 return buffer;
59 } 59 }
60 60
61 } // namespace webrtc 61 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/java/jni/androidvideocapturer_jni.cc ('k') | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698