SDK Version 2.0.1
AnsuR Technologies ASMIRA SDK
Loading...
Searching...
No Matches
Video and imaging

Classes

struct  asdk::frame_t
 A decoded video or photo frame, delivered by FrameFunc. More...
struct  asdk::video_options_t
 Encoder settings in effect on the sending client, delivered by VideoOptionsFunc. More...
struct  asdk::video_mode_t
 What the sending client is currently doing, delivered by VideoModeFunc. More...

Typedefs

typedef void(*) asdk::FrameFunc(const frame_t *frame, void *opaque)
 A video or photo frame was decoded to RGB.
typedef void(*) asdk::EncodedStreamFunc(const StreamType type, const void *data, const uint32_t dataSize, void *opaque)
 An encoded frame or stream chunk arrived, before any decoding.
typedef void(*) asdk::VideoOptionsFunc(const video_options_t *videoOptions, void *opaque)
 The sending client reported its encoder settings, see video_options_t.
typedef void(*) asdk::VideoModeFunc(const video_mode_t *videoMode, void *opaque)
 The sending client switched photo mode, ROI or streaming on or off.
typedef void(*) asdk::RoomPreviewImageFunc(const uint32_t roomID, const uint64_t utc, const ImageFormat imageFormat, const uint8_t *data, const uint32_t size, void *opaque)
 A room preview image arrived for a room announced with RoomStatePreview.

Enumerations

enum  asdk::StreamType {
  asdk::StreamTypeUnknown ,
  asdk::StreamType264Frame ,
  asdk::StreamType265Frame ,
  asdk::StreamTypeAV1Frame ,
  asdk::StreamTypeMPEGTS ,
  asdk::StreamTypeWEBP
}
 Kind of payload delivered by EncodedStreamFunc. More...
enum  asdk::ImageFormat {
  asdk::ImageFormatUndef ,
  asdk::ImageFormatJPEG ,
  asdk::ImageFormatWEBP ,
  asdk::ImageFormatHEIF ,
  asdk::ImageFormatAVIF ,
  asdk::ImageFormatAV1 ,
  asdk::ImageFormatH265
}
 Encoding of the image delivered by RoomPreviewImageFunc. More...

Functions

void asdk::sdk_t::SetFrameCallback (FrameFunc func, void *opaque=nullptr)
 Video/Photo Frame callback.
void asdk::sdk_t::SetEncodedStreamCallback (EncodedStreamFunc func, void *opaque=nullptr)
 Encoded Frame or stream callback.
void asdk::sdk_t::SetVideoOptionsCallback (VideoOptionsFunc func, void *opaque=nullptr)
 Video Options callback.
void asdk::sdk_t::SetVideoModeCallback (VideoModeFunc func, void *opaque=nullptr)
 Video Mode callback.
void asdk::sdk_t::SetRoomPreviewImageCallback (RoomPreviewImageFunc func, void *opaque=nullptr)
 Room Preview Image callback.

Detailed Description

Decoded frames, encoded stream passthrough, the encoder options chosen by the sending client, and room preview images.

Typedef Documentation

◆ FrameFunc

typedef void(*) asdk::FrameFunc(const frame_t *frame, void *opaque)

A video or photo frame was decoded to RGB.

Called on the video decoder thread, frame is valid only for the duration of the callback.

Definition at line 843 of file asmirasdk.h.

◆ EncodedStreamFunc

typedef void(*) asdk::EncodedStreamFunc(const StreamType type, const void *data, const uint32_t dataSize, void *opaque)

An encoded frame or stream chunk arrived, before any decoding.

Use it to record or relay the stream untouched. data is valid only for the duration of the callback.

Definition at line 847 of file asmirasdk.h.

◆ VideoOptionsFunc

typedef void(*) asdk::VideoOptionsFunc(const video_options_t *videoOptions, void *opaque)

The sending client reported its encoder settings, see video_options_t.

Definition at line 858 of file asmirasdk.h.

◆ VideoModeFunc

typedef void(*) asdk::VideoModeFunc(const video_mode_t *videoMode, void *opaque)

The sending client switched photo mode, ROI or streaming on or off.

Definition at line 861 of file asmirasdk.h.

◆ RoomPreviewImageFunc

typedef void(*) asdk::RoomPreviewImageFunc(const uint32_t roomID, const uint64_t utc, const ImageFormat imageFormat, const uint8_t *data, const uint32_t size, void *opaque)

A room preview image arrived for a room announced with RoomStatePreview.

utc is the Unix time in seconds it was taken; data is valid only for the duration of the callback.

Definition at line 871 of file asmirasdk.h.

Enumeration Type Documentation

◆ StreamType

Kind of payload delivered by EncodedStreamFunc.

Enumerator
StreamTypeUnknown 

Not supported by this SDK

StreamType264Frame 

Raw 264 frame

StreamType265Frame 

Raw 265 frame

StreamTypeAV1Frame 

Raw AV1 frame

StreamTypeMPEGTS 

MPEG-TS data chunk

StreamTypeWEBP 

WebP image file

Examples
example_complete.cpp.

Definition at line 304 of file asmirasdk.h.

◆ ImageFormat

Encoding of the image delivered by RoomPreviewImageFunc.

Current servers send ImageFormatJPEG or ImageFormatWEBP; the remaining values are reserved for future use.

Enumerator
ImageFormatUndef 

Undefined

ImageFormatJPEG 

JPEG file

ImageFormatWEBP 

WebP file

ImageFormatHEIF 

HEIF file, reserved

ImageFormatAVIF 

AVIF file, reserved

ImageFormatAV1 

AV1 keyframe, decodable as a single image, reserved

ImageFormatH265 

H.265 keyframe, decodable as a single image, reserved

Examples
example_complete.cpp.

Definition at line 320 of file asmirasdk.h.

Function Documentation

◆ SetFrameCallback()

void asdk::sdk_t::SetFrameCallback ( FrameFunc func,
void * opaque = nullptr )
inline

Video/Photo Frame callback.

Parameters
funcCallback to install.
opaqueCaller data passed back unchanged to every invocation.

Definition at line 1443 of file asmirasdk.h.

◆ SetEncodedStreamCallback()

void asdk::sdk_t::SetEncodedStreamCallback ( EncodedStreamFunc func,
void * opaque = nullptr )
inline

Encoded Frame or stream callback.

Parameters
funcCallback to install.
opaqueCaller data passed back unchanged to every invocation.

Definition at line 1455 of file asmirasdk.h.

◆ SetVideoOptionsCallback()

void asdk::sdk_t::SetVideoOptionsCallback ( VideoOptionsFunc func,
void * opaque = nullptr )
inline

Video Options callback.

Parameters
funcCallback to install.
opaqueCaller data passed back unchanged to every invocation.

Definition at line 1479 of file asmirasdk.h.

◆ SetVideoModeCallback()

void asdk::sdk_t::SetVideoModeCallback ( VideoModeFunc func,
void * opaque = nullptr )
inline

Video Mode callback.

Parameters
funcCallback to install.
opaqueCaller data passed back unchanged to every invocation.

Definition at line 1491 of file asmirasdk.h.

◆ SetRoomPreviewImageCallback()

void asdk::sdk_t::SetRoomPreviewImageCallback ( RoomPreviewImageFunc func,
void * opaque = nullptr )
inline

Room Preview Image callback.

Parameters
funcCallback to install.
opaqueCaller data passed back unchanged to every invocation.

Definition at line 1527 of file asmirasdk.h.