visualizer-ticks: adjust ticks for capture epoch

We need to take into account the real start of the capture to
land the ticks in the right position. Add "epoch" concept
to SpVisualizerTicks for just this purpose.
This commit is contained in:
Christian Hergert
2016-09-30 13:21:17 -07:00
parent 54116ba765
commit c116120563
3 changed files with 47 additions and 1 deletions

View File

@ -328,6 +328,8 @@ sp_visualizer_view_set_reader (SpVisualizerView *self,
begin_time = sp_capture_reader_get_start_time (reader);
end_time = sp_capture_reader_get_end_time (reader);
sp_visualizer_ticks_set_epoch (priv->ticks, begin_time);
g_object_set (priv->scroll_adjustment,
"lower", (gdouble)begin_time,
"upper", (gdouble)end_time,