40 Intel® Digital Set Top Box Display Driver
User’s Guide for Microsoft* Windows* CE 5.0
7.1.1.11 ICEGD_ESCAPE_VBI_UPDATE
Input Data Structure Output Data Structure Notes
vbi_data N/A
Description
This escape code is used to call port driver to update VBI. It passes VBI line information to the TV encoder to insert
into the analog TV signal. Before you update VBI, you should enable VBI, and disable VBI after the update has
completed. There should be a short wait between every update operation.
Input Data Structure Definition
Please refer to igd_public.h for vbi data structure details.
Example
vbi_data* pvbi = 0;
pvbi = (vbi_data*)malloc( sizeof(vbi_data) + 2 );
pvbi->unFlags = VERSION_1;
pvbi->unDataLength = 2;
/* CC, CGMS (line 21) */
pvbi->unDataType = LINE_21_FIELD_1;
//enable vbi
ExtEscape(
Hdc,
ICEGD_ESCAPE_VBI_ENABLE,
0,
NULL,
0,
NULL
);
//selects paint-on style
pvbi->pucData[ 0 ] = 0x14;
pvbi->pucData[ 1 ] = 0x29;
ExtEscape(
Hdc,
ICEGD_ESCAPE_VBI_UPDATE,
sizeof(vbi_data) + 2,
(const char*)pvbi,
0,
NULL);
//33 is the time between byte updates. TV seems unable to handle it too fast.
Sleep(33);
//select position and color(green)
pvbi->pucData[ 0 ] = 0x11;
pvbi->pucData[ 1 ] = 0x62;
ExtEscape(
Hdc,
ICEGD_ESCAPE_VBI_UPDATE,
sizeof(vbi_data) + 2,
(const char*)pvbi,
0,
NULL);
Sleep(33);
//display a string "ababababab"
for(int i=0;i<5;i++){
pvbi->pucData[ 0 ] = 'a';
pvbi->pucData[ 1 ] = 'b';