1 /* 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 12 #define COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 13 14 #include <stdint.h> 15 16 #include "api/scoped_refptr.h" 17 #include "api/video/video_frame_buffer.h" 18 #include "rtc_base/callback.h" 19 #include "rtc_base/ref_counted_object.h" 20 21 namespace webrtc { 22 23 rtc::scoped_refptr<I420BufferInterface> WrapI420Buffer( 24 int width, 25 int height, 26 const uint8_t* y_plane, 27 int y_stride, 28 const uint8_t* u_plane, 29 int u_stride, 30 const uint8_t* v_plane, 31 int v_stride, 32 const rtc::Callback0<void>& no_longer_used); 33 34 rtc::scoped_refptr<I444BufferInterface> WrapI444Buffer( 35 int width, 36 int height, 37 const uint8_t* y_plane, 38 int y_stride, 39 const uint8_t* u_plane, 40 int u_stride, 41 const uint8_t* v_plane, 42 int v_stride, 43 const rtc::Callback0<void>& no_longer_used); 44 45 rtc::scoped_refptr<I420ABufferInterface> WrapI420ABuffer( 46 int width, 47 int height, 48 const uint8_t* y_plane, 49 int y_stride, 50 const uint8_t* u_plane, 51 int u_stride, 52 const uint8_t* v_plane, 53 int v_stride, 54 const uint8_t* a_plane, 55 int a_stride, 56 const rtc::Callback0<void>& no_longer_used); 57 58 rtc::scoped_refptr<PlanarYuvBuffer> WrapYuvBuffer( 59 VideoFrameBuffer::Type type, 60 int width, 61 int height, 62 const uint8_t* y_plane, 63 int y_stride, 64 const uint8_t* u_plane, 65 int u_stride, 66 const uint8_t* v_plane, 67 int v_stride, 68 const rtc::Callback0<void>& no_longer_used); 69 70 rtc::scoped_refptr<I010BufferInterface> WrapI010Buffer( 71 int width, 72 int height, 73 const uint16_t* y_plane, 74 int y_stride, 75 const uint16_t* u_plane, 76 int u_stride, 77 const uint16_t* v_plane, 78 int v_stride, 79 const rtc::Callback0<void>& no_longer_used); 80 81 } // namespace webrtc 82 83 #endif // COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 84