Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

MediaInfoLib::MediaInfoList Class Reference

MediaInfoList. More...

#include <MediaInfoList.h>

List of all members.

Public Member Functions

 MediaInfoList (unsigned int Count_Init=64)
 Constructor.

 ~MediaInfoList ()
int Open (const MediaInfo_String &File, const fileoptions_t Options=FileOption_Nothing)
 Open files.

int Open (const unsigned char *Begin, size_t Begin_Size, const unsigned char *End=NULL, size_t End_Size=NULL, int64u FileSize=0)
 Open a stream.

int Save (unsigned int FilePos)
 Save the file.

void Close (unsigned int FilePos)
 Save all files Close the file.

MediaInfo_String Inform (unsigned int FilePos=(unsigned int)-1, size_t Reserved=0)
 Get all details about a file.

MediaInfo_String Get (unsigned int FilePos, stream_t StreamKind, unsigned int StreamNumber, unsigned int Parameter, info_t KindOfInfo=Info_Text)
 Get a piece of information about a file (parameter is an integer).

MediaInfo_String Get (unsigned int FilePos, stream_t StreamKind, unsigned int StreamNumber, const MediaInfo_String &Parameter, info_t KindOfInfo=Info_Text, info_t KindOfSearch=Info_Name)
 Get a piece of information about a file (parameter is a string).

int Set (const MediaInfo_String &ToSet, unsigned int FilePos, stream_t StreamKind, unsigned int StreamNumber, unsigned int Parameter, const MediaInfo_String &OldValue=_T(""))
 Set a piece of information about a file (parameter is an int).

int Set (const MediaInfo_String &ToSet, unsigned int FilePos, stream_t StreamKind, unsigned int StreamNumber, const MediaInfo_String &Parameter, const MediaInfo_String &OldValue=_T(""))
 Get information about a file (parameter is a string).

MediaInfo_String Option (const MediaInfo_String &Option, const MediaInfo_String &Value=MediaInfo_String(_T("")))
int State_Get ()
 (NOT IMPLEMENTED YET) Get the state of the library

int Count_Get (unsigned int FilePos, stream_t StreamKind, unsigned int StreamNumber=-1)
 Count of streams, or count of piece of information in this stream.

int Count_Get ()
 Get the count of opened files.


Static Public Member Functions

MediaInfo_String Option_Static (const MediaInfo_String &Option, const MediaInfo_String &Value=MediaInfo_String(_T("")))


Detailed Description

MediaInfoList.

Version:
0.7

Definition at line 45 of file MediaInfoList.h.


Constructor & Destructor Documentation

MediaInfoLib::MediaInfoList::MediaInfoList unsigned int    Count_Init = 64
 

Constructor.

Parameters:
Count_Init optimization information : How many files do you plan to handle?

MediaInfoLib::MediaInfoList::~MediaInfoList  
 


Member Function Documentation

void MediaInfoLib::MediaInfoList::Close unsigned int    FilePos
 

Save all files Close the file.

Close the file opened before with Open() (without saving)

Warning:
without have saved before, modifications are lost
Remarks:
All positions of files upper than FilePos are shifted
Return values:
>=0 number of files saved

int MediaInfoLib::MediaInfoList::Count_Get  
 

Get the count of opened files.

Returns:
Count of files opened

int MediaInfoLib::MediaInfoList::Count_Get unsigned int    FilePos,
stream_t    StreamKind,
unsigned int    StreamNumber = -1
 

Count of streams, or count of piece of information in this stream.

Parameters:
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...)

MediaInfo_String MediaInfoLib::MediaInfoList::Get unsigned int    FilePos,
stream_t    StreamKind,
unsigned int    StreamNumber,
const MediaInfo_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)

Parameters:
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
Returns:
a string about information you search
an empty string if there is a problem

MediaInfo_String MediaInfoLib::MediaInfoList::Get unsigned int    FilePos,
stream_t    StreamKind,
unsigned int    StreamNumber,
unsigned int    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)

Parameters:
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...)
Returns:
a string about information you search
an empty string if there is a problem

MediaInfo_String MediaInfoLib::MediaInfoList::Inform unsigned int    FilePos = (unsigned int)-1,
size_t    Reserved = 0
 

Get all details about a file.

Get all details about a file in one string

Parameters:
FilePos File position
(you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
Precondition:
You can change default presentation with Inform_Set()

int MediaInfoLib::MediaInfoList::Open const unsigned char *    Begin,
size_t    Begin_Size,
const unsigned char *    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)

Parameters:
Begin First bytes of the buffer
Begin_Size Size of Begin
End Last bytes of the buffer
End_Size Size of End
Return values:
0 File not opened
1 File opened

int MediaInfoLib::MediaInfoList::Open const MediaInfo_String &    File,
const fileoptions_t    Options = FileOption_Nothing
 

Open files.

Open one or more files and collect information about them (technical information and tags)

Parameters:
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
Return values:
Number of files successfuly added

MediaInfo_String MediaInfoLib::MediaInfoList::Option const MediaInfo_String &    Option,
const MediaInfo_String &    Value = MediaInfo_String(_T(""))
 

Configure or get information about MediaInfoLib

Parameters:
Option The name of option
Value The value of option
Returns:
Depend of the option : by default "" (nothing) means No, other means Yes
Postcondition:
Known options are : See MediaInfo::Option()

MediaInfo_String MediaInfoLib::MediaInfoList::Option_Static const MediaInfo_String &    Option,
const MediaInfo_String &    Value = MediaInfo_String(_T(""))
[static]
 

int MediaInfoLib::MediaInfoList::Save unsigned int    FilePos
 

Save the file.

Save the file opened before with Open() (modifications of tags)

Parameters:
FilePos File position
(you can know the position in searching the filename with MediaInfoList::Get(FilePos, 0, 0, "CompleteName") )
Return values:
0 failed
1 suceed

int MediaInfoLib::MediaInfoList::Set const MediaInfo_String &    ToSet,
unsigned int    FilePos,
stream_t    StreamKind,
unsigned int    StreamNumber,
const MediaInfo_String &    Parameter,
const MediaInfo_String &    OldValue = _T("")
 

Get information about a file (parameter is a string).

Parameters:
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
Return values:
>=0 suceed
<0 failed

int MediaInfoLib::MediaInfoList::Set const MediaInfo_String &    ToSet,
unsigned int    FilePos,
stream_t    StreamKind,
unsigned int    StreamNumber,
unsigned int    Parameter,
const MediaInfo_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)

Parameters:
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
Return values:
>=0 suceed
<0 failed

int MediaInfoLib::MediaInfoList::State_Get  
 

(NOT IMPLEMENTED YET) Get the state of the library

Return values:
<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


The documentation for this class was generated from the following file:
Generated on Fri Nov 24 09:38:36 2006 for MediaInfoLib by doxygen1.3-rc3