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

Unified Diff: media/cast/logging/stats_serializer.h

Issue 184853003: Cast: Add GetStats() extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
Index: media/cast/logging/stats_serializer.h
diff --git a/media/cast/logging/stats_serializer.h b/media/cast/logging/stats_serializer.h
new file mode 100644
index 0000000000000000000000000000000000000000..81879efde83c67f4bdcba512319472dfe2d37a8d
--- /dev/null
+++ b/media/cast/logging/stats_serializer.h
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
Alpha Left Google 2014/03/03 07:11:39 I don't think we need to serialize the stats to JS
imcheng 2014/03/04 02:06:24 Done. I will rename this class to StatsConverter?
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_CAST_LOGGING_STATS_SERIALIZER_H_
+#define MEDIA_CAST_LOGGING_STATS_SERIALIZER_H_
+
+#include "media/cast/logging/logging_defines.h"
+
+namespace media {
+namespace cast {
+
+// Writes stats provided in |frame_stats_map| and |packet_stats_map| in JSON
+// format to |out|. See the .cc file for format. Returns |true| if serialization
+// was successful.
+bool SerializeStats(const FrameStatsMap& frame_stats_map,
+ const PacketStatsMap& packet_stats_map,
+ std::string* out);
+
+} // namespace cast
+} // namespace media
+
+#endif // MEDIA_CAST_LOGGING_STATS_SERIALIZER_H_

Powered by Google App Engine
This is Rietveld 408576698