xref: /aosp_15_r20/external/webrtc/rtc_tools/rtc_event_log_to_text/converter.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef RTC_TOOLS_RTC_EVENT_LOG_TO_TEXT_CONVERTER_H_
12 #define RTC_TOOLS_RTC_EVENT_LOG_TO_TEXT_CONVERTER_H_
13 
14 #include <stdio.h>
15 
16 #include <string>
17 
18 #include "absl/base/attributes.h"
19 #include "logging/rtc_event_log/rtc_event_log_parser.h"
20 
21 namespace webrtc {
22 
23 // Parses events from file `inputfile` and prints human readable text
24 // representations to `output`. The output is sorted by log time.
25 // `handle_unconfigured_extensions` controls the policy for parsing RTP
26 // header extensions if the log doesn't contain a mapping between the
27 // header extensions and numerical IDs.
28 ABSL_MUST_USE_RESULT bool Convert(
29     std::string inputfile,
30     FILE* output,
31     ParsedRtcEventLog::UnconfiguredHeaderExtensions
32         handle_unconfigured_extensions);
33 
34 }  // namespace webrtc
35 
36 #endif  // RTC_TOOLS_RTC_EVENT_LOG_TO_TEXT_CONVERTER_H_
37