VideoInputFrameRecorder Class¶
Description¶
输入帧录制器。
有一个输入帧输入端口和一个输入帧输出端口,用于将经过的输入帧保存到EIF MKV文件中。参考 概览 。
本类的所有成员都是线程安全的。
isAvailable¶
检查是否可用。只在MacOS、iOS、Android上返回true。
- C
bool easyar_VideoInputFrameRecorder_isAvailable(void)
- C++
static bool isAvailable()
- Java
public static boolean isAvailable()
- Kotlin
companion object fun isAvailable(): Boolean
- Objective-C
+ (bool)isAvailable
- Swift
public static func isAvailable() -> Bool
- C#
public static bool isAvailable()
input¶
输入端口。
- C
void easyar_VideoInputFrameRecorder_input(easyar_VideoInputFrameRecorder * This, easyar_InputFrameSink * * Return)
- C++
std::shared_ptr<InputFrameSink> input()
- Java
public @Nonnull InputFrameSink input()
- Kotlin
fun input(): InputFrameSink
- Objective-C
- (easyar_InputFrameSink *)input
- Swift
public func input() -> InputFrameSink
- C#
public virtual InputFrameSink input()
accelerometerResultSink¶
可选。加速度计结果输入端口。参考 AccelerometerResultSink 。
- C
void easyar_VideoInputFrameRecorder_accelerometerResultSink(easyar_VideoInputFrameRecorder * This, easyar_AccelerometerResultSink * * Return)
- C++
std::shared_ptr<AccelerometerResultSink> accelerometerResultSink()
- Java
public @Nonnull AccelerometerResultSink accelerometerResultSink()
- Kotlin
fun accelerometerResultSink(): AccelerometerResultSink
- Objective-C
- (easyar_AccelerometerResultSink *)accelerometerResultSink
- Swift
public func accelerometerResultSink() -> AccelerometerResultSink
- C#
public virtual AccelerometerResultSink accelerometerResultSink()
gyroscopeResultSink¶
可选。陀螺仪结果输入端口。参考 GyroscopeResultSink 。
- C
void easyar_VideoInputFrameRecorder_gyroscopeResultSink(easyar_VideoInputFrameRecorder * This, easyar_GyroscopeResultSink * * Return)
- C++
std::shared_ptr<GyroscopeResultSink> gyroscopeResultSink()
- Java
public @Nonnull GyroscopeResultSink gyroscopeResultSink()
- Kotlin
fun gyroscopeResultSink(): GyroscopeResultSink
- Objective-C
- (easyar_GyroscopeResultSink *)gyroscopeResultSink
- Swift
public func gyroscopeResultSink() -> GyroscopeResultSink
- C#
public virtual GyroscopeResultSink gyroscopeResultSink()
attitudeSensorResultSink¶
可选。姿态传感器结果输入端口。参考 AttitudeSensorResultSink 。
- C
void easyar_VideoInputFrameRecorder_attitudeSensorResultSink(easyar_VideoInputFrameRecorder * This, easyar_AttitudeSensorResultSink * * Return)
- C++
std::shared_ptr<AttitudeSensorResultSink> attitudeSensorResultSink()
- Java
public @Nonnull AttitudeSensorResultSink attitudeSensorResultSink()
- Kotlin
fun attitudeSensorResultSink(): AttitudeSensorResultSink
- Objective-C
- (easyar_AttitudeSensorResultSink *)attitudeSensorResultSink
- Swift
public func attitudeSensorResultSink() -> AttitudeSensorResultSink
- C#
public virtual AttitudeSensorResultSink attitudeSensorResultSink()
magnetometerResultSink¶
可选。磁力计结果输入端口。参考 MagnetometerResultSink 。
- C
void easyar_VideoInputFrameRecorder_magnetometerResultSink(easyar_VideoInputFrameRecorder * This, easyar_MagnetometerResultSink * * Return)
- C++
std::shared_ptr<MagnetometerResultSink> magnetometerResultSink()
- Java
public @Nonnull MagnetometerResultSink magnetometerResultSink()
- Kotlin
fun magnetometerResultSink(): MagnetometerResultSink
- Objective-C
- (easyar_MagnetometerResultSink *)magnetometerResultSink
- Swift
public func magnetometerResultSink() -> MagnetometerResultSink
- C#
public virtual MagnetometerResultSink magnetometerResultSink()
locationResultSink¶
可选。位置结果输入端口。参考 LocationResultSink 。
- C
void easyar_VideoInputFrameRecorder_locationResultSink(easyar_VideoInputFrameRecorder * This, easyar_LocationResultSink * * Return)
- C++
std::shared_ptr<LocationResultSink> locationResultSink()
- Java
public @Nonnull LocationResultSink locationResultSink()
- Kotlin
fun locationResultSink(): LocationResultSink
- Objective-C
- (easyar_LocationResultSink *)locationResultSink
- Swift
public func locationResultSink() -> LocationResultSink
- C#
public virtual LocationResultSink locationResultSink()
proximityLocationResultSink¶
可选。邻近位置结果输入端口。参考 ProximityLocationResultSink 。
- C
void easyar_VideoInputFrameRecorder_proximityLocationResultSink(easyar_VideoInputFrameRecorder * This, easyar_ProximityLocationResultSink * * Return)
- C++
std::shared_ptr<ProximityLocationResultSink> proximityLocationResultSink()
- Java
public @Nonnull ProximityLocationResultSink proximityLocationResultSink()
- Kotlin
fun proximityLocationResultSink(): ProximityLocationResultSink
- Objective-C
- (easyar_ProximityLocationResultSink *)proximityLocationResultSink
- Swift
public func proximityLocationResultSink() -> ProximityLocationResultSink
- C#
public virtual ProximityLocationResultSink proximityLocationResultSink()
bufferRequirement¶
当前组件占用camera buffer的数量。
- C
int easyar_VideoInputFrameRecorder_bufferRequirement(easyar_VideoInputFrameRecorder * This)
- C++
int bufferRequirement()
- Java
public int bufferRequirement()
- Kotlin
fun bufferRequirement(): Int
- Objective-C
- (int)bufferRequirement
- Swift
public func bufferRequirement() -> Int32
- C#
public virtual int bufferRequirement()
output¶
输出端口。
- C
void easyar_VideoInputFrameRecorder_output(easyar_VideoInputFrameRecorder * This, easyar_InputFrameSource * * Return)
- C++
std::shared_ptr<InputFrameSource> output()
- Java
public @Nonnull InputFrameSource output()
- Kotlin
fun output(): InputFrameSource
- Objective-C
- (easyar_InputFrameSource *)output
- Swift
public func output() -> InputFrameSource
- C#
public virtual InputFrameSource output()
create¶
创建。
- C
void easyar_VideoInputFrameRecorder_create(easyar_VideoInputFrameRecorder * * Return)
- C++
static std::shared_ptr<VideoInputFrameRecorder> create()
- Java
public static @Nonnull VideoInputFrameRecorder create()
- Kotlin
companion object fun create(): VideoInputFrameRecorder
- Objective-C
+ (easyar_VideoInputFrameRecorder *)create
- Swift
public static func create() -> VideoInputFrameRecorder
- C#
public static VideoInputFrameRecorder create()
start¶
开始录制数据。cameraDeviceType、cameraOrientation和initialScreenRotation的定义与 CameraParameters 中的一致。initialScreenRotation为录制数据时的初始屏幕旋转方向,播放时以此方向为基准进行渲染。
- C
bool easyar_VideoInputFrameRecorder_start(easyar_VideoInputFrameRecorder * This, easyar_String * filePath, easyar_CameraDeviceType cameraDeviceType, int cameraOrientation, int initialScreenRotation, easyar_VideoInputFrameRecorderVideoCodec codec, int width, int height, double frameRate, easyar_String * metadata)
- C++
bool start(std::string filePath, CameraDeviceType cameraDeviceType, int cameraOrientation, int initialScreenRotation, VideoInputFrameRecorderVideoCodec codec, int width, int height, double frameRate, std::string metadata)
- Java
public boolean start(java.lang.@Nonnull String filePath, int cameraDeviceType, int cameraOrientation, int initialScreenRotation, int codec, int width, int height, double frameRate, java.lang.@Nonnull String metadata)
- Kotlin
fun start(filePath: String, cameraDeviceType: Int, cameraOrientation: Int, initialScreenRotation: Int, codec: Int, width: Int, height: Int, frameRate: Double, metadata: String): Boolean
- Objective-C
- (bool)start:(NSString *)filePath cameraDeviceType:(easyar_CameraDeviceType)cameraDeviceType cameraOrientation:(int)cameraOrientation initialScreenRotation:(int)initialScreenRotation codec:(easyar_VideoInputFrameRecorderVideoCodec)codec width:(int)width height:(int)height frameRate:(double)frameRate metadata:(NSString *)metadata
- Swift
public func start(_ filePath: String, _ cameraDeviceType: CameraDeviceType, _ cameraOrientation: Int32, _ initialScreenRotation: Int32, _ codec: VideoInputFrameRecorderVideoCodec, _ width: Int32, _ height: Int32, _ frameRate: Double, _ metadata: String) -> Bool
- C#
public virtual bool start(string filePath, CameraDeviceType cameraDeviceType, int cameraOrientation, int initialScreenRotation, VideoInputFrameRecorderVideoCodec codec, int width, int height, double frameRate, string metadata)
stop¶
停止录制数据。这个方法只会停止录制,连接将不会受到影响。
- C
void easyar_VideoInputFrameRecorder_stop(easyar_VideoInputFrameRecorder * This)
- C++
void stop()
- Java
public void stop()
- Kotlin
fun stop(): Unit
- Objective-C
- (void)stop
- Swift
public func stop() -> Void
- C#
public virtual void stop()
setAutomaticCompletionCallback¶
设置自动完成录制回调。
- C
void easyar_VideoInputFrameRecorder_setAutomaticCompletionCallback(easyar_VideoInputFrameRecorder * This, easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromVideoInputFrameRecorderCompletionReason automaticCompletionCallback)
- C++
void setAutomaticCompletionCallback(std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(VideoInputFrameRecorderCompletionReason)>> automaticCompletionCallback)
- Java
public void setAutomaticCompletionCallback(@Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromVideoInputFrameRecorderCompletionReason automaticCompletionCallback)
- Kotlin
fun setAutomaticCompletionCallback(callbackScheduler: CallbackScheduler, automaticCompletionCallback: FunctorOfVoidFromVideoInputFrameRecorderCompletionReason?): Unit
- Objective-C
- (void)setAutomaticCompletionCallback:(easyar_CallbackScheduler *)callbackScheduler automaticCompletionCallback:(void (^)(easyar_VideoInputFrameRecorderCompletionReason))automaticCompletionCallback
- Swift
public func setAutomaticCompletionCallback(_ callbackScheduler: CallbackScheduler, _ automaticCompletionCallback: ((VideoInputFrameRecorderCompletionReason) -> Void)?) -> Void
- C#
public virtual void setAutomaticCompletionCallback(CallbackScheduler callbackScheduler, Optional<Action<VideoInputFrameRecorderCompletionReason>> automaticCompletionCallback)