Hi everybody,

I am trying to switch from a multicast address to another multicast address. On the bottom of ExecSwitchStreams that perform switch, I want to register a function (ExecSwitchStreamsBack ) so that the program will auto call to after t_time seconds. ExecSwitchStreamsBack will switch back to old multicast address.

static void ExecSwitchStreams(input_thread_t *p_input, char *p_new_server, int64_t t_time)
	InputClean( p_input, &p_input->input );		
	input_source_t *other_input = &p_input->input;		
	   /* Create the stream_t */
	   other_input->p_stream = streamAccessNew( other_input->p_access, p_new_server, MY_FALSE );
		RegisterTimer ( t_time, p_old_server, ExecSwitchStreamsBack) //  Function to register call ExecSwitchStreamsBack after t_time seconds 
																	// p_old_server is a parameter for ExecSwitchStreamsBack 

static void ExecSwitchStreamsBack(char *p_old_server )
	 // code
How can I implement the RegisterTimer like that?

Please give me any ideas to implement this function. Many thanks