1 /* Copyright (c) MediaArea.net SARL. All Rights Reserved. 2 * 3 * Use of this source code is governed by a BSD-style license that can 4 * be found in the License.html file in the root of the source tree. 5 */ 6 7 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 // 9 // Global configuration of MediaInfo 10 // 11 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 12 13 //--------------------------------------------------------------------------- 14 #ifndef MediaInfo_ConstH 15 #define MediaInfo_ConstH 16 //--------------------------------------------------------------------------- 17 18 //--------------------------------------------------------------------------- 19 #include <string> 20 #include <ZenLib/Conf.h> 21 //--------------------------------------------------------------------------- 22 23 namespace MediaInfoLib 24 { 25 26 //--------------------------------------------------------------------------- 27 /// \mainpage MediaInfoLib Index Page 28 /// 29 /// \section Interfaces 30 /// 31 /// There is 2 access methods 32 /// 33 /// - MediaInfo class \n 34 /// To manage one file, this is the simplest interface. \n 35 /// - MediaInfo::Open to analyse file \n 36 /// - MediaInfo::Inform to have a summary \n 37 /// - MediaInfo::Get to retreive one piece of information \n 38 /// 39 /// - MediaInfoList class \n 40 /// To manage a list of files \n 41 /// - MediaInfoList::Open to analyse file \n 42 /// - MediaInfoList::Inform to have a summary \n 43 /// - MediaInfoList::Get to retreive one piece of information \n 44 /// - MediaInfoList::Close to close one file \n 45 /// 46 /// \section C C Interface (MediaInfo_*) 47 /// For compatibility and DLL interface \n 48 /// This is a C interface for the List class \n 49 /// Note : Don't forget to include the MediaInfoDLL.h file in your source file! \n 50 /// - Example of commands: 51 /// - MediaInfo_Open to analyse file \n 52 /// - MediaInfo_Inform to have a summary \n 53 /// - MediaInfo_Get to retreive one piece of information \n 54 /// - MediaInfo_Close to free memory \n 55 /// 56 //--------------------------------------------------------------------------- 57 58 //--------------------------------------------------------------------------- 59 /// @brief Kinds of Stream 60 enum stream_t 61 { 62 Stream_General, ///< StreamKind = General 63 Stream_Video, ///< StreamKind = Video 64 Stream_Audio, ///< StreamKind = Audio 65 Stream_Text, ///< StreamKind = Text 66 Stream_Other, ///< StreamKind = Chapters 67 Stream_Image, ///< StreamKind = Image 68 Stream_Menu, ///< StreamKind = Menu 69 Stream_Max 70 }; 71 72 /// @brief Kind of information 73 enum info_t 74 { 75 Info_Name, ///< InfoKind = Unique name of parameter 76 Info_Text, ///< InfoKind = Value of parameter 77 Info_Measure, ///< InfoKind = Unique name of measure unit of parameter 78 Info_Options, ///< InfoKind = See infooptions_t 79 Info_Name_Text, ///< InfoKind = Translated name of parameter 80 Info_Measure_Text, ///< InfoKind = Translated name of measure unit 81 Info_Info, ///< InfoKind = More information about the parameter 82 Info_HowTo, ///< InfoKind = How this parameter is supported, could be N (No), B (Beta), R (Read only), W (Read/Write) 83 Info_Domain, ///< InfoKind = Domain of this piece of information 84 Info_Max 85 }; 86 87 /// Get(...)[infooptions_t] return a string like "YNYN..." \n 88 /// Use this enum to know at what correspond the Y (Yes) or N (No) 89 /// If Get(...)[0]==Y, then : 90 /// @brief Option if InfoKind = Info_Options 91 enum infooptions_t 92 { 93 InfoOption_ShowInInform, ///< Show this parameter in Inform() 94 InfoOption_Reserved, ///< 95 InfoOption_ShowInSupported, ///< Internal use only (info : Must be showed in Info_Capacities() ) 96 InfoOption_TypeOfValue, ///< Value return by a standard Get() can be : T (Text), I (Integer, warning up to 64 bits), F (Float), D (Date), B (Binary datas coded Base64) (Numbers are in Base 10) 97 InfoOption_ShowInXml, ///< 98 InfoOption_Max 99 }; 100 101 /// @brief File opening options 102 enum fileoptions_t 103 { 104 FileOption_Nothing =0x00, 105 FileOption_NoRecursive =0x01, ///< Do not browse folders recursively 106 FileOption_CloseAll =0x02, ///< Close all files before open 107 FileOption_Max =0x04 108 }; 109 110 //--------------------------------------------------------------------------- 111 112 //--------------------------------------------------------------------------- 113 //Char types 114 #undef __T 115 #define __T(__x) __T(__x) 116 #if defined(UNICODE) || defined (_UNICODE) 117 typedef wchar_t Char; ///< Unicode/Ansi independant char 118 #undef __T 119 #define __T(__x) L ## __x 120 #else 121 typedef char Char; ///< Unicode/Ansi independant char 122 #undef __T 123 #define __T(__x) __x 124 #endif 125 typedef std::basic_string<MediaInfoLib::Char> String; ///< Unicode/Ansi independant string 126 typedef std::basic_stringstream<MediaInfoLib::Char> StringStream; ///< Unicode/Ansi independant stringstream 127 typedef std::basic_istringstream<MediaInfoLib::Char> tiStringStream; ///< Unicode/Ansi independant istringstream 128 typedef std::basic_ostringstream<MediaInfoLib::Char> toStringStream; ///< Unicode/Ansi independant ostringstream 129 //--------------------------------------------------------------------------- 130 131 } //NameSpace 132 133 #endif 134