2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * @brief A representation of a piece of video (with sound), including naming,
22 * the source content file, and how it should be presented in a DCP.
25 #ifndef DVDOMATIC_FILM_H
26 #define DVDOMATIC_FILM_H
31 #include <boost/thread/mutex.hpp>
32 #include <boost/thread.hpp>
34 #include <libavcodec/avcodec.h>
36 #include "dcp_content_type.h"
37 #include "film_state.h"
43 class ExamineContentJob;
46 * @brief A representation of a video with sound.
48 * A representation of a piece of video (with sound), including naming,
49 * the source content file, and how it should be presented in a DCP.
51 class Film : public FilmState
54 Film (std::string d, bool must_exist = true);
57 std::string j2k_dir () const;
59 std::vector<std::string> audio_files () const;
61 void update_thumbs_pre_gui ();
62 void update_thumbs_post_gui ();
63 std::pair<Position, std::string> thumb_subtitle (int) const;
65 void copy_from_dvd_post_gui ();
66 void examine_content ();
67 void examine_content_post_gui ();
68 void send_dcp_to_tms ();
69 void copy_from_dvd ();
71 void make_dcp (bool, int freq = 0);
74 * It is safe to call this from any thread.
80 int encoded_frames () const;
83 /** Log to write to */
86 /** Any running ExamineContentJob, or 0 */
87 boost::shared_ptr<ExamineContentJob> _examine_content_job;