Skip to content

Commit fe788c9

Browse files
author
Clement Champetier
committed
ProfileLoader: can print a profile
Useful for debugging.
1 parent b1aef13 commit fe788c9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/AvTranscoder/profile/ProfileLoader.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,12 @@ bool ProfileLoader::checkAudioProfile( const Profile& profileToCheck )
204204
return isValid;
205205
}
206206

207+
// To print a profile
208+
std::ostream &operator<<( std::ostream &os, const ProfileLoader::Profile &profile )
209+
{
210+
for( ProfileLoader::Profile::const_iterator it = profile.begin(); it != profile.end(); ++it )
211+
os << "(" << it->first << ", " << it->second << ")" << std::endl;
212+
return os;
213+
}
214+
207215
}

src/AvTranscoder/profile/ProfileLoader.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <string>
77
#include <vector>
88
#include <map>
9+
#include <iostream>
910

1011
namespace avtranscoder
1112
{
@@ -73,5 +74,8 @@ class AvExport ProfileLoader
7374
Profiles _profiles;
7475
};
7576

77+
// To print a profile
78+
std::ostream &operator<<( std::ostream &os, const ProfileLoader::Profile &profile );
79+
7680
}
7781
#endif

0 commit comments

Comments
 (0)