#include "ffmpeg_subtitle_stream.h"
#include "file_log.h"
#include "film.h"
+#include "film_util.h"
#include "font.h"
#include "job.h"
#include "job_manager.h"
isdcf_name += "-3D";
}
- auto vf = false;
- for (auto content: content_list) {
- auto dcp = dynamic_pointer_cast<const DCPContent>(content);
- if (!dcp) {
- continue;
- }
-
- bool any_text = false;
- for (int i = 0; i < static_cast<int>(TextType::COUNT); ++i) {
- if (dcp->reference_text(static_cast<TextType>(i))) {
- any_text = true;
- }
- }
- if (dcp->reference_video() || dcp->reference_audio() || any_text) {
- vf = true;
- }
- }
-
- if (vf) {
+ if (dcpomatic::film::is_vf(shared_from_this())) {
isdcf_name += "_VF";
} else {
isdcf_name += "_OV";
#include "config.h"
+#include "content.h"
+#include "dcp_content.h"
#include "film.h"
#include "film_util.h"
+using std::dynamic_pointer_cast;
using std::shared_ptr;
using boost::optional;
: boost::optional<boost::filesystem::path>();
}
+
+
+bool
+dcpomatic::film::is_vf(shared_ptr<const Film> film)
+{
+ for (auto content: film->content()) {
+ auto dcp = dynamic_pointer_cast<const DCPContent>(content);
+ if (!dcp) {
+ continue;
+ }
+
+ bool any_text = false;
+ for (int i = 0; i < static_cast<int>(TextType::COUNT); ++i) {
+ if (dcp->reference_text(static_cast<TextType>(i))) {
+ any_text = true;
+ }
+ }
+ if (dcp->reference_video() || dcp->reference_audio() || any_text) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
bool channel_is_mapped(std::shared_ptr<const Film> film, dcp::Channel channel);
boost::optional<boost::filesystem::path> add_files_override_path(std::shared_ptr<const Film> film);
+bool is_vf(std::shared_ptr<const Film> film);
}