MediaInfoList.h
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// Give information about a lot of media files
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//---------------------------------------------------------------------------
#ifndef MediaInfoListH
#define MediaInfoListH
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "MediaInfo/MediaInfo.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#undef MEDIAINFO_EXP
#if defined(_WIN32) && !defined(__MINGW32__) //MinGW32 does not support _declspec
#ifdef MEDIAINFO_DLL_EXPORT
#define MEDIAINFO_EXP
#else
#define MEDIAINFO_EXP
#endif
#else //defined(_WIN32) && !defined(__MINGW32__)
#if __GNUC__ >= 4
#define MEDIAINFO_EXP __attribute__ ((visibility("default")))
#else
#define MEDIAINFO_EXP
#endif
#endif //defined(_WIN32) && !defined(__MINGW32__)
#if !defined(__WINDOWS__)
#define __stdcall //Supported only on windows
#endif
//---------------------------------------------------------------------------
namespace MediaInfoLib
{
class MediaInfoList_Internal;
//***************************************************************************
//***************************************************************************
class MEDIAINFO_EXP MediaInfoList
{
public :
//Class
MediaInfoList (size_t Count_Init=64);
~MediaInfoList ();
//Files
size_t Open (const String &File, const fileoptions_t Options=FileOption_Nothing);
size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0);
size_t Open_Buffer_Continue (size_t FilePos, const ZenLib::int8u* Buffer, size_t Buffer_Size);
ZenLib::int64u Open_Buffer_Continue_GoTo_Get (size_t FilePos);
size_t Open_Buffer_Finalize (size_t FilePos);
size_t Save (size_t FilePos);
void Close (size_t FilePos=(size_t)-1);
String Inform (size_t FilePos=(size_t)-1, size_t Reserved=0);
//Get
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
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?
//Set
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
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?
//Output_Buffered
char* Output_Buffer_Get (size_t FilePos, size_t &Output_Buffer_Size);
//Info
String Option (const String &Option, const String &Value=String());
static String Option_Static (const String &Option, const String &Value=String());
size_t State_Get ();
size_t Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber=(size_t)-1);
size_t Count_Get ();
private :
MediaInfoList_Internal* Internal;
//Constructor
MediaInfoList (const MediaInfoList&); // Prevent copy-construction
MediaInfoList& operator=(const MediaInfoList&); // Prevent assignment
};
} //NameSpace
#endif
MediaInfoLib::Info_Name
InfoKind = Unique name of parameter.
Definition: MediaInfo_Const.h:75
MediaInfoLib::String
std::basic_string< MediaInfoLib::Char > String
Unicode/Ansi independant string.
Definition: MediaInfo_Const.h:125
MediaInfoLib::MediaInfoList
MediaInfoList.
Definition: MediaInfoList.h:53
MediaInfoLib::info_t
info_t
Kind of information.
Definition: MediaInfo_Const.h:73
MediaInfoLib::fileoptions_t
fileoptions_t
File opening options.
Definition: MediaInfo_Const.h:102
MediaInfoLib::stream_t
stream_t
Kinds of Stream.
Definition: MediaInfo_Const.h:60
MediaInfoLib::Info_Text
InfoKind = Value of parameter.
Definition: MediaInfo_Const.h:76