#include <MediaInfoList.h>
Public Member Functions | |
MediaInfoList (size_t Count_Init=64) | |
Constructor. | |
~MediaInfoList () | |
size_t | Open (const String &File, const fileoptions_t Options=FileOption_Nothing) |
Open files. | |
size_t | Open (const int8u *Begin, size_t Begin_Size, const int8u *End=NULL, size_t End_Size=NULL, int64u FileSize=0) |
Open a stream. | |
size_t | Save (size_t FilePos) |
Save the file. | |
void | Close (size_t FilePos=(size_t)-1) |
Save all files. | |
String | Inform (size_t FilePos=(size_t)-1, size_t Reserved=0) |
Get all details about a file. | |
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). | |
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). | |
size_t | Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=_T("")) |
Set a piece of information about a file (parameter is an int). | |
size_t | Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=_T("")) |
Get information about a file (parameter is a string). | |
String | Option (const String &Option, const String &Value=String(_T(""))) |
size_t | State_Get () |
(NOT IMPLEMENTED YET) Get the state of the library | |
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. | |
size_t | Count_Get () |
Get the count of opened files. | |
Static Public Member Functions | |
static String | Option_Static (const String &Option, const String &Value=String(_T(""))) |
Definition at line 45 of file MediaInfoList.h.
MediaInfoLib::MediaInfoList::MediaInfoList | ( | size_t | Count_Init = 64 |
) |
Constructor.
Count_Init | optimization information : How many files do you plan to handle? |
MediaInfoLib::MediaInfoList::~MediaInfoList | ( | ) |
size_t MediaInfoLib::MediaInfoList::Open | ( | const String & | File, | |
const fileoptions_t | Options = FileOption_Nothing | |||
) |
Open files.
Open one or more files and collect information about them (technical information and tags)
File | Full name of file(s) to open or Full name of folder(s) to open (if multiple names, names must be separated by "|") | |
Options | : FileOption_Recursive = Recursive mode for folders FileOption_Close = Close all already opened files before |
Number | of files successfuly added |
size_t MediaInfoLib::MediaInfoList::Open | ( | const int8u * | Begin, | |
size_t | Begin_Size, | |||
const int8u * | End = NULL , |
|||
size_t | End_Size = NULL , |
|||
int64u | FileSize = 0 | |||
) |
Open a stream.
Open a buffer (Begin and end of the stream) and collect information about it (technical information and tags)
Begin | First bytes of the buffer | |
Begin_Size | Size of Begin | |
End | Last bytes of the buffer | |
End_Size | Size of End |
0 | File not opened | |
1 | File opened |
size_t MediaInfoLib::MediaInfoList::Save | ( | size_t | FilePos | ) |
Save the file.
Save the file opened before with Open() (modifications of tags)
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) |
0 | failed | |
1 | suceed |
void MediaInfoLib::MediaInfoList::Close | ( | size_t | FilePos = (size_t)-1 |
) |
Save all files.
Save all files opened before with Open() (modifications of tags)
Count | of files saved |
String MediaInfoLib::MediaInfoList::Inform | ( | size_t | FilePos = (size_t)-1 , |
|
size_t | Reserved = 0 | |||
) |
Get all details about a file.
Get all details about a file in one string
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) |
String MediaInfoLib::MediaInfoList::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).
Get a piece of information about a file (parameter is an integer)
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) | |
StreamKind | Kind of stream (general, video, audio...) | |
StreamNumber | Stream number in Kind of stream (first, second...) | |
Parameter | Parameter you are looking for in the stream (Codec, width, bitrate...), in integer format (first parameter, second parameter...) | |
KindOfInfo | Kind of information you want about the parameter (the text, the measure, the help...) |
String MediaInfoLib::MediaInfoList::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).
Get a piece of information about a file (parameter is a string)
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) | |
StreamKind | Kind of stream (general, video, audio...) | |
StreamNumber | Stream number in Kind of stream (first, second...) | |
Parameter | Parameter you are looking for in the stream (Codec, width, bitrate...), in string format ("Codec", "Width"...) See Info_Parameters() to have the full list | |
KindOfInfo | Kind of information you want about the parameter (the text, the measure, the help...) | |
KindOfSearch | Where to look for the parameter |
size_t MediaInfoLib::MediaInfoList::Set | ( | const String & | ToSet, | |
size_t | FilePos, | |||
stream_t | StreamKind, | |||
size_t | StreamNumber, | |||
size_t | Parameter, | |||
const String & | OldValue = _T("") | |||
) |
Set a piece of information about a file (parameter is an int).
Set a piece of information about a file (parameter is an int)
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) | |
StreamKind | Kind of stream (general, video, audio...) | |
StreamNumber | Stream number in Kind of stream (first, second...) | |
Parameter | Parameter you are looking for in the stream (Codec, width, bitrate...), in integer format (first parameter, second parameter...) | |
OldValue | The old value of the parameter if OldValue is empty and ToSet is filled : tag is added if OldValue is filled and ToSet is filled : tag is replaced if OldValue is filled and ToSet is empty : tag is deleted |
>0 | succeed | |
0 | failed |
size_t MediaInfoLib::MediaInfoList::Set | ( | const String & | ToSet, | |
size_t | FilePos, | |||
stream_t | StreamKind, | |||
size_t | StreamNumber, | |||
const String & | Parameter, | |||
const String & | OldValue = _T("") | |||
) |
Get information about a file (parameter is a string).
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) | |
StreamKind | Kind of stream (general, video, audio...) | |
StreamNumber | Stream number in Kind of stream (first, second...) | |
Parameter | Parameter you are looking for in the stream (Codec, width, bitrate...), in string format ("Codec", "Width"...) See Option("Info_Parameters") to have the full list | |
OldValue | The old value of the parameter if OldValue is empty and ToSet is filled : tag is added if OldValue is filled and ToSet is filled : tag is replaced if OldValue is filled and ToSet is empty : tag is deleted |
>0 | succeed | |
0 | failed |
String MediaInfoLib::MediaInfoList::Option | ( | const String & | Option, | |
const String & | Value = String(_T("")) | |||
) |
Configure or get information about MediaInfoLib
Option | The name of option | |
Value | The value of option |
static String MediaInfoLib::MediaInfoList::Option_Static | ( | const String & | Option, | |
const String & | Value = String(_T("")) | |||
) | [static] |
size_t MediaInfoLib::MediaInfoList::State_Get | ( | ) |
(NOT IMPLEMENTED YET) Get the state of the library
<1000 | No information is available for the file yet | |
>=1000_<5000 | Only local (into the file) information is available, getting Internet information (titles only) is no finished yet | |
5000 | (only if Internet connection is accepted) User interaction is needed (use Option() with "Internet_Title_Get") Warning : even there is only one possible, user interaction (or the software) is needed | |
>5000<=10000 | Only local (into the file) information is available, getting Internet information (all) is no finished yet | |
<10000 | Done |
size_t MediaInfoLib::MediaInfoList::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.
FilePos | File position (you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") ) | |
StreamKind | Kind of stream (general, video, audio...) | |
StreamNumber | Stream number in this kind of stream (first, second...) |
size_t MediaInfoLib::MediaInfoList::Count_Get | ( | ) |
Get the count of opened files.