Exemple #1
0
double VTimeBar::pixel_to_position(int pixel)
{
	double start = 0, length = 0;
	EDL *edl = get_edl();
	if(edl)
	{
		start = edl->local_session->preview_start;
		if(start >= 0)
			length = edl->local_session->preview_end - start;
	}
	if(length <= 0)
		length = get_edl_length();
	return start + (double)pixel * length / get_w();
}
int64_t TimeBar::position_to_pixel(double position)
{
	get_edl_length();
	return (int64_t)(position / time_per_pixel);
}