int tv_step_channel(tvi_handle_t *tvh, int direction) { tvh->tv_param->scan=0; if (tv_channel_list) { if (direction == TV_CHANNEL_HIGHER) { tv_channel_last = tv_channel_current; if (tv_channel_current->next) tv_channel_current = tv_channel_current->next; else tv_channel_current = tv_channel_list; tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); } if (direction == TV_CHANNEL_LOWER) { tv_channel_last = tv_channel_current; if (tv_channel_current->prev) tv_channel_current = tv_channel_current->prev; else while (tv_channel_current->next) tv_channel_current = tv_channel_current->next; tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); } } else tv_step_channel_real(tvh, direction); return 1; }
int tv_step_channel(tvi_handle_t *tvh, int direction) { tvh->tv_param->scan=0; if (tv_channel_list) { if (direction == TV_CHANNEL_HIGHER) { tv_channel_last = tv_channel_current; if (tv_channel_current->next) tv_channel_current = tv_channel_current->next; else tv_channel_current = tv_channel_list; set_norm_and_freq(tvh, tv_channel_current); } if (direction == TV_CHANNEL_LOWER) { tv_channel_last = tv_channel_current; if (tv_channel_current->prev) tv_channel_current = tv_channel_current->prev; else while (tv_channel_current->next) tv_channel_current = tv_channel_current->next; set_norm_and_freq(tvh, tv_channel_current); } } else tv_step_channel_real(tvh, direction); return 1; }