I'm building an app in Swift that imports some .h files. I have these definitions:
RTCEAGLVideoView.h
@interface RTCEAGLVideoView : UIView <RTCVideoRenderer>
@property(nonatomic, weak) id<RTCEAGLVideoViewDelegate> delegate;
@end
RTCVideoRenderer.h
@protocol RTCVideoRenderer<NSObject>
// The size of the frame.
- (void)setSize:(CGSize)size;
// The frame to be displayed.
- (void)renderFrame:(RTCI420Frame*)frame;
@end
Now, in a ViewController, I have an object of type RTCEAGLVideoView and I want to call the renderFrame method.
@IBOutlet weak var remoteView: RTCEAGLVideoView!
...
self.remoteView.renderFrame(nil)
But I'm getting this error:
Value of type 'RTCVideoRenderer' has no member 'renderFrame'
Any help would be appreciated.
EDIT: RTCI420Frame.h
#import <Foundation/Foundation.h>
// RTCI420Frame is an ObjectiveC version of cricket::VideoFrame.
@interface RTCI420Frame : NSObject
@property(nonatomic, readonly) NSUInteger width;
@property(nonatomic, readonly) NSUInteger height;
@property(nonatomic, readonly) NSUInteger chromaWidth;
@property(nonatomic, readonly) NSUInteger chromaHeight;
@property(nonatomic, readonly) NSUInteger chromaSize;
// These can return NULL if the object is not backed by a buffer.
@property(nonatomic, readonly) const uint8_t* yPlane;
@property(nonatomic, readonly) const uint8_t* uPlane;
@property(nonatomic, readonly) const uint8_t* vPlane;
@property(nonatomic, readonly) NSInteger yPitch;
@property(nonatomic, readonly) NSInteger uPitch;
@property(nonatomic, readonly) NSInteger vPitch;
- (BOOL)makeExclusive;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Disallow init and don't add to documentation
- (id)init __attribute__((
unavailable("init is not a supported initializer for this class.")));
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
@end