2 Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 #include "lib/swaroop_spl.h"
25 class EncryptedECinemaKDM;
27 class SwaroopControls : public Controls
30 SwaroopControls (wxWindow* parent, boost::shared_ptr<FilmViewer> viewer);
32 void log (wxString s);
33 void set_film (boost::shared_ptr<Film> film);
34 void check_restart ();
36 /** This is so that we can tell our parent player to reset the film
37 when we have created one from a SPL. We could call a method
38 in the player's DOMFrame but we don't have that in a header.
40 boost::signals2::signal<void (boost::weak_ptr<Film>)> ResetFilm;
44 void pause_clicked ();
47 void previous_clicked ();
48 void add_playlist_to_list (SPL spl);
49 void update_content_directory ();
50 void update_playlist_directory ();
51 void spl_selection_changed ();
52 void select_playlist (int selected, int position);
55 void setup_sensitivity ();
56 void config_changed (int);
57 void viewer_finished ();
58 void write_position ();
60 void update_current_content ();
61 bool can_do_previous ();
63 void decrement_allowed_shows ();
64 void deselect_playlist ();
66 boost::optional<dcp::EncryptedKDM> get_kdm_from_url (boost::shared_ptr<DCPContent> dcp);
67 boost::optional<dcp::EncryptedKDM> get_kdm_from_directory (boost::shared_ptr<DCPContent> dcp);
68 boost::optional<EncryptedECinemaKDM> get_kdm_from_directory (boost::shared_ptr<FFmpegContent> ffmpeg);
70 wxButton* _play_button;
71 wxButton* _pause_button;
72 wxButton* _stop_button;
73 wxButton* _next_button;
74 wxButton* _previous_button;
76 ContentView* _content_view;
77 wxButton* _refresh_content_view;
78 wxListCtrl* _spl_view;
79 wxButton* _refresh_spl_view;
80 wxListCtrl* _current_spl_view;
82 bool _current_disable_timeline;
83 bool _current_disable_next;
85 std::vector<SPL> _playlists;
86 boost::optional<int> _selected_playlist;
87 int _selected_playlist_position;