File indexing completed on 2024-04-28 04:49:54
0001 /* 0002 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef _K3B_VIDEODVD_VIDEO_STREAM_H_ 0007 #define _K3B_VIDEODVD_VIDEO_STREAM_H_ 0008 0009 #include "k3b_export.h" 0010 0011 namespace K3b { 0012 namespace VideoDVD 0013 { 0014 enum VideoMPEGVersion { 0015 MPEG1 = 0, 0016 MPEG2 = 1 0017 }; 0018 0019 enum VideoFormat { 0020 VIDEO_FORMAT_NTSC = 0, 0021 VIDEO_FORMAT_PAL = 1 0022 }; 0023 0024 enum VideoAspectRatio { 0025 VIDEO_ASPECT_RATIO_4_3 = 0, 0026 VIDEO_ASPECT_RATIO_16_9 = 1 0027 }; 0028 0029 enum VideoPermitedDf { 0030 VIDEO_PERMITTED_DF_BOTH = 0, 0031 VIDEO_PERMITTED_DF_PAN_SCAN = 1, 0032 VIDEO_PERMITTED_DF_LETTERBOXED = 2, 0033 VIDEO_PERMITTED_DF_UNSPECIFIED = 3 0034 }; 0035 0036 enum VideoBitRate { 0037 VIDEO_BITRATE_VARIABLE = 0, 0038 VIDEO_BITRATE_CONSTANT = 1 0039 }; 0040 0041 enum VideoPicureSize { 0042 VIDEO_PICTURE_SIZE_720 = 0, 0043 VIDEO_PICTURE_SIZE_704 = 1, 0044 VIDEO_PICTURE_SIZE_352 = 2, 0045 VIDEO_PICTURE_SIZE_352_2 = 3 0046 }; 0047 0048 class LIBK3B_EXPORT VideoStream 0049 { 0050 public: 0051 VideoStream() {} 0052 0053 unsigned int permittedDf() const { return m_permittedDf; } 0054 unsigned int displayAspectRatio() const { return m_displayAspectRatio; } 0055 unsigned int format() const { return m_videoFormat; } 0056 unsigned int mpegVersion() const { return m_mpegVersion; } 0057 unsigned int filmMode() const { return m_filmMode; } 0058 unsigned int letterboxed() const { return m_letterboxed; } 0059 unsigned int pictureSize() const { return m_pictureSize; } 0060 unsigned int bitRate() const { return m_bitRate; } 0061 0062 /** 0063 * The picture width of the video stream 0064 */ 0065 unsigned int pictureWidth() const; 0066 0067 /** 0068 * The picture height of the video stream 0069 */ 0070 unsigned int pictureHeight() const; 0071 0072 /** 0073 * The width of the "real" video after applying aspect ratio 0074 * correction 0075 */ 0076 unsigned int realPictureWidth() const; 0077 0078 /** 0079 * The height of the "real" video after applying aspect ratio 0080 * correction 0081 */ 0082 unsigned int realPictureHeight() const; 0083 0084 private: 0085 unsigned int m_permittedDf:2; 0086 unsigned int m_displayAspectRatio:2; 0087 unsigned int m_videoFormat:2; 0088 unsigned int m_mpegVersion:2; 0089 unsigned int m_filmMode:1; 0090 unsigned int m_letterboxed:1; 0091 unsigned int m_pictureSize:2; 0092 unsigned int m_bitRate:1; 0093 0094 friend class VideoDVD; 0095 }; 0096 } 0097 } 0098 0099 #endif