Rename TYPE_DEBUG_PLAYER to TYPE_DEBUG_VIDEO_VIEW.
[dcpomatic.git] / src / lib / video_examiner.h
1 /*
2     Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
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.
10
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.
15
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/>.
18
19 */
20
21 /** @file  src/lib/video_examiner.h
22  *  @brief VideoExaminer class.
23  */
24
25 #include "types.h"
26 #include "video_content.h"
27 #include <dcp/types.h>
28
29 /** @class VideoExaminer
30  *  @brief Parent for classes which examine video sources and obtain information about them.
31  */
32 class VideoExaminer
33 {
34 public:
35         virtual ~VideoExaminer () {}
36
37         virtual bool has_video () const = 0;
38
39         /** @return video frame rate (if known); must not be called if has_video() == false */
40         virtual boost::optional<double> video_frame_rate () const = 0;
41         /** @return video size; must not be called if has_video() == false */
42         virtual dcp::Size video_size () const = 0;
43         /** @return video length in frames; must not be called if has_video() == false */
44         virtual Frame video_length () const = 0;
45         /** @return video sample aspect ratio (if known); must not be called if has_video() == false */
46         virtual boost::optional<double> sample_aspect_ratio () const {
47                 return boost::optional<double> ();
48         }
49         /** @return true if this video is in YUV; must not be called if has_video() == false */
50         virtual bool yuv () const = 0;
51         virtual VideoRange range () const = 0;
52 };