From 769d56b7f3b2fe78036b4ba12c0cfe71734b379d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 Apr 2022 23:51:19 +0200 Subject: [PATCH] Cleanup: tidying. --- src/lib/video_content.cc | 39 ++++++++++++++++++++++----------------- src/lib/video_examiner.h | 2 +- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 853204575..51d6ba418 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2021 Carl Hetherington + Copyright (C) 2013-2022 Carl Hetherington This file is part of DCP-o-matic. @@ -18,19 +18,20 @@ */ -#include "video_content.h" -#include "content.h" -#include "video_examiner.h" + +#include "colour_conversion.h" #include "compose.hpp" -#include "ratio.h" #include "config.h" -#include "colour_conversion.h" -#include "util.h" -#include "film.h" +#include "content.h" +#include "dcpomatic_log.h" #include "exceptions.h" +#include "film.h" #include "frame_rate_change.h" #include "log.h" -#include "dcpomatic_log.h" +#include "ratio.h" +#include "util.h" +#include "video_content.h" +#include "video_examiner.h" #include #include #include @@ -39,6 +40,7 @@ #include "i18n.h" + int const VideoContentProperty::USE = 0; int const VideoContentProperty::SIZE = 1; int const VideoContentProperty::FRAME_TYPE = 2; @@ -51,23 +53,25 @@ int const VideoContentProperty::CUSTOM_RATIO = 8; int const VideoContentProperty::CUSTOM_SIZE = 9; int const VideoContentProperty::BURNT_SUBTITLE_LANGUAGE = 10; -using std::string; -using std::setprecision; + using std::cout; -using std::vector; -using std::min; -using std::max; +using std::dynamic_pointer_cast; using std::fixed; -using std::setprecision; using std::list; +using std::make_shared; +using std::max; +using std::min; using std::pair; +using std::setprecision; +using std::setprecision; using std::shared_ptr; -using std::make_shared; +using std::string; +using std::vector; using boost::optional; -using std::dynamic_pointer_cast; using dcp::raw_convert; using namespace dcpomatic; + VideoContent::VideoContent (Content* parent) : ContentPart (parent) , _use (true) @@ -81,6 +85,7 @@ VideoContent::VideoContent (Content* parent) } + shared_ptr VideoContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version) { diff --git a/src/lib/video_examiner.h b/src/lib/video_examiner.h index c56530448..86dd9345a 100644 --- a/src/lib/video_examiner.h +++ b/src/lib/video_examiner.h @@ -48,7 +48,7 @@ public: virtual Frame video_length () const = 0; /** @return video sample aspect ratio (if known); must not be called if has_video() == false */ virtual boost::optional sample_aspect_ratio () const { - return boost::optional (); + return {}; } /** @return true if this video is in YUV; must not be called if has_video() == false */ virtual bool yuv () const = 0; -- 2.30.2