MediaInfoDLL.h

Go to the documentation of this file.
00001 /* MediaInfoDLL - All info about media files, for DLL
00002 // Copyright (C) 2002-2007 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00017 //
00018 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00019 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00020 //
00021 // Public DLL interface implementation
00022 // Wrapper for MediaInfo Library
00023 // See MediaInfo.h for help
00024 //
00025 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
00026 
00027 #ifndef MediaInfoDLLH
00028 #define MediaInfoDLLH
00029 
00030 /*-------------------------------------------------------------------------*/
00031 #if defined(_WIN32)
00032     #define MEDIAINFODLL_NAME  "MediaInfo.dll"
00033 #else
00034     #define MEDIAINFODLL_NAME  "libMediaInfo.la"
00035     #define __stdcall
00036 #endif //!defined(_WIN32)
00037 #include <new> //For size_t in MacOS
00038 
00039 /*-------------------------------------------------------------------------*/
00040 /*Char types                                                               */
00041 #undef  _T
00042 #define _T(__x)     __T(__x)
00043 #if defined(UNICODE) || defined (_UNICODE)
00044     typedef wchar_t MediaInfo_Char;
00045     #undef  __T
00046     #define __T(__x) L ## __x
00047     #define MEDIAINFO_Ansi ""
00048 #else
00049     typedef char MediaInfo_Char;
00050     #undef  __T
00051     #define __T(__x) __x
00052     #define MEDIAINFO_Ansi "A"
00053 #endif
00054 /*-------------------------------------------------------------------------*/
00055 
00056 /*-------------------------------------------------------------------------*/
00057 /*NULL                                                                      */
00058 #ifndef NULL
00059     #define NULL 0
00060 #endif
00061 /*-------------------------------------------------------------------------*/
00062 
00063 /** @brief Kinds of Stream */
00064 typedef enum MediaInfo_stream_t
00065 {
00066     MediaInfo_Stream_General,
00067     MediaInfo_Stream_Video,
00068     MediaInfo_Stream_Audio,
00069     MediaInfo_Stream_Text,
00070     MediaInfo_Stream_Chapters,
00071     MediaInfo_Stream_Image,
00072     MediaInfo_Stream_Menu,
00073     MediaInfo_Stream_Max
00074 } MediaInfo_stream_C;
00075 
00076 /** @brief Kinds of Info */
00077 typedef enum MediaInfo_info_t
00078 {
00079     MediaInfo_Info_Name,
00080     MediaInfo_Info_Text,
00081     MediaInfo_Info_Measure,
00082     MediaInfo_Info_Options,
00083     MediaInfo_Info_Name_Text,
00084     MediaInfo_Info_Measure_Text,
00085     MediaInfo_Info_Info,
00086     MediaInfo_Info_HowTo,
00087     MediaInfo_Info_Max
00088 } MediaInfo_info_C;
00089 
00090 /** @brief Option if InfoKind = Info_Options */
00091 typedef enum MediaInfo_infooptions_t
00092 {
00093     MediaInfo_InfoOption_ShowInInform,
00094     MediaInfo_InfoOption_Reserved,
00095     MediaInfo_InfoOption_ShowInSupported,
00096     MediaInfo_InfoOption_TypeOfValue,
00097     MediaInfo_InfoOption_Max
00098 } MediaInfo_infooptions_C;
00099 
00100 /** @brief File opening options */
00101 typedef enum MediaInfo_fileoptions_t
00102 {
00103     MediaInfo_FileOption_Nothing        =0x00,
00104     MediaInfo_FileOption_Recursive      =0x01,
00105     MediaInfo_FileOption_CloseAll       =0x02,
00106     MediaInfo_FileOption_Max            =0x04
00107 } MediaInfo_fileoptions_C;
00108 
00109 
00110 #ifdef __cplusplus
00111 extern "C"
00112 {
00113 #endif /* __cplusplus */
00114 
00115 #ifdef MEDIAINFO_GLIBC
00116     #include <gmodule.h>
00117     static GModule* Module=NULL;
00118 #elif defined (_WIN32) || defined (WIN32)
00119     #include <windows.h>
00120     static HMODULE  Module=NULL;
00121 #else
00122     #include <dlfcn.h>
00123     static void*    Module=NULL;
00124 #endif
00125 static size_t Module_Count=0;
00126 
00127 #ifdef MEDIAINFO_GLIBC
00128 #define MEDIAINFO_ASSIGN(_Name,_Name2) \
00129     if (!g_module_symbol (Module, "MediaInfo"MEDIAINFO_Ansi"_"_Name2, (gpointer*)&MediaInfo_##_Name)) \
00130         Errors++; \
00131     if (!g_module_symbol (Module, "MediaInfoList"MEDIAINFO_Ansi"_"_Name2, (gpointer*)&MediaInfoList_##_Name)) \
00132         Errors++;
00133 #elif defined (_WIN32) || defined (WIN32)
00134 #define MEDIAINFO_ASSIGN(_Name,_Name2) \
00135     MediaInfo_##_Name=(MEDIAINFO_##_Name)GetProcAddress(Module, "MediaInfo"MEDIAINFO_Ansi"_"_Name2); \
00136     if (MediaInfo_##_Name==NULL) Errors++; \
00137     MediaInfoList_##_Name=(MEDIAINFOLIST_##_Name)GetProcAddress(Module, "MediaInfoList"MEDIAINFO_Ansi"_"_Name2); \
00138     if (MediaInfoList_##_Name==NULL) Errors++;
00139 #else
00140 #define MEDIAINFO_ASSIGN(_Name,_Name2) \
00141     MediaInfo_##_Name=(MEDIAINFO_##_Name)dlsym(Module, "MediaInfo"MEDIAINFO_Ansi"_"_Name2); \
00142     if (MediaInfo_##_Name==NULL) Errors++; \
00143     MediaInfoList_##_Name=(MEDIAINFOLIST_##_Name)dlsym(Module, "MediaInfoList"MEDIAINFO_Ansi"_"_Name2); \
00144     if (MediaInfoList_##_Name==NULL) Errors++;
00145 #endif
00146 
00147 typedef void* (__stdcall *MEDIAINFO_New)(); static MEDIAINFO_New MediaInfo_New;
00148 typedef void* (__stdcall *MEDIAINFOLIST_New)(); static MEDIAINFOLIST_New MediaInfoList_New;
00149 typedef void (__stdcall *MEDIAINFO_Delete)(void*); static MEDIAINFO_Delete MediaInfo_Delete;
00150 typedef void (__stdcall *MEDIAINFOLIST_Delete)(void*); static MEDIAINFOLIST_Delete MediaInfoList_Delete;
00151 typedef size_t (__stdcall *MEDIAINFO_Open)(void*, const MediaInfo_Char*); static MEDIAINFO_Open MediaInfo_Open;
00152 typedef size_t (__stdcall *MEDIAINFOLIST_Open)(void*, const MediaInfo_Char*, const MediaInfo_fileoptions_C); static MEDIAINFOLIST_Open MediaInfoList_Open;
00153 typedef void (__stdcall *MEDIAINFO_Close)(void*); static MEDIAINFO_Close MediaInfo_Close;
00154 typedef void (__stdcall *MEDIAINFOLIST_Close)(void*, size_t); static MEDIAINFOLIST_Close MediaInfoList_Close;
00155 typedef const MediaInfo_Char* (__stdcall *MEDIAINFO_Inform)(void*, size_t Reserved); static MEDIAINFO_Inform MediaInfo_Inform;
00156 typedef const MediaInfo_Char* (__stdcall *MEDIAINFOLIST_Inform)(void*, size_t, size_t Reserved); static MEDIAINFOLIST_Inform MediaInfoList_Inform;
00157 typedef const MediaInfo_Char* (__stdcall *MEDIAINFO_GetI)(void*, MediaInfo_stream_C StreamKind, size_t StreamNumber, size_t Parameter, MediaInfo_info_C KindOfInfo); static MEDIAINFO_GetI MediaInfo_GetI;
00158 typedef const MediaInfo_Char* (__stdcall *MEDIAINFOLIST_GetI)(void*, size_t, MediaInfo_stream_C StreamKind, size_t StreamNumber, size_t Parameter, MediaInfo_info_C KindOfInfo); static MEDIAINFOLIST_GetI MediaInfoList_GetI;
00159 typedef const MediaInfo_Char* (__stdcall *MEDIAINFO_Get)(void*, MediaInfo_stream_C StreamKind, size_t StreamNumber, const MediaInfo_Char* Parameter, MediaInfo_info_C KindOfInfo, MediaInfo_info_C KindOfSearch); static MEDIAINFO_Get MediaInfo_Get;
00160 typedef const MediaInfo_Char* (__stdcall *MEDIAINFOLIST_Get)(void*, size_t, MediaInfo_stream_C StreamKind, size_t StreamNumber, const MediaInfo_Char* Parameter, MediaInfo_info_C KindOfInfo, MediaInfo_info_C KindOfSearch); static MEDIAINFOLIST_Get MediaInfoList_Get;
00161 typedef const MediaInfo_Char* (__stdcall *MEDIAINFO_Option)(void*, const MediaInfo_Char* Parameter, const MediaInfo_Char* Value); static MEDIAINFO_Option MediaInfo_Option;
00162 typedef const MediaInfo_Char* (__stdcall *MEDIAINFOLIST_Option)(void*, const MediaInfo_Char* Parameter, const MediaInfo_Char* Value); static MEDIAINFOLIST_Option MediaInfoList_Option;
00163 typedef size_t (__stdcall *MEDIAINFO_State_Get)(void*); static MEDIAINFO_State_Get MediaInfo_State_Get;
00164 typedef size_t (__stdcall *MEDIAINFOLIST_State_Get)(void*); static MEDIAINFOLIST_State_Get MediaInfoList_State_Get;
00165 typedef size_t (__stdcall *MEDIAINFO_Count_Get)(void*, MediaInfo_stream_C StreamKind, size_t StreamNumber); static MEDIAINFO_Count_Get MediaInfo_Count_Get;
00166 typedef size_t (__stdcall *MEDIAINFOLIST_Count_Get)(void*, size_t, MediaInfo_stream_C StreamKind, size_t StreamNumber); static MEDIAINFOLIST_Count_Get MediaInfoList_Count_Get;
00167 typedef size_t (__stdcall *MEDIAINFO_Count_Get_Files)(void*); static MEDIAINFO_Count_Get_Files MediaInfo_Count_Get_Files;
00168 typedef size_t (__stdcall *MEDIAINFOLIST_Count_Get_Files)(void*); static MEDIAINFOLIST_Count_Get_Files MediaInfoList_Count_Get_Files;
00169 
00170 static size_t MediaInfoDLL_Load()
00171 {
00172     if (Module_Count>0)
00173     {
00174         Module_Count++;
00175         return 1;
00176     }
00177 
00178     /* Load library */
00179     #ifdef MEDIAINFO_GLIBC
00180         Module=g_module_open(MEDIAINFODLL_NAME, G_MODULE_BIND_LAZY);
00181     #elif defined (_WIN32) || defined (WIN32)
00182         Module=LoadLibrary(_T(MEDIAINFODLL_NAME));
00183     #else
00184         Module=dlopen(MEDIAINFODLL_NAME, RTLD_LAZY);
00185         if (!Module)
00186             Module=dlopen("./"MEDIAINFODLL_NAME, RTLD_LAZY);
00187     #endif
00188     if (!Module)
00189         return -1;
00190 
00191     /* Load methods */
00192     size_t Errors=0;
00193     MEDIAINFO_ASSIGN(New,"New")
00194     MEDIAINFO_ASSIGN(Delete,"Delete")
00195     MEDIAINFO_ASSIGN(Open,"Open")
00196     MEDIAINFO_ASSIGN(Close,"Close")
00197     MEDIAINFO_ASSIGN(Inform,"Inform")
00198     MEDIAINFO_ASSIGN(GetI,"GetI")
00199     MEDIAINFO_ASSIGN(Get,"Get")
00200     MEDIAINFO_ASSIGN(Option,"Option")
00201     MEDIAINFO_ASSIGN(State_Get,"State_Get")
00202     MEDIAINFO_ASSIGN(Count_Get,"Count_Get")
00203     MEDIAINFO_ASSIGN(Count_Get_Files,"Count_Get_Files")
00204     if (Errors>1) //Normal for Count_Get_Files, MediaInfo has no one.
00205        return -1;
00206 
00207     Module_Count++;
00208     return 1;
00209 }
00210 
00211 static size_t MediaInfoDLL_IsLoaded()
00212 {
00213     if (Module)
00214         return 1;
00215     else
00216         return 0;
00217 }
00218 
00219 static void MediaInfoDLL_UnLoad()
00220 {
00221     Module_Count--;
00222     if (Module_Count>0)
00223         return;
00224 
00225     #ifdef MEDIAINFO_GLIBC
00226         g_module_close(Module);
00227     #elif defined (_WIN32) || defined (WIN32)
00228         FreeLibrary(Module);
00229     #else
00230         dlclose(Module);
00231     #endif
00232     Module=NULL;
00233 }
00234 
00235 #ifdef __cplusplus
00236 }
00237 #endif /*__cplusplus*/
00238 
00239 /***************************************************************************/
00240 /***************************************************************************/
00241 /***************************************************************************/
00242 
00243 #ifdef __cplusplus
00244 //DLL C++ wrapper for C functions
00245 
00246 //---------------------------------------------------------------------------
00247 #include <string>
00248 #include <sstream>
00249 //---------------------------------------------------------------------------
00250 
00251 namespace MediaInfoLib
00252 {
00253 
00254 //---------------------------------------------------------------------------
00255 //MediaInfo_Char types
00256 #undef  _T
00257 #define _T(__x)     __T(__x)
00258 #if defined(UNICODE) || defined (_UNICODE)
00259     typedef wchar_t Char;
00260     #undef  __T
00261     #define __T(__x) L ## __x
00262 #else
00263     typedef char Char;
00264     #undef  __T
00265     #define __T(__x) __x
00266 #endif
00267 typedef std::basic_string<Char>        String;
00268 typedef std::basic_stringstream<Char>  StringStream;
00269 typedef std::basic_istringstream<Char> tiStringStream;
00270 typedef std::basic_ostringstream<Char> toStringStream;
00271 const size_t Error=(size_t)(-1);
00272 //---------------------------------------------------------------------------
00273 
00274 //---------------------------------------------------------------------------
00275 /// @brief Kinds of Stream
00276 enum stream_t
00277 {
00278     Stream_General,                 ///< StreamKind = General
00279     Stream_Video,                   ///< StreamKind = Video
00280     Stream_Audio,                   ///< StreamKind = Audio
00281     Stream_Text,                    ///< StreamKind = Text
00282     Stream_Chapters,                ///< StreamKind = Chapters
00283     Stream_Image,                   ///< StreamKind = Image
00284     Stream_Menu,                    ///< StreamKind = Menu
00285     Stream_Max,
00286 };
00287 
00288 /// @brief Kind of information
00289 enum info_t
00290 {
00291     Info_Name,                      ///< InfoKind = Unique name of parameter
00292     Info_Text,                      ///< InfoKind = Value of parameter
00293     Info_Measure,                   ///< InfoKind = Unique name of measure unit of parameter
00294     Info_Options,                   ///< InfoKind = See infooptions_t
00295     Info_Name_Text,                 ///< InfoKind = Translated name of parameter
00296     Info_Measure_Text,              ///< InfoKind = Translated name of measure unit
00297     Info_Info,                      ///< InfoKind = More information about the parameter
00298     Info_HowTo,                     ///< InfoKind = Information : how data is found
00299     Info_Max
00300 };
00301 
00302 /// Get(...)[infooptions_t] return a string like "YNYN..." \n
00303 /// Use this enum to know at what correspond the Y (Yes) or N (No)
00304 /// If Get(...)[0]==Y, then :
00305 /// @brief Option if InfoKind = Info_Options
00306 enum infooptions_t
00307 {
00308     InfoOption_ShowInInform,        ///< Show this parameter in Inform()
00309     InfoOption_Reserved,            ///<
00310     InfoOption_ShowInSupported,     ///< Internal use only (info : Must be showed in Info_Capacities() )
00311     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)
00312     InfoOption_Max
00313 };
00314 
00315 /// @brief File opening options
00316 enum fileoptions_t
00317 {
00318     FileOption_Nothing      =0x00,
00319     FileOption_Recursive    =0x01,  ///< Browse folders recursively
00320     FileOption_CloseAll     =0x02,  ///< Close all files before open
00321     FileOption_Max          =0x04
00322 };
00323 
00324 const String Unable_Load_DLL=_T("Unable to load ")_T(MEDIAINFODLL_NAME);
00325 #define MEDIAINFO_TEST_VOID \
00326     if (!IsReady()) return
00327 #define MEDIAINFO_TEST_INT \
00328     if (!IsReady()) return 0
00329 #define MEDIAINFO_TEST_STRING \
00330     if (!IsReady()) return Unable_Load_DLL
00331 #define MEDIAINFO_TEST_STRING_STATIC \
00332     if (!Module) return Unable_Load_DLL
00333 
00334 //---------------------------------------------------------------------------
00335 class MediaInfo
00336 {
00337 public :
00338     MediaInfo ()                {if (!Module) MediaInfoDLL_Load(); if (!Module) {Handle=NULL; return;}; Handle=MediaInfo_New();};
00339     ~MediaInfo ()               {MEDIAINFO_TEST_VOID; MediaInfo_Delete(Handle);};
00340 
00341     //File
00342     size_t Open (const String &File) {MEDIAINFO_TEST_INT; return MediaInfo_Open(Handle, File.c_str());};
00343     //size_t Open (const unsigned char* Begin, size_t Begin_Size, const unsigned char* End=NULL, size_t End_Size=NULL) {MEDIAINFO_TEST_INT; return MediaInfo_Open_Buffer(Handle, Begin, Begin_Size, End, End_Size);};
00344     //size_t Save () {MEDIAINFO_TEST_INT; return MediaInfo_Save(Handle);};
00345     void Close () {MEDIAINFO_TEST_VOID; return MediaInfo_Close(Handle);};
00346 
00347     //General information
00348     String Inform ()  {MEDIAINFO_TEST_STRING; return MediaInfo_Inform(Handle, 0);};
00349     String Get (stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t InfoKind=Info_Text)  {MEDIAINFO_TEST_STRING; return MediaInfo_GetI (Handle, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, (MediaInfo_info_C)InfoKind);};
00350     String Get (stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name)  {MEDIAINFO_TEST_STRING; return MediaInfo_Get (Handle, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), (MediaInfo_info_C)InfoKind, (MediaInfo_info_C)SearchKind);};
00351     //size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=_T(""))  {MEDIAINFO_TEST_INT; return MediaInfo_SetI (Handle, ToSet.c_str(), (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, OldValue.c_str());};
00352     //size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=_T(""))  {MEDIAINFO_TEST_INT; return MediaInfo_Set (Handle, ToSet.c_str(), (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), OldValue.c_str());};
00353     String        Option (const String &Option, const String &Value=_T(""))  {MEDIAINFO_TEST_STRING; return MediaInfo_Option (Handle, Option.c_str(), Value.c_str());};
00354     static String Option_Static (const String &Option, const String &Value=_T(""))  {MEDIAINFO_TEST_STRING_STATIC; return MediaInfo_Option (NULL, Option.c_str(), Value.c_str());};
00355     size_t                  State_Get ()  {MEDIAINFO_TEST_INT; return MediaInfo_State_Get(Handle);};
00356     size_t                  Count_Get (stream_t StreamKind, size_t StreamNumber=-1)  {MEDIAINFO_TEST_INT; return MediaInfo_Count_Get(Handle, (MediaInfo_stream_C)StreamKind, StreamNumber);};
00357 
00358     bool IsReady() {return (Handle && Module)?true:false;}
00359 
00360 private :
00361     void* Handle;
00362 };
00363 
00364 class MediaInfoList
00365 {
00366 public :
00367     MediaInfoList ()                {MediaInfoDLL_Load(); if (!MediaInfoDLL_IsLoaded()) {Handle=NULL; return;}; Handle=MediaInfoList_New();};
00368     ~MediaInfoList ()               {MEDIAINFO_TEST_VOID; MediaInfoList_Delete(Handle); MediaInfoDLL_UnLoad();};
00369 
00370     //File
00371     size_t Open (const String &File, const fileoptions_t Options=FileOption_Nothing) {MEDIAINFO_TEST_INT; return MediaInfoList_Open(Handle, File.c_str(), (MediaInfo_fileoptions_C)Options);};
00372     //size_t Open (const unsigned char* Begin, size_t Begin_Size, const unsigned char* End=NULL, size_t End_Size=NULL) {MEDIAINFO_TEST_INT; return MediaInfoList_Open_Buffer(Handle, Begin, Begin_Size, End, End_Size);};
00373     //size_t Save (size_t FilePos) {MEDIAINFO_TEST_INT; return MediaInfoList_Save(Handle, FilePos);};
00374     void Close (size_t FilePos) {MEDIAINFO_TEST_VOID; return MediaInfoList_Close(Handle, FilePos);};
00375 
00376     //General information
00377     String Inform (size_t FilePos=(size_t)-1)  {MEDIAINFO_TEST_STRING; return MediaInfoList_Inform(Handle, FilePos, 0);};
00378     String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t InfoKind=Info_Text)  {MEDIAINFO_TEST_STRING; return MediaInfoList_GetI (Handle, FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, (MediaInfo_info_C)InfoKind);};
00379     String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name)  {MEDIAINFO_TEST_STRING; return MediaInfoList_Get (Handle, FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), (MediaInfo_info_C)InfoKind, (MediaInfo_info_C)SearchKind);};
00380     //size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=_T(""))  {MEDIAINFO_TEST_INT; return MediaInfoList_SetI (Handle, ToSet.c_str(), FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter, OldValue.c_str());};
00381     //size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=_T(""))  {MEDIAINFO_TEST_INT; return MediaInfoList_Set (Handle, ToSet.c_str(), FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber, Parameter.c_str(), OldValue.c_str());};
00382     String        Option (const String &Option, const String &Value=_T(""))  {MEDIAINFO_TEST_STRING; return MediaInfoList_Option (Handle, Option.c_str(), Value.c_str());};
00383     static String Option_Static (const String &Option, const String &Value=_T(""))  {MEDIAINFO_TEST_STRING_STATIC; return MediaInfoList_Option (NULL, Option.c_str(), Value.c_str());};
00384     size_t        State_Get ()  {MEDIAINFO_TEST_INT; return MediaInfoList_State_Get(Handle);};
00385     size_t        Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber=-1)  {MEDIAINFO_TEST_INT; return MediaInfoList_Count_Get(Handle, FilePos, (MediaInfo_stream_C)StreamKind, StreamNumber);};
00386     size_t        Count_Get ()  {MEDIAINFO_TEST_INT; return MediaInfoList_Count_Get_Files(Handle);};
00387 
00388     bool IsReady() {return (Handle && Module)?true:false;}
00389 
00390 private :
00391     void* Handle;
00392 };
00393 
00394 } //NameSpace
00395 #endif /*__cplusplus*/
00396 
00397 #endif

Generated on Mon May 14 15:51:00 2007 for MediaInfoLib by  doxygen 1.5.1-p1