#include "lib/examine_content_job.h"
#include "lib/filter.h"
#include "lib/player.h"
+#include "lib/player_video.h"
#include "lib/video_content.h"
#include "lib/video_decoder.h"
#include "lib/timer.h"
-#include "lib/dcp_video.h"
#include "film_viewer.h"
#include "wx_util.h"
, _frame_number (new wxStaticText (this, wxID_ANY, wxT("")))
, _timecode (new wxStaticText (this, wxID_ANY, wxT("")))
, _play_button (new wxToggleButton (this, wxID_ANY, _("Play")))
+ , _last_get_accurate (true)
{
#ifndef __WXOSX__
_panel->SetDoubleBuffered (true);
_player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
calculate_sizes ();
- get (_position, true);
+ get (_position, _last_get_accurate);
}
void
return;
}
- list<shared_ptr<DCPVideo> > dcp_video = _player->get_video (p, accurate);
- if (!dcp_video.empty ()) {
- _frame = dcp_video.front()->image (PIX_FMT_BGRA, true);
+ list<shared_ptr<PlayerVideo> > pvf = _player->get_video (p, accurate);
+ if (!pvf.empty ()) {
+ _frame = pvf.front()->image ();
_frame = _frame->scale (_frame->size(), Scaler::from_id ("fastbilinear"), PIX_FMT_RGB24, false);
+ _position = pvf.front()->time ();
} else {
_frame.reset ();
+ _position = p;
}
- _position = p;
-
set_position_text ();
_panel->Refresh ();
_panel->Update ();
+
+ _last_get_accurate = accurate;
}
void
_panel_size.width = ev.GetSize().GetWidth();
_panel_size.height = ev.GetSize().GetHeight();
calculate_sizes ();
- get (_position, true);
+ get (_position, _last_get_accurate);
}
void
}
calculate_sizes ();
- get (_position, true);
+ get (_position, _last_get_accurate);
}