MediaInfo.h

00001 // MediaInfo - All information about media files
00002 
00003 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00004 //
00005 // Give information about a lot of media files
00006 // Dispatch the file to be tested by all containers
00007 //
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 
00010 //---------------------------------------------------------------------------
00011 #ifndef MediaInfoH
00012 #define MediaInfoH
00013 //---------------------------------------------------------------------------
00014 
00015 //---------------------------------------------------------------------------
00016 #include "MediaInfo/MediaInfo_Const.h"
00017 //---------------------------------------------------------------------------
00018 
00019 //---------------------------------------------------------------------------
00020 #undef MEDIAINFO_EXP
00021 #if defined(_WIN32) && !defined(__MINGW32__) //MinGW32 does not support _declspec
00022     #ifdef MEDIAINFO_DLL_EXPORT
00023         #define MEDIAINFO_EXP
00024     #else
00025         #define MEDIAINFO_EXP
00026     #endif
00027 #else //defined(_WIN32) && !defined(__MINGW32__)
00028     #if __GNUC__ >= 4
00029         #define MEDIAINFO_EXP __attribute__ ((visibility("default")))
00030     #else
00031         #define MEDIAINFO_EXP
00032     #endif
00033 #endif //defined(_WIN32) && !defined(__MINGW32__)
00034 
00035 #if !defined(__WINDOWS__)
00036     #define __stdcall //Supported only on windows
00037 #endif 
00038 //---------------------------------------------------------------------------
00039 
00040 namespace MediaInfoLib
00041 {
00042 
00043 class MediaInfo_Internal;
00044 
00045 //***************************************************************************
00048 //***************************************************************************
00049 
00050 class MEDIAINFO_EXP MediaInfo
00051 {
00052 public :
00053     //Constructor/Destructor
00054     MediaInfo ();
00055     ~MediaInfo ();
00056     //File
00062     size_t Open (const String &File_Name);
00072     size_t Open (const ZenLib::int8u* Begin, size_t Begin_Size, const ZenLib::int8u* End=NULL, size_t End_Size=0, ZenLib::int64u File_Size=0);
00079     size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0);
00091     size_t Open_Buffer_Continue (const ZenLib::int8u* Buffer, size_t Buffer_Size);
00096     ZenLib::int64u Open_Buffer_Continue_GoTo_Get ();
00101     size_t Open_Buffer_Finalize ();
00106     size_t Open_NextPacket ();
00111     size_t Save ();
00115     void Close ();
00116 
00117     //General information
00123     String Inform (size_t Reserved=0);
00124 
00125     //Get
00135     String Get (stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t InfoKind=Info_Text);
00146     String Get (stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t InfoKind=Info_Text, info_t SearchKind=Info_Name);
00147 
00148     //Set
00159     size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=String());
00170     size_t Set (const String &ToSet, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=String());
00171 
00172     //Output_Buffered
00177     size_t Output_Buffer_Get (const String &Value);
00182     size_t Output_Buffer_Get (size_t Pos);
00183 
00184     //Info
00223     String        Option (const String &Option, const String &Value=String());
00229     static String Option_Static (const String &Option, const String &Value=String());
00237     size_t                  State_Get ();
00242     size_t                  Count_Get (stream_t StreamKind, size_t StreamNumber=(size_t)-1);
00243 
00244 private :
00245     MediaInfo_Internal* Internal;
00246 
00247     //Constructor
00248     MediaInfo (const MediaInfo&);                           // Prevent copy-construction
00249     MediaInfo& operator=(const MediaInfo&);                 // Prevent assignment
00250 };
00251 
00252 } //NameSpace
00253 #endif

Generated on 30 Oct 2016 for MediaInfoLib by  doxygen 1.4.7