Пример #1
0
int tv_set_channel(tvi_handle_t *tvh, char *channel) {
    int i, channel_int;

    tvh->tv_param->scan=0;
    if (tv_channel_list) {
        tv_channel_last = tv_channel_current;
        channel_int = atoi(channel);
        tv_channel_current = tv_channel_list;
        for (i = 1; i < channel_int; i++)
            if (tv_channel_current->next)
                tv_channel_current = tv_channel_current->next;
        set_norm_and_freq(tvh, tv_channel_current);
    } else tv_set_channel_real(tvh, channel);
    return 1;
}
Пример #2
0
int tv_set_channel(tvi_handle_t *tvh, char *channel) {
	int i, channel_int;

	tvh->tv_param->scan=0;
	if (tv_channel_list) {
		tv_channel_last = tv_channel_current;
		channel_int = atoi(channel);
		tv_channel_current = tv_channel_list;
		for (i = 1; i < channel_int; i++)
			if (tv_channel_current->next)
				tv_channel_current = tv_channel_current->next;
		mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number,
				tv_channel_current->name, (float)tv_channel_current->freq/1000);
		tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
	} else tv_set_channel_real(tvh, channel);
	return(1);
}
Пример #3
0
int tv_set_channel(tvi_handle_t *tvh, char *channel) {
	int i, channel_int;

	tvh->tv_param->scan=0;
	if (tv_channel_list) {
		tv_channel_last = tv_channel_current;
		channel_int = atoi(channel);
		tv_channel_current = tv_channel_list;
		for (i = 1; i < channel_int; i++)
			if (tv_channel_current->next)
				tv_channel_current = tv_channel_current->next;
		mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number,
				tv_channel_current->name, (float)tv_channel_current->freq/1000);
		tv_set_norm_i(tvh, tv_channel_current->norm);
		tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
	} else tv_set_channel_real(tvh, channel);
	return 1;
}