![]() |
![]() |
Data Structures | |
struct | Capture_Attrs |
Attributes used to create a Capture device driver instance. More... | |
Typedefs | |
typedef struct Capture_Object * | Capture_Handle |
Handle through which to reference a Capture device instance. | |
Enumerations | |
enum | Capture_Input { Capture_Input_SVIDEO = 0, Capture_Input_COMPOSITE, Capture_Input_COMPONENT, Capture_Input_CAMERA, Capture_Input_COUNT } |
Video capture inputs. More... | |
Functions | |
Capture_Handle | Capture_create (BufTab_Handle hBufTab, Capture_Attrs *attrs) |
Creates a Capture driver instance. | |
Int | Capture_detectVideoStd (Capture_Handle hCapture, VideoStd_Type *videoStdPtr, Capture_Attrs *attrs) |
Detects the video standard of the input connected to a video. | |
Int | Capture_get (Capture_Handle hCapture, Buffer_Handle *hBufPtr) |
Receive a captured buffer from the capture device driver. | |
Int | Capture_put (Capture_Handle hCapture, Buffer_Handle hBuf) |
Send a captured buffer to the capture device driver instance to be filled with captured data. | |
Int | Capture_delete (Capture_Handle hCapture) |
Deletes a Capture device driver instance. | |
VideoStd_Type | Capture_getVideoStd (Capture_Handle hCapture) |
Get the VideoStd_Type of a previously created Capture device driver instance. | |
BufTab_Handle | Capture_getBufTab (Capture_Handle hCapture) |
Get the BufTab_Handle of a previously created Capture device driver instance. | |
Variables | |
const Capture_Attrs | Capture_Attrs_DM6446_DM355_DEFAULT |
Default attributes for video window 0 on dm6446 and dm355. | |
const Capture_Attrs | Capture_Attrs_DM6467_DEFAULT |
Default attributes for video window 0 on dm6467. | |
const Capture_Attrs | Capture_Attrs_DM365_DEFAULT |
Default attributes for video window 0 on dm365. | |
const Capture_Attrs | Capture_Attrs_OMAPL138_DEFAULT |
Default attributes for video window 0 on omapl138. | |
const Capture_Attrs | Capture_Attrs_OMAP3530_DEFAULT |
Default attributes for video window 0 on omap3530. |
#include <xdc/std.h> #include <ti/sdo/dmai/Dmai.h> #include <ti/sdo/dmai/Capture.h> #include <ti/sdo/dmai/BufferGfx.h> BufferGfx_Handle cBuf; Capture_Attrs cAttrs = Capture_Attrs_DM6446_DM355_DEFAULT; Capture_Handle hCapture; Dmai_init(); hCapture = Capture_create(NULL, &cAttrs); while (1) { Capture_get(hCapture, &cBuf); // Process captured buffer "cBuf". Capture_put(hCapture, cBuf); } Capture_delete(hCapture);
typedef struct Capture_Object* Capture_Handle |
Handle through which to reference a Capture device instance.
enum Capture_Input |
Capture_Handle Capture_create | ( | BufTab_Handle | hBufTab, | |
Capture_Attrs * | attrs | |||
) |
Creates a Capture driver instance.
[in] | hBufTab | The BufTab with buffers to use with the capture device. If NULL is passed, the capture driver will allocate it's own buffers. |
[in] | attrs | Capture_Attrs to use for creating the Capture driver instance. |
Handle | for use in subsequent operations (see Capture_Handle). | |
NULL | for failure. |
Int Capture_detectVideoStd | ( | Capture_Handle | hCapture, | |
VideoStd_Type * | videoStdPtr, | |||
Capture_Attrs * | attrs | |||
) |
Detects the video standard of the input connected to a video.
[in] | hCapture | The Capture_Handle of the device driver instance to get the video standard of. If this is set to NULL a temporary instance will be created for this call. |
[out] | videoStdPtr | The VideoStd_Type of the capture device will be returned here. |
[in] | attrs | Capture_Attrs which will be used to create the capture driver instance. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Capture_get | ( | Capture_Handle | hCapture, | |
Buffer_Handle * | hBufPtr | |||
) |
Receive a captured buffer from the capture device driver.
[in] | hCapture | The Capture_Handle to get a buffer from. |
[out] | hBufPtr | A pointer to the Buffer_Handle received. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Capture_put | ( | Capture_Handle | hCapture, | |
Buffer_Handle | hBuf | |||
) |
Send a captured buffer to the capture device driver instance to be filled with captured data.
[in] | hCapture | The Capture_Handle to send a buffer to. |
[in] | hBuf | A Buffer_Handle to send to the capture device. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Capture_delete | ( | Capture_Handle | hCapture | ) |
Deletes a Capture device driver instance.
[in] | hCapture | The Capture_Handle to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
VideoStd_Type Capture_getVideoStd | ( | Capture_Handle | hCapture | ) |
Get the VideoStd_Type of a previously created Capture device driver instance.
[in] | hCapture | The Capture_Handle to get VideoStd_Type of. |
VideoStd_Type | used by Capture device driver. |
BufTab_Handle Capture_getBufTab | ( | Capture_Handle | hCapture | ) |
Get the BufTab_Handle of a previously created Capture device driver instance.
[in] | hCapture | The Capture_Handle to get the BufTab_Handle from. |
VideoStd_Type | used by Capture device driver. |
Default attributes for video window 0 on dm6446 and dm355.
numBufs = 3, videoInput = Capture_Input_COMPOSITE, cropWidth = -1, cropHeight = -1, cropX = -1, cropY = -1, captureDevice = "/dev/video0", smoothPad = FALSE, videoStd = VideoStd_AUTO, decoderIdx = -1, colorSpace = ColorSpace_UYVY, captureDimension = NULL, onTheFly = FALSE
Default attributes for video window 0 on dm6467.
numBufs = 3, videoInput = Capture_Input_COMPONENT, cropWidth = -1, cropHeight = -1, cropX = -1, cropY = -1, captureDevice = "/dev/video0", smoothPad = FALSE, videoStd = VideoStd_AUTO, decoderIdx = -1 colorSpace = ColorSpace_YUV422PSEMI, captureDimension = NULL, onTheFly = FALSE
Default attributes for video window 0 on dm365.
numBufs = 3, videoInput = Capture_Input_COMPONENT, cropWidth = -1, cropHeight = -1, cropX = -1, cropY = -1, captureDevice = "/dev/video0", smoothPad = FALSE, videoStd = VideoStd_AUTO, decoderIdx = -1 colorSpace = ColorSpace_YUV420PSEMI, captureDimension = NULL, onTheFly = TRUE
Default attributes for video window 0 on omapl138.
numBufs = 3, videoInput = Capture_Input_COMPOSITE, cropWidth = -1, cropHeight = -1, cropX = -1, cropY = -1, captureDevice = "/dev/video0", smoothPad = FALSE, videoStd = VideoStd_AUTO, decoderIdx = -1 colorSpace = ColorSpace_YUV422PSEMI, captureDimension = NULL, onTheFly = FALSE
Default attributes for video window 0 on omap3530.
numBufs = 3, videoInput = Capture_Input_COMPOSITE, cropWidth = -1, cropHeight = -1, cropX = -1, cropY = -1, captureDevice = "/dev/video0", smoothPad = FALSE, videoStd = VideoStd_AUTO, decoderIdx = -1 colorSpace = ColorSpace_UYVY, captureDimension = NULL, onTheFly = FALSE