Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

MediaInfoDLL.h

Go to the documentation of this file.
00001 /* MediaInfoDLL - All info about media files, for DLL
00002 // Copyright (C) 2002-2005 Jerome Martinez, Zen@MediaArea.net
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 //
00018 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00019 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00020 //
00021 // Public DLL interface implementation
00022 // Wrapper for MediaInfo Library
00023 // Please see MediaInfo.h for help
00024 //
00025 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00026 //
00027 // 2005-07-22, Zen@MediaArea.net
00028 // 0.7 adaptation (Open function must not return Handle)
00029 // New, Close, News_Quick created
00030 // Open, Open_Buffer modified
00031 // MediaInfoList Interface added
00032 // C++ interface
00033 //
00034 // 2005-06-22, Zen@MediaArea.net
00035 // StreamNumber is signed (no change in the interface)
00036 //
00037 // 2005-05-18, Zen@MediaArea.net
00038 // Added Optons in Inform function
00039 //
00040 // 2004-12-15, Zen@MediaArea.net
00041 // Adaptation to new interface
00042 // MediaInfoList Interface
00043 //
00044 // 2003-05-04, Zen@MediaArea.net
00045 // Init
00046 //
00047 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00048 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
00049 
00050 #ifndef MediaInfoDLLH
00051 #define MediaInfoDLLH
00052 
00053 #ifdef MEDIAINFO_DLL_EXPORT
00054 #define MEDIAINFO_EXP extern _declspec(dllexport)
00055 #else
00056 #define MEDIAINFO_EXP extern _declspec(dllimport)
00057 #endif
00058 
00059 /** @brief Kinds of Stream */
00060 typedef enum MediaInfo_stream_t
00061 {
00062     MediaInfo_Stream_General,
00063     MediaInfo_Stream_Video,
00064     MediaInfo_Stream_Audio,
00065     MediaInfo_Stream_Text,
00066     MediaInfo_Stream_Chapters,
00067     MediaInfo_Stream_Image,
00068     MediaInfo_Stream_Max
00069 } MediaInfo_stream_C;
00070 
00071 /** @brief Kinds of Info */
00072 typedef enum MediaInfo_info_t
00073 {
00074     MediaInfo_Info_Name,
00075     MediaInfo_Info_Text,
00076     MediaInfo_Info_Measure,
00077     MediaInfo_Info_Options,
00078     MediaInfo_Info_Name_Text,
00079     MediaInfo_Info_Measure_Text,
00080     MediaInfo_Info_Info,
00081     MediaInfo_Info_HowTo,
00082     MediaInfo_Info_Max
00083 } MediaInfo_info_C;
00084 
00085 /** @brief Option if InfoKind = Info_Options */
00086 typedef enum MediaInfo_infooptions_t
00087 {
00088     MediaInfo_InfoOption_ShowInInform,
00089     MediaInfo_InfoOption_Support,
00090     MediaInfo_InfoOption_ShowInSupported,
00091     MediaInfo_InfoOption_TypeOfValue,
00092     MediaInfo_InfoOption_Max
00093 } MediaInfo_infooptions_C;
00094 
00095 /** @brief Option for Inform */
00096 typedef enum MediaInfo_informoptions_t
00097 {
00098     MediaInfo_InformOption_Nothing,
00099     MediaInfo_InformOption_Custom,
00100     MediaInfo_InformOption_HTML,
00101     MediaInfo_InformOption_Max
00102 } MediaInfo_informoptions_C;
00103 
00104 /** @brief File opening options */
00105 typedef enum MediaInfo_fileoptions_t
00106 {
00107     MediaInfo_FileOption_Nothing,
00108     MediaInfo_FileOption_Recursive,
00109     MediaInfo_FileOption_Close,
00110     MediaInfo_FileOption_Max
00111 } MediaInfo_fileoptions_C;
00112 
00113 #ifdef __cplusplus
00114 extern "C"
00115 {
00116 #endif /* __cplusplus */
00117 
00118 /***************************************************************************/
00119 /*! \file MediaInfoDll.h
00120 \brief DLL wrapper for MediaInfo.h.
00121 
00122 DLL wrapper for MediaInfo.h \n
00123         Can be used for C and C++\n
00124     "Handle" replaces class definition
00125 */
00126 /***************************************************************************/
00127 
00128 #if defined (MEDIAINFO_DLL_EXPORT) || (defined (UNICODE) || defined (_UNICODE)) //DLL construction or Unicode
00129 /** @brief A 'new' MediaInfo interface, return a Handle, don't forget to delete it after using it*/
00130 MEDIAINFO_EXP void*             __stdcall MediaInfo_New (); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
00131 /** @brief A 'new' MediaInfo interface (with a quick init of useful options : "**VERSION**;**APP_NAME**;**APP_VERSION**", but without debug information, use it only if you know what you do), return a Handle, don't forget to delete it after using it*/
00132 MEDIAINFO_EXP void*             __stdcall MediaInfo_New_Quick (const wchar_t* File, const wchar_t* Options); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
00133 /** @brief Delete a MediaInfo interface*/
00134 MEDIAINFO_EXP void              __stdcall MediaInfo_Delete (void* Handle);
00135 /** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a filename)*/
00136 MEDIAINFO_EXP int               __stdcall MediaInfo_Open (void* Handle, const wchar_t* File);
00137 /** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer) */
00138 MEDIAINFO_EXP int               __stdcall MediaInfo_Open_Buffer (void* Handle, const unsigned char* Begin, unsigned int Begin_Size, const unsigned char* End, unsigned int End_Size); /*return Handle*/
00139 /** @brief Wrapper for MediaInfoLib::MediaInfo::Save */
00140 MEDIAINFO_EXP int               __stdcall MediaInfo_Save (void* Handle);
00141 /** @brief Wrapper for MediaInfoLib::MediaInfo::Close */
00142 MEDIAINFO_EXP void              __stdcall MediaInfo_Close (void* Handle);
00143 /** @brief Wrapper for MediaInfoLib::MediaInfo::Inform */
00144 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Inform (void* Handle, MediaInfo_informoptions_t Options); /*Default : Options=0*/
00145 /** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
00146 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_GetI (void* Handle, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, MediaInfo_info_C InfoKind); /*Default : InfoKind=Info_Text*/
00147 /** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
00148 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Get (void* Handle, MediaInfo_stream_C StreamKind, int StreamNumber, const wchar_t* Parameter, MediaInfo_info_C InfoKind, MediaInfo_info_C SearchKind); /*Default : InfoKind=Info_Text, SearchKind=Info_Name*/
00149 /** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
00150 MEDIAINFO_EXP int               __stdcall MediaInfo_SetI (void* Handle, const wchar_t* ToSet, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, const wchar_t* OldParameter);
00151 /** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
00152 MEDIAINFO_EXP int               __stdcall MediaInfo_Set (void* Handle, const wchar_t* ToSet, MediaInfo_stream_C StreamKind, int StreamNumber, const wchar_t* Parameter, const wchar_t* OldParameter);
00153 /** @brief Wrapper for MediaInfoLib::MediaInfo::Option */
00154 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfo_Option (void* Handle, const wchar_t* Option, const wchar_t* Value);
00155 /** @brief Wrapper for MediaInfoLib::MediaInfo::State_Get */
00156 MEDIAINFO_EXP int               __stdcall MediaInfo_State_Get (void* Handle);
00157 /** @brief Wrapper for MediaInfoLib::MediaInfo::Count_Get */
00158 MEDIAINFO_EXP int               __stdcall MediaInfo_Count_Get (void* Handle, MediaInfo_stream_C StreamKind, int StreamNumber); /*Default : StreamNumber=-1*/
00159 #else //defined (MEDIAINFO_DLL_EXPORT) || (defined (UNICODE) || defined (_UNICODE))
00160     #define MediaInfo_New               MediaInfoA_New
00161     #define MediaInfo_New_Quick         MediaInfoA_New_Quick
00162     #define MediaInfo_Delete            MediaInfoA_Delete
00163     #define MediaInfo_Open              MediaInfoA_Open
00164     #define MediaInfo_Open_Buffer       MediaInfoA_Open_Buffer
00165     #define MediaInfo_Save              MediaInfoA_Save
00166     #define MediaInfo_Close             MediaInfoA_Close
00167     #define MediaInfo_Inform            MediaInfoA_Inform
00168     #define MediaInfo_GetI              MediaInfoA_GetI
00169     #define MediaInfo_Get               MediaInfoA_Get
00170     #define MediaInfo_SetI              MediaInfoA_SetI
00171     #define MediaInfo_Set               MediaInfoA_Set
00172     #define MediaInfo_Option            MediaInfoA_Option
00173     #define MediaInfo_State_Get         MediaInfoA_State_Get
00174     #define MediaInfo_Count_Get         MediaInfoA_Count_Get
00175 #endif //defined (MEDIAINFO_DLL_EXPORT) || (defined (UNICODE) || defined (_UNICODE))
00176 
00177 /** @brief A 'new' MediaInfo interface, return a Handle, don't forget to delete it after using it*/
00178 MEDIAINFO_EXP void*             __stdcall MediaInfoA_New (); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
00179 /** @brief A 'new' MediaInfo interface (with a quick init of useful options : "**VERSION**;**APP_NAME**;**APP_VERSION**", but without debug information, use it only if you know what you do), return a Handle, don't forget to delete it after using it*/
00180 MEDIAINFO_EXP void*             __stdcall MediaInfoA_New_Quick (const char* File, const char* Options); /*you must ALWAYS call MediaInfo_Delete(Handle) in order to free memory*/
00181 /** @brief Delete a MediaInfo interface*/
00182 MEDIAINFO_EXP void              __stdcall MediaInfoA_Delete (void* Handle);
00183 /** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a filename)*/
00184 MEDIAINFO_EXP int               __stdcall MediaInfoA_Open (void* Handle, const char* File); /*you must ALWAYS call MediaInfo_Close(Handle) in order to free memory*/
00185 /** @brief Wrapper for MediaInfoLib::MediaInfo::Open (with a buffer) */
00186 MEDIAINFO_EXP int               __stdcall MediaInfoA_Open_Buffer (void* Handle, const unsigned char* Begin, unsigned int Begin_Size, const unsigned char* End, unsigned int End_Size); /*return Handle*/
00187 /** @brief Wrapper for MediaInfoLib::MediaInfo::Save */
00188 MEDIAINFO_EXP int               __stdcall MediaInfoA_Save (void* Handle);
00189 /** @brief Wrapper for MediaInfoLib::MediaInfo::Close */
00190 MEDIAINFO_EXP void              __stdcall MediaInfoA_Close (void* Handle);
00191 /** @brief Wrapper for MediaInfoLib::MediaInfo::Inform */
00192 MEDIAINFO_EXP const char*       __stdcall MediaInfoA_Inform (void* Handle, MediaInfo_informoptions_t Options); /*Default : Options=MediaInfo_*/
00193 /** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
00194 MEDIAINFO_EXP const char*       __stdcall MediaInfoA_GetI (void* Handle, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, MediaInfo_info_C InfoKind); /*Default : InfoKind=Info_Text*/
00195 /** @brief Wrapper for MediaInfoLib::MediaInfo::Get */
00196 MEDIAINFO_EXP const char*       __stdcall MediaInfoA_Get (void* Handle, MediaInfo_stream_C StreamKind, int StreamNumber, const char* Parameter, MediaInfo_info_C InfoKind, MediaInfo_info_C SearchKind); /*Default : InfoKind=Info_Text, SearchKind=Info_Name*/
00197 /** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
00198 MEDIAINFO_EXP int               __stdcall MediaInfoA_SetI (void* Handle, const char* ToSet, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, const char* OldParameter);
00199 /** @brief Wrapper for MediaInfoLib::MediaInfo::Set */
00200 MEDIAINFO_EXP int               __stdcall MediaInfoA_Set (void* Handle, const char* ToSet, MediaInfo_stream_C StreamKind, int StreamNumber, const char* Parameter, const char* OldParameter);
00201 /** @brief Wrapper for MediaInfoLib::MediaInfo::Option */
00202 MEDIAINFO_EXP const char*       __stdcall MediaInfoA_Option (void* Handle, const char* Option, const char* Value);
00203 /** @brief Wrapper for MediaInfoLib::MediaInfo::State_Get */
00204 MEDIAINFO_EXP int               __stdcall MediaInfoA_State_Get (void* Handle);
00205 /** @brief Wrapper for MediaInfoLib::MediaInfo::Count_Get */
00206 MEDIAINFO_EXP int               __stdcall MediaInfoA_Count_Get (void* Handle, MediaInfo_stream_C StreamKind, int StreamNumber); /*Default : StreamNumber=-1*/
00207 
00208 
00209 #if defined (MEDIAINFO_DLL_EXPORT) || (defined (UNICODE) || defined (_UNICODE)) //DLL construction or Unicode
00210 /** @brief A 'new' MediaInfoList interface, return a Handle, don't forget to delete it after using it*/
00211 MEDIAINFO_EXP void*             __stdcall MediaInfoList_New (); /*you must ALWAYS call MediaInfoList_Delete(Handle) in order to free memory*/
00212 /** @brief A 'new' MediaInfoList interface (with a quick init of useful options : "**VERSION**;**APP_NAME**;**APP_VERSION**", but without debug information, use it only if you know what you do), return a Handle, don't forget to delete it after using it*/
00213 MEDIAINFO_EXP void*             __stdcall MediaInfoList_New_Quick (const wchar_t* Files, const wchar_t* Config); /*you must ALWAYS call MediaInfoList_Delete(Handle) in order to free memory*/
00214 /** @brief Delete a MediaInfoList interface*/
00215 MEDIAINFO_EXP void              __stdcall MediaInfoList_Delete (void* Handle);
00216 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Open (with a filename)*/
00217 MEDIAINFO_EXP int               __stdcall MediaInfoList_Open (void* Handle, const wchar_t* Files, const MediaInfo_fileoptions_C Options); /*Default : Options=MediaInfo_FileOption_Nothing*/
00218 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Open (with a buffer) */
00219 MEDIAINFO_EXP int               __stdcall MediaInfoList_Open_Buffer (void* Handle, const unsigned char* Begin, unsigned int Begin_Size, const unsigned char* End, unsigned int End_Size); /*return Handle*/
00220 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Save */
00221 MEDIAINFO_EXP int               __stdcall MediaInfoList_Save (void* Handle, unsigned int FilePos);
00222 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Save_All */
00223 MEDIAINFO_EXP int               __stdcall MediaInfoList_Save_All (void* Handle);
00224 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Close */
00225 MEDIAINFO_EXP void              __stdcall MediaInfoList_Close (void* Handle, unsigned int FilePos);
00226 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Close_All */
00227 MEDIAINFO_EXP void              __stdcall MediaInfoList_Close_All (void* Handle);
00228 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Inform */
00229 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfoList_Inform (void* Handle, unsigned int FilePos, MediaInfo_informoptions_t Options); /*Default : Options=0*/
00230 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Inform_All */
00231 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfoList_Inform_All (void* Handle, MediaInfo_informoptions_t Options); /*Default : Options=MediaInfo_FileOption_Nothing*/
00232 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Get */
00233 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfoList_GetI (void* Handle, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, MediaInfo_info_C InfoKind); /*Default : InfoKind=Info_Text*/
00234 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Get */
00235 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfoList_Get (void* Handle, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, const wchar_t* Parameter, MediaInfo_info_C InfoKind, MediaInfo_info_C SearchKind); /*Default : InfoKind=Info_Text, SearchKind=Info_Name*/
00236 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Set */
00237 MEDIAINFO_EXP int               __stdcall MediaInfoList_SetI (void* Handle, const wchar_t* ToSet, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, const wchar_t* OldParameter);
00238 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Set */
00239 MEDIAINFO_EXP int               __stdcall MediaInfoList_Set (void* Handle, const wchar_t* ToSet, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, const wchar_t* Parameter, const wchar_t* OldParameter);
00240 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Option */
00241 MEDIAINFO_EXP const wchar_t*    __stdcall MediaInfoList_Option (void* Handle, const wchar_t* Option, const wchar_t* Value);
00242 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::State_Get */
00243 MEDIAINFO_EXP int               __stdcall MediaInfoList_State_Get (void* Handle);
00244 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Count_Get */
00245 MEDIAINFO_EXP int               __stdcall MediaInfoList_Count_Get (void* Handle, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber); /*Default : StreamNumber=-1*/
00246 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Count_Get */
00247 MEDIAINFO_EXP int               __stdcall MediaInfoList_Count_Get_Files (void* Handle);
00248 #else //defined (MEDIAINFO_DLL_EXPORT) || (defined (UNICODE) || defined (_UNICODE))
00249     #define MediaInfoList_New               MediaInfoListA_New
00250     #define MediaInfoList_New_Quick         MediaInfoListA_New_Quick
00251     #define MediaInfoList_Delete            MediaInfoListA_Delete
00252     #define MediaInfoList_Open              MediaInfoListA_Open
00253     #define MediaInfoList_Open_Buffer       MediaInfoListA_Open_Buffer
00254     #define MediaInfoList_Save              MediaInfoListA_Save
00255     #define MediaInfoList_Save_All          MediaInfoListA_Save_All
00256     #define MediaInfoList_Close             MediaInfoListA_Close
00257     #define MediaInfoList_Close_All         MediaInfoListA_Close_All
00258     #define MediaInfoList_Inform            MediaInfoListA_Inform
00259     #define MediaInfoList_Inform_All        MediaInfoListA_Inform_All
00260     #define MediaInfoList_GetI              MediaInfoListA_GetI
00261     #define MediaInfoList_Get               MediaInfoListA_Get
00262     #define MediaInfoList_SetI              MediaInfoListA_SetI
00263     #define MediaInfoList_Set               MediaInfoListA_Set
00264     #define MediaInfoList_Option            MediaInfoListA_Option
00265     #define MediaInfoList_State_Get         MediaInfoListA_State_Get
00266     #define MediaInfoList_Count_Get         MediaInfoListA_Count_Get
00267     #define MediaInfoList_Count_Get_Files   MediaInfoListA_Count_Get_Files
00268 #endif //defined (MEDIAINFO_DLL_EXPORT) || (defined (UNICODE) || defined (_UNICODE))
00269 
00270 /* Warning : Deprecated, use MediaInfo_Option("Info_Version", "**YOUR VERSION COMPATIBLE**") instead */
00271 MEDIAINFO_EXP const char*       __stdcall MediaInfo_Info_Version ();
00272 
00273 
00274 /** @brief A 'new' MediaInfoList interface, return a Handle, don't forget to delete it after using it*/
00275 MEDIAINFO_EXP void*             __stdcall MediaInfoListA_New (); /*you must ALWAYS call MediaInfoList_Delete(Handle) in order to free memory*/
00276 /** @brief A 'new' MediaInfoList interface (with a quick init of useful options : "**VERSION**;**APP_NAME**;**APP_VERSION**", but without debug information, use it only if you know what you do), return a Handle, don't forget to delete it after using it*/
00277 MEDIAINFO_EXP void*             __stdcall MediaInfoListA_New_Quick (const char* Files, const char* Config); /*you must ALWAYS call MediaInfoList_Delete(Handle) in order to free memory*/
00278 /** @brief Delete a MediaInfoList interface*/
00279 MEDIAINFO_EXP void              __stdcall MediaInfoListA_Delete (void* Handle);
00280 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Open (with a filename)*/
00281 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Open (void* Handle, const char* Files, const MediaInfo_fileoptions_C Options); /*Default : Options=0*/
00282 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Open (with a buffer) */
00283 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Open_Buffer (void* Handle, const unsigned char* Begin, unsigned int Begin_Size, const unsigned char* End, unsigned int End_Size); /*return Handle*/
00284 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Save */
00285 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Save (void* Handle, unsigned int FilePos);
00286 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Save_All */
00287 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Save_All (void* Handle);
00288 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Close */
00289 MEDIAINFO_EXP void              __stdcall MediaInfoListA_Close (void* Handle, unsigned int FilePos);
00290 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Close_All */
00291 MEDIAINFO_EXP void              __stdcall MediaInfoListA_Close_All (void* Handle);
00292 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Inform */
00293 MEDIAINFO_EXP const char*       __stdcall MediaInfoListA_Inform (void* Handle, unsigned int FilePos, MediaInfo_informoptions_t Options); /*Default : Options=0*/
00294 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Inform_All */
00295 MEDIAINFO_EXP const char*       __stdcall MediaInfoListA_Inform_All (void* Handle, MediaInfo_informoptions_t Options); /*Default : Options=0*/
00296 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Get */
00297 MEDIAINFO_EXP const char*       __stdcall MediaInfoListA_GetI (void* Handle, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, MediaInfo_info_C InfoKind); /*Default : InfoKind=Info_Text*/
00298 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Get */
00299 MEDIAINFO_EXP const char*       __stdcall MediaInfoListA_Get (void* Handle, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, const char* Parameter, MediaInfo_info_C InfoKind, MediaInfo_info_C SearchKind); /*Default : InfoKind=Info_Text, SearchKind=Info_Name*/
00300 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Set */
00301 MEDIAINFO_EXP int               __stdcall MediaInfoListA_SetI (void* Handle, const char* ToSet, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, unsigned int Parameter, const char* OldParameter);
00302 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Set */
00303 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Set (void* Handles, const char* ToSet, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber, const char* Parameter, const char* OldParameter);
00304 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Option */
00305 MEDIAINFO_EXP const char*       __stdcall MediaInfoListA_Option (void* Handle, const char* Option, const char* Value);
00306 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::State_Get */
00307 MEDIAINFO_EXP int               __stdcall MediaInfoListA_State_Get (void* Handle);
00308 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Count_Get */
00309 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Count_Get (void* Handle, unsigned int FilePos, MediaInfo_stream_C StreamKind, int StreamNumber); /*Default : StreamNumber=-1*/
00310 /** @brief Wrapper for MediaInfoListLib::MediaInfoList::Count_Get */
00311 MEDIAINFO_EXP int               __stdcall MediaInfoListA_Count_Get_Files (void* Handle);
00312 
00313 #ifdef __cplusplus
00314 }
00315 #endif /*__cplusplus*/
00316 
00317 
00318 
00319 #ifdef __cplusplus
00320 //DLL C++ wrapper for C functions
00321 #if !defined(MediaInfoH) && !defined (MEDIAINFO_DLL_EXPORT) //No Lib include and No DLL construction
00322 
00323 //---------------------------------------------------------------------------
00324 #include <string>
00325 //---------------------------------------------------------------------------
00326 
00327 namespace MediaInfoLib
00328 {
00329 
00330 //---------------------------------------------------------------------------
00331 //Char types
00332 #undef  _T
00333 #define _T(__x)     __T(__x)
00334 #if defined(UNICODE) || defined (_UNICODE)
00335     typedef wchar_t Char;
00336     #undef  __T
00337     #define __T(__x) L ## __x
00338 #else
00339     typedef char Char;
00340     #undef  __T
00341     #define __T(__x) __x
00342 #endif
00343 typedef std::basic_string<Char, std::char_traits<Char>, std::allocator<Char> > MediaInfo_String;
00344 //---------------------------------------------------------------------------
00345 
00346 //---------------------------------------------------------------------------
00347 /// @brief Kinds of Stream
00348 enum stream_t
00349 {
00350     Stream_General,                 ///< StreamKind = General
00351     Stream_Video,                   ///< StreamKind = Video
00352     Stream_Audio,                   ///< StreamKind = Audio
00353     Stream_Text,                    ///< StreamKind = Text
00354     Stream_Chapters,                ///< StreamKind = Chapters
00355     Stream_Image,                   ///< StreamKind = Image
00356     Stream_Max,
00357 };
00358 
00359 /// @brief Kind of information
00360 enum info_t
00361 {
00362     Info_Name,                      ///< InfoKind = Unique name of parameter
00363     Info_Text,                      ///< InfoKind = Value of parameter
00364     Info_Measure,                   ///< InfoKind = Unique name of measure unit of parameter
00365     Info_Options,                   ///< InfoKind = See infooptions_t
00366     Info_Name_Text,                 ///< InfoKind = Translated name of parameter
00367     Info_Measure_Text,              ///< InfoKind = Translated name of measure unit
00368     Info_Info,                      ///< InfoKind = More information about the parameter
00369     Info_HowTo,                     ///< InfoKind = Information : how data is found
00370     Info_Max
00371 };
00372 
00373 /// Get(...)[infooptions_t] return a string like "YNYN..." \n
00374 /// Use this enum to know at what correspond the Y (Yes) or N (No)
00375 /// If Get(...)[0]==Y, then :
00376 /// @brief Option if InfoKind = Info_Options
00377 enum infooptions_t
00378 {
00379     InfoOption_ShowInInform,            ///< Show this parameter in Inform()
00380     InfoOption_Support,                         ///< how this parameter is supported, could be N (No), R (Read only), W (Read/Write), space (Non applicable)
00381     InfoOption_ShowInSupported,         ///< Internal use only (info : Must be showed in Info_Capacities() )
00382     InfoOption_Max
00383 };
00384 
00385 /// @brief Option for Inform
00386 enum informoptions_t
00387 {
00388     InformOption_Nothing,                       ///< No options
00389     InformOption_Custom,                        ///< Use information given by Inform_Set
00390     InformOption_HTML,                          ///< Output is in HTML Format
00391     InformOption_Max
00392 };
00393 
00394 //---------------------------------------------------------------------------
00395 /// @brief File opening options
00396 enum fileoptions_t
00397 {
00398     FileOption_Nothing,
00399     FileOption_Recursive,           ///< Browse folders recursively
00400     FileOption_Close,               ///< Close all files before open
00401     FileOption_Max
00402 };
00403 //---------------------------------------------------------------------------
00404 
00405 class MediaInfo
00406 {
00407 public :
00408     MediaInfo ()                {Handle=MediaInfo_New();};
00409     ~MediaInfo ()               {MediaInfo_Close(Handle);};
00410 
00411     //File
00412     int Open (const MediaInfo_String &File) {return MediaInfo_Open(Handle, File.c_str());};
00413     int Open (const unsigned char* Begin, size_t Begin_Size, const unsigned char* End=NULL, size_t End_Size=NULL) {return MediaInfo_Open_Buffer(Handle, Begin, Begin_Size, End, End_Size);};
00414     int Save () {return MediaInfo_Save(Handle);};
00415     void Close () {return MediaInfo_Close(Handle);};
00416 
00417     //General information
00418     MediaInfo_String Inform (informoptions_t Options=InformOption_Nothing)  {return MediaInfo_Inform(Handle, (MediaInfo_informoptions_t)Options);};
00419     MediaInfo_String Get (stream_t StreamKind, int StreamNumber, int Parameter, info_t InfoKind=Info_Text)  {return MediaInfo_GetI (Handle, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, (MediaInfo_info_C)InfoKind);};
00420     MediaInfo_String Get (stream_t StreamKind, int StreamNumber, const MediaInfo_String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name)  {return MediaInfo_Get (Handle, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), (MediaInfo_info_C)InfoKind, (MediaInfo_info_C)SearchKind);};
00421     int Set (const MediaInfo_String &ToSet, stream_t StreamKind, int StreamNumber, int Parameter, const MediaInfo_String &OldValue=_T(""))  {return MediaInfo_SetI (Handle, ToSet.c_str(), (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, OldValue.c_str());};
00422     int Set (const MediaInfo_String &ToSet, stream_t StreamKind, int StreamNumber, const MediaInfo_String &Parameter, const MediaInfo_String &OldValue=_T(""))  {return MediaInfo_Set (Handle, ToSet.c_str(), (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), OldValue.c_str());};
00423     MediaInfo_String        Option (const MediaInfo_String &Option, const MediaInfo_String &Value=_T(""))  {return MediaInfo_Option (Handle, Option.c_str(), Value.c_str());};
00424     static MediaInfo_String Option_Static (const MediaInfo_String &Option, const MediaInfo_String &Value=_T(""))  {return MediaInfo_Option (NULL, Option.c_str(), Value.c_str());};
00425     int                     State_Get ()  {return MediaInfo_State_Get(Handle);};
00426     int                     Count_Get (stream_t StreamKind, int StreamNumber=-1)  {return MediaInfo_Count_Get(Handle, (MediaInfo_stream_C)StreamKind, StreamNumber);};
00427 
00428 private :
00429     void* Handle;
00430 };
00431 
00432 class MediaInfoList
00433 {
00434 public :
00435     MediaInfoList ()                {Handle=MediaInfoList_New();};
00436     ~MediaInfoList ()               {MediaInfoList_Delete(Handle);};
00437 
00438     //File
00439     int Open (const MediaInfo_String &File, const fileoptions_t Options=FileOption_Nothing) {return MediaInfoList_Open(Handle, File.c_str(), (MediaInfo_fileoptions_C)Options);};
00440     int Open (const unsigned char* Begin, size_t Begin_Size, const unsigned char* End=NULL, size_t End_Size=NULL) {return MediaInfoList_Open_Buffer(Handle, Begin, Begin_Size, End, End_Size);};
00441     int Save (unsigned int FilePos) {return MediaInfoList_Save(Handle, FilePos);};
00442     int Save_All () {return MediaInfoList_Save_All(Handle);};
00443     void Close (unsigned int FilePos) {return MediaInfoList_Close(Handle, FilePos);};
00444     void Close_All () {return MediaInfoList_Close_All(Handle);};
00445 
00446     //General information
00447     MediaInfo_String Inform (unsigned int FilePos, informoptions_t Options=InformOption_Nothing)  {return MediaInfoList_Inform(Handle, FilePos, (MediaInfo_informoptions_t)Options);};
00448     MediaInfo_String Inform_All (informoptions_t Options=InformOption_Nothing)  {return MediaInfoList_Inform_All(Handle, (MediaInfo_informoptions_t)Options);};
00449     MediaInfo_String Get (unsigned int FilePos, stream_t StreamKind, int StreamNumber, int Parameter, info_t InfoKind=Info_Text)  {return MediaInfoList_GetI (Handle, FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, (MediaInfo_info_C)InfoKind);};
00450     MediaInfo_String Get (unsigned int FilePos, stream_t StreamKind, int StreamNumber, const MediaInfo_String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name)  {return MediaInfoList_Get (Handle, FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), (MediaInfo_info_C)InfoKind, (MediaInfo_info_C)SearchKind);};
00451     int Set (const MediaInfo_String &ToSet, unsigned int FilePos, stream_t StreamKind, int StreamNumber, int Parameter, const MediaInfo_String &OldValue=_T(""))  {return MediaInfoList_SetI (Handle, ToSet.c_str(), FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, OldValue.c_str());};
00452     int Set (const MediaInfo_String &ToSet, unsigned int FilePos, stream_t StreamKind, int StreamNumber, const MediaInfo_String &Parameter, const MediaInfo_String &OldValue=_T(""))  {return MediaInfoList_Set (Handle, ToSet.c_str(), FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), OldValue.c_str());};
00453     MediaInfo_String        Option (const MediaInfo_String &Option, const MediaInfo_String &Value=_T(""))  {return MediaInfoList_Option (Handle, Option.c_str(), Value.c_str());};
00454     static MediaInfo_String Option_Static (const MediaInfo_String &Option, const MediaInfo_String &Value=_T(""))  {return MediaInfoList_Option (NULL, Option.c_str(), Value.c_str());};
00455     int                     State_Get ()  {return MediaInfoList_State_Get(Handle);};
00456     int                     Count_Get (unsigned int FilePos, stream_t StreamKind, int StreamNumber=-1)  {return MediaInfoList_Count_Get(Handle, FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber);};
00457     int                     Count_Get ()  {return MediaInfoList_Count_Get_Files(Handle);};
00458 
00459 private :
00460     void* Handle;
00461 };
00462 } //NameSpace
00463 #endif//#if !defined(MediaInfoH) && !defined (MEDIAINFO_DLL_EXPORT) && !(defined (UNICODE) || defined (_UNICODE))
00464 #endif /*__cplusplus*/
00465 
00466 
00467 #endif

Generated on Sat Jul 23 18:26:57 2005 for MediaInfoLib by doxygen1.3-rc3