#include "audio_content.h"
#include "compose.hpp"
#include "config.h"
+#include "constants.h"
#include "exceptions.h"
#include "film.h"
#include "frame_rate_change.h"
#include "audio_buffers.h"
#include "audio_filter_graph.h"
#include "compose.hpp"
+#include "dcpomatic_assert.h"
+#include "exceptions.h"
extern "C" {
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include "audio_mapping.h"
#include "audio_processor.h"
+#include "constants.h"
+#include "dcpomatic_assert.h"
#include "digester.h"
-#include "util.h"
#include <dcp/raw_convert.h>
#include <dcp/warnings.h>
#include <libcxml/cxml.h>
#include "audio_stream.h"
#include "audio_mapping.h"
-#include "util.h"
+#include "constants.h"
AudioStream::AudioStream (int frame_rate, Frame length, int channels)
#include "colour_conversion.h"
#include "compose.hpp"
#include "config.h"
+#include "constants.h"
#include "cross.h"
#include "crypto.h"
#include "dcp_content_type.h"
#include "log.h"
#include "ratio.h"
#include "types.h"
-#include "util.h"
#include "zipper.h"
#include <dcp/certificate_chain.h>
#include <dcp/name_format.h>
--- /dev/null
+/*
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#ifndef DCPOMATIC_CONSTANTS_H
+#define DCPOMATIC_CONSTANTS_H
+
+
+/** The maximum number of audio channels that we can have in a DCP */
+#define MAX_DCP_AUDIO_CHANNELS 16
+/** Message broadcast to find possible encoding servers */
+#define DCPOMATIC_HELLO "I mean really, Ray, it's used."
+/** Number of films to keep in history */
+#define HISTORY_SIZE 10
+#define REPORT_PROBLEM _("Please report this problem by using Help -> Report a problem or via email to carl@dcpomatic.com")
+#define TEXT_FONT_ID "font"
+/** Largest KDM size (in bytes) that will be accepted */
+#define MAX_KDM_SIZE (256 * 1024)
+/** Number of lines that closed caption viewers will display */
+#define MAX_CLOSED_CAPTION_LINES 3
+/** Maximum line length of closed caption viewers, according to SMPTE Bv2.1 */
+#define MAX_CLOSED_CAPTION_LENGTH 32
+/** Maximum size of a subtitle / closed caption MXF in bytes, according to SMPTE Bv2.1 */
+#define MAX_TEXT_MXF_SIZE (115 * 1024 * 1024)
+#define MAX_TEXT_MXF_SIZE_TEXT "115MB"
+/** Maximum size of a font file, in bytes */
+#define MAX_FONT_FILE_SIZE (640 * 1024)
+#define MAX_FONT_FILE_SIZE_TEXT "640KB"
+/** Maximum size of the XML part of a closed caption file, according to SMPTE Bv2.1 */
+#define MAX_CLOSED_CAPTION_XML_SIZE (256 * 1024)
+#define MAX_CLOSED_CAPTION_XML_SIZE_TEXT "256KB"
+#define CERTIFICATE_VALIDITY_PERIOD (10 * 365)
+
+
+#endif
+
#include "dcp_subtitle_decoder.h"
#include "font.h"
#include "text_content.h"
+#include "util.h"
#include <dcp/interop_subtitle_asset.h>
#include <dcp/load_font_node.h>
*/
-#include "encode_server.h"
-#include "util.h"
-#include "dcpomatic_socket.h"
-#include "image.h"
-#include "dcp_video.h"
+#include "compose.hpp"
#include "config.h"
+#include "constants.h"
#include "cross.h"
-#include "player_video.h"
-#include "compose.hpp"
-#include "log.h"
+#include "dcp_video.h"
#include "dcpomatic_log.h"
+#include "dcpomatic_socket.h"
+#include "encode_server.h"
#include "encoded_log_entry.h"
+#include "image.h"
+#include "log.h"
+#include "player_video.h"
#include "version.h"
#include <dcp/raw_convert.h>
#include <dcp/warnings.h>
*/
-#include "encode_server_finder.h"
-#include "exceptions.h"
-#include "util.h"
#include "config.h"
+#include "constants.h"
#include "cross.h"
-#include "encode_server_description.h"
#include "dcpomatic_socket.h"
+#include "encode_server_description.h"
+#include "encode_server_finder.h"
+#include "exceptions.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <boost/bind/placeholders.hpp>
*/
-#include "ffmpeg_content.h"
-#include "video_content.h"
#include "audio_content.h"
-#include "ffmpeg_examiner.h"
-#include "ffmpeg_subtitle_stream.h"
-#include "ffmpeg_audio_stream.h"
#include "compose.hpp"
-#include "job.h"
-#include "util.h"
-#include "filter.h"
-#include "film.h"
-#include "log.h"
#include "config.h"
+#include "constants.h"
#include "exceptions.h"
+#include "ffmpeg_audio_stream.h"
+#include "ffmpeg_content.h"
+#include "ffmpeg_examiner.h"
+#include "ffmpeg_subtitle_stream.h"
+#include "film.h"
+#include "filter.h"
#include "frame_rate_change.h"
+#include "job.h"
+#include "log.h"
#include "text_content.h"
+#include "video_content.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
extern "C" {
#include "decoder.h"
#include "ffmpeg.h"
#include "video_filter_graph_set.h"
-#include "util.h"
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "cinema.h"
#include "compose.hpp"
#include "config.h"
+#include "constants.h"
#include "cross.h"
#include "dcp_content.h"
#include "dcp_content_type.h"
#include "text_content.h"
#include "transcode_job.h"
#include "upload_job.h"
-#include "util.h"
#include "video_content.h"
#include "version.h"
#include <libcxml/cxml.h>
#include "change_signaller.h"
#include "dcp_text_track.h"
+#include "dcpomatic_time.h"
#include "frame_rate_change.h"
#include "signaller.h"
#include "transcode_job.h"
#include "types.h"
-#include "util.h"
#include <dcp/encrypted_kdm.h>
#include <dcp/file.h>
#include <dcp/key.h>
#define DCPOMATIC_FILTER_GRAPH_H
-#include "util.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
extern "C" {
#include <libavfilter/buffersink.h>
}
LIBDCP_ENABLE_WARNINGS
+#include <string>
+#include <vector>
struct AVFilterContext;
#include "audio_processor.h"
#include "compose.hpp"
#include "config.h"
+#include "constants.h"
#include "content.h"
#include "cross.h"
#include "dcp_content_type.h"
#include "image_examiner.h"
#include "image_filename_sorter.h"
#include "job.h"
+#include "util.h"
#include "video_content.h"
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
#include "image_content.h"
#include "image_decoder.h"
#include "j2k_image_proxy.h"
+#include "util.h"
#include "video_content.h"
#include "video_decoder.h"
#include <boost/filesystem.hpp>
#include "enum_indexed_vector.h"
#include "event_history.h"
#include "exception_store.h"
-#include "util.h"
#include "writer.h"
#include <boost/optional.hpp>
#include <boost/signals2.hpp>
#include "compose.hpp"
+#include "constants.h"
#include "cross.h"
#include "dcpomatic_log.h"
#include "exceptions.h"
#include "film.h"
#include "job.h"
#include "job_manager.h"
+#include "util.h"
#include <boost/thread.hpp>
#include "change_signaller.h"
+#include "dcpomatic_time.h"
#include "frame_rate_change.h"
-#include "util.h"
+#include "types.h"
#include <libcxml/cxml.h>
#include <boost/signals2.hpp>
#include <boost/thread.hpp>
#include "cinema_sound_processor.h"
#include "compose.hpp"
#include "config.h"
+#include "constants.h"
#include "cross.h"
#include "crypto.h"
#include "dcp_content_type.h"
class SubtitleAsset;
}
-/** The maximum number of audio channels that we can have in a DCP */
-#define MAX_DCP_AUDIO_CHANNELS 16
-/** Message broadcast to find possible encoding servers */
-#define DCPOMATIC_HELLO "I mean really, Ray, it's used."
-/** Number of films to keep in history */
-#define HISTORY_SIZE 10
-#define REPORT_PROBLEM _("Please report this problem by using Help -> Report a problem or via email to carl@dcpomatic.com")
-#define TEXT_FONT_ID "font"
-/** Largest KDM size (in bytes) that will be accepted */
-#define MAX_KDM_SIZE (256 * 1024)
-/** Number of lines that closed caption viewers will display */
-#define MAX_CLOSED_CAPTION_LINES 3
-/** Maximum line length of closed caption viewers, according to SMPTE Bv2.1 */
-#define MAX_CLOSED_CAPTION_LENGTH 32
-/** Maximum size of a subtitle / closed caption MXF in bytes, according to SMPTE Bv2.1 */
-#define MAX_TEXT_MXF_SIZE (115 * 1024 * 1024)
-#define MAX_TEXT_MXF_SIZE_TEXT "115MB"
-/** Maximum size of a font file, in bytes */
-#define MAX_FONT_FILE_SIZE (640 * 1024)
-#define MAX_FONT_FILE_SIZE_TEXT "640KB"
-/** Maximum size of the XML part of a closed caption file, according to SMPTE Bv2.1 */
-#define MAX_CLOSED_CAPTION_XML_SIZE (256 * 1024)
-#define MAX_CLOSED_CAPTION_XML_SIZE_TEXT "256KB"
-#define CERTIFICATE_VALIDITY_PERIOD (10 * 365)
-
extern std::string program_name;
extern bool is_batch_converter;
#define DCPOMATIC_VIDEO_DECODER_H
-#include "decoder.h"
-#include "video_content.h"
-#include "util.h"
#include "content_video.h"
+#include "decoder.h"
#include "decoder_part.h"
+#include "video_content.h"
#include <boost/signals2.hpp>
#include "compose.hpp"
+#include "dcpomatic_assert.h"
+#include "exceptions.h"
#include "image.h"
#include "scope_guard.h"
#include "video_filter_graph.h"
#include "lib/cinema.h"
#include "lib/compose.hpp"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/content.h"
#include "lib/content_factory.h"
#include "lib/cross.h"
#include "lib/text_content.h"
#include "lib/transcode_job.h"
#include "lib/update_checker.h"
-#include "lib/util.h"
#include "lib/version.h"
#include "lib/video_content.h"
#include <dcp/exceptions.h>
#include "wx/wx_signal_manager.h"
#include "lib/combine_dcp_job.h"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/job_manager.h"
-#include "lib/util.h"
#include <dcp/combine.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/filepicker.h>
#include "wx/editable_list.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/dcpomatic_log.h"
#include "lib/null_log.h"
-#include "lib/util.h"
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel.h>
#include "lib/cinema.h"
#include "lib/collator.h"
#include "lib/compose.hpp"
+#include "lib/constants.h"
#include "lib/config.h"
#include "lib/cross.h"
#include "lib/dcpomatic_log.h"
#include "lib/kdm_with_metadata.h"
#include "lib/screen.h"
#include "lib/send_kdm_email_job.h"
-#include "lib/util.h"
#include <dcp/encrypted_kdm.h>
#include <dcp/decrypted_kdm.h>
#include <dcp/exceptions.h>
#include "wx/wx_util.h"
#include "lib/compose.hpp"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/dcp_content.h"
#include "lib/dcp_examiner.h"
#include "lib/server.h"
#include "lib/text_content.h"
#include "lib/update_checker.h"
-#include "lib/util.h"
#include "lib/verify_dcp_job.h"
#include "lib/video_content.h"
#include <dcp/cpl.h>
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/dcp_content.h"
#include "lib/film.h"
#include "lib/spl.h"
#include "lib/spl_entry.h"
-#include "lib/util.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/imaglist.h>
#include "lib/audio_analysis.h"
+#include "lib/constants.h"
#include "lib/film.h"
#include "lib/playlist.h"
#include <dcp/warnings.h>
#include "lib/audio_decoder.h"
#include "lib/audio_analysis.h"
#include "lib/compose.hpp"
+#include "lib/constants.h"
#include "lib/maths_util.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
*/
-#include "lib/util.h"
+
#include "lib/audio_analysis.h"
+#include "lib/constants.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
*/
+
#include "closed_captions_dialog.h"
-#include "wx_util.h"
#include "film_viewer.h"
-#include "lib/string_text.h"
+#include "wx_util.h"
#include "lib/butler.h"
-#include "lib/text_content.h"
#include "lib/compose.hpp"
+#include "lib/constants.h"
+#include "lib/string_text.h"
+#include "lib/text_content.h"
#include <boost/bind/bind.hpp>
+
+using std::cout;
using std::list;
+using std::make_pair;
using std::max;
-using std::cout;
using std::pair;
-using std::make_pair;
using std::shared_ptr;
using std::weak_ptr;
using boost::optional;
#endif
using namespace dcpomatic;
+
ClosedCaptionsDialog::ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer)
: wxDialog (parent, wxID_ANY, _("Closed captions"), wxDefaultPosition, wxDefaultSize,
#ifdef DCPOMATIC_OSX
#include "dcpomatic_button.h"
#include "nag_dialog.h"
#include "static_text.h"
+#include "lib/constants.h"
#include <dcp/file.h>
#include <dcp/raw_convert.h>
#include "lib/filter.h"
#include "lib/log.h"
#include "lib/ratio.h"
-#include "lib/util.h"
#include <dcp/certificate_chain.h>
#include <dcp/exceptions.h>
#include <dcp/locale_convert.h>
#include "lib/audio_content.h"
#include "lib/config.h"
#include "lib/content_factory.h"
+#include "lib/constants.h"
#include "lib/copy_dcp_details_to_film.h"
#include "lib/dcp_content.h"
#include "lib/dcp_examiner.h"
#include "make_chain_dialog.h"
#include "static_text.h"
+#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/util.h"
#include <dcp/certificate_chain.h>
#include "static_text.h"
#include "wx_util.h"
#include "lib/compose.hpp"
+#include "lib/constants.h"
#include "lib/cross.h"
#include "lib/dcp_content.h"
#include "lib/ffmpeg_content.h"
*/
+
#include "content_menu.h"
#include "timeline_content_view.h"
#include "lib/film.h"
#include "lib/rect.h"
-#include "lib/util.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
#include <boost/test/unit_test.hpp>
#include "lib/audio_mapping.h"
-#include "lib/util.h"
+#include "lib/constants.h"
+#include "lib/compose.hpp"
using std::list;
#include "lib/audio_content.h"
#include "lib/compose.hpp"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/content_factory.h"
#include "lib/dcp_content.h"
#include "lib/dcpomatic_log.h"
#include "lib/audio_content.h"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/content.h"
#include "lib/content_factory.h"
#include "lib/cross.h"
#include "lib/font.h"
#include "lib/hints.h"
#include "lib/text_content.h"
-#include "lib/util.h"
#include "test.h"
#include <boost/test/unit_test.hpp>
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/content_factory.h"
#include "lib/cross.h"
#include "lib/dcp_content.h"
*/
+#include "lib/constants.h"
#include "lib/ffmpeg_content.h"
#include "lib/film.h"
#include "lib/dcp_content_type.h"
#include "lib/film.h"
#include "lib/font.h"
#include "lib/text_content.h"
+#include "lib/util.h"
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel.h>
#include "test.h"
-#include "lib/film.h"
-#include "lib/dcp_subtitle_content.h"
-#include "lib/ratio.h"
-#include "lib/dcp_content_type.h"
-#include "lib/dcp_content.h"
-#include "lib/ffmpeg_content.h"
#include "lib/config.h"
+#include "lib/constants.h"
#include "lib/cross.h"
+#include "lib/dcp_content.h"
+#include "lib/dcp_content_type.h"
+#include "lib/dcp_subtitle_content.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/film.h"
+#include "lib/ratio.h"
#include "lib/screen.h"
#include <dcp/cpl.h>
#include <boost/test/unit_test.hpp>