/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+#include "hints_dialog.h"
#include "lib/film.h"
#include "lib/ratio.h"
#include "lib/video_content.h"
#include "lib/subtitle_content.h"
#include "lib/font.h"
-#include "hints_dialog.h"
+#include "lib/content.h"
#include <wx/richtext/richtextctrl.h>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
bool big_font_files = false;
if (film->interop ()) {
BOOST_FOREACH (shared_ptr<Content> i, content) {
- shared_ptr<SubtitleContent> s = dynamic_pointer_cast<SubtitleContent> (i);
- if (s) {
- BOOST_FOREACH (shared_ptr<Font> j, s->fonts ()) {
- for (int i = 0; i < FontFiles::VARIANTS; ++i) {
- optional<boost::filesystem::path> const p = j->file (static_cast<FontFiles::Variant> (i));
+ if (i->subtitle) {
+ BOOST_FOREACH (shared_ptr<Font> j, i->subtitle->fonts ()) {
+ for (int k = 0; k < FontFiles::VARIANTS; ++k) {
+ optional<boost::filesystem::path> const p = j->file (static_cast<FontFiles::Variant> (k));
if (p && boost::filesystem::file_size (p.get()) >= (640 * 1024)) {
big_font_files = true;
}
int flat_or_narrower = 0;
int scope = 0;
BOOST_FOREACH (shared_ptr<const Content> i, content) {
- shared_ptr<const VideoContent> vc = dynamic_pointer_cast<const VideoContent> (i);
- if (vc) {
- Ratio const * r = vc->scale().ratio ();
+ if (i->video) {
+ Ratio const * r = i->video->scale().ratio ();
if (r && r->id() == "239") {
++scope;
} else if (r && r->id() != "239" && r->id() != "full-frame") {
int three_d = 0;
BOOST_FOREACH (shared_ptr<const Content> i, content) {
- shared_ptr<const VideoContent> vc = dynamic_pointer_cast<const VideoContent> (i);
- if (vc && vc->video_frame_type() != VIDEO_FRAME_TYPE_2D) {
+ if (i->video && i->video->frame_type() != VIDEO_FRAME_TYPE_2D) {
++three_d;
}
}