Internal change
PiperOrigin-RevId: 140507109
Change-Id: Iccba8e997cb9010381780133d518df69ecdb2a81
diff --git a/libutil/Database.cpp b/libutil/Database.cpp
index 9cd72ed..d65eb62 100644
--- a/libutil/Database.cpp
+++ b/libutil/Database.cpp
@@ -63,7 +63,7 @@
///////////////////////////////////////////////////////////////////////////////
void
-Database::parseData( map<string,string>& data )
+Database::parseData( std::map<string,string>& data )
{
data.clear();
diff --git a/libutil/Database.h b/libutil/Database.h
index 9f96c3e..fb2ccd8 100644
--- a/libutil/Database.h
+++ b/libutil/Database.h
@@ -75,7 +75,7 @@
///
/// @param data is populated with NAME/VALUE pairs if any.
///
- void parseData( map<string,string>& data );
+ void parseData( std::map<string,string>& data );
///////////////////////////////////////////////////////////////////////////
diff --git a/libutil/Timecode.cpp b/libutil/Timecode.cpp
index 195a009..1dbfc14 100644
--- a/libutil/Timecode.cpp
+++ b/libutil/Timecode.cpp
@@ -131,7 +131,7 @@
uint64_t dur = _duration + convertDuration( rhs );
// overflow check
if( dur < _duration )
- dur = numeric_limits<long long>::max();
+ dur = std::numeric_limits<long long>::max();
setDuration( dur );
return *this;
diff --git a/libutil/Utility.cpp b/libutil/Utility.cpp
index 76cdd12..a83b06e 100644
--- a/libutil/Utility.cpp
+++ b/libutil/Utility.cpp
@@ -189,8 +189,8 @@
{
// determine longest long-option [+space +argname]
int longMax = 0;
- list<Group*>::reverse_iterator ie = _groups.rend();
- for( list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) {
+ std::list<Group*>::reverse_iterator ie = _groups.rend();
+ for( std::list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) {
Group& group = **it;
const Group::List::const_iterator ieo = group.options.end();
for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++ ) {
@@ -212,7 +212,7 @@
int groupCount = 0;
int optionCount = 0;
ie = _groups.rend();
- for( list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++, groupCount++ ) {
+ for( std::list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++, groupCount++ ) {
if( groupCount )
oss << '\n';
Group& group = **it;
@@ -262,7 +262,7 @@
int optionIndex = 0;
ie = _groups.rend();
- for( list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) {
+ for( std::list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) {
Group& group = **it;
const Group::List::const_iterator ieo = group.options.end();
for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++, optionIndex++ ) {
@@ -315,8 +315,8 @@
}
// free data flagged with job
- list<void*>::iterator ie = job.tofree.end();
- for( list<void*>::iterator it = job.tofree.begin(); it != ie; it++ )
+ std::list<void*>::iterator ie = job.tofree.end();
+ for( std::list<void*>::iterator it = job.tofree.begin(); it != ie; it++ )
free( *it );
@@ -379,8 +379,8 @@
oss << "Usage: " << _name << " " << _usage << '\n' << _description << '\n' << _help;
if( extended ) {
- const list<Group*>::reverse_iterator ie = _groups.rend();
- for( list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) {
+ const std::list<Group*>::reverse_iterator ie = _groups.rend();
+ for( std::list<Group*>::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) {
Group& group = **it;
const Group::List::const_iterator ieo = group.options.end();
for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++ ) {
@@ -469,7 +469,7 @@
formatGroups();
// populate code lookup set
- set<int> codes;
+ std::set<int> codes;
const Group::List::const_iterator ie = _group.options.end();
for( Group::List::const_iterator it = _group.options.begin(); it != ie; it++ ) {
const Option& option = **it;
diff --git a/libutil/Utility.h b/libutil/Utility.h
index 26d57b8..38ebd38 100644
--- a/libutil/Utility.h
+++ b/libutil/Utility.h
@@ -88,7 +88,7 @@
const string name;
public:
- typedef list<const Option*> List;
+ typedef std::list<const Option*> List;
private:
List _options;
@@ -107,7 +107,7 @@
const string file; //!< file job is working on
MP4FileHandle fileHandle; //!< handle of file, if applicable to job
bool optimizeApplicable; //!< indicate file optimization is applicable
- list<void*> tofree; //!< memory to free at end of job
+ std::list<void*> tofree; //!< memory to free at end of job
};
public:
@@ -177,7 +177,7 @@
Group _group; // group to which standard options are added
string _usage;
string _description;
- list<Group*> _groups;
+ std::list<Group*> _groups;
protected:
// standard options for concrete utilities to add to _group in constructor
diff --git a/libutil/other.h b/libutil/other.h
index 83d5411..b1e4a7b 100644
--- a/libutil/other.h
+++ b/libutil/other.h
@@ -8,7 +8,7 @@
///////////////////////////////////////////////////////////////////////////////
struct MP4V2_EXPORT FileSummaryInfo {
- typedef set<string> BrandSet;
+ typedef std::set<string> BrandSet;
// standard ftyp box attributes
string major_brand;
diff --git a/src/enum.h b/src/enum.h
index af5b6d4..f41368f 100644
--- a/src/enum.h
+++ b/src/enum.h
@@ -78,8 +78,8 @@
const string formal;
};
- typedef map<string,const Entry*,LessIgnoreCase> MapToType;
- typedef map<T,const Entry*> MapToString;
+ typedef std::map<string,const Entry*,LessIgnoreCase> MapToType;
+ typedef std::map<T,const Entry*> MapToString;
public:
static const Entry data[];
diff --git a/src/itmf/CoverArtBox.cpp b/src/itmf/CoverArtBox.cpp
index 0125362..f248d1b 100644
--- a/src/itmf/CoverArtBox.cpp
+++ b/src/itmf/CoverArtBox.cpp
@@ -196,7 +196,7 @@
return true;
// wildcard mode: delete covr and all images
- if( index == numeric_limits<uint32_t>::max() ) {
+ if( index == std::numeric_limits<uint32_t>::max() ) {
covr->GetParentAtom()->DeleteChildAtom( covr );
delete covr;
return false;
diff --git a/src/itmf/CoverArtBox.h b/src/itmf/CoverArtBox.h
index 023e3c9..37bd14e 100644
--- a/src/itmf/CoverArtBox.h
+++ b/src/itmf/CoverArtBox.h
@@ -58,7 +58,7 @@
};
/// Object representing a list of covr-box items.
- typedef vector<Item> ItemList;
+ typedef std::vector<Item> ItemList;
/// Fetch list of covr-box items from file.
///
@@ -111,7 +111,8 @@
///
/// @return <b>true</b> on failure, <b>false</b> on success.
///
- static bool remove( MP4FileHandle hFile, uint32_t index = numeric_limits<uint32_t>::max() );
+ static bool remove(MP4FileHandle hFile,
+ uint32_t index = std::numeric_limits<uint32_t>::max());
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/itmf/Tags.h b/src/itmf/Tags.h
index 57ef82c..bc6fdff 100644
--- a/src/itmf/Tags.h
+++ b/src/itmf/Tags.h
@@ -174,7 +174,7 @@
void c_setDisk ( const MP4TagDisk*, MP4TagDisk&, const MP4TagDisk*& );
private:
- typedef map<string,MP4ItmfItem*> CodeItemMap;
+ typedef std::map<string,MP4ItmfItem*> CodeItemMap;
private:
void fetchString ( const CodeItemMap&, const string&, string&, const char*& );
diff --git a/src/itmf/generic.cpp b/src/itmf/generic.cpp
index 184cd74..98f77ea 100644
--- a/src/itmf/generic.cpp
+++ b/src/itmf/generic.cpp
@@ -321,7 +321,7 @@
// pass 1: filter by code and populate indexList
const uint32_t childCount = ilst->GetNumberOfChildAtoms();
- vector<uint32_t> indexList;
+ std::vector<uint32_t> indexList;
for( uint32_t i = 0; i < childCount; i++ ) {
if( ATOMID( ilst->GetChildAtom( i )->GetType() ) != ATOMID( code.c_str() ))
continue;
@@ -335,8 +335,8 @@
__itemListResize( list, (uint32_t)indexList.size() );
// pass 2: process each atom
- const vector<uint32_t>::size_type max = indexList.size();
- for( vector<uint32_t>::size_type i = 0; i < max; i++ ) {
+ const std::vector<uint32_t>::size_type max = indexList.size();
+ for( std::vector<uint32_t>::size_type i = 0; i < max; i++ ) {
uint32_t& aidx = indexList[i];
__itemAtomToModel( *(MP4ItemAtom*)ilst->GetChildAtom( aidx ), list.elements[i] );
}
@@ -355,7 +355,7 @@
// pass 1: filter by code and populate indexList
const uint32_t childCount = ilst->GetNumberOfChildAtoms();
- vector<uint32_t> indexList;
+ std::vector<uint32_t> indexList;
for( uint32_t i = 0; i < childCount; i++ ) {
MP4Atom& atom = *ilst->GetChildAtom( i );
if( ATOMID( atom.GetType() ) != ATOMID( "----" ))
@@ -387,8 +387,8 @@
__itemListResize( list, (uint32_t)indexList.size() );
// pass 2: process each atom
- const vector<uint32_t>::size_type max = indexList.size();
- for( vector<uint32_t>::size_type i = 0; i < max; i++ ) {
+ const std::vector<uint32_t>::size_type max = indexList.size();
+ for( std::vector<uint32_t>::size_type i = 0; i < max; i++ ) {
uint32_t& aidx = indexList[i];
__itemAtomToModel( *(MP4ItemAtom*)ilst->GetChildAtom( aidx ), list.elements[i] );
}
@@ -431,7 +431,7 @@
MP4ItemAtom* const old = static_cast<MP4ItemAtom*>(item->__handle);
const uint32_t childCount = ilst->GetNumberOfChildAtoms();
- uint32_t fidx = numeric_limits<uint32_t>::max();
+ uint32_t fidx = std::numeric_limits<uint32_t>::max();
for( uint32_t i = 0; i < childCount; i++ ) {
MP4Atom* atom = ilst->GetChildAtom( i );
if( atom == old ) {
@@ -440,7 +440,7 @@
}
}
- if( fidx == numeric_limits<uint32_t>::max() )
+ if( fidx == std::numeric_limits<uint32_t>::max() )
return false;
ilst->DeleteChildAtom( old );
diff --git a/src/mp4atom.cpp b/src/mp4atom.cpp
index 520cbc8..744c9e0 100644
--- a/src/mp4atom.cpp
+++ b/src/mp4atom.cpp
@@ -634,7 +634,7 @@
{
if ( m_type[0] != '\0' ) {
// create list of ancestors
- list<string> tlist;
+ std::list<string> tlist;
for( MP4Atom* atom = this; atom; atom = atom->GetParentAtom() ) {
const char* const type = atom->GetType();
if( type && type[0] != '\0' )
@@ -643,8 +643,8 @@
// create contextual atom-name
string can;
- const list<string>::iterator ie = tlist.end();
- for( list<string>::iterator it = tlist.begin(); it != ie; it++ )
+ const std::list<string>::iterator ie = tlist.end();
+ for( std::list<string>::iterator it = tlist.begin(); it != ie; it++ )
can += *it + '.';
if( can.length() )
can.resize( can.length() - 1 );
diff --git a/src/qtff/ColorParameterBox.cpp b/src/qtff/ColorParameterBox.cpp
index 7581c63..9cc9c15 100644
--- a/src/qtff/ColorParameterBox.cpp
+++ b/src/qtff/ColorParameterBox.cpp
@@ -233,7 +233,7 @@
///////////////////////////////////////////////////////////////////////////////
ColorParameterBox::IndexedItem::IndexedItem()
- : trackIndex ( numeric_limits<uint16_t>::max() )
+ : trackIndex ( std::numeric_limits<uint16_t>::max() )
, trackId ( MP4_INVALID_TRACK_ID )
{
}
diff --git a/src/qtff/ColorParameterBox.h b/src/qtff/ColorParameterBox.h
index 9a27fcd..cfbf81c 100644
--- a/src/qtff/ColorParameterBox.h
+++ b/src/qtff/ColorParameterBox.h
@@ -97,7 +97,7 @@
Item item;
};
- typedef vector<IndexedItem> ItemList;
+ typedef std::vector<IndexedItem> ItemList;
static bool list( MP4FileHandle file, ItemList& itemList );
diff --git a/src/qtff/PictureAspectRatioBox.cpp b/src/qtff/PictureAspectRatioBox.cpp
index 4fe5916..3fbacb1 100644
--- a/src/qtff/PictureAspectRatioBox.cpp
+++ b/src/qtff/PictureAspectRatioBox.cpp
@@ -217,7 +217,7 @@
///////////////////////////////////////////////////////////////////////////////
PictureAspectRatioBox::IndexedItem::IndexedItem()
- : trackIndex ( numeric_limits<uint16_t>::max() )
+ : trackIndex ( std::numeric_limits<uint16_t>::max() )
, trackId ( MP4_INVALID_TRACK_ID )
{
}
diff --git a/src/qtff/coding.cpp b/src/qtff/coding.cpp
index 29eaf77..3b8154a 100644
--- a/src/qtff/coding.cpp
+++ b/src/qtff/coding.cpp
@@ -37,7 +37,7 @@
supportedCodings.insert( "mp4v" );
}
- set<string> supportedCodings;
+ std::set<string> supportedCodings;
};
const StaticData STATIC_DATA;
@@ -51,7 +51,7 @@
coding = NULL;
MP4File& mp4 = *((MP4File*)file);
- if( trackIndex == numeric_limits<uint16_t>::max() ) {
+ if( trackIndex == std::numeric_limits<uint16_t>::max() ) {
ostringstream xss;
xss << "invalid track-index: " << trackIndex;
throw new Exception( xss.str(), __FILE__, __LINE__, __FUNCTION__ );
diff --git a/src/text.h b/src/text.h
index 4afd336..5cb8d7a 100644
--- a/src/text.h
+++ b/src/text.h
@@ -5,7 +5,7 @@
///////////////////////////////////////////////////////////////////////////////
-struct MP4V2_EXPORT LessIgnoreCase : less<string>
+struct MP4V2_EXPORT LessIgnoreCase : std::less<string>
{
bool operator()( const string&, const string& ) const;
};
diff --git a/util/mp4art.cpp b/util/mp4art.cpp
index add935e..57fbe13 100644
--- a/util/mp4art.cpp
+++ b/util/mp4art.cpp
@@ -55,7 +55,7 @@
struct ArtType {
string name;
string ext;
- vector<string> cwarns; // compatibility warnings
+ std::vector<string> cwarns; // compatibility warnings
string cerror; // compatibility error
};
@@ -84,7 +84,7 @@
, _actionGroup ( "ACTIONS" )
, _parmGroup ( "ACTION PARAMETERS" )
, _action ( NULL )
- , _artFilter ( numeric_limits<uint32_t>::max() )
+ , _artFilter ( std::numeric_limits<uint32_t>::max() )
{
// add standard options which make sense for this utility
_group.add( STD_OPTIMIZE );
@@ -127,7 +127,7 @@
if( in.open() )
return herrf( "unable to open %s for read: %s\n", _artImageFile.c_str(), sys::getLastErrorStr() );
- const uint32_t max = numeric_limits<uint32_t>::max();
+ const uint32_t max = std::numeric_limits<uint32_t>::max();
if( in.size > max )
return herrf( "file too large: %s (exceeds %u bytes)\n", _artImageFile.c_str(), max );
@@ -166,7 +166,7 @@
return herrf( "unable to open for read: %s\n", job.file.c_str() );
// single-mode
- if( _artFilter != numeric_limits<uint32_t>::max() ) {
+ if( _artFilter != std::numeric_limits<uint32_t>::max() ) {
CoverArtBox::Item item;
if( CoverArtBox::get( job.fileHandle, item, _artFilter ))
return herrf( "unable to retrieve covr-box (index=%d): %s\n", _artFilter, job.file.c_str() );
@@ -226,21 +226,20 @@
int line = 0;
const CoverArtBox::ItemList::size_type max = items.size();
for( CoverArtBox::ItemList::size_type i = 0; i < max; i++ ) {
- if( _artFilter != numeric_limits<uint32_t>::max() && _artFilter != i )
- continue;
+ if (_artFilter != std::numeric_limits<uint32_t>::max() && _artFilter != i)
+ continue;
- CoverArtBox::Item& item = items[i];
- const uint32_t crc = crc32( item.buffer, item.size );
+ CoverArtBox::Item& item = items[i];
+ const uint32_t crc = crc32(item.buffer, item.size);
- report << setw(widx) << right << i
- << sep << setw(wsize) << item.size
- << sep << setw(8) << setfill('0') << hex << crc << setfill(' ') << dec
- << sep << setw(wtype) << left << enumBasicType.toString( item.type );
+ report << setw(widx) << right << i << sep << setw(wsize) << item.size
+ << sep << setw(8) << setfill('0') << hex << crc << setfill(' ')
+ << dec << sep << setw(wtype) << left
+ << enumBasicType.toString(item.type);
- if( line++ == 0 )
- report << sep << setw(0) << job.file;
+ if (line++ == 0) report << sep << setw(0) << job.file;
- report << '\n';
+ report << '\n';
}
verbose1f( "%s", report.str().c_str() );
@@ -256,7 +255,7 @@
if( job.fileHandle == MP4_INVALID_FILE_HANDLE )
return herrf( "unable to open for write: %s\n", job.file.c_str() );
- if( _artFilter == numeric_limits<uint32_t>::max() )
+ if( _artFilter == std::numeric_limits<uint32_t>::max() )
verbose1f( "removing covr-box (all) from %s\n", job.file.c_str() );
else
verbose1f( "removing covr-box (index=%d) from %s\n", _artFilter, job.file.c_str() );
@@ -279,7 +278,7 @@
if( in.open() )
return herrf( "unable to open %s for read: %s\n", _artImageFile.c_str(), sys::getLastErrorStr() );
- const uint32_t max = numeric_limits<uint32_t>::max();
+ const uint32_t max = std::numeric_limits<uint32_t>::max();
if( in.size > max )
return herrf( "file too large: %s (exceeds %u bytes)\n", _artImageFile.c_str(), max );
@@ -294,7 +293,7 @@
in.close();
- if( _artFilter == numeric_limits<uint32_t>::max() )
+ if( _artFilter == std::numeric_limits<uint32_t>::max() )
verbose1f( "replacing %s -> %s (all)\n", _artImageFile.c_str(), job.file.c_str() );
else
verbose1f( "replacing %s -> %s (index=%d)\n", _artImageFile.c_str(), job.file.c_str(), _artFilter );
@@ -378,7 +377,7 @@
switch( code ) {
case LC_ART_ANY:
- _artFilter = numeric_limits<uint32_t>::max();
+ _artFilter = std::numeric_limits<uint32_t>::max();
break;
case LC_ART_INDEX:
diff --git a/util/mp4chaps.cpp b/util/mp4chaps.cpp
index 98400f8..8b85fc9 100644
--- a/util/mp4chaps.cpp
+++ b/util/mp4chaps.cpp
@@ -93,7 +93,7 @@
void fixQtScale(MP4FileHandle );
MP4TrackId getReferencingTrack( MP4FileHandle, bool& );
string getChapterTypeName( MP4ChapterType ) const;
- bool parseChapterFile( const string, vector<MP4Chapter_t>&, Timecode::Format& );
+ bool parseChapterFile( const string, std::vector<MP4Chapter_t>&, Timecode::Format& );
bool readChapterFile( const string, char**, File::Size& );
MP4Duration convertFrameToMillis( MP4Duration, uint32_t );
@@ -300,7 +300,7 @@
Timecode chapterDuration( _ChaptersEvery * 1000, CHAPTERTIMESCALE );
chapterDuration.setFormat( Timecode::DECIMAL );
- vector<MP4Chapter_t> chapters;
+ std::vector<MP4Chapter_t> chapters;
do
{
@@ -450,7 +450,7 @@
bool
ChapterUtility::actionImport( JobContext& job )
{
- vector<MP4Chapter_t> chapters;
+ std::vector<MP4Chapter_t> chapters;
Timecode::Format format;
// create the chapter file name
@@ -509,7 +509,7 @@
refTrackDuration.setScale( CHAPTERTIMESCALE );
// check for chapters starting after duration of reftrack
- for( vector<MP4Chapter_t>::iterator it = chapters.begin(); it != chapters.end(); )
+ for( std::vector<MP4Chapter_t>::iterator it = chapters.begin(); it != chapters.end(); )
{
Timecode curr( (*it).duration, CHAPTERTIMESCALE );
if( refTrackDuration <= curr )
@@ -538,7 +538,7 @@
framerate = static_cast<uint32_t>( std::ceil( ((double)sampleCount / (double)tmpcd.duration) * CHAPTERTIMESCALE ) );
}
- for( vector<MP4Chapter_t>::iterator it = chapters.begin(); it != chapters.end(); ++it )
+ for( std::vector<MP4Chapter_t>::iterator it = chapters.begin(); it != chapters.end(); ++it )
{
MP4Duration currDur = (*it).duration;
MP4Duration nextDur = chapters.end() == it+1 ? refTrackDuration.duration : (*(it+1)).duration;
@@ -880,7 +880,7 @@
* @return true if there was an error, false otherwise
*/
bool
-ChapterUtility::parseChapterFile( const string filename, vector<MP4Chapter_t>& chapters, Timecode::Format& format )
+ChapterUtility::parseChapterFile( const string filename, std::vector<MP4Chapter_t>& chapters, Timecode::Format& format )
{
// get the content
char * inBuf;