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_AUDIO_STREAM_H_ 0007 #define _K3B_VIDEODVD_AUDIO_STREAM_H_ 0008 0009 #include "k3b_export.h" 0010 0011 #include <QString> 0012 0013 0014 namespace K3b { 0015 namespace VideoDVD 0016 { 0017 enum AudioFormat { 0018 AUDIO_FORMAT_AC3 = 0, 0019 AUDIO_FORMAT_MPEG1 = 2, 0020 AUDIO_FORMAT_MPEG2EXT = 3, 0021 AUDIO_FORMAT_LPCM = 4, 0022 AUDIO_FORMAT_DTS = 6 0023 }; 0024 0025 enum AudioApplicationMode { 0026 AUDIO_APPLICATION_KARAOKE = 1, 0027 AUDIO_APPLICATION_SURROUND = 2 0028 }; 0029 0030 enum AudioQuantization { 0031 AUDIO_QUANTIZATION_16BIT = 0, 0032 AUDIO_QUANTIZATION_20BIT = 1, 0033 AUDIO_QUANTIZATION_24BIT = 2 0034 }; 0035 0036 enum AudioSampleFrequency { 0037 AUDIO_SAMPLE_FREQ_48HZ = 0, 0038 AUDIO_SAMPLE_FREQ_96HZ = 1 0039 }; 0040 0041 enum AudioCodeExtension { 0042 AUDIO_CODE_EXT_UNSPECIFIED = 0, 0043 AUDIO_CODE_EXT_NORMAL = 1, 0044 AUDIO_CODE_EXT_VISUALLY_IMPAIRED = 2, 0045 AUDIO_CODE_EXT_DIR_COMMENTS_1 = 3, 0046 AUDIO_CODE_EXT_DIR_COMMENTS_2 = 4 0047 }; 0048 0049 class LIBK3B_EXPORT AudioStream 0050 { 0051 public: 0052 AudioStream() {} 0053 0054 /** 0055 * \return A two chars language code or the empty string 0056 * if the language is undefined. 0057 */ 0058 const QString& langCode() const { return m_langCode; } 0059 0060 /** 0061 * \see AudioFormat 0062 */ 0063 unsigned short format() const { return m_format; } 0064 0065 /** 0066 * \see AudioApplicationMode 0067 */ 0068 unsigned short applicationMode() const { return m_applicationMode; } 0069 0070 /** 0071 * \see AudioQuantization 0072 */ 0073 unsigned short quantization() const { return m_quantization; } 0074 0075 /** 0076 * \see AudioSampleFrequency 0077 */ 0078 unsigned short sampleFrequency() const { return m_sampleFrequency; } 0079 0080 /** 0081 * \see AudioCodeExtension 0082 */ 0083 unsigned short codeExtension() const { return m_codeExtension; } 0084 0085 bool multiChannelExt() const { return m_multiChannelExt; } 0086 0087 unsigned short channels() const { return m_channels; } 0088 0089 private: 0090 unsigned short m_format:3; 0091 unsigned short m_applicationMode:2; 0092 unsigned short m_quantization:2; 0093 unsigned short m_sampleFrequency:2; 0094 unsigned short m_codeExtension; 0095 bool m_multiChannelExt; 0096 unsigned short m_channels:3; 0097 QString m_langCode; 0098 0099 friend class VideoDVD; 0100 }; 0101 } 0102 } 0103 0104 #endif