MediaInfoLib: MediaInfoList.h Source File

MediaInfoLib 0.7

MediaInfoList.h
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 // Give information about a lot of media files
10 //
11 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12
13 //---------------------------------------------------------------------------
14 #ifndef MediaInfoListH
15 #define MediaInfoListH
16 //---------------------------------------------------------------------------
17
18 //---------------------------------------------------------------------------
19 #include "MediaInfo/MediaInfo.h"
20 //---------------------------------------------------------------------------
21
22 //---------------------------------------------------------------------------
23 #undef MEDIAINFO_EXP
24 #if defined(_WIN32) && !defined(__MINGW32__) //MinGW32 does not support _declspec
25 #ifdef MEDIAINFO_DLL_EXPORT
26 #define MEDIAINFO_EXP
27 #else
28 #define MEDIAINFO_EXP
29 #endif
30 #else //defined(_WIN32) && !defined(__MINGW32__)
31 #if __GNUC__ >= 4
32 #define MEDIAINFO_EXP __attribute__ ((visibility("default")))
33 #else
34 #define MEDIAINFO_EXP
35 #endif
36 #endif //defined(_WIN32) && !defined(__MINGW32__)
37
38 #if !defined(__WINDOWS__)
39 #define __stdcall //Supported only on windows
40 #endif
41 //---------------------------------------------------------------------------
42
43 namespace MediaInfoLib
44 {
45
46 class MediaInfoList_Internal;
47
48 //***************************************************************************
51 //***************************************************************************
52
53 class MEDIAINFO_EXP MediaInfoList
54 {
55 public :
56 //Class
59 MediaInfoList (size_t Count_Init=64);
60 ~MediaInfoList ();
61
62 //Files
70 size_t Open (const String &File, const fileoptions_t Options=FileOption_Nothing);
77 size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0);
85 size_t Open_Buffer_Continue (size_t FilePos, const ZenLib::int8u* Buffer, size_t Buffer_Size);
91 ZenLib::int64u Open_Buffer_Continue_GoTo_Get (size_t FilePos);
97 size_t Open_Buffer_Finalize (size_t FilePos);
104 size_t Save (size_t FilePos);
110 void Close (size_t FilePos=(size_t)-1);
111
119 String Inform (size_t FilePos=(size_t)-1, size_t Reserved=0);
120
121 //Get
132 String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t KindOfInfo=Info_Text); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name, text, measure, options, name (language), measure (language), info, how to
145 String Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name text measure options name(language) measure(language) information how to, KindOfSearch=which Kind Of information Parameter must be searched?
146
147 //Set
160 size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=String()); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name, text, measure, options name(language) measure(language) information how to
173 size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=String()); //Get info, FilePos=File position, StreamKind=General video audio text chapter, StreamNumber=stream number, PosInStream=parameter you want, KindOfInfo=name text measure options name (language) measure (language) information how to, KindOfSearch=which Kind Of information Parameter must be searched?
174
175 //Output_Buffered
182 char* Output_Buffer_Get (size_t FilePos, size_t &Output_Buffer_Size);
183
184 //Info
190 String Option (const String &Option, const String &Value=String());
196 static String Option_Static (const String &Option, const String &Value=String());
204 size_t State_Get ();
211 size_t Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber=(size_t)-1);
214 size_t Count_Get ();
215
216 private :
217 MediaInfoList_Internal* Internal;
218
219 //Constructor
220 MediaInfoList (const MediaInfoList&); // Prevent copy-construction
221 MediaInfoList& operator=(const MediaInfoList&); // Prevent assignment
222 };
223
224 } //NameSpace
225 #endif
MediaInfoLib::MediaInfoList
MediaInfoList.
Definition: MediaInfoList.h:54
MediaInfoLib::MediaInfoList::MediaInfoList
MediaInfoList(size_t Count_Init=64)
Constructor.
MediaInfoLib::MediaInfoList::Inform
String Inform(size_t FilePos=(size_t) -1, size_t Reserved=0)
Get all details about a file.
MediaInfoLib::MediaInfoList::Open_Buffer_Continue_GoTo_Get
ZenLib::int64u Open_Buffer_Continue_GoTo_Get(size_t FilePos)
Open a stream (Get the needed file Offset)
MediaInfoLib::MediaInfoList::Count_Get
size_t Count_Get()
Get the count of opened files.
MediaInfoLib::MediaInfoList::Get
String Get(size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name)
Get a piece of information about a file (parameter is a string)
MediaInfoLib::MediaInfoList::Option
String Option(const String &Option, const String &Value=String())
MediaInfoLib::MediaInfoList::Get
String Get(size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, info_t KindOfInfo=Info_Text)
Get a piece of information about a file (parameter is an integer)
MediaInfoLib::MediaInfoList::Close
void Close(size_t FilePos=(size_t) -1)
(NOT IMPLEMENTED YET) Save all files
MediaInfoLib::MediaInfoList::Set
size_t Set(const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=String())
(NOT IMPLEMENTED YET) Get information about a file (parameter is a string)
MediaInfoLib::MediaInfoList::Save
size_t Save(size_t FilePos)
Save the file.
MediaInfoLib::MediaInfoList::Open_Buffer_Continue
size_t Open_Buffer_Continue(size_t FilePos, const ZenLib::int8u *Buffer, size_t Buffer_Size)
Open a stream (Continue)
MediaInfoLib::MediaInfoList::Option_Static
static String Option_Static(const String &Option, const String &Value=String())
MediaInfoLib::MediaInfoList::State_Get
size_t State_Get()
(NOT IMPLEMENTED YET) Get the state of the library
MediaInfoLib::MediaInfoList::Set
size_t Set(const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=String())
(NOT IMPLEMENTED YET) Set a piece of information about a file (parameter is an int)
MediaInfoLib::MediaInfoList::Count_Get
size_t Count_Get(size_t FilePos, stream_t StreamKind, size_t StreamNumber=(size_t) -1)
Count of streams, or count of piece of information in this stream.
MediaInfoLib::MediaInfoList::Open_Buffer_Finalize
size_t Open_Buffer_Finalize(size_t FilePos)
Open a stream (Finalize)
MediaInfoLib::MediaInfoList::Output_Buffer_Get
char * Output_Buffer_Get(size_t FilePos, size_t &Output_Buffer_Size)
Output buffer retrieving.
MediaInfoLib::MediaInfoList::Open
size_t Open(const String &File, const fileoptions_t Options=FileOption_Nothing)
Open files.
MediaInfoLib::MediaInfoList::Open_Buffer_Init
size_t Open_Buffer_Init(ZenLib::int64u File_Size=(ZenLib::int64u) -1, ZenLib::int64u File_Offset=0)
Open a stream (Init)
MediaInfoLib
defined(_WIN32)
Definition: MediaInfo_Const.h:24
MediaInfoLib::String
std::basic_string< MediaInfoLib::Char > String
Unicode/Ansi independant string.
Definition: MediaInfo_Const.h:125
MediaInfoLib::info_t
info_t
Kind of information.
Definition: MediaInfo_Const.h:74
MediaInfoLib::Info_Text
@ Info_Text
InfoKind = Value of parameter.
Definition: MediaInfo_Const.h:76
MediaInfoLib::Info_Name
@ Info_Name
InfoKind = Unique name of parameter.
Definition: MediaInfo_Const.h:75
MediaInfoLib::fileoptions_t
fileoptions_t
File opening options.
Definition: MediaInfo_Const.h:103
MediaInfoLib::stream_t
stream_t
Kinds of Stream.
Definition: MediaInfo_Const.h:61