let's try simpler EndOfStreamReached version now that we have nanoseconds
This commit is contained in:
parent
f5d5451c16
commit
2b0dcebaec
@ -687,14 +687,23 @@ void GstEngine::timerEvent(QTimerEvent* e) {
|
|||||||
EmitAboutToEnd();
|
EmitAboutToEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: a simpler version now that we have nanoseconds - let's see if this
|
||||||
|
// works...
|
||||||
|
if(current_position >= current_length) {
|
||||||
|
EndOfStreamReached(current_pipeline_->has_next_valid_url());
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: below is the previous versions; after the nanoseconds improvement,
|
||||||
|
// this stops my test CUE songs about two seconds too late
|
||||||
|
|
||||||
// when at the end, kill the track if it didn't stop yet (probably a
|
// when at the end, kill the track if it didn't stop yet (probably a
|
||||||
// multisection media file). We add 1 second onto the length during this
|
// multisection media file). We add 1 second onto the length during this
|
||||||
// check to allow for the fact that the length has been rounded down to
|
// check to allow for the fact that the length has been rounded down to
|
||||||
// the nearest second, and to stop us from occasionally stopping the
|
// the nearest second, and to stop us from occasionally stopping the
|
||||||
// stream just before it ends normally.
|
// stream just before it ends normally.
|
||||||
if(current_position >= current_length + 1000 * kNsecPerMsec) {
|
// if(current_position >= current_length + 1000 * kNsecPerMsec) {
|
||||||
EndOfStreamReached(current_pipeline_->has_next_valid_url());
|
// EndOfStreamReached(current_pipeline_->has_next_valid_url());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user