capture
capture_native.h File Reference

Native Capture interface, for reading native uncompressed images. More...

Go to the source code of this file.

Typedefs

typedef struct _media_native media_native
 

Functions

media_native * capture_open_native (int width, int height)
 Open a connection to retrieve architecture dependent YUV images. More...
 
media_native * capture_open_native_channel (unsigned int channel, int width, int height)
 Open a connection to retrieve architecture dependent YUV images from a specific video channel. More...
 
void capture_start_native (media_native *nat)
 Add an initial capture request for a native image. More...
 
void * capture_get_image_native (media_native *nat)
 Read an architecture dependent YUV image. More...
 
void capture_close_native (media_native *nat)
 Close connection to native image reading. More...
 

Detailed Description

Native Capture interface, for reading native uncompressed images.

Can be used to read YUV images in the format native to the current hardware. (UYVY on artpec-3 and artpec-4, NV12 on ambarella-a5s) Through the interface, width and height is specified and a pointer to a buffer of YUV data can be read. The memory for the buffer is reused and it needs to be copied if it is to be saved. If the application need to be fast and the format of YUV or the need to use VAPIX functionality like cropping is not important, then this interface can be useful.

Function Documentation

◆ capture_open_native()

media_native* capture_open_native ( int  width,
int  height 
)

Open a connection to retrieve architecture dependent YUV images.

Deprecated:
The capture native methods are not available on all products. They have been removed in Capture interface of major version 1.
Parameters
widthThe width of the image.
heightThe height of the image.
Returns
A media_native object.

◆ capture_open_native_channel()

media_native* capture_open_native_channel ( unsigned int  channel,
int  width,
int  height 
)

Open a connection to retrieve architecture dependent YUV images from a specific video channel.

Deprecated:
The capture native methods are not available on all products. They have been removed in Capture interface of major version 1.

This function is an extension of capture_open_native with the possibility to specify from which video channel the YUV image should be retrieved.

Parameters
channelThe video channel to be used as input for the image.
widthThe width of the image.
heightThe height of the image.
Returns
A media_native object or NULL if failed.

◆ capture_start_native()

void capture_start_native ( media_native *  nat)

Add an initial capture request for a native image.

Deprecated:
The capture native methods are not available on all products. They have been removed in Capture interface of major version 1.
Parameters
natThe media_native object.

◆ capture_get_image_native()

void* capture_get_image_native ( media_native *  nat)

Read an architecture dependent YUV image.

The memory will be re-used for each new call to this function. If you need to store the image you have to copy it! This will block until an image is ready and then add a new capture request.

Deprecated:
The capture native methods are not available on all products. They have been removed in Capture interface of major version 1.
Parameters
natThe media_native object.
Returns
A pointer to the YUV image.

◆ capture_close_native()

void capture_close_native ( media_native *  nat)

Close connection to native image reading.

This will free the memory used to buffer an image.

Deprecated:
The capture native methods are not available on all products. They have been removed in Capture interface of major version 1.
Parameters
natThe media_native object.