Display

Creates an interface instance to the display device driver. This module will allow you to get and return display buffers from the capture device. Currently all platforms support the driver allocating it's own buffers, and some (like dm6467) support the user allocating contiguous buffers themselves and passing them in at creation. Typical use case for driver allocated buffers (dm6446 video window 1, no error checking):. More...

Data Structures

struct  Display_Attrs
 Attributes used to create a Display device driver instance. More...

Typedefs

typedef struct Display_Object * Display_Handle
 Handle through which to reference a Display device instance.

Enumerations

enum  Display_Std {
  Display_Std_V4L2 = 0,
  Display_Std_FBDEV,
  Display_Std_COUNT
}
 Display standards supported on Linux (v4l2 and fbdev). More...
enum  Display_Output {
  Display_Output_SVIDEO = 0,
  Display_Output_COMPOSITE,
  Display_Output_COMPONENT,
  Display_Output_LCD,
  Display_Output_DVI,
  Display_Output_SYSTEM,
  Display_Output_COUNT
}
 Video display outputs. More...
enum  Display_Control_Message {
  Display_Control_V4L2_Overlay_FMT = 0,
  Display_Control_V4L2_Output_FMT,
  Display_Control_V4L2_Streamoff,
  Display_Control_V4L2_Streamon,
  Display_Control_V4L2_Qbuf,
  Display_Control_COUNT
}
 Video display control Messages. More...

Functions

Display_Handle Display_create (BufTab_Handle hBufTab, Display_Attrs *attrs)
 Creates a Display driver instance.
Int Display_delete (Display_Handle hDisplay)
 Deletes a Display driver instance.
Int Display_get (Display_Handle hDisplay, Buffer_Handle *hBuf)
 Receive a buffer from the display device driver instance to be filled with data.
Int Display_put (Display_Handle hDisplay, Buffer_Handle hBufPtr)
 Send a buffer with data to the display device driver instance to be shown on the display.
VideoStd_Type Display_getVideoStd (Display_Handle hDisplay)
 Get the display standard used by a Display device driver instance.
BufTab_Handle Display_getBufTab (Display_Handle hDisplay)
 Get a handle to the BufTab used by the Display device driver instance.
Int Display_getHandle (Display_Handle hDisplay)
 Obtains the File Descriptor for a given Display driver instance.
Int Display_control (Display_Handle hDisplay, Display_Control_Message message, void *parameters, BufTab_Handle hBufTab, Display_Attrs *attrs)
 Sends a Control a Message to the A Display Driver Instance.

Variables

const Display_Attrs Display_Attrs_DM6446_DM355_ATTR_DEFAULT
 Default parameters for the Attribute window on DM6446 / DM355.
const Display_Attrs Display_Attrs_DM6446_DM355_OSD_DEFAULT
 Default parameters for the OSD window on DM6446 / DM355.
const Display_Attrs Display_Attrs_DM6446_DM355_VID_DEFAULT
 Default parameters for Video window 1 on DM6446 / DM355.
const Display_Attrs Display_Attrs_OMAPL137_OSD_DEFAULT
 Default parameters for the OSD window on OMAPL137.
const Display_Attrs Display_Attrs_OMAPL138_OSD_DEFAULT
 Default parameters for the OSD window on OMAPL138.
const Display_Attrs Display_Attrs_OMAPL138_VID_DEFAULT
 Default parameters for VID window on OMAPL138.
const Display_Attrs Display_Attrs_DM6467_VID_DEFAULT
 Default parameters for Video window on DM6467.
const Display_Attrs Display_Attrs_DM365_VID_DEFAULT
 Default parameters for Video window on DM365.
const Display_Attrs Display_Attrs_DM365_OSD_DEFAULT
 Default parameters for OSD window on DM365.
const Display_Attrs Display_Attrs_DM365_ATTR_DEFAULT
 Default parameters for Attribute window on DM365.
const Display_Attrs Display_Attrs_O3530_VID_DEFAULT
 Default parameters for Video window on OMAP3530.
const Display_Attrs Display_Attrs_O3530_OSD_DEFAULT
 Default parameters for OSD window on OMAP3530.

Detailed Description

Creates an interface instance to the display device driver. This module will allow you to get and return display buffers from the capture device. Currently all platforms support the driver allocating it's own buffers, and some (like dm6467) support the user allocating contiguous buffers themselves and passing them in at creation. Typical use case for driver allocated buffers (dm6446 video window 1, no error checking):.

   #include <xdc/std.h>
   #include <ti/sdo/dmai/Dmai.h>
   #include <ti/sdo/dmai/Display.h>
   #include <ti/sdo/dmai/BufferGfx.h>
   BufferGfx_Handle dBuf;
   Display_Attrs dattrs = Display_Attrs_DM6446_DM355_VID_DEFAULT;
   Display_Handle hDisplay;

   Dmai_init();
   hDisplay = Display_create(NULL, &dAttrs);
   while (1) {
       Display_get(hDisplay, &dBuf);
       // Write data in to display buffer "dBuf" for display..
       Display_put(hDisplay, dBuf);
   }
   Display_delete(hDisplay);

Typedef Documentation

typedef struct Display_Object* Display_Handle

Handle through which to reference a Display device instance.


Enumeration Type Documentation

Display standards supported on Linux (v4l2 and fbdev).

Enumerator:
Display_Std_V4L2  v4l2 video standard
Display_Std_FBDEV  Fbdev video standard.
Display_Std_COUNT 

Video display outputs.

Enumerator:
Display_Output_SVIDEO  S-Video video output.
Display_Output_COMPOSITE  Composite video output.
Display_Output_COMPONENT  Component video output.
Display_Output_LCD  LCD video output.
Display_Output_DVI  DVI video output.
Display_Output_SYSTEM  Select video output by reading sysfs.
Display_Output_COUNT 

Video display control Messages.

Enumerator:
Display_Control_V4L2_Overlay_FMT  Overlay Format Information
Display_Control_V4L2_Output_FMT  Display Format Information
Display_Control_V4L2_Streamoff  Display Stream off information
Display_Control_V4L2_Streamon  Display Stream on information
Display_Control_V4L2_Qbuf  Display Queue Buf information
Display_Control_COUNT 


Function Documentation

Display_Handle Display_create ( BufTab_Handle  hBufTab,
Display_Attrs attrs 
)

Creates a Display driver instance.

Parameters:
[in] hBufTab The BufTab with buffers to use with the display device. If NULL is passed, the display driver will be used to allocate the buffers.
[in] attrs Display_Attrs to use for creating the Display driver instance.
Return values:
Display_Handle for use in subsequent operations.
NULL for failure.

Int Display_delete ( Display_Handle  hDisplay  ) 

Deletes a Display driver instance.

Parameters:
[in] hDisplay The Display_Handle to delete.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Display_create must be called before this function.

Int Display_get ( Display_Handle  hDisplay,
Buffer_Handle hBuf 
)

Receive a buffer from the display device driver instance to be filled with data.

Parameters:
[in] hDisplay The Display_Handle to get a buffer from.
[out] hBuf A pointer to the Buffer_Handle received.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Display_create must be called before this function.

Int Display_put ( Display_Handle  hDisplay,
Buffer_Handle  hBufPtr 
)

Send a buffer with data to the display device driver instance to be shown on the display.

Parameters:
[in] hDisplay The Display_Handle to send a buffer to.
[in] hBufPtr A Buffer_Handle to send to the display device.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Display_create must be called before this function.

For Frame buffer Display driver Display_get and Display_put have to called in sequence for since Display_fbdev_put is function which assigns the working index.If not called in sequence it will return the same buffer address as previous Display_get function. Current implementation for Frame Buffer driver will work to support two buffers. In order to support more buffers implementation will have to be changed.

VideoStd_Type Display_getVideoStd ( Display_Handle  hDisplay  ) 

Get the display standard used by a Display device driver instance.

Parameters:
[in] hDisplay The Display_Handle to get the video standard of.
Return values:
Type of video standard used (see VideoStd_Type).
Remarks:
Display_create must be called before this function.

BufTab_Handle Display_getBufTab ( Display_Handle  hDisplay  ) 

Get a handle to the BufTab used by the Display device driver instance.

Parameters:
[in] hDisplay The Display_Handle to get the BufTab of.
Return values:
Handle to the BufTab used (see BufTab_Handle).
Remarks:
Display_create must be called before this function.

Int Display_getHandle ( Display_Handle  hDisplay  ) 

Obtains the File Descriptor for a given Display driver instance.

Parameters:
[in] hDisplay The Display_Handle to get the BufTab of.
Return values:
Internal Handle associated with this Display.
Remarks:
Display_create must be called before this function.

Tested only for transparency in OMAP3530 platform.

Returns the File Descriptor for Linux.

Int Display_control ( Display_Handle  hDisplay,
Display_Control_Message  message,
void *  parameters,
BufTab_Handle  hBufTab,
Display_Attrs attrs 
)

Sends a Control a Message to the A Display Driver Instance.

Parameters:
[in] hDisplay The Display_Handle where the message should be delivered.
[in] messsage The Display_Control_Message message that is sent to the Driver.
[in] hBufTab The BufTab with buffers to use with the display device. If NULL is passed, the display driver will be used to allocate the buffers.
[in] parameters A pointer to the parameters related to the specific message.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Display_create must be called before this function.


Variable Documentation

Default parameters for the Attribute window on DM6446 / DM355.

 numBufs           = 1,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/fb2"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for the OSD window on DM6446 / DM355.

 numBufs           = 2,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/fb0"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for Video window 1 on DM6446 / DM355.

 numBufs           = 3,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/fb3"
 rotation          = 0
 colorSpace        = ColorSpace_UYVY
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for the OSD window on OMAPL137.

 numBufs           = 1,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_QVGA,
 videoOutput       = Display_Output_LCD,
 displayDevice     = "/dev/fb/0"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for the OSD window on OMAPL138.

 numBufs           = 1,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_QVGA,
 videoOutput       = Display_Output_LCD,
 displayDevice     = "/dev/fb0"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for VID window on OMAPL138.

 frameSkip         = FALSE,
 numBufs           = 3,
 displayStd        = Display_Std_V4L2,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/video2"
 rotation          = -1
 colorSpace        = ColorSpace_YUV422PSEMI
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for Video window on DM6467.

 numBufs           = 3,
 displayStd        = Display_Std_V4L2,
 videoStd          = VideoStd_720P_60,
 videoOutput       = Display_Output_COMPONENT,
 displayDevice     = "/dev/video2"
 rotation          = 0
 colorSpace        = ColorSpace_YUV422PSEMI 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for Video window on DM365.

 numBufs           = 3,
 displayStd        = Display_Std_V4L2,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/video2"
 rotation          = 0
 colorSpace        = ColorSpace_YUV420PSEMI 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for OSD window on DM365.

 numBufs           = 2,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/fb0"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for Attribute window on DM365.

 numBufs           = 1,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_D1_NTSC,
 videoOutput       = Display_Output_COMPOSITE,
 displayDevice     = "/dev/fb2"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for Video window on OMAP3530.

 numBufs           = 3,
 displayStd        = Display_Std_V4L2,
 videoStd          = VideoStd_VGA,
 videoOutput       = Display_Output_LCD,
 displayDevice     = "/dev/video1"
 rotation          = 0
 colorSpace        = ColorSpace_UYVY 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE

Default parameters for OSD window on OMAP3530.

 numBufs           = 1,
 displayStd        = Display_Std_FBDEV,
 videoStd          = VideoStd_VGA,
 videoOutput       = Display_Output_LCD,
 displayDevice     = "/dev/fb0"
 rotation          = 0
 colorSpace        = ColorSpace_RGB565 
 width             = -1
 height            = -1
 delayStreamon     = FALSE
 forceFrameRateNum = 0
 forceFrameRateDen = 0
 streamonDisable   = FALSE


Copyright 2011, Texas Instruments Incorporated