Internal change
PiperOrigin-RevId: 148351016
Change-Id: I7ff776adb64c72f369a8d89f2bc06c891e6eb35f
diff --git a/libplatform/io/FileSystem.cpp b/libplatform/io/FileSystem.cpp
index 073b026..22dff87 100644
--- a/libplatform/io/FileSystem.cpp
+++ b/libplatform/io/FileSystem.cpp
@@ -92,7 +92,7 @@
}
buf << prefix;
- buf << setfill('0') << setw(8) << number::random32();
+ buf << std::setfill('0') << std::setw(8) << number::random32();
buf << suffix;
name = buf.str();
diff --git a/libutil/Timecode.cpp b/libutil/Timecode.cpp
index 1dbfc14..05e4287 100644
--- a/libutil/Timecode.cpp
+++ b/libutil/Timecode.cpp
@@ -467,22 +467,19 @@
_duration = _subseconds + (iscale * _seconds) + (iscale * _minutes * 60) + (iscale * _hours * 3600);
ostringstream oss;
- oss << setfill('0') << right
- << setw(2) << _hours
- << ':'
- << setw(2) << _minutes
- << ':'
- << setw(2) << _seconds;
+ oss << std::setfill('0') << right << std::setw(2) << _hours << ':'
+ << std::setw(2) << _minutes << ':' << std::setw(2) << _seconds;
switch( _format ) {
case FRAME:
- oss << ':' << setw(2) << setfill( '0' ) << _subseconds;
- break;
+ oss << ':' << std::setw(2) << std::setfill('0') << _subseconds;
+ break;
case DECIMAL:
{
- oss << '.' << setw(3) << setfill( '0' ) << static_cast<uint64_t>(_subseconds / _scale * 1000.0 + 0.5);
- break;
+ oss << '.' << std::setw(3) << std::setfill('0')
+ << static_cast<uint64_t>(_subseconds / _scale * 1000.0 + 0.5);
+ break;
}
}
diff --git a/libutil/TrackModifier.cpp b/libutil/TrackModifier.cpp
index 78593a9..91934fd 100644
--- a/libutil/TrackModifier.cpp
+++ b/libutil/TrackModifier.cpp
@@ -76,21 +76,31 @@
const string eq = " = ";
const string ind = " ";
- out << left << xind << "track[" << trackIndex << "] id=" << trackId
- << '\n' << xind << ind << setw( w ) << "type" << eq << toStringTrackType( handlerType )
- << '\n' << xind << ind << setw( w ) << "enabled" << eq << toString( enabled )
- << '\n' << xind << ind << setw( w ) << "inMovie" << eq << toString( inMovie )
- << '\n' << xind << ind << setw( w ) << "inPreview" << eq << toString( inPreview )
- << '\n' << xind << ind << setw( w ) << "layer" << eq << layer
- << '\n' << xind << ind << setw( w ) << "alternateGroup" << eq << alternateGroup
- << '\n' << xind << ind << setw( w ) << "volume" << eq << toString( volume, 8, 8 )
- << '\n' << xind << ind << setw( w ) << "width" << eq << toString( width, 16, 16 )
- << '\n' << xind << ind << setw( w ) << "height" << eq << toString( height, 16, 16 )
- << '\n' << xind << ind << setw( w ) << "language" << eq << bmff::enumLanguageCode.toString( language, true )
- << '\n' << xind << ind << setw( w ) << "handlerName" << eq << handlerName;
+ out << left << xind << "track[" << trackIndex << "] id=" << trackId << '\n'
+ << xind << ind << std::setw(w) << "type" << eq
+ << toStringTrackType(handlerType) << '\n'
+ << xind << ind << std::setw(w) << "enabled" << eq << toString(enabled)
+ << '\n'
+ << xind << ind << std::setw(w) << "inMovie" << eq << toString(inMovie)
+ << '\n'
+ << xind << ind << std::setw(w) << "inPreview" << eq
+ << toString(inPreview) << '\n'
+ << xind << ind << std::setw(w) << "layer" << eq << layer << '\n'
+ << xind << ind << std::setw(w) << "alternateGroup" << eq
+ << alternateGroup << '\n'
+ << xind << ind << std::setw(w) << "volume" << eq
+ << toString(volume, 8, 8) << '\n'
+ << xind << ind << std::setw(w) << "width" << eq
+ << toString(width, 16, 16) << '\n'
+ << xind << ind << std::setw(w) << "height" << eq
+ << toString(height, 16, 16) << '\n'
+ << xind << ind << std::setw(w) << "language" << eq
+ << bmff::enumLanguageCode.toString(language, true) << '\n'
+ << xind << ind << std::setw(w) << "handlerName" << eq << handlerName;
- out << '\n' << xind << ind << setw( w ) << "userDataName" << eq
- << ( _props.userDataName ? userDataName : "<absent>" );
+ out << '\n'
+ << xind << ind << std::setw(w) << "userDataName" << eq
+ << (_props.userDataName ? userDataName : "<absent>");
out << '\n';
}
@@ -409,7 +419,7 @@
TrackModifier::toString( float value, uint8_t i, uint8_t f )
{
ostringstream oss;
- oss << fixed << setprecision(f <= 8 ? 4 : 8) << value;
+ oss << fixed << std::setprecision(f <= 8 ? 4 : 8) << value;
return oss.str();
}
diff --git a/libutil/Utility.cpp b/libutil/Utility.cpp
index a83b06e..9e1da97 100644
--- a/libutil/Utility.cpp
+++ b/libutil/Utility.cpp
@@ -232,10 +232,12 @@
if( option.lhasarg ) {
oss << option.lname << ' ' << option.argname;
- oss << setw( longMax - option.lname.length() - 1 - option.argname.length() ) << "";
+ oss << std::setw(longMax - option.lname.length() - 1 -
+ option.argname.length())
+ << "";
}
else {
- oss << setw( longMax ) << left << option.lname;
+ oss << std::setw(longMax) << left << option.lname;
}
oss << " ";
@@ -423,17 +425,22 @@
oss << left;
if( extended ) {
- oss << setw(13) << "utility:" << _name
- << '\n' << setw(13) << "product:" << MP4V2_PROJECT_name
- << '\n' << setw(13) << "version:" << MP4V2_PROJECT_version
- << '\n' << setw(13) << "build date:" << MP4V2_PROJECT_build
- << '\n'
- << '\n' << setw(18) << "repository URL:" << MP4V2_PROJECT_repo_url
- << '\n' << setw(18) << "repository root:" << MP4V2_PROJECT_repo_root
- << '\n' << setw(18) << "repository UUID:" << MP4V2_PROJECT_repo_uuid
- << '\n' << setw(18) << "repository rev:" << MP4V2_PROJECT_repo_rev
- << '\n' << setw(18) << "repository date:" << MP4V2_PROJECT_repo_date
- << '\n' << setw(18) << "repository type:" << MP4V2_PROJECT_repo_type;
+ oss << std::setw(13) << "utility:" << _name << '\n'
+ << std::setw(13) << "product:" << MP4V2_PROJECT_name << '\n'
+ << std::setw(13) << "version:" << MP4V2_PROJECT_version << '\n'
+ << std::setw(13) << "build date:" << MP4V2_PROJECT_build << '\n'
+ << '\n'
+ << std::setw(18) << "repository URL:" << MP4V2_PROJECT_repo_url
+ << '\n'
+ << std::setw(18) << "repository root:" << MP4V2_PROJECT_repo_root
+ << '\n'
+ << std::setw(18) << "repository UUID:" << MP4V2_PROJECT_repo_uuid
+ << '\n'
+ << std::setw(18) << "repository rev:" << MP4V2_PROJECT_repo_rev
+ << '\n'
+ << std::setw(18) << "repository date:" << MP4V2_PROJECT_repo_date
+ << '\n'
+ << std::setw(18) << "repository type:" << MP4V2_PROJECT_repo_type;
}
else {
oss << _name << " - " << MP4V2_PROJECT_name_formal;
diff --git a/src/log.cpp b/src/log.cpp
index 41d6aef..b76fdc8 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -436,8 +436,8 @@
// an 8 character, leading 0, hex number. Leave the
// fill character set to 0 for the remaining
// operations
- oneLine << ':' << hex << setw(8) << setfill('0') <<
- std::right << i << setw(0) << setfill(' ') << ": ";
+ oneLine << ':' << std::hex << std::setw(8) << std::setfill('0')
+ << std::right << i << std::setw(0) << std::setfill(' ') << ": ";
uint32_t curlen = min((uint32_t)16,numBytes - i);
const uint8_t *b = pBytes + i;
@@ -445,8 +445,9 @@
for (j = 0;(j < curlen);j++)
{
- oneLine << hex << setw(2) << setfill('0') << right << static_cast<uint32_t>(b[j]);
- oneLine << setw(0) << setfill(' ') << ' ';
+ oneLine << std::hex << std::setw(2) << std::setfill('0') << right
+ << static_cast<uint32_t>(b[j]);
+ oneLine << std::setw(0) << std::setfill(' ') << ' ';
}
for (; j < 16; j++)
diff --git a/src/mp4property.cpp b/src/mp4property.cpp
index 9a5b1e3..dff16e0 100644
--- a/src/mp4property.cpp
+++ b/src/mp4property.cpp
@@ -614,7 +614,8 @@
for( uint32_t i = 0; i < size; i++ ) {
if( i )
oss << ' ';
- oss << hex << setw(2) << setfill('0') << right << static_cast<uint32_t>(value[i]);
+ oss << std::hex << std::setw(2) << std::setfill('0') << right
+ << static_cast<uint32_t>(value[i]);
text << (isprint( static_cast<int>(value[i]) ) ? static_cast<char>(value[i]) : '.');
}
diff --git a/util/mp4art.cpp b/util/mp4art.cpp
index 57fbe13..f1454ca 100644
--- a/util/mp4art.cpp
+++ b/util/mp4art.cpp
@@ -205,14 +205,13 @@
const string sep = " ";
if( _jobCount == 0 ) {
- report << setw(widx) << right << "IDX" << left
- << sep << setw(wsize) << right << "BYTES" << left
- << sep << setw(8) << "CRC32"
- << sep << setw(wtype) << "TYPE"
- << sep << setw(0) << "FILE"
- << '\n';
+ report << std::setw(widx) << right << "IDX" << left << sep
+ << std::setw(wsize) << right << "BYTES" << left << sep
+ << std::setw(8) << "CRC32" << sep << std::setw(wtype) << "TYPE"
+ << sep << std::setw(0) << "FILE" << '\n';
- report << setfill('-') << setw(70) << "" << setfill(' ') << '\n';
+ report << std::setfill('-') << std::setw(70) << "" << std::setfill(' ')
+ << '\n';
}
job.fileHandle = MP4Read( job.file.c_str() );
@@ -232,12 +231,12 @@
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 << std::setw(widx) << right << i << sep << std::setw(wsize)
+ << item.size << sep << std::setw(8) << std::setfill('0')
+ << std::hex << crc << std::setfill(' ') << std::dec << sep
+ << std::setw(wtype) << left << enumBasicType.toString(item.type);
- if (line++ == 0) report << sep << setw(0) << job.file;
+ if (line++ == 0) report << sep << std::setw(0) << job.file;
report << '\n';
}
diff --git a/util/mp4chaps.cpp b/util/mp4chaps.cpp
index 8b85fc9..12095aa 100644
--- a/util/mp4chaps.cpp
+++ b/util/mp4chaps.cpp
@@ -184,15 +184,17 @@
// start output (more or less like mp4box does)
ostringstream report;
- report << getChapterTypeName( chtp ) << ' ' << "Chapters of " << '"' << job.file << '"' << endl;
+ report << getChapterTypeName(chtp) << ' ' << "Chapters of " << '"'
+ << job.file << '"' << std::endl;
Timecode duration(0, CHAPTERTIMESCALE);
duration.setFormat( Timecode::DECIMAL );
for (uint32_t i = 0; i < chapterCount; ++i)
{
// print the infos
- report << '\t' << "Chapter #" << setw( 3 ) << setfill( '0' ) << i+1
- << " - " << duration.svalue << " - " << '"' << chapters[i].title << '"' << endl;
+ report << '\t' << "Chapter #" << std::setw(3) << std::setfill('0')
+ << i + 1 << " - " << duration.svalue << " - " << '"'
+ << chapters[i].title << '"' << std::endl;
// add the duration of this chapter to the sum (is the start time of the next chapter)
duration += Timecode(chapters[i].duration, CHAPTERTIMESCALE);
@@ -233,8 +235,9 @@
}
ostringstream oss;
- oss << "converting chapters in file " << '"' << job.file << '"'
- << " from " << getChapterTypeName( sourceType ) << " to " << getChapterTypeName( _ChapterType ) << endl;
+ oss << "converting chapters in file " << '"' << job.file << '"' << " from "
+ << getChapterTypeName(sourceType) << " to "
+ << getChapterTypeName(_ChapterType) << std::endl;
verbose1f( "%s", oss.str().c_str() );
if( dryrunAbort() )
@@ -273,8 +276,9 @@
ChapterUtility::actionEvery( JobContext& job )
{
ostringstream oss;
- oss << "Setting " << getChapterTypeName( _ChapterType ) << " chapters every "
- << _ChaptersEvery << " seconds in file " << '"' << job.file << '"' << endl;
+ oss << "Setting " << getChapterTypeName(_ChapterType) << " chapters every "
+ << _ChaptersEvery << " seconds in file " << '"' << job.file << '"'
+ << std::endl;
verbose1f( "%s", oss.str().c_str() );
if( dryrunAbort() )
@@ -365,7 +369,8 @@
ostringstream oss;
oss << "Exporting " << chapterCount << " " << getChapterTypeName( chtp );
- oss << " chapters from file " << '"' << job.file << '"' << " into chapter file " << '"' << outName << '"' << endl;
+ oss << " chapters from file " << '"' << job.file << '"'
+ << " into chapter file " << '"' << outName << '"' << std::endl;
verbose1f( "%s", oss.str().c_str() );
if( dryrunAbort() )
@@ -408,9 +413,11 @@
switch( _ChapterFormat )
{
case CHPT_FMT_COMMON:
- oss << "CHAPTER" << setw( width ) << setfill( '0' ) << i+1 << '=' << duration.svalue << LINEND
- << "CHAPTER" << setw( width ) << setfill( '0' ) << i+1 << "NAME=" << chapters[i].title << LINEND;
- break;
+ oss << "CHAPTER" << std::setw(width) << std::setfill('0') << i + 1
+ << '=' << duration.svalue << LINEND << "CHAPTER"
+ << std::setw(width) << std::setfill('0') << i + 1
+ << "NAME=" << chapters[i].title << LINEND;
+ break;
case CHPT_FMT_NATIVE:
default:
oss << duration.svalue << ' ' << chapters[i].title << LINEND;
@@ -472,7 +479,8 @@
ostringstream oss;
oss << "Importing " << chapters.size() << " " << getChapterTypeName( _ChapterType );
- oss << " chapters from file " << inName << " into file " << '"' << job.file << '"' << endl;
+ oss << " chapters from file " << inName << " into file " << '"' << job.file
+ << '"' << std::endl;
verbose1f( "%s", oss.str().c_str() );
if( dryrunAbort() )
@@ -578,7 +586,8 @@
ChapterUtility::actionRemove( JobContext& job )
{
ostringstream oss;
- oss << "Deleting " << getChapterTypeName( _ChapterType ) << " chapters from file " << '"' << job.file << '"' << endl;
+ oss << "Deleting " << getChapterTypeName(_ChapterType)
+ << " chapters from file " << '"' << job.file << '"' << std::endl;
verbose1f( "%s", oss.str().c_str() );
if( dryrunAbort() )
diff --git a/util/mp4file.cpp b/util/mp4file.cpp
index c27844b..bd33f61 100644
--- a/util/mp4file.cpp
+++ b/util/mp4file.cpp
@@ -115,13 +115,13 @@
const string sep = " ";
if( _jobCount == 0 ) {
- report << setw(wbrand) << left << "BRAND"
- << sep << setw(wcompat) << left << "COMPAT"
- << sep << setw(wsizing) << left << "SIZING"
- << sep << setw(0) << "FILE"
- << '\n';
+ report << std::setw(wbrand) << left << "BRAND" << sep
+ << std::setw(wcompat) << left << "COMPAT" << sep
+ << std::setw(wsizing) << left << "SIZING" << sep << std::setw(0)
+ << "FILE" << '\n';
- report << setfill('-') << setw(70) << "" << setfill(' ') << '\n';
+ report << std::setfill('-') << std::setw(70) << "" << std::setfill(' ')
+ << '\n';
}
job.fileHandle = MP4Read( job.file.c_str() );
@@ -145,11 +145,9 @@
const bool sizing = info.nlargesize | info.nversion1 | info.nspecial;
- report << setw(wbrand) << left << info.major_brand
- << sep << setw(wcompat) << left << compat
- << sep << setw(wsizing) << left << (sizing ? "64-bit" : "32-bit")
- << sep << job.file
- << '\n';
+ report << std::setw(wbrand) << left << info.major_brand << sep
+ << std::setw(wcompat) << left << compat << sep << std::setw(wsizing)
+ << left << (sizing ? "64-bit" : "32-bit") << sep << job.file << '\n';
verbose1f( "%s", report.str().c_str() );
return SUCCESS;
diff --git a/util/mp4track.cpp b/util/mp4track.cpp
index d550506..90675c9 100644
--- a/util/mp4track.cpp
+++ b/util/mp4track.cpp
@@ -280,16 +280,14 @@
const string sep = " ";
if( _jobCount == 0 ) {
- report << setw(widx) << right << "IDX"
- << sep << setw(wid) << "ID"
- << sep << setw(wtype) << left << "TYPE"
- << sep << setw(wparm) << right << "PRIMRY"
- << sep << setw(wparm) << right << "XFERFN"
- << sep << setw(wparm) << right << "MATRIX"
- << sep << setw(0) << "FILE"
- << '\n';
+ report << std::setw(widx) << right << "IDX" << sep << std::setw(wid)
+ << "ID" << sep << std::setw(wtype) << left << "TYPE" << sep
+ << std::setw(wparm) << right << "PRIMRY" << sep << std::setw(wparm)
+ << right << "XFERFN" << sep << std::setw(wparm) << right
+ << "MATRIX" << sep << std::setw(0) << "FILE" << '\n';
- report << setfill('-') << setw(70) << "" << setfill(' ') << '\n';
+ report << std::setfill('-') << std::setw(70) << "" << std::setfill(' ')
+ << '\n';
}
qtff::ColorParameterBox::ItemList itemList;
@@ -304,15 +302,14 @@
if( !type)
type = "unknown";
- report << right << setw(widx) << xitem.trackIndex
- << sep << setw(wid) << xitem.trackId
- << sep << setw(wtype) << left << toStringTrackType( type )
- << sep << setw(wparm) << right << xitem.item.primariesIndex
- << sep << setw(wparm) << right << xitem.item.transferFunctionIndex
- << sep << setw(wparm) << right << xitem.item.matrixIndex;
+ report << right << std::setw(widx) << xitem.trackIndex << sep
+ << std::setw(wid) << xitem.trackId << sep << std::setw(wtype)
+ << left << toStringTrackType(type) << sep << std::setw(wparm)
+ << right << xitem.item.primariesIndex << sep << std::setw(wparm)
+ << right << xitem.item.transferFunctionIndex << sep
+ << std::setw(wparm) << right << xitem.item.matrixIndex;
- if( i == 0 )
- report << sep << setw(0) << job.file;
+ if (i == 0) report << sep << std::setw(0) << job.file;
report << '\n';
}
@@ -545,15 +542,13 @@
const string sep = " ";
if( _jobCount == 0 ) {
- report << setw(widx) << right << "IDX"
- << sep << setw(wid) << "ID"
- << sep << setw(wtype) << left << "TYPE"
- << sep << setw(wparm) << right << "hSPACE"
- << sep << setw(wparm) << right << "vSPACE"
- << sep << setw(0) << "FILE"
- << '\n';
+ report << std::setw(widx) << right << "IDX" << sep << std::setw(wid)
+ << "ID" << sep << std::setw(wtype) << left << "TYPE" << sep
+ << std::setw(wparm) << right << "hSPACE" << sep << std::setw(wparm)
+ << right << "vSPACE" << sep << std::setw(0) << "FILE" << '\n';
- report << setfill('-') << setw(70) << "" << setfill(' ') << '\n';
+ report << std::setfill('-') << std::setw(70) << "" << std::setfill(' ')
+ << '\n';
}
qtff::PictureAspectRatioBox::ItemList itemList;
@@ -568,14 +563,13 @@
if( !type)
type = "unknown";
- report << right << setw(widx) << xitem.trackIndex
- << sep << setw(wid) << xitem.trackId
- << sep << setw(wtype) << left << toStringTrackType( type )
- << sep << setw(wparm) << right << xitem.item.hSpacing
- << sep << setw(wparm) << right << xitem.item.vSpacing;
+ report << right << std::setw(widx) << xitem.trackIndex << sep
+ << std::setw(wid) << xitem.trackId << sep << std::setw(wtype)
+ << left << toStringTrackType(type) << sep << std::setw(wparm)
+ << right << xitem.item.hSpacing << sep << std::setw(wparm)
+ << right << xitem.item.vSpacing;
- if( i == 0 )
- report << sep << setw(0) << job.file;
+ if (i == 0) report << sep << std::setw(0) << job.file;
report << '\n';
}