Create RtcEventLogEncoderLegacy

We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working.

This CL introduces RtcEventLogEncoderLegacy, which takes provides the encoding currently done by RtcEventLogImpl. After this, we can modify RtcEventLogImpl to use a dynamically chosen encoding, allowing us to easily choose between the current encoding and the new one on which we're working.

BUG=webrtc:8111
TBR=stefan@webrtc.org

Change-Id: I3dde7e222a40a117549a094a59b04219467f490a
Reviewed-on: https://webrtc-review.googlesource.com/1364
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20116}
This commit is contained in:
Elad Alon
2017-10-03 15:01:03 +02:00
parent 729b9109ca
commit 1d87b0e40f
21 changed files with 1323 additions and 38 deletions

View File

@ -373,7 +373,7 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
}
case ParsedRtcEventLog::RTP_EVENT: {
RtpHeaderExtensionMap* extension_map = parsed_log_.GetRtpHeader(
i, &direction, header, &header_length, &total_length);
i, &direction, header, &header_length, &total_length, nullptr);
RtpUtility::RtpHeaderParser rtp_parser(header, header_length);
RTPHeader parsed_header;
if (extension_map != nullptr) {
@ -923,7 +923,8 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
for (size_t i = 0; i < parsed_log_.GetNumberOfEvents(); i++) {
ParsedRtcEventLog::EventType event_type = parsed_log_.GetEventType(i);
if (event_type == ParsedRtcEventLog::RTP_EVENT) {
parsed_log_.GetRtpHeader(i, &direction, nullptr, nullptr, &total_length);
parsed_log_.GetRtpHeader(i, &direction, nullptr, nullptr, &total_length,
nullptr);
if (direction == desired_direction) {
uint64_t timestamp = parsed_log_.GetTimestamp(i);
packets.push_back(TimestampSize(timestamp, total_length));
@ -999,6 +1000,8 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
case BandwidthUsage::kBwOverusing:
last_series = &overusing_series;
break;
case BandwidthUsage::kLast:
RTC_NOTREACHED();
}
}