Use tile cache again and pause when seeking

This commit is contained in:
Ylva Selling
2023-02-15 14:25:40 -05:00
parent f9b7270910
commit a2285af180
2 changed files with 2 additions and 5 deletions

View File

@@ -311,7 +311,7 @@ void VideoPlayer::seekToTime(double time) {
bool seekIsDifferent = abs(time - _currentVideoTime) > _seekThreshold;
if (seekIsDifferent && !_isSeeking) {
// Pause while seeking
//pause();
pause();
std::string timeString = std::to_string(time);
const char* params = timeString.c_str();
const char* cmd[] = { "seek", params, "absolute", NULL };

View File

@@ -186,9 +186,6 @@ Tile VideoTileProvider::tile(const TileIndex& tileIndex) {
LINFO("Framebuffer is not complete");
}
return Tile{ _videoPlayer.frameTexture().get(), std::nullopt, Tile::Status::OK };
/*
// For now, don't use the cache as we're trying to debug the problem w playback
uint64_t hash = tileIndex.hashKey();
auto foundTile = _tileCache.find(hash);
@@ -203,7 +200,7 @@ Tile VideoTileProvider::tile(const TileIndex& tileIndex) {
};
}
return _tileCache[hash];*/
return _tileCache[hash];
}
Tile::Status VideoTileProvider::tileStatus(const TileIndex& tileIndex) {