예제 #1
0
void ResetTSChannelParser( TS_CHANNEL_PARSER *pTSChannelParser )
{
	int i;
	ResetTSFilter( pTSChannelParser->ts_filter );
	pTSChannelParser->ts_filter->disable_ts_table_parse = 0;
	pTSChannelParser->ts_filter->disable_stream_filter = 0;
	SageLog(( _LOG_TRACE, 3, TEXT("TS Channel Parser is reset  .") ));
	pTSChannelParser->state = 0;
	for ( i = 0; i<pTSChannelParser->max_stream_num; i++ )
	{
		pTSChannelParser->es_buffer[i].bytes = 0;
		pTSChannelParser->es_buffer[i].main_track = -1;
		pTSChannelParser->es_buffer[i].input_bytes = 0;
		pTSChannelParser->es_buffer[i].stream_id = 0;
	}
	pTSChannelParser->ts_streams.num_stream = 0;
	pTSChannelParser->es_streams.num_stream = 0;
	pTSChannelParser->av_streams.num_stream = 0;
	memset( pTSChannelParser->ts_streams.ts_element, 0, pTSChannelParser->max_stream_num*sizeof(TS_ELEMENT) );
	memset( pTSChannelParser->es_streams.es_element, 0, pTSChannelParser->max_stream_num*sizeof(ES_ELEMENT) );
	memset( pTSChannelParser->av_streams.av_element, 0, pTSChannelParser->max_stream_num*sizeof(AV_ELEMENT) );
	pTSChannelParser->avinf[0] = 0x0;
	pTSChannelParser->avinf_size = 0;
	pTSChannelParser->total_bytes = 0;
	pTSChannelParser->total_video_num = 0;
	pTSChannelParser->total_audio_num = 0;
	pTSChannelParser->found_video_num = 0;
	pTSChannelParser->found_audio_num = 0;

	pTSChannelParser->channel_list.channel_num = 0;
	pTSChannelParser->program_list.program_num = 0;
	pTSChannelParser->program_list.flag = 0;
	pTSChannelParser->program_list.drop_program_num = 0;
}
예제 #2
0
void ResetTSInfoParser( TS_INFO_PARSER *pTSInfoParser )
{
	int i;
	ResetTSFilter( pTSInfoParser->ts_filter );
	pTSInfoParser->ts_filter->disable_ts_table_parse = 0;
	pTSInfoParser->ts_filter->disable_stream_filter = 0;
	SageLog(( _LOG_TRACE, 3, TEXT("TS Info Parser is reset  .") ));
	pTSInfoParser->state = 0;
	for ( i = 0; i<pTSInfoParser->max_stream_num; i++ )
	{
		pTSInfoParser->es_buffer[i].bytes = 0;
		pTSInfoParser->es_buffer[i].main_track = -1;
		pTSInfoParser->es_buffer[i].input_bytes = 0;
		pTSInfoParser->es_buffer[i].stream_id = 0;
	}
	pTSInfoParser->ts_streams.num_stream = 0;
	pTSInfoParser->es_streams.num_stream = 0;
	pTSInfoParser->av_streams.num_stream = 0;
	memset( pTSInfoParser->ts_streams.ts_element, 0, pTSInfoParser->max_stream_num*sizeof(TS_ELEMENT) );
	memset( pTSInfoParser->es_streams.es_element, 0, pTSInfoParser->max_stream_num*sizeof(ES_ELEMENT) );
	memset( pTSInfoParser->av_streams.av_element, 0, pTSInfoParser->max_stream_num*sizeof(AV_ELEMENT) );
	pTSInfoParser->avinf[0] = 0x0;
	pTSInfoParser->avinf_size = 0;
	pTSInfoParser->total_bytes = 0;
	pTSInfoParser->total_video_num = 0;
	pTSInfoParser->total_audio_num = 0;
	pTSInfoParser->found_video_num = 0;
	pTSInfoParser->found_audio_num = 0;
	pTSInfoParser->utc_sec_start = 0;
	pTSInfoParser->pcr_sec_start = 0;
	memset( &pTSInfoParser->tune, 0x0, sizeof(pTSInfoParser->tune) );
}