#include "lib/filter.h"
#include "lib/player.h"
#include "lib/video_content.h"
-#include "lib/ffmpeg_content.h"
-#include "lib/still_image_content.h"
#include "lib/video_decoder.h"
#include "film_viewer.h"
#include "wx_util.h"
_film = f;
_frame.reset ();
- _queue.clear ();
-
+
_slider->SetValue (0);
set_position_text (0);
return;
}
- shared_ptr<Image> packed_frame (new Image (_frame, false));
-
- wxImage frame (_out_size.width, _out_size.height, packed_frame->data()[0], true);
+ wxImage frame (_out_size.width, _out_size.height, _frame->data()[0], true);
wxBitmap frame_bitmap (frame);
dc.DrawBitmap (frame_bitmap, 0, 0);
return;
}
- if (_got_frame) {
- /* This is an additional frame emitted by a single pass. Store it. */
- _queue.push_front (make_pair (image, t));
- return;
- }
-
_frame = image;
_got_frame = true;
_got_frame = false;
- if (!_queue.empty ()) {
- process_video (_queue.back().first, EYES_BOTH, _queue.back().second);
- _queue.pop_back ();
- } else {
- try {
- while (!_got_frame && !_player->pass ()) {}
- } catch (DecodeError& e) {
- _play_button->SetValue (false);
- check_play_state ();
- error_dialog (this, wxString::Format (_("Could not decode video for view (%s)"), std_to_wx(e.what()).data()));
- } catch (OpenFileError& e) {
- /* There was a problem opening a content file; we'll let this slide as it
- probably means a missing content file, which we're already taking care of.
- */
- }
+ try {
+ while (!_got_frame && !_player->pass ()) {}
+ } catch (DecodeError& e) {
+ _play_button->SetValue (false);
+ check_play_state ();
+ error_dialog (this, wxString::Format (_("Could not decode video for view (%s)"), std_to_wx(e.what()).data()));
+ } catch (OpenFileError& e) {
+ /* There was a problem opening a content file; we'll let this slide as it
+ probably means a missing content file, which we're already taking care of.
+ */
}
_panel->Refresh ();