1*d9f75844SAndroid Build Coastguard Worker /* 2*d9f75844SAndroid Build Coastguard Worker * Copyright 2017 The WebRTC project authors. All Rights Reserved. 3*d9f75844SAndroid Build Coastguard Worker * 4*d9f75844SAndroid Build Coastguard Worker * Use of this source code is governed by a BSD-style license 5*d9f75844SAndroid Build Coastguard Worker * that can be found in the LICENSE file in the root of the source 6*d9f75844SAndroid Build Coastguard Worker * tree. An additional intellectual property rights grant can be found 7*d9f75844SAndroid Build Coastguard Worker * in the file PATENTS. All contributing project authors may 8*d9f75844SAndroid Build Coastguard Worker * be found in the AUTHORS file in the root of the source tree. 9*d9f75844SAndroid Build Coastguard Worker */ 10*d9f75844SAndroid Build Coastguard Worker 11*d9f75844SAndroid Build Coastguard Worker #import <Foundation/Foundation.h> 12*d9f75844SAndroid Build Coastguard Worker 13*d9f75844SAndroid Build Coastguard Worker #import "RTCCodecSpecificInfo.h" 14*d9f75844SAndroid Build Coastguard Worker #import "RTCEncodedImage.h" 15*d9f75844SAndroid Build Coastguard Worker #import "RTCMacros.h" 16*d9f75844SAndroid Build Coastguard Worker #import "RTCVideoEncoderSettings.h" 17*d9f75844SAndroid Build Coastguard Worker #import "RTCVideoFrame.h" 18*d9f75844SAndroid Build Coastguard Worker 19*d9f75844SAndroid Build Coastguard Worker NS_ASSUME_NONNULL_BEGIN 20*d9f75844SAndroid Build Coastguard Worker 21*d9f75844SAndroid Build Coastguard Worker /** Callback block for decoder. */ 22*d9f75844SAndroid Build Coastguard Worker typedef void (^RTCVideoDecoderCallback)(RTC_OBJC_TYPE(RTCVideoFrame) * frame); 23*d9f75844SAndroid Build Coastguard Worker 24*d9f75844SAndroid Build Coastguard Worker /** Protocol for decoder implementations. */ 25*d9f75844SAndroid Build Coastguard Worker RTC_OBJC_EXPORT 26*d9f75844SAndroid Build Coastguard Worker @protocol RTC_OBJC_TYPE 27*d9f75844SAndroid Build Coastguard Worker (RTCVideoDecoder)<NSObject> 28*d9f75844SAndroid Build Coastguard Worker 29*d9f75844SAndroid Build Coastguard Worker - (void)setCallback : (RTCVideoDecoderCallback)callback; 30*d9f75844SAndroid Build Coastguard Worker - (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores; 31*d9f75844SAndroid Build Coastguard Worker - (NSInteger)releaseDecoder; 32*d9f75844SAndroid Build Coastguard Worker - (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage 33*d9f75844SAndroid Build Coastguard Worker missingFrames:(BOOL)missingFrames 34*d9f75844SAndroid Build Coastguard Worker codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info 35*d9f75844SAndroid Build Coastguard Worker renderTimeMs:(int64_t)renderTimeMs; 36*d9f75844SAndroid Build Coastguard Worker - (NSString *)implementationName; 37*d9f75844SAndroid Build Coastguard Worker 38*d9f75844SAndroid Build Coastguard Worker @end 39*d9f75844SAndroid Build Coastguard Worker 40*d9f75844SAndroid Build Coastguard Worker NS_ASSUME_NONNULL_END 41