Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 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 | #import <Foundation/Foundation.h> |
| 12 | |
| 13 | #import "RTCCodecSpecificInfo.h" |
| 14 | #import "RTCEncodedImage.h" |
| 15 | #import "RTCMacros.h" |
| 16 | #import "RTCVideoEncoderSettings.h" |
| 17 | #import "RTCVideoFrame.h" |
| 18 | |
| 19 | NS_ASSUME_NONNULL_BEGIN |
| 20 | |
| 21 | /** Callback block for decoder. */ |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 22 | typedef void (^RTCVideoDecoderCallback)(RTC_OBJC_TYPE(RTCVideoFrame) * frame); |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 23 | |
| 24 | /** Protocol for decoder implementations. */ |
Mirko Bonadei | e8d5724 | 2018-09-17 10:22:56 +0200 | [diff] [blame] | 25 | RTC_OBJC_EXPORT |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 26 | @protocol RTC_OBJC_TYPE |
| 27 | (RTCVideoDecoder)<NSObject> |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 28 | |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 29 | - (void)setCallback : (RTCVideoDecoderCallback)callback; |
Kári Tristan Helgason | d4ea8c9 | 2019-04-23 14:33:23 +0200 | [diff] [blame] | 30 | - (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores; |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 31 | - (NSInteger)releaseDecoder; |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 32 | - (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 33 | missingFrames:(BOOL)missingFrames |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 34 | codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 35 | renderTimeMs:(int64_t)renderTimeMs; |
| 36 | - (NSString *)implementationName; |
| 37 | |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 38 | @end |
| 39 | |
| 40 | NS_ASSUME_NONNULL_END |