Skip to main content

MTCapture API Reference

Functions

Function MTCapCreateCapture

MTCAPSTATUS MTCAPAPI MTCapCreateCapture(MTCAP_CREATE_CAPTURE_PARAMS *pCreateCaptureParams, MTCAP_INSTANCE *captureInstance)

Creates a capture instance.

Creates a capture and returns a pointer to the capture interface in the MTCAP_INSTANCE parameter. The client should start the capturing process by calling this function first. The client must call MTCapReleaseCapture() before exiting.

Parameters:

  • pCreateCaptureParams: A pointer to MTCAP_CREATE_CAPTURE_PARAMS.
  • captureInstance: The captureInstance pointer to the MTCaptureAPI interface.

Returns:

MTCAP_SUCCESS
MTCAP_ERR_INVALID_VERSION
MTCAP_ERR_INVALID_PARAM
MTCAP_ERR_MAX_CLIENTS
MTCAP_ERR_OUT_OF_MEMORY
MTCAP_ERR_UNSUPPORTED
MTCAP_ERR_SERVER
MTCAP_ERR_UNKNOWN

Function MTCapReleaseCapture

MTCAPSTATUS MTCAPAPI MTCapReleaseCapture(MTCAP_INSTANCE capture)

Releases a capture.

Releases the capture previously created using MTCapCreateCapture(). After this function returns, it is not possible to use this MTCAP_INSTANCE for any further API call.

Parameters:

  • capture: The object of MTCAP_INSTANCE .

Returns:

MTCAP_SUCCESS
MTCAP_ERR_INVALID_PARAM

Function MTCapInitCapture

MTCAPSTATUS MTCAPAPI MTCapInitCapture(MTCAP_INSTANCE capture, MTCAP_INIT_PARAMS *pInitParams)

Initializes the capture.

This function must be used to initialize the capture. The initialization parameters are passed using *pInitParams.

Parameters:

Returns:

MTCAP_SUCCESS
MTCAP_ERR_INVALID_VERSION
MTCAP_ERR_INVALID_PARAM
MTCAP_ERR_OUT_OF_MEMORY
MTCAP_ERR_UNSUPPORTED
MTCAP_ERR_SERVER
MTCAP_ERR_WRONG_REQUEST
MTCAP_ERR_UNKNOWN

Function MTCapGetCaptureInfo

MTCAPSTATUS MTCAPAPI MTCapGetCaptureInfo(MTCAP_INSTANCE capture, MTCAP_GET_CAPTURE_INFO *pCaptureInfoParams)

Gets the current output renders and visible windows of the system.

This function queries the system for various information.

Parameters:

Returns:

MTCAP_SUCCESS
MTCAP_ERR_INVALID_VERSION
MTCAP_ERR_INVALID_PARAM
MTCAP_ERR_UNSUPPORTED
MTCAP_ERR_UNKNOWN

Function MTCapSetUp

MTCAPSTATUS MTCAPAPI MTCapSetUp(MTCAP_INSTANCE capture, MTCAP_SETUP_PARAMS *pSetupParams)

Sets up a capture session.

This will allocate the system memory to store the frame buffer for tosys.

Parameters:

Returns:

MTCAP_SUCCESS
MTCAP_ERR_INVALID_VERSION
MTCAP_ERR_INVALID_PARAM
MTCAP_ERR_OUT_OF_MEMORY
MTCAP_ERR_UNSUPPORTED
MTCAP_ERR_WRONG_REQUEST
MTCAP_ERR_UNKNOWN

Function MTCapGrabFrame

MTCAPSTATUS MTCAPAPI MTCapGrabFrame(MTCAP_INSTANCE capture, MTCAP_GRAB_FRAME_PARAMS *pGrabFrameParams)

Grabs one frame.

After this function is called, it may get one new frame or the previous frame, and no frame available in timeout. Parameters:

Returns:

MTCAP_SUCCESS
MTCAP_ERR_INVALID_VERSION
MTCAP_ERR_INVALID_PARAM
MTCAP_ERR_WRONG_REQUEST
MTCAP_ERR_UNKNOWN

Function MTCaptureAPICreateInstance

MTCAPSTATUS MTCaptureAPICreateInstance(MT_CAPTURE_API_FUNCTION_LIST *pFunctionList)

The entry point to the MTCaptureAPI interface.

Creates an instance of the MTCaptureAPI interface and populates the pFunctionList with function pointers to the API routines implemented by MTCaptureAPI.

Parameters:

Returns:

  • MTCAP_SUCCESS
  • MTCAP_ERR_INVALID_PARAM
  • MTCAP_ERR_INVALID_VERSION

MTCaptureAPI Data Structures

Enumeration types

Enumeration type _MTCAPSTATUS

Definition: mtCaptureAPI.h (line 142)

enum _MTCAPSTATUS {
MTCAP_SUCCESS,
MTCAP_ERR_INVALID_VERSION,
MTCAP_ERR_INVALID_PARAM,
MTCAP_ERR_MAX_CLIENTS,
MTCAP_ERR_OUT_OF_MEMORY,
MTCAP_ERR_UNSUPPORTED,
MTCAP_ERR_SERVER,
MTCAP_ERR_WRONG_REQUEST,
MTCAP_RESOLUTION_CHANGED,
MTCAP_ERR_UNKNOWN
}

Returns codes.

Enumerator MTCAP_SUCCESS

This indicates that the API call returned with no errors.

Enumerator MTCAP_ERR_INVALID_VERSION

The client API is not compatible with the SDK or server.

Enumerator MTCAP_ERR_INVALID_PARAM

At least one parameter value passed to the API is invalid.

Enumerator MTCAP_ERR_MAX_CLIENTS

The client is over the maximum number per process. A process supports a maximum of 10 clients.

Enumerator MTCAP_ERR_OUT_OF_MEMORY

Out of memory.

Enumerator MTCAP_ERR_UNSUPPORTED

The requested feature is not currently supported for the current version.

Enumerator MTCAP_ERR_SERVER

The capture server has been terminated.

Enumerator MTCAP_ERR_WRONG_REQUEST

The requested was not expected. it may more than one time api call or wrong order api call.

Enumerator MTCAP_RESOLUTION_CHANGED

The resolution has been changed.

Enumerator MTCAP_ERR_UNKNOWN

An unknown internal error has occurred.

Enumeration type _MTCAP_BOOL

Definition: mtCaptureAPI.h (line 199)

enum _MTCAP_BOOL {
MTCAP_FALSE = 0,
MTCAP_TRUE
}

Defines Boolean values for MTCapture.

Enumerator MTCAP_FALSE

Indicates a false value.

Enumerator MTCAP_TRUE

Indicates a true value.

Enumeration type _MTCAP_PLATFORM_TYPE

Definition: mtCaptureAPI.h (line 207)

enum _MTCAP_PLATFORM_TYPE {
MTCAP_PLATFORM_TYPE_LINUX
}

Defines the platform specifications.

Enumerator MTCAP_PLATFORM_TYPE_LINUX

The current platform will use capture.

Enumeration type _MTCAP_CAPTURE_TYPE

Definition: mtCaptureAPI.h (line 240)

enum _MTCAP_CAPTURE_TYPE {
MTCAP_CAPTURE_TYPE_TO_FD,
MTCAP_CAPTURE_TYPE_TO_SYS
}

Defines the capture type.

Enumerator MTCAP_CAPTURE_TYPE_TO_FD

Default value. The application can get fd of the frame buffer based on DMA-BUF.

Enumerator MTCAP_CAPTURE_TYPE_TO_SYS

The application can get frame buffer in system memory. Not supported

Enumeration type _MTCAP_TARGET_TYPE

Definition: mtCaptureAPI.h (line 248)

enum _MTCAP_TARGET_TYPE {
MTCAP_TARGET_TYPE_DEFAULT,
MTCAP_TARGET_TYPE_OUTPUT,
MTCAP_TARGET_TYPE_WINDOW
}

Defines the target type of the capture.

Enumerator MTCAP_TARGET_TYPE_DEFAULT

Default value. The application will capture the primary screen.

Enumerator MTCAP_TARGET_TYPE_OUTPUT

The application will capture the xrandr's screen by its ID. The list of connected outputs can be queried using MTCapGetCaptureInfo().

Enumerator MTCAP_TARGET_TYPE_WINDOW

The application will capture the window by its ID. Not supported

Enumeration type _MTCAP_BUFFER_FORMAT

Definition: mtCaptureAPI.h (line 298)

enum _MTCAP_BUFFER_FORMAT {
MTCAP_BUFFER_FORMAT_BGRA,
MTCAP_BUFFER_FORMAT_NV12
}

Defines the buffer format of the frame. More formats will be supported in the future.

Enumerator MTCAP_BUFFER_FORMAT_BGRA

Default value. BGRA8888 (32 bpp). This does not need format conversion.

Enumerator MTCAP_BUFFER_FORMAT_NV12

Semi-planar YUV. The Y plane is followed by the interleaved UV plane. Data will be converted to NV12 format.

Enumeration type _MTCAP_GRAB_POLICY_FLAGS

Definition: mtCaptureAPI.h (line 331)

enum _MTCAP_GRAB_POLICY_FLAGS {
MTCAP_GRAB_POLICY_FLAGS_BLOCK_TIMEOUT,
MTCAP_GRAB_POLICY_FLAGS_NOFLAG,
MTCAP_GRAB_POLICY_FLAGS_BLOCK
}

Defines the grab frame policy.

Enumerator MTCAP_GRAB_POLICY_FLAGS_BLOCK_TIMEOUT

The capture will wait for a new frame or mouse move. It can get a new frame if the timer expires.

Enumerator MTCAP_GRAB_POLICY_FLAGS_NOFLAG

The capture will get a new frame immediately, whether a new frame is available or the mouse is moved.

Enumerator MTCAP_GRAB_POLICY_FLAGS_BLOCK

The capture will wait for a new frame or mouse move. It may get a new frame or the last frame if the timer expires.

Typedefs

Typedef MTCAP_INSTANCE

Definition: mtCaptureAPI.h (line 111)

typedef void* MTCAP_INSTANCE

Used to identify an MTCapture instance.

Return type: void *

Typedef MTCAPSTATUS

Definition: mtCaptureAPI.h (line 194)

typedef enum _MTCAPSTATUS MTCAPSTATUS

Returns codes.

Return type: enum _MTCAPSTATUS

Typedef MTCAP_BOOL

Definition: mtCaptureAPI.h (line 202)

typedef enum _MTCAP_BOOL MTCAP_BOOL

Defines Boolean values for MTCapture.

Return type: enum _MTCAP_BOOL

Typedef MTCAP_PLATFORM_TYPE

Definition: mtCaptureAPI.h (line 209)

typedef enum _MTCAP_PLATFORM_TYPE MTCAP_PLATFORM_TYPE

Defines the platform specifications.

Return type: enum _MTCAP_PLATFORM_TYPE

Typedef MTCAP_DISPLAY_INFO

Definition: mtCaptureAPI.h (line 217)

typedef struct _MTCAP_DISPLAY_INFO MTCAP_DISPLAY_INFO

Defines the display information.

Return type: struct _MTCAP_DISPLAY_INFO

Typedef MTCAP_CREATE_CAPTURE_PARAMS

Definition: mtCaptureAPI.h (line 230)

typedef struct _MTCAP_CREATE_CAPTURE_PARAMS MTCAP_CREATE_CAPTURE_PARAMS

Defines the parameters for the MTCapCreateCapture API call.

Return type: struct _MTCAP_CREATE_CAPTURE_PARAMS

Typedef MTCAP_CAPTURE_TYPE

Definition: mtCaptureAPI.h (line 243)

typedef enum _MTCAP_CAPTURE_TYPE MTCAP_CAPTURE_TYPE

Defines the capture type.

Return type: enum _MTCAP_CAPTURE_TYPE

Typedef MTCAP_TARGET_TYPE

Definition: mtCaptureAPI.h (line 253)

typedef enum _MTCAP_TARGET_TYPE MTCAP_TARGET_TYPE

Defines the target type of the capture.

Return type: enum _MTCAP_TARGET_TYPE

Typedef MTCAP_ZONE

Definition: mtCaptureAPI.h (line 263)

typedef struct _MTCAP_ZONE MTCAP_ZONE

Defines the zone for the capture.

Return type: struct _MTCAP_ZONE

Typedef MTCAP_SIZE

Definition: mtCaptureAPI.h (line 271)

typedef struct _MTCAP_CAPTURE_SIZE MTCAP_SIZE

Size of a frame buffer.

Return type: struct _MTCAP_CAPTURE_SIZE

Typedef MTCAP_INIT_PARAMS

Definition: mtCaptureAPI.h (line 288)

typedef struct _MTCAP_INIT_PARAMS MTCAP_INIT_PARAMS

Defines the parameters for the MTCapInitCapture API call.

Return type: struct _MTCAP_INIT_PARAMS

Typedef MTCAP_BUFFER_FORMAT

Definition: mtCaptureAPI.h (line 301)

typedef enum _MTCAP_BUFFER_FORMAT MTCAP_BUFFER_FORMAT

Defines the buffer format of the frame. More formats will be supported in the future.

Return type: enum _MTCAP_BUFFER_FORMAT

Typedef MTCAP_SETUP_PARAMS

Definition: mtCaptureAPI.h (line 321)

typedef struct _MTCAP_SETUP_PARAMS MTCAP_SETUP_PARAMS

Defines the parameters for MTCapSetUp API call.

Return type: struct _MTCAP_SETUP_PARAMS

Typedef MTCAP_GRAB_POLICY_FLAGS

Definition: mtCaptureAPI.h (line 335)

typedef enum _MTCAP_GRAB_POLICY_FLAGS MTCAP_GRAB_POLICY_FLAGS

Defines the grab frame policy.

Return type: enum _MTCAP_GRAB_POLICY_FLAGS

Typedef MTCAP_GRAB_FRAME_INFO

Definition: mtCaptureAPI.h (line 352)

typedef struct _MTCAP_GRAB_FRAME_INFO MTCAP_GRAB_FRAME_INFO

Defines information struct about the captured frame.

Return type: struct _MTCAP_GRAB_FRAME_INFO

Typedef MTCAP_GRAB_FRAME_PARAMS

Definition: mtCaptureAPI.h (line 369)

typedef struct _MTCAP_GRAB_FRAME_PARAMS MTCAP_GRAB_FRAME_PARAMS

Defines the parameters for MTCapGrabFrame API call.

Return type: struct _MTCAP_GRAB_FRAME_PARAMS

Typedef MTCAP_RANDER_OUTPUT_INFO

Definition: mtCaptureAPI.h (line 383)

typedef struct _MTCAP_RANDER_OUTPUT_INFO MTCAP_RANDER_OUTPUT_INFO

Defines the structure of render output from xrandr

Return type: struct _MTCAP_RANDER_OUTPUT_INFO

Typedef MTCAP_VISIBLE_WINDOW_INFO

Definition: mtCaptureAPI.h (line 393)

typedef struct _MTCAP_VISIBLE_WINDOW_INFO MTCAP_VISIBLE_WINDOW_INFO

Defines the structure of visible window

Return type: struct _MTCAP_VISIBLE_WINDOW_INFO

Typedef MTCAP_GET_CAPTURE_INFO

Definition: mtCaptureAPI.h (line 412)

typedef struct _MTCAP_GET_CAPTURE_INFO MTCAP_GET_CAPTURE_INFO

Defines the parameters for MTCapGetCaptureInfo API call.

Return type: struct _MTCAP_GET_CAPTURE_INFO

Typedef MT_CAPTURE_API_FUNCTION_LIST

Definition: mtCaptureAPI.h (line 582)

typedef struct _MT_CAPTURE_API_FUNCTION_LIST MT_CAPTURE_API_FUNCTION_LIST

A list of pointers to the MTCaptureAPI functions.

Return type: struct _MT_CAPTURE_API_FUNCTION_LIST

Macros

Macro MTCAPAPI_VERSION

#define MTCAPAPI_VERSION (uint32_t) ((MTCAPAPI_MAJOR_VERSION << 16) | (MTCAPAPI_MINOR_VERSION << 8) | MTCAPAPI_PATCH_VERSION)

The MTCatpureAPI version.

Macro MTCAP_STRUCT_VERSION

#define MTCAP_STRUCT_VERSION (uint32_t) (ver | ([MTCAPAPI\_VERSION](#group__CAPTURE__STRUCTURE_1ga289f27921299e124f3983e56d5955088) << 8))( ver )

Defines the version number for the structure parameter.

Macro MTCAP_FRAME_NUM_MAX

#define MTCAP_FRAME_NUM_MAX 16

Maximum number of frame numbers that can be used to store captured frames.

Macro MTCAP_RANDER_OUTPUT_MAX

#define MTCAP_RANDER_OUTPUT_MAX 16

Maximum number of connected RandR outputs on the current system.

Macro MTCAP_VISIBLE_WINDOW_MAX

#define MTCAP_VISIBLE_WINDOW_MAX 32

Maximum number of windows that can be enumerated.

Macro MTCAP_NAME_LEN_MAX

#define MTCAP_NAME_LEN_MAX 128

Maximum size in bytes of a RandR output name, or a window name or the device name of a captured frame.

Macro MTCAP_CLINETS_PEER_PROCESS_MAX

#define MTCAP_CLINETS_PEER_PROCESS_MAX 10

Maximum client size in peer process.

Macro MTCAP_CREATE_CAPTURE_PARAMS_VER

#define MTCAP_CREATE_CAPTURE_PARAMS_VER [MTCAP\_STRUCT\_VERSION](#group__CAPTURE__STRUCTURE_1ga5f345a3e60994fb435b7e04b95fe0823)(1)

MTCAP_CREATE_CAPTURE_PARAMS structure version.

Macro MTCAP_INIT_PARAMS_VER

#define MTCAP_INIT_PARAMS_VER [MTCAP\_STRUCT\_VERSION](#group__CAPTURE__STRUCTURE_1ga5f345a3e60994fb435b7e04b95fe0823)(1)

MTCAP_INIT_PARAMS structure version.

Macro MTCAP_SETUP_PARAMS_VER

#define MTCAP_SETUP_PARAMS_VER [MTCAP\_STRUCT\_VERSION](#group__CAPTURE__STRUCTURE_1ga5f345a3e60994fb435b7e04b95fe0823)(1)

MTCAP_SETUP_PARAMS structure version.

Macro MTCAP_GRAB_FRAME_PARAMS_VER

#define MTCAP_GRAB_FRAME_PARAMS_VER [MTCAP\_STRUCT\_VERSION](#group__CAPTURE__STRUCTURE_1ga5f345a3e60994fb435b7e04b95fe0823)(2)

MTCAP_GRAB_FRAME_PARAMS structure version.

Macro MTCAP_GET_CAPTURE_INFO_VER

#define MTCAP_GET_CAPTURE_INFO_VER [MTCAP\_STRUCT\_VERSION](#group__CAPTURE__STRUCTURE_1ga5f345a3e60994fb435b7e04b95fe0823)(1)

MTCAP_GET_CAPTURE_INFO structure version.


Structures


Index of Structures

_


Structure _MTCAP_CAPTURE_SIZE

Definition: mtCaptureAPI.h (line 268)

Size of a frame buffer.

Members

Public attributes

Variable width

Definition: mtCaptureAPI.h (line 269)

uint32_t _MTCAP_CAPTURE_SIZE::width

[in]: The width of the frame buffer.

Type: uint32_t

Variable height

Definition: mtCaptureAPI.h (line 270)

uint32_t _MTCAP_CAPTURE_SIZE::height

[in]: The height of the frame buffer.

Type: uint32_t


Structure _MTCAP_CREATE_CAPTURE_PARAMS

Definition: mtCaptureAPI.h (line 222)

Defines the parameters for the MTCapCreateCapture API call.

Members

Public attributes

Variable version

Definition: mtCaptureAPI.h (line 223)

uint32_t _MTCAP_CREATE_CAPTURE_PARAMS::version

[in]: The struct version. Must be set to MTCAP_CREATE_CAPTURE_PARAMS_VER.

Type: uint32_t

Variable platformType

Definition: mtCaptureAPI.h (line 224)

MTCAP_PLATFORM_TYPE _MTCAP_CREATE_CAPTURE_PARAMS::platformType

[in]: The platform type. Only MTCAP_PLATFORM_TYPE_LINUX is supported.

Type: MTCAP_PLATFORM_TYPE

Variable privData

Definition: mtCaptureAPI.h (line 225)

const void* _MTCAP_CREATE_CAPTURE_PARAMS::privData

[in]: The private data. Not used.

Type: const void *

Variable privDataSize

Definition: mtCaptureAPI.h (line 226)

uint32_t _MTCAP_CREATE_CAPTURE_PARAMS::privDataSize

[in]: The size of the private data. Not used.

Type: uint32_t

Variable displayInfo

Definition: mtCaptureAPI.h (line 227)

MTCAP_DISPLAY_INFO* _MTCAP_CREATE_CAPTURE_PARAMS::displayInfo

[in]: The display that the capture will be connected to. The default display will be used if this is null.

Type: MTCAP_DISPLAY_INFO *

Variable reserved0

Definition: mtCaptureAPI.h (line 228)

uint32_t _MTCAP_CREATE_CAPTURE_PARAMS::reserved0[16][16]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved1

Definition: mtCaptureAPI.h (line 229)

void* _MTCAP_CREATE_CAPTURE_PARAMS::reserved1[4][4]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MTCAP_DISPLAY_INFO

Definition: mtCaptureAPI.h (line 214)

Defines the display information.

Members

Public attributes

Variable displayName

Definition: mtCaptureAPI.h (line 215)

char _MTCAP_DISPLAY_INFO::displayName[MTCAP_NAME_LEN_MAX][MTCAP_NAME_LEN_MAX]

The display will be used. Examples: ":0.0", ":0.1", and ":1.0". For DISPLAY=:0.0, it is ":0.0".

Type: char

Variable nameLen

Definition: mtCaptureAPI.h (line 216)

int _MTCAP_DISPLAY_INFO::nameLen

The size of the display name.

Type: int


Structure _MTCAP_GET_CAPTURE_INFO

Definition: mtCaptureAPI.h (line 398)

Defines the parameters for MTCapGetCaptureInfo API call.

Members

Public attributes

Variable version

Definition: mtCaptureAPI.h (line 400)

uint32_t _MTCAP_GET_CAPTURE_INFO::version

[in]: The struct version. Must be set to MTCAP_GET_CAPTURE_INFO_VER.

Type: uint32_t

Variable sdkVersion

Definition: mtCaptureAPI.h (line 401)

uint32_t _MTCAP_GET_CAPTURE_INFO::sdkVersion

[out]: The SDK version on this system.

Type: uint32_t

Variable targetType

Definition: mtCaptureAPI.h (line 402)

MTCAP_TARGET_TYPE _MTCAP_GET_CAPTURE_INFO::targetType

[in]: The desired target type.

Type: MTCAP_TARGET_TYPE

Variable isCaptureSupported

Definition: mtCaptureAPI.h (line 403)

MTCAP_BOOL _MTCAP_GET_CAPTURE_INFO::isCaptureSupported

[out]: Whether MTCapture is available on this driver.

Type: MTCAP_BOOL

Variable isXRandrAvailable

Definition: mtCaptureAPI.h (line 404)

MTCAP_BOOL _MTCAP_GET_CAPTURE_INFO::isXRandrAvailable

[out]: Whether xrandr is available on this system.

Type: MTCAP_BOOL

Variable screenSize

Definition: mtCaptureAPI.h (line 405)

MTCAP_SIZE _MTCAP_GET_CAPTURE_INFO::screenSize

[out]: The size of the X screen.

Type: MTCAP_SIZE

Variable outputCount

Definition: mtCaptureAPI.h (line 406)

uint32_t _MTCAP_GET_CAPTURE_INFO::outputCount

[out]: The count of render outputs in the current system.

Type: uint32_t

Variable outputLists

Definition: mtCaptureAPI.h (line 407)

MTCAP_RANDER_OUTPUT_INFO _MTCAP_GET_CAPTURE_INFO::outputLists[MTCAP_RANDER_OUTPUT_MAX][MTCAP_RANDER_OUTPUT_MAX]

[out]: The list of render outputs.

Type: MTCAP_RANDER_OUTPUT_INFO

Variable windowCount

Definition: mtCaptureAPI.h (line 408)

uint32_t _MTCAP_GET_CAPTURE_INFO::windowCount

[out]: The count of visible windows on current system.

Type: uint32_t

Variable windowLists

Definition: mtCaptureAPI.h (line 409)

MTCAP_VISIBLE_WINDOW_INFO _MTCAP_GET_CAPTURE_INFO::windowLists[MTCAP_VISIBLE_WINDOW_MAX][MTCAP_VISIBLE_WINDOW_MAX]

[out]: The list of visible windows.

Type: MTCAP_VISIBLE_WINDOW_INFO

Variable reserved0

Definition: mtCaptureAPI.h (line 410)

uint32_t _MTCAP_GET_CAPTURE_INFO::reserved0[16][16]

[out]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved1

Definition: mtCaptureAPI.h (line 411)

void* _MTCAP_GET_CAPTURE_INFO::reserved1[4][4]

[out]: Reserved and must be set to NULL.

Type: void *


Structure _MTCAP_GRAB_FRAME_INFO

Definition: mtCaptureAPI.h (line 340)

Defines information struct about the captured frame.

Members

Public attributes

Variable width

Definition: mtCaptureAPI.h (line 341)

uint32_t _MTCAP_GRAB_FRAME_INFO::width

[out]: The width of the captured frame.

Type: uint32_t

Variable height

Definition: mtCaptureAPI.h (line 342)

uint32_t _MTCAP_GRAB_FRAME_INFO::height

[out]: The height of the captured frame.

Type: uint32_t

Variable sizeInByte

Definition: mtCaptureAPI.h (line 343)

uint32_t _MTCAP_GRAB_FRAME_INFO::sizeInByte

[out]: The size of the captured frame in bytes.

Type: uint32_t

Variable frameId

Definition: mtCaptureAPI.h (line 344)

uint32_t _MTCAP_GRAB_FRAME_INFO::frameId

[out]: The ID of the captured frame from the beginning.

Type: uint32_t

Variable isNewFrame

Definition: mtCaptureAPI.h (line 345)

MTCAP_BOOL _MTCAP_GRAB_FRAME_INFO::isNewFrame

[out]: Whether the captured frame is a new frame.

Type: MTCAP_BOOL

Variable needPostProcess

Definition: mtCaptureAPI.h (line 346)

MTCAP_BOOL _MTCAP_GRAB_FRAME_INFO::needPostProcess

[out]: Whether the captured frame needs post processing.

Type: MTCAP_BOOL

Variable numPlanes

Definition: mtCaptureAPI.h (line 347)

uint32_t _MTCAP_GRAB_FRAME_INFO::numPlanes

The planes of the video frame, can not be greater than 4

Type: uint32_t

Variable reserved

Definition: mtCaptureAPI.h (line 348)

uint32_t _MTCAP_GRAB_FRAME_INFO::reserved[3][3]

Type: uint32_t

Variable pitches

Definition: mtCaptureAPI.h (line 349)

uint32_t _MTCAP_GRAB_FRAME_INFO::pitches[4][4]

An array indicating the scanline pitch in bytes for each plane

Type: uint32_t

Variable offsets

Definition: mtCaptureAPI.h (line 350)

uint32_t _MTCAP_GRAB_FRAME_INFO::offsets[4][4]

An array indicating the byte offset from the beginning of the image data to the start of each plane.

Type: uint32_t

Variable reserved1

Definition: mtCaptureAPI.h (line 351)

uint32_t _MTCAP_GRAB_FRAME_INFO::reserved1[4][4]

Reserved for future use (set to zero)

Type: uint32_t


Structure _MTCAP_GRAB_FRAME_PARAMS

Definition: mtCaptureAPI.h (line 357)

Defines the parameters for MTCapGrabFrame API call.

Members

Public attributes

Variable version

Definition: mtCaptureAPI.h (line 358)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::version

[in]: The struct version. Must be set to MTCAP_GRAB_FRAME_PARAMS_VER.

Type: uint32_t

Variable grabPolicy

Definition: mtCaptureAPI.h (line 359)

MTCAP_GRAB_POLICY_FLAGS _MTCAP_GRAB_FRAME_PARAMS::grabPolicy

[in]: Sets the behavior of this frame capture.

Type: MTCAP_GRAB_POLICY_FLAGS

Variable timeoutMs

Definition: mtCaptureAPI.h (line 360)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::timeoutMs

[in]: Sets the timeout in milliseconds in block mode (MTCAP_GRAB_POLICY_FLAGS_BLOCK/MTCAP_GRAB_POLICY_FLAGS_BLOCK_TIMEOUT).

Type: uint32_t

Variable frameIndex

Definition: mtCaptureAPI.h (line 361)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::frameIndex

[out]: The index of the current capture frame.

Type: uint32_t

Variable frameInfo

Definition: mtCaptureAPI.h (line 362)

MTCAP_GRAB_FRAME_INFO* _MTCAP_GRAB_FRAME_PARAMS::frameInfo

[out]: The frame information about the captured frame.

Type: MTCAP_GRAB_FRAME_INFO *

Variable x

Definition: mtCaptureAPI.h (line 363)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::x

[out]: The x coordinate of the screen.

Type: uint32_t

Variable y

Definition: mtCaptureAPI.h (line 364)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::y

[out]: The y coordinate of the screen.

Type: uint32_t

Variable width

Definition: mtCaptureAPI.h (line 365)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::width

[out]: The width of the screen.

Type: uint32_t

Variable height

Definition: mtCaptureAPI.h (line 366)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::height

[out]: The height of the screen.

Type: uint32_t

Variable reserved0

Definition: mtCaptureAPI.h (line 367)

uint32_t _MTCAP_GRAB_FRAME_PARAMS::reserved0[12][12]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved1

Definition: mtCaptureAPI.h (line 368)

void* _MTCAP_GRAB_FRAME_PARAMS::reserved1[4][4]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MTCAP_INIT_PARAMS

Definition: mtCaptureAPI.h (line 276)

Defines the parameters for the MTCapInitCapture API call.

Members

Public attributes

Variable version

Definition: mtCaptureAPI.h (line 277)

uint32_t _MTCAP_INIT_PARAMS::version

[in]: The struct version. Must be set to MTCAP_INIT_PARAMS_VER.

Type: uint32_t

Variable capureType

Definition: mtCaptureAPI.h (line 278)

MTCAP_CAPTURE_TYPE _MTCAP_INIT_PARAMS::capureType

[in]: The desired usage scenario for capture.

Type: MTCAP_CAPTURE_TYPE

Variable targetType

Definition: mtCaptureAPI.h (line 279)

MTCAP_TARGET_TYPE _MTCAP_INIT_PARAMS::targetType

[in]: The desired target type.

Type: MTCAP_TARGET_TYPE

Variable targetId

Definition: mtCaptureAPI.h (line 280)

uint32_t _MTCAP_INIT_PARAMS::targetId

[in]: The ID of the output or the window to capture.

Type: uint32_t

Variable captureZone

Definition: mtCaptureAPI.h (line 281)

MTCAP_ZONE _MTCAP_INIT_PARAMS::captureZone

[in]: The desired capture zone.

Type: MTCAP_ZONE

Variable frameSize

Definition: mtCaptureAPI.h (line 282)

MTCAP_SIZE _MTCAP_INIT_PARAMS::frameSize

[in]: The desired frame buffer size which allows scaling the captured frame. This can be set to 0 to disable frame resizing.

Type: MTCAP_SIZE

Variable frameRate

Definition: mtCaptureAPI.h (line 284)

uint32_t _MTCAP_INIT_PARAMS::frameRate

[in]: The desired fps of the capture frame buffer. Suggested as 1-120. The default is 60.

Type: uint32_t

Variable enableCursor

Definition: mtCaptureAPI.h (line 285)

MTCAP_BOOL _MTCAP_INIT_PARAMS::enableCursor

[in]: The cursor will be composited into the frame buffer.

Type: MTCAP_BOOL

Variable reserved0

Definition: mtCaptureAPI.h (line 286)

uint32_t _MTCAP_INIT_PARAMS::reserved0[16][16]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved1

Definition: mtCaptureAPI.h (line 287)

void* _MTCAP_INIT_PARAMS::reserved1[4][4]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MTCAP_RANDER_OUTPUT_INFO

Definition: mtCaptureAPI.h (line 379)

Defines the structure of render output from xrandr

Members

Public attributes

Variable outputId

Definition: mtCaptureAPI.h (line 380)

uint32_t _MTCAP_RANDER_OUTPUT_INFO::outputId

[out]: The current render ID.

Type: uint32_t

Variable outputName

Definition: mtCaptureAPI.h (line 381)

char _MTCAP_RANDER_OUTPUT_INFO::outputName[MTCAP_NAME_LEN_MAX][MTCAP_NAME_LEN_MAX]

[out]: The current render name.

Type: char

Variable outputZone

Definition: mtCaptureAPI.h (line 382)

MTCAP_ZONE _MTCAP_RANDER_OUTPUT_INFO::outputZone

[out]: The zone of this render.

Type: MTCAP_ZONE


Structure _MTCAP_SETUP_PARAMS

Definition: mtCaptureAPI.h (line 306)

Defines the parameters for MTCapSetUp API call.

Members

Public attributes

Variable version

Definition: mtCaptureAPI.h (line 307)

uint32_t _MTCAP_SETUP_PARAMS::version

[in]: The struct version. Must be set to MTCAP_SETUP_PARAMS_VER.

Type: uint32_t

Variable bufferFormat

Definition: mtCaptureAPI.h (line 308)

MTCAP_BUFFER_FORMAT _MTCAP_SETUP_PARAMS::bufferFormat

[in]: The desired buffer format.

Type: MTCAP_BUFFER_FORMAT

Variable roundFrameSize

Definition: mtCaptureAPI.h (line 309)

MTCAP_BOOL _MTCAP_SETUP_PARAMS::roundFrameSize

[in]: Whether the requested frame size should be rounded. Some pixel formats have resolution requirements. For example, NV12 formats must have a width and a height of multiples of 2. But RGB formats do not have such requirements. If set to MTCAP_FALSE and the resolution does not meet the requirements of the format, then it will fail at setup time.

Type: MTCAP_BOOL

Variable outFrameSize

Definition: mtCaptureAPI.h (line 313)

MTCAP_SIZE _MTCAP_SETUP_PARAMS::outFrameSize

[out]: The actual frame size from SDK.

Type: MTCAP_SIZE

Variable deviceName

Definition: mtCaptureAPI.h (line 314)

char _MTCAP_SETUP_PARAMS::deviceName[MTCAP_NAME_LEN_MAX][MTCAP_NAME_LEN_MAX]

[out]: The device name of captured frame, see /dev/dri.

Type: char

Variable frameCount

Definition: mtCaptureAPI.h (line 315)

uint32_t _MTCAP_SETUP_PARAMS::frameCount

[out]: The count of frame buffers to store captured frames.

Type: uint32_t

Variable frameLists

Definition: mtCaptureAPI.h (line 316)

uint32_t _MTCAP_SETUP_PARAMS::frameLists[MTCAP_FRAME_NUM_MAX][MTCAP_FRAME_NUM_MAX]

[out]: The lists of the captured frames.

Type: uint32_t

Variable pFrameBuffer

Definition: mtCaptureAPI.h (line 317)

void** _MTCAP_SETUP_PARAMS::pFrameBuffer

[in]: For MTCAP_CAPTURE_TYPE_TO_SYS, it pointer to a pointer to a buffer in system memory. The buffer will be allocated and freed by MTCapture library. Not supported

Type: void **

Variable reserved0

Definition: mtCaptureAPI.h (line 319)

uint32_t _MTCAP_SETUP_PARAMS::reserved0[16][16]

[in]: Reserved and must be set to 0.

Type: uint32_t

Variable reserved1

Definition: mtCaptureAPI.h (line 320)

void* _MTCAP_SETUP_PARAMS::reserved1[4][4]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MT_CAPTURE_API_FUNCTION_LIST

Definition: mtCaptureAPI.h (line 571)

A list of pointers to the MTCaptureAPI functions.

Members

Public attributes

Variable version

Definition: mtCaptureAPI.h (line 573)

uint32_t _MT_CAPTURE_API_FUNCTION_LIST::version

[in]: The client should pass MTCAPAPI_VERSION.

Type: uint32_t

Variable sdkVersion

Definition: mtCaptureAPI.h (line 574)

uint32_t _MT_CAPTURE_API_FUNCTION_LIST::sdkVersion

[out]: The SDK version.

Type: uint32_t

Variable mtCapCreateCapture

Definition: mtCaptureAPI.h (line 575)

PMTCAPCREATECAPTURE _MT_CAPTURE_API_FUNCTION_LIST::mtCapCreateCapture

[out]: The client should access MTCapCreateCapture() by using this pointer.

Type: PMTCAPCREATECAPTURE

Variable mtCapReleaseCapture

Definition: mtCaptureAPI.h (line 576)

PMTCAPRELEASECAPTURE _MT_CAPTURE_API_FUNCTION_LIST::mtCapReleaseCapture

[out]: The client should access MTCapReleaseCapture() by using this pointer.

Type: PMTCAPRELEASECAPTURE

Variable mtCapInitCapture

Definition: mtCaptureAPI.h (line 577)

PMTCAPINITCAPTURE _MT_CAPTURE_API_FUNCTION_LIST::mtCapInitCapture

[out]: The client should access MTCapInitCapture() by using this pointer.

Type: PMTCAPINITCAPTURE

Variable mtCapGetCaptureInfo

Definition: mtCaptureAPI.h (line 578)

PMTCAPGETCAPTUREINFO _MT_CAPTURE_API_FUNCTION_LIST::mtCapGetCaptureInfo

[out]: The client should access MTCapGetCaptureInfo() by using this pointer.

Type: PMTCAPGETCAPTUREINFO

Variable mtCapSetUp

Definition: mtCaptureAPI.h (line 579)

PMTCAPSETUP _MT_CAPTURE_API_FUNCTION_LIST::mtCapSetUp

[out]: The client should access MTCapSetUp() by using this pointer.

Type: PMTCAPSETUP

Variable mtCapGrabFrame

Definition: mtCaptureAPI.h (line 580)

PMTCAPGRABFRAME _MT_CAPTURE_API_FUNCTION_LIST::mtCapGrabFrame

[out]: The client should access MTCapGrabFrame() by using this pointer.

Type: PMTCAPGRABFRAME

Variable reserved0

Definition: mtCaptureAPI.h (line 581)

void* _MT_CAPTURE_API_FUNCTION_LIST::reserved0[32][32]

[in]: Reserved and must be set to NULL.

Type: void *


Structure _MTCAP_VISIBLE_WINDOW_INFO

Definition: mtCaptureAPI.h (line 388)

Defines the structure of visible window

Members

Public attributes

Variable windowId

Definition: mtCaptureAPI.h (line 389)

uint32_t _MTCAP_VISIBLE_WINDOW_INFO::windowId

[out]: The current window ID on the system.

Type: uint32_t

Variable windowPid

Definition: mtCaptureAPI.h (line 390)

uint32_t _MTCAP_VISIBLE_WINDOW_INFO::windowPid

[out]: The current process ID about this window.

Type: uint32_t

Variable windowName

Definition: mtCaptureAPI.h (line 391)

char _MTCAP_VISIBLE_WINDOW_INFO::windowName[MTCAP_NAME_LEN_MAX][MTCAP_NAME_LEN_MAX]

[out]: The current window name.

Type: char

Variable windowZone

Definition: mtCaptureAPI.h (line 392)

MTCAP_ZONE _MTCAP_VISIBLE_WINDOW_INFO::windowZone

[out]: The zone of this window.

Type: MTCAP_ZONE


Structure _MTCAP_ZONE

Definition: mtCaptureAPI.h (line 258)

Defines the zone for the capture.

Members

Public attributes

Variable startX

Definition: mtCaptureAPI.h (line 259)

uint32_t _MTCAP_ZONE::startX

[in/out]: The offset of the x coordinate.

Type: uint32_t

Variable startY

Definition: mtCaptureAPI.h (line 260)

uint32_t _MTCAP_ZONE::startY

[in/out]: The offset of the y coordinate.

Type: uint32_t

Variable width

Definition: mtCaptureAPI.h (line 261)

uint32_t _MTCAP_ZONE::width

[in/out]: The width of the zone.

Type: uint32_t

Variable height

Definition: mtCaptureAPI.h (line 262)

uint32_t _MTCAP_ZONE::height

[in/out]: The height of the zone.

Type: uint32_t