//============================================================================================================================= // // EasyAR Sense 4.2.0.8700-7bcbc8b1c // Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved. // EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China // and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd. // //============================================================================================================================= #import "easyar/types.oc.h" /// /// Signal input port. /// It is used to expose input port for a component. /// All members of this class is thread-safe. /// @interface easyar_SignalSink : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input data. /// - (void)handle; @end /// /// Signal output port. /// It is used to expose output port for a component. /// All members of this class is thread-safe. /// @interface easyar_SignalSource : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Sets data handler. /// - (void)setHandler:(void (^)())handler; /// /// Connects to input port. /// - (void)connect:(easyar_SignalSink *)sink; /// /// Disconnects. /// - (void)disconnect; @end /// /// Input frame input port. /// It is used to expose input port for a component. /// All members of this class is thread-safe. /// @interface easyar_InputFrameSink : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input data. /// - (void)handle:(easyar_InputFrame *)inputData; @end /// /// Input frame output port. /// It is used to expose output port for a component. /// All members of this class is thread-safe. /// @interface easyar_InputFrameSource : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Sets data handler. /// - (void)setHandler:(void (^)(easyar_InputFrame *))handler; /// /// Connects to input port. /// - (void)connect:(easyar_InputFrameSink *)sink; /// /// Disconnects. /// - (void)disconnect; @end /// /// Output frame input port. /// It is used to expose input port for a component. /// All members of this class is thread-safe. /// @interface easyar_OutputFrameSink : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input data. /// - (void)handle:(easyar_OutputFrame *)inputData; @end /// /// Output frame output port. /// It is used to expose output port for a component. /// All members of this class is thread-safe. /// @interface easyar_OutputFrameSource : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Sets data handler. /// - (void)setHandler:(void (^)(easyar_OutputFrame *))handler; /// /// Connects to input port. /// - (void)connect:(easyar_OutputFrameSink *)sink; /// /// Disconnects. /// - (void)disconnect; @end /// /// Feedback frame input port. /// It is used to expose input port for a component. /// All members of this class is thread-safe. /// @interface easyar_FeedbackFrameSink : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input data. /// - (void)handle:(easyar_FeedbackFrame *)inputData; @end /// /// Feedback frame output port. /// It is used to expose output port for a component. /// All members of this class is thread-safe. /// @interface easyar_FeedbackFrameSource : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Sets data handler. /// - (void)setHandler:(void (^)(easyar_FeedbackFrame *))handler; /// /// Connects to input port. /// - (void)connect:(easyar_FeedbackFrameSink *)sink; /// /// Disconnects. /// - (void)disconnect; @end /// /// Input frame fork. /// It is used to branch and transfer input frame to multiple components in parallel. /// All members of this class is thread-safe. /// @interface easyar_InputFrameFork : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_InputFrameSink *)input; /// /// Output port. /// - (easyar_InputFrameSource *)output:(int)index; /// /// Output count. /// - (int)outputCount; /// /// Creates an instance. /// + (easyar_InputFrameFork *)create:(int)outputCount; @end /// /// Output frame fork. /// It is used to branch and transfer output frame to multiple components in parallel. /// All members of this class is thread-safe. /// @interface easyar_OutputFrameFork : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_OutputFrameSink *)input; /// /// Output port. /// - (easyar_OutputFrameSource *)output:(int)index; /// /// Output count. /// - (int)outputCount; /// /// Creates an instance. /// + (easyar_OutputFrameFork *)create:(int)outputCount; @end /// /// Output frame join. /// It is used to aggregate output frame from multiple components in parallel. /// All members of this class is thread-safe. /// It shall be noticed that connections and disconnections to the inputs shall not be performed during the flowing of data, or it may stuck in a state that no frame can be output. (It is recommended to complete dataflow connection before start a camera.) /// @interface easyar_OutputFrameJoin : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_OutputFrameSink *)input:(int)index; /// /// Output port. /// - (easyar_OutputFrameSource *)output; /// /// Input count. /// - (int)inputCount; /// /// Creates an instance. The default joiner will be used, which takes input frame from the first input and first result or null of each input. The first result of every input will be placed at the corresponding input index of results of the final output frame. /// + (easyar_OutputFrameJoin *)create:(int)inputCount; /// /// Creates an instance. A custom joiner is specified. /// + (easyar_OutputFrameJoin *)createWithJoiner:(int)inputCount joiner:(easyar_OutputFrame * (^)(NSArray *))joiner; @end /// /// Feedback frame fork. /// It is used to branch and transfer feedback frame to multiple components in parallel. /// All members of this class is thread-safe. /// @interface easyar_FeedbackFrameFork : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_FeedbackFrameSink *)input; /// /// Output port. /// - (easyar_FeedbackFrameSource *)output:(int)index; /// /// Output count. /// - (int)outputCount; /// /// Creates an instance. /// + (easyar_FeedbackFrameFork *)create:(int)outputCount; @end /// /// Input frame throttler. /// There is a input frame input port and a input frame output port. It can be used to prevent incoming frames from entering algorithm components when they have not finished handling previous workload. /// InputFrameThrottler occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview <Overview.html>`__ . /// All members of this class is thread-safe. /// It shall be noticed that connections and disconnections to signalInput shall not be performed during the flowing of data, or it may stuck in a state that no frame can be output. (It is recommended to complete dataflow connection before start a camera.) /// @interface easyar_InputFrameThrottler : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_InputFrameSink *)input; /// /// Camera buffers occupied in this component. /// - (int)bufferRequirement; /// /// Output port. /// - (easyar_InputFrameSource *)output; /// /// Input port for clearance signal. /// - (easyar_SignalSink *)signalInput; /// /// Creates an instance. /// + (easyar_InputFrameThrottler *)create; @end /// /// Output frame buffer. /// There is an output frame input port and output frame fetching function. It can be used to convert output frame fetching from asynchronous pattern to synchronous polling pattern, which fits frame by frame rendering. /// OutputFrameBuffer occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview <Overview.html>`__ . /// All members of this class is thread-safe. /// @interface easyar_OutputFrameBuffer : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_OutputFrameSink *)input; /// /// Camera buffers occupied in this component. /// - (int)bufferRequirement; /// /// Output port for frame arrival. It can be connected to `InputFrameThrottler.signalInput`_ . /// - (easyar_SignalSource *)signalOutput; /// /// Fetches the most recent `OutputFrame`_ . /// - (easyar_OutputFrame *)peek; /// /// Creates an instance. /// + (easyar_OutputFrameBuffer *)create; /// /// Pauses output of `OutputFrame`_ . After execution, all results of `OutputFrameBuffer.peek`_ will be empty. `OutputFrameBuffer.signalOutput`_ is not affected. /// - (void)pause; /// /// Resumes output of `OutputFrame`_ . /// - (void)resume; @end /// /// Input frame to output frame adapter. /// There is an input frame input port and an output frame output port. It can be used to wrap an input frame into an output frame, which can be used for rendering without an algorithm component. Refer to `Overview <Overview.html>`__ . /// All members of this class is thread-safe. /// @interface easyar_InputFrameToOutputFrameAdapter : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_InputFrameSink *)input; /// /// Output port. /// - (easyar_OutputFrameSource *)output; /// /// Creates an instance. /// + (easyar_InputFrameToOutputFrameAdapter *)create; @end /// /// Input frame to feedback frame adapter. /// There is an input frame input port, a historic output frame input port and a feedback frame output port. It can be used to combine an input frame and a historic output frame into a feedback frame, which is required by algorithm components such as `ImageTracker`_ . /// On every input of an input frame, a feedback frame is generated with a previously input historic feedback frame. If there is no previously input historic feedback frame, it is null in the feedback frame. /// InputFrameToFeedbackFrameAdapter occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview <Overview.html>`__ . /// All members of this class is thread-safe. /// @interface easyar_InputFrameToFeedbackFrameAdapter : easyar_RefBase + (instancetype)new NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE; /// /// Input port. /// - (easyar_InputFrameSink *)input; /// /// Camera buffers occupied in this component. /// - (int)bufferRequirement; /// /// Side input port for historic output frame input. /// - (easyar_OutputFrameSink *)sideInput; /// /// Output port. /// - (easyar_FeedbackFrameSource *)output; /// /// Creates an instance. /// + (easyar_InputFrameToFeedbackFrameAdapter *)create; @end