42 #define PES_HDR_DATA_LEN_BYTE 0x08 49 static BOOLEAN initialised;
53 static void VBIPesCallback(U32BIT handle, U8BIT data_identifier,
void *buffer_ptr, U32BIT buffer_size);
78 static void VBIPesCallback(U32BIT handle, U8BIT data_identifier,
void *buffer_ptr, U32BIT buffer_size)
81 U16BIT processed_bytes;
82 U8BIT pes_hdr_data_len;
87 FUNCTION_START(VBIPesCallback);
89 USE_UNWANTED_PARAM(handle);
90 USE_UNWANTED_PARAM(data_identifier);
91 USE_UNWANTED_PARAM(buffer_size);
95 if ((pes_ptr[0] == 0x00) && (pes_ptr[1] == 0x00) && (pes_ptr[2] == 0x01))
98 if (pes_ptr[3] == 0xbd)
103 pes_length = (pes_ptr[4] << 8) + pes_ptr[5] + 6;
107 pes_hdr_data_len = pes_ptr[PES_HDR_DATA_LEN_BYTE];
110 segment_data = PES_HDR_DATA_LEN_BYTE + pes_hdr_data_len + 1;
112 processed_bytes = segment_data;
114 if ((pes_ptr[processed_bytes] >= 0x10) && (pes_ptr[processed_bytes] <= 0x1f))
116 STB_HWVBIInsert(&pes_ptr[processed_bytes], (pes_length - pes_hdr_data_len));
120 FUNCTION_FINISH(VBIPesCallback);
143 STB_HWInitialiseVBI();
Function prototypes for HW control.
void STB_VBIRemoveCallbackFunction(void)
Removes the VBI callback function from the PES collection task.
U32BIT STB_RegisterPesCollectionCallback(void(*callback_function)(U32BIT, U8BIT, void *, U32BIT), U8BIT lowest_data_identifier, U8BIT highest_data_identifier)
Used to register a callback function that will receive specific PES data packets. In theory...
Debug functions header file.
System Wide Global Technical Data Type Definitions.
void STB_VBIInitialise(void)
Initialises VBI insertion, and registers the callback function with PES collection task...
void STB_PesCollectionTaskInitialise(void)
Initialises the PES collection task.
void STB_UnregisterPesCollectionCallback(U32BIT handle)
Used to un-register a callback function that will receive specific PES data packets.
Header file - Function prototypes for PES collection task.