CameraFrameStreamer Class

Inherits: FrameStreamer

Description

CameraFrameStreamer 从 CameraDevice 获取数据并生成frame数据提供给 filter。

如果你在寻找可以使用自己的视频源的自定义的frame生成器,它在最新的EasyAR SDK中无法使用。在今后的发布版中,这个功能将以FrameStreamer 的子类实现。

Constructor

C: void easyar_CameraFrameStreamer__ctor(easyar_CameraFrameStreamer * * Return)
C++11: CameraFrameStreamer()
Traditional C++: CameraFrameStreamer()
Java: public CameraFrameStreamer()
Objective-C: + (easyar_CameraFrameStreamer *) create
Swift (since EasyAR SDK 2.1.0): public convenience init()

attachCamera

CameraDevice 连接到streamer。在有 CameraDevice 连接之前,streamer不会开始streaming。

Attach null object 将会断开streamer之前与 CameraDevice 的连接。

C: bool easyar_CameraFrameStreamer_attachCamera(easyar_CameraFrameStreamer * This, easyar_CameraDevice * obj)
C++11: bool attachCamera(std::shared_ptr<CameraDevice> obj)
Traditional C++: bool attachCamera(CameraDevice * obj)
Java: public native boolean attachCamera(CameraDevice obj)
Objective-C: - (bool)attachCamera:(easyar_CameraDevice *)obj
Swift (since EasyAR SDK 2.1.0): public func attachCamera(_ obj: CameraDevice?) -> Bool

peek

获取streamer最新的frame。

C: void easyar_CameraFrameStreamer_peek(easyar_CameraFrameStreamer * This, easyar_Frame * * Return)
C++11: std::shared_ptr<Frame> peek()
Traditional C++: void peek(Frame * * Return)
Java: public native Frame peek()
Objective-C: - (easyar_Frame *)peek
Swift (since EasyAR SDK 2.1.0): public override func peek() -> Frame

start

开始streaming frames。

C: bool easyar_CameraFrameStreamer_start(easyar_CameraFrameStreamer * This)
C++11: bool start()
Traditional C++: bool start()
Java: public native boolean start()
Objective-C: - (bool)start
Swift (since EasyAR SDK 2.1.0): public override func start() -> Bool

stop

停止streaming。

C: bool easyar_CameraFrameStreamer_stop(easyar_CameraFrameStreamer * This)
C++11: bool stop()
Traditional C++: bool stop()
Java: public native boolean stop()
Objective-C: - (bool)stop
Swift (since EasyAR SDK 2.1.0): public override func stop() -> Bool