00001 // MediaInfoList - A list of MediaInfo 00002 // Copyright (C) 2002-2008 Jerome Martinez, Zen@MediaArea.net 00003 // 00004 // This library is free software: you can redistribute it and/or modify it 00005 // under the terms of the GNU Lesser General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // any later version. 00008 // 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU Lesser General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU Lesser General Public License 00015 // along with this library. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00018 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00019 // MediaInfoList 00020 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00021 // 00022 // Give information about a lot of media files 00023 // 00024 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00025 00026 //--------------------------------------------------------------------------- 00027 #ifndef MediaInfoListH 00028 #define MediaInfoListH 00029 //--------------------------------------------------------------------------- 00030 00031 //--------------------------------------------------------------------------- 00032 #include "MediaInfo/MediaInfo.h" 00033 //--------------------------------------------------------------------------- 00034 00035 namespace MediaInfoLib 00036 { 00037 00038 //*************************************************************************** 00041 //*************************************************************************** 00042 00043 class MediaInfoList 00044 { 00045 public : 00046 //Class 00049 MediaInfoList (size_t Count_Init=64); 00050 ~MediaInfoList (); 00051 00052 //Files 00061 size_t Open (const String &File, const fileoptions_t Options=FileOption_Nothing); 00066 size_t Open_Buffer_Init (ZenLib::int64u File_Size=(ZenLib::int64u)-1, ZenLib::int64u File_Offset=0); 00072 size_t Open_Buffer_Continue (size_t FilePos, const ZenLib::int8u* Buffer, size_t Buffer_Size); 00078 ZenLib::int64u Open_Buffer_Continue_GoTo_Get (size_t FilePos); 00082 size_t Open_Buffer_Finalize (size_t FilePos); 00089 size_t Save (size_t FilePos); 00095 void Close (size_t FilePos=(size_t)-1); 00096 00103 String Inform (size_t FilePos=(size_t)-1, size_t Reserved=0); 00104 00105 //Get 00116 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 00129 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? 00130 00131 //Set 00144 size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, size_t Parameter, const String &OldValue=_T("")); //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 00157 size_t Set (const String &ToSet, size_t FilePos, stream_t StreamKind, size_t StreamNumber, const String &Parameter, const String &OldValue=_T("")); //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? 00158 00159 //Output_Buffered 00166 char* Output_Buffer_Get (size_t FilePos, size_t &Output_Buffer_Size); 00167 00168 //Info 00174 String Option (const String &Option, const String &Value=String(_T(""))); 00180 static String Option_Static (const String &Option, const String &Value=String(_T(""))); 00188 size_t State_Get (); 00194 size_t Count_Get (size_t FilePos, stream_t StreamKind, size_t StreamNumber=(size_t)-1); 00197 size_t Count_Get (); 00198 00199 private : 00200 void* Internal; 00201 }; 00202 00203 } //NameSpace 00204 #endif