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

Unified Diff: webrtc/modules/include/module_common_types.h

Issue 2554003002: Make ostream<< for enum class H264PacketizationMode (Closed)
Patch Set: Fix bug number Created 4 years 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 | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/include/module_common_types.h
diff --git a/webrtc/modules/include/module_common_types.h b/webrtc/modules/include/module_common_types.h
index 3df93b6c89a050fb05603a0d5987a2a7c982a2d8..fa0826a551a456294310af4874aa6ec907247766 100644
--- a/webrtc/modules/include/module_common_types.h
+++ b/webrtc/modules/include/module_common_types.h
@@ -271,6 +271,22 @@ enum class H264PacketizationMode {
SingleNalUnit // Mode 0 - only single NALU allowed
};
+// This function is declared inline because it is not clear which
+// .cc file it should belong to.
+// TODO(hta): Refactor. https://bugs.webrtc.org/6842
+inline std::ostream& operator<<(std::ostream& stream,
+ H264PacketizationMode mode) {
+ switch (mode) {
+ case H264PacketizationMode::NonInterleaved:
+ stream << "NonInterleaved";
+ break;
+ case H264PacketizationMode::SingleNalUnit:
+ stream << "SingleNalUnit";
+ break;
+ }
+ return stream;
+}
+
struct NaluInfo {
uint8_t type;
int sps_id;
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698