X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fbutler.cc;h=56acbd8a0817aa4809741aea234a3589a9d9162c;hb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;hp=d09b0356a7829e8afa5be0714d8c8d585e1296f2;hpb=4985d87750c87019dfe5dc7ef44e12c45326dd0e;p=dcpomatic.git diff --git a/src/lib/butler.cc b/src/lib/butler.cc index d09b0356a..56acbd8a0 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -384,8 +384,8 @@ void Butler::player_change (ChangeType type, int property) { if (property == VideoContentProperty::CROP) { - if (type == CHANGE_TYPE_DONE) { - shared_ptr film = _film.lock(); + if (type == ChangeType::DONE) { + auto film = _film.lock(); if (film) { _video.reset_metadata (film, _player->video_container_size()); } @@ -395,9 +395,9 @@ Butler::player_change (ChangeType type, int property) boost::mutex::scoped_lock lm (_mutex); - if (type == CHANGE_TYPE_PENDING) { + if (type == ChangeType::PENDING) { ++_suspended; - } else if (type == CHANGE_TYPE_DONE) { + } else if (type == ChangeType::DONE) { --_suspended; if (_died || _pending_seek_position) { lm.unlock (); @@ -406,7 +406,7 @@ Butler::player_change (ChangeType type, int property) } DCPTime seek_to; - DCPTime next = _video.get().second; + auto next = _video.get().second; if (_awaiting && _awaiting > next) { /* We have recently done a player_changed seek and our buffers haven't been refilled yet, so assume that we're seeking to the same place as last time. @@ -418,7 +418,7 @@ Butler::player_change (ChangeType type, int property) seek_unlocked (seek_to, true); _awaiting = seek_to; - } else if (type == CHANGE_TYPE_CANCELLED) { + } else if (type == ChangeType::CANCELLED) { --_suspended; } @@ -429,7 +429,7 @@ Butler::player_change (ChangeType type, int property) void Butler::text (PlayerText pt, TextType type, optional track, DCPTimePeriod period) { - if (type != TEXT_CLOSED_CAPTION) { + if (type != TextType::CLOSED_CAPTION) { return; }