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

Unified Diff: webrtc/modules/audio_coding/main/acm2/acm_dump.h

Issue 1200833002: Reland "Added ACM_dump protobuf, class for reading/writing and..." (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix for gn build file, so it no longer breaks Chromium. Created 5 years, 6 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 | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/main/acm2/acm_dump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/acm2/acm_dump.h
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_dump.h b/webrtc/modules/audio_coding/main/acm2/acm_dump.h
new file mode 100644
index 0000000000000000000000000000000000000000..c72c3870965f4883f68a0ca10d06ee91337f8463
--- /dev/null
+++ b/webrtc/modules/audio_coding/main/acm2/acm_dump.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_DUMP_H_
+#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_DUMP_H_
+
+#include <string>
+
+#include "webrtc/base/scoped_ptr.h"
+
+namespace webrtc {
+
+// Forward declaration of storage class that is automatically generated from
+// the protobuf file.
+class ACMDumpEventStream;
+
+class AcmDumpImpl;
+
+class AcmDump {
+ public:
+ // The types of debug events that are currently supported for logging.
+ enum class DebugEvent { kLogStart, kLogEnd, kAudioPlayout };
+
+ virtual ~AcmDump() {}
+
+ static rtc::scoped_ptr<AcmDump> Create();
+
+ // Starts logging for the specified duration to the specified file.
+ // The logging will stop automatically after the specified duration.
+ // If the file already exists it will be overwritten.
+ // The function will return false on failure.
+ virtual void StartLogging(const std::string& file_name, int duration_ms) = 0;
+
+ // Logs an incoming or outgoing RTP packet.
+ virtual void LogRtpPacket(bool incoming,
+ const uint8_t* packet,
+ size_t length) = 0;
+
+ // Logs a debug event, with optional message.
+ virtual void LogDebugEvent(DebugEvent event_type,
+ const std::string& event_message) = 0;
+ virtual void LogDebugEvent(DebugEvent event_type) = 0;
+
+ // Reads an AcmDump file and returns true when reading was successful.
+ // The result is stored in the given ACMDumpEventStream object.
+ static bool ParseAcmDump(const std::string& file_name,
+ ACMDumpEventStream* result);
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_DUMP_H_
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/main/acm2/acm_dump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698