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"
29 #include "video_content.h"
30 #include <dcp/types.h>
33 /** @class VideoExaminer
34 * @brief Parent for classes which examine video sources and obtain information about them.
39 virtual ~VideoExaminer () {}
41 virtual bool has_video () const = 0;
43 /** @return video frame rate (if known); must not be called if has_video() == false */
44 virtual boost::optional<double> video_frame_rate () const = 0;
45 /** @return video size; must not be called if has_video() == false */
46 virtual dcp::Size video_size () const = 0;
47 /** @return video length in frames; must not be called if has_video() == false */
48 virtual Frame video_length () const = 0;
49 /** @return video sample aspect ratio (if known); must not be called if has_video() == false */
50 virtual boost::optional<double> sample_aspect_ratio () const {
51 return boost::optional<double> ();
53 /** @return true if this video is in YUV; must not be called if has_video() == false */
54 virtual bool yuv () const = 0;
55 virtual VideoRange range () const = 0;
56 virtual PixelQuanta pixel_quanta () const = 0;