libOGC  1.0
Typedefs | Functions
video.h File Reference

VIDEO subsystem. More...

#include <gctypes.h>
#include "gx_struct.h"
#include "video_types.h"

Typedefs

typedef void(* VIPositionCallback )(u32 posX, u32 posY)
typedef void(* VIRetraceCallback )(u32 retraceCnt)
 function pointer typedef for the user's retrace callback

Functions

void VIDEO_ClearFrameBuffer (GXRModeObj *rmode, void *fb, u32 color)
 Clear the given framebuffer.
void VIDEO_Configure (GXRModeObj *rmode)
 Configure the VI with the given render mode object.
void VIDEO_Flush ()
 Flush the shadow registers to the drivers video registers.
void * VIDEO_GetCurrentFramebuffer ()
u32 VIDEO_GetCurrentLine ()
 Get current video line.
u32 VIDEO_GetCurrentTvMode ()
 Get current configured TV mode.
u32 VIDEO_GetFrameBufferSize (GXRModeObj *rmode)
u32 VIDEO_GetNextField ()
 Get the next field in DS mode.
void * VIDEO_GetNextFramebuffer ()
GXRModeObjVIDEO_GetPreferredMode (GXRModeObj *mode)
u32 VIDEO_HaveComponentCable (void)
 Check for a component cable. This function returns 1 when a Component (YPbPr) cable is connected.
void VIDEO_Init ()
 Initializes the VIDEO subsystem. This call should be done in the early stages of your main()
void VIDEO_SetBlack (bool black)
 Blackout the VIDEO interface.
void VIDEO_SetNextFramebuffer (void *fb)
 Set the framebuffer for the next VI register update.
void VIDEO_SetNextRightFramebuffer (void *fb)
 Set the right framebuffer for the next VI register update. This is used for 3D Gloves for instance.
VIRetraceCallback VIDEO_SetPostRetraceCallback (VIRetraceCallback callback)
 Set the Post-Retrace callback function. This function is called within the video interrupt handler after the VI registers are updated.
VIRetraceCallback VIDEO_SetPreRetraceCallback (VIRetraceCallback callback)
 Set the Pre-Retrace callback function. This function is called within the video interrupt handler before the VI registers will be updated.
void VIDEO_WaitVSync (void)
 Wait on the next vertical retrace.

Detailed Description

VIDEO subsystem.


Typedef Documentation

void(* VIRetraceCallback)(u32 retraceCnt)

function pointer typedef for the user's retrace callback

Parameters:
[in]retraceCntcurrent retrace count

Function Documentation

void VIDEO_ClearFrameBuffer ( GXRModeObj rmode,
void *  fb,
u32  color 
)

Clear the given framebuffer.

Parameters:
[in]rmodepointer to a GXRModeObj, specifying the mode.
[in]fbpointer to the startaddress of the framebuffer to clear.
[in]colorYUYUV value to use for clearing.
Returns:
none
void VIDEO_Configure ( GXRModeObj rmode)

Configure the VI with the given render mode object.

Parameters:
[in]rmodepointer to the video/render mode configuration.
Returns:
none
void VIDEO_Flush ( )

Flush the shadow registers to the drivers video registers.

Returns:
none
u32 VIDEO_GetCurrentLine ( )

Get current video line.

Returns:
linenumber
u32 VIDEO_GetCurrentTvMode ( )

Get current configured TV mode.

Returns:
tvmode
u32 VIDEO_GetNextField ( )

Get the next field in DS mode.

Returns:
field
u32 VIDEO_HaveComponentCable ( void  )

Check for a component cable. This function returns 1 when a Component (YPbPr) cable is connected.

Returns:
1 if a component cable is connected, 0 otherwise
void VIDEO_Init ( )

Initializes the VIDEO subsystem. This call should be done in the early stages of your main()

Returns:
none
void VIDEO_SetBlack ( bool  black)

Blackout the VIDEO interface.

Parameters:
[in]blackBoolean flag to determine whether to blackout the VI or not.
Returns:
none
void VIDEO_SetNextFramebuffer ( void *  fb)

Set the framebuffer for the next VI register update.

Returns:
none
void VIDEO_SetNextRightFramebuffer ( void *  fb)

Set the right framebuffer for the next VI register update. This is used for 3D Gloves for instance.

Returns:
none
VIRetraceCallback VIDEO_SetPostRetraceCallback ( VIRetraceCallback  callback)

Set the Post-Retrace callback function. This function is called within the video interrupt handler after the VI registers are updated.

Parameters:
[in]callbackpointer to the callback function which is called at post-retrace.
Returns:
Old post-retrace callback or NULL
VIRetraceCallback VIDEO_SetPreRetraceCallback ( VIRetraceCallback  callback)

Set the Pre-Retrace callback function. This function is called within the video interrupt handler before the VI registers will be updated.

Parameters:
[in]callbackpointer to the callback function which is called at pre-retrace.
Returns:
Old pre-retrace callback or NULL
void VIDEO_WaitVSync ( void  )

Wait on the next vertical retrace.

Returns:
none
 All Data Structures Files Functions Variables Typedefs Defines