1 /* 2 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 3 SPDX-License-Identifier: GPL-2.0-or-later 4 */ 5 6 #ifndef _K3B_VIDEODVD_VIDEO_STREAM_H_ 7 #define _K3B_VIDEODVD_VIDEO_STREAM_H_ 8 9 #include "k3b_export.h" 10 11 namespace K3b { 12 namespace VideoDVD 13 { 14 enum VideoMPEGVersion { 15 MPEG1 = 0, 16 MPEG2 = 1 17 }; 18 19 enum VideoFormat { 20 VIDEO_FORMAT_NTSC = 0, 21 VIDEO_FORMAT_PAL = 1 22 }; 23 24 enum VideoAspectRatio { 25 VIDEO_ASPECT_RATIO_4_3 = 0, 26 VIDEO_ASPECT_RATIO_16_9 = 1 27 }; 28 29 enum VideoPermitedDf { 30 VIDEO_PERMITTED_DF_BOTH = 0, 31 VIDEO_PERMITTED_DF_PAN_SCAN = 1, 32 VIDEO_PERMITTED_DF_LETTERBOXED = 2, 33 VIDEO_PERMITTED_DF_UNSPECIFIED = 3 34 }; 35 36 enum VideoBitRate { 37 VIDEO_BITRATE_VARIABLE = 0, 38 VIDEO_BITRATE_CONSTANT = 1 39 }; 40 41 enum VideoPicureSize { 42 VIDEO_PICTURE_SIZE_720 = 0, 43 VIDEO_PICTURE_SIZE_704 = 1, 44 VIDEO_PICTURE_SIZE_352 = 2, 45 VIDEO_PICTURE_SIZE_352_2 = 3 46 }; 47 48 class LIBK3B_EXPORT VideoStream 49 { 50 public: VideoStream()51 VideoStream() {} 52 permittedDf()53 unsigned int permittedDf() const { return m_permittedDf; } displayAspectRatio()54 unsigned int displayAspectRatio() const { return m_displayAspectRatio; } format()55 unsigned int format() const { return m_videoFormat; } mpegVersion()56 unsigned int mpegVersion() const { return m_mpegVersion; } filmMode()57 unsigned int filmMode() const { return m_filmMode; } letterboxed()58 unsigned int letterboxed() const { return m_letterboxed; } pictureSize()59 unsigned int pictureSize() const { return m_pictureSize; } bitRate()60 unsigned int bitRate() const { return m_bitRate; } 61 62 /** 63 * The picture width of the video stream 64 */ 65 unsigned int pictureWidth() const; 66 67 /** 68 * The picture height of the video stream 69 */ 70 unsigned int pictureHeight() const; 71 72 /** 73 * The width of the "real" video after applying aspect ratio 74 * correction 75 */ 76 unsigned int realPictureWidth() const; 77 78 /** 79 * The height of the "real" video after applying aspect ratio 80 * correction 81 */ 82 unsigned int realPictureHeight() const; 83 84 private: 85 unsigned int m_permittedDf:2; 86 unsigned int m_displayAspectRatio:2; 87 unsigned int m_videoFormat:2; 88 unsigned int m_mpegVersion:2; 89 unsigned int m_filmMode:1; 90 unsigned int m_letterboxed:1; 91 unsigned int m_pictureSize:2; 92 unsigned int m_bitRate:1; 93 94 friend class VideoDVD; 95 }; 96 } 97 } 98 99 #endif 100