blob: 2abda428712ee9b6c8e0cecb61beb1b20a6985d8 [file] [log] [blame]
Anders Carlsson3ff50fb2018-02-01 15:47:05 +01001/*
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 Carlsson7bca8ca2018-08-30 09:30:29 +020011#include "sdk/objc/native/api/video_frame_buffer.h"
Anders Carlsson3ff50fb2018-02-01 15:47:05 +010012
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020013#include "sdk/objc/native/src/objc_frame_buffer.h"
Anders Carlsson3ff50fb2018-02-01 15:47:05 +010014
15namespace webrtc {
16
Anders Carlsson9823ee42018-03-07 10:32:03 +010017rtc::scoped_refptr<VideoFrameBuffer> ObjCToNativeVideoFrameBuffer(
Anders Carlsson3ff50fb2018-02-01 15:47:05 +010018 id<RTCVideoFrameBuffer> objc_video_frame_buffer) {
Anders Carlsson9823ee42018-03-07 10:32:03 +010019 return new rtc::RefCountedObject<ObjCFrameBuffer>(objc_video_frame_buffer);
20}
21
22id<RTCVideoFrameBuffer> NativeToObjCVideoFrameBuffer(
23 const rtc::scoped_refptr<VideoFrameBuffer> &buffer) {
24 return ToObjCVideoFrameBuffer(buffer);
Anders Carlsson3ff50fb2018-02-01 15:47:05 +010025}
26
27} // namespace webrtc