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

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

Issue 2554003002: Make ostream<< for enum class H264PacketizationMode (Closed)
Patch Set: 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
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..b79401a7bebb2499812f5782c584bcb2f1486dad 100644
--- a/webrtc/modules/include/module_common_types.h
+++ b/webrtc/modules/include/module_common_types.h
@@ -271,6 +271,21 @@ 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.
sprang_webrtc 2016/12/06 11:32:55 Could you add a file-level TODO instead (and maybe
kwiberg-webrtc 2016/12/06 11:40:19 I'd really prefer to have this in a .cc file inste
+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') | webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698