Anders Carlsson | 3ff50fb | 2018-02-01 15:47:05 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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 | |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 11 | #include "sdk/objc/native/api/video_frame_buffer.h" |
Anders Carlsson | 3ff50fb | 2018-02-01 15:47:05 +0100 | [diff] [blame] | 12 | |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 13 | #include "sdk/objc/native/src/objc_frame_buffer.h" |
Anders Carlsson | 3ff50fb | 2018-02-01 15:47:05 +0100 | [diff] [blame] | 14 | |
| 15 | namespace webrtc { |
| 16 | |
Anders Carlsson | 9823ee4 | 2018-03-07 10:32:03 +0100 | [diff] [blame] | 17 | rtc::scoped_refptr<VideoFrameBuffer> ObjCToNativeVideoFrameBuffer( |
Anders Carlsson | 3ff50fb | 2018-02-01 15:47:05 +0100 | [diff] [blame] | 18 | id<RTCVideoFrameBuffer> objc_video_frame_buffer) { |
Anders Carlsson | 9823ee4 | 2018-03-07 10:32:03 +0100 | [diff] [blame] | 19 | return new rtc::RefCountedObject<ObjCFrameBuffer>(objc_video_frame_buffer); |
| 20 | } |
| 21 | |
| 22 | id<RTCVideoFrameBuffer> NativeToObjCVideoFrameBuffer( |
| 23 | const rtc::scoped_refptr<VideoFrameBuffer> &buffer) { |
| 24 | return ToObjCVideoFrameBuffer(buffer); |
Anders Carlsson | 3ff50fb | 2018-02-01 15:47:05 +0100 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | } // namespace webrtc |