2 Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 /** @file src/lib/video_examiner.h
23 * @brief VideoExaminer class.
27 #include "pixel_quanta.h"
28 #include "video_content.h"
29 #include <dcp/types.h>
32 /** @class VideoExaminer
33 * @brief Parent for classes which examine video sources and obtain information about them.
38 virtual ~VideoExaminer () {}
40 virtual bool has_video () const = 0;
42 /** @return video frame rate (if known); must not be called if has_video() == false */
43 virtual boost::optional<double> video_frame_rate () const = 0;
44 /** @return video size (if known) */
45 virtual boost::optional<dcp::Size> video_size() const = 0;
46 /** @return video length in frames; must not be called if has_video() == false */
47 virtual Frame video_length () const = 0;
48 /** @return video sample aspect ratio (if known); must not be called if has_video() == false */
49 virtual boost::optional<double> sample_aspect_ratio () const {
52 /** @return true if this video is in YUV; must not be called if has_video() == false */
53 virtual bool yuv () const = 0;
54 virtual VideoRange range () const = 0;
55 virtual PixelQuanta pixel_quanta () const = 0;