Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: services/media/framework/formatting.h

Issue 1902183002: Motown: Change media type (stream type) representation (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Changes per review feedback. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/media/framework/conversion_pipeline_builder.cc ('k') | services/media/framework/formatting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/framework/formatting.h
diff --git a/services/media/framework/formatting.h b/services/media/framework/formatting.h
index b01919d6d96d0c2121e142e7f165b2e06b0b9ba5..17154abc4429eef6d80148e9b8beca42aee53ebe 100644
--- a/services/media/framework/formatting.h
+++ b/services/media/framework/formatting.h
@@ -50,12 +50,8 @@ inline std::ostream& outdent(std::ostream& os) {
std::ostream& operator<<(std::ostream& os, Result value);
std::ostream& operator<<(std::ostream& os, Demand value);
std::ostream& operator<<(std::ostream& os, const PacketPtr& value);
-std::ostream& operator<<(std::ostream& os, StreamType::Scheme value);
-std::ostream& operator<<(std::ostream& os, LpcmStreamType::SampleFormat value);
-std::ostream& operator<<(std::ostream& os,
- CompressedAudioStreamType::AudioEncoding value);
-std::ostream& operator<<(std::ostream& os,
- VideoStreamType::VideoEncoding value);
+std::ostream& operator<<(std::ostream& os, StreamType::Medium value);
+std::ostream& operator<<(std::ostream& os, AudioStreamType::SampleFormat value);
std::ostream& operator<<(std::ostream& os, VideoStreamType::VideoProfile value);
std::ostream& operator<<(std::ostream& os, VideoStreamType::PixelFormat value);
std::ostream& operator<<(std::ostream& os, VideoStreamType::ColorSpace value);
@@ -81,6 +77,22 @@ std::ostream& operator<<(
std::ostream& os,
const std::unique_ptr<std::vector<std::unique_ptr<StreamTypeSet>>>& value);
+template <typename T>
+std::ostream& operator<<(std::ostream& os, const std::vector<T>& value) {
+ if (value.size() == 0) {
+ return os << "<empty>" << std::endl;
+ } else {
+ os << std::endl;
+ }
+
+ int index = 0;
+ for (const T& element : value) {
+ os << begl << "[" << index++ << "] " << element;
+ }
+
+ return os;
+}
+
} // namespace media
} // namespace mojo
« no previous file with comments | « services/media/framework/conversion_pipeline_builder.cc ('k') | services/media/framework/formatting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698