MediaInfoLib 0.7

- Main Page
- Namespaces
- Classes
- Files

- File List

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