From 8053593f2ccff66287c43d20a8f28be9919bff75 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 29 Oct 2013 18:40:48 +0000 Subject: [PATCH] Seek past trim on setting up player pieces. --- ChangeLog | 3 +++ src/lib/player.cc | 18 ++++++++++-------- src/lib/video_content.cc | 20 ++++++++++++++++++++ src/lib/video_content.h | 2 ++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index af3093205..3a3dffd12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-10-29 Carl Hetherington + * Improve performance when start-trimming + large files. + * Fix audio problems when start-trimming. 2013-10-28 Carl Hetherington diff --git a/src/lib/player.cc b/src/lib/player.cc index 8370a3f9f..53186af6e 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -102,7 +102,9 @@ public: shared_ptr content; shared_ptr decoder; + /** Time of the last video we emitted relative to the start of the DCP */ Time video_position; + /** Time of the last audio we emitted relative to the start of the DCP */ Time audio_position; IncomingVideo repeat_video; @@ -408,20 +410,19 @@ Player::seek (Time t, bool accurate) if (!vc) { continue; } - + + /* s is the offset of t from the start position of this content */ Time s = t - vc->position (); s = max (static_cast