mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-17 15:47:53 +01:00

RtcEventLogImpl no longer hard-codes the way encoding is done. It now relies on RtcEventEncoder for it. This gives two benefits: 1. We can decide between the current encoding and the new encoding (which is still WIP) without code duplication (no need for RtcEventLogImplNew). 2. Encoding is done only when the event needs to be written to a file. This both avoids unnecessary encoding of events which don't end up getting written to a file, as well as is useful for the new, delta-based encoding, which is stateful. BUG=webrtc:8111 Change-Id: I9517132e5f96b8059002a66fde8d42d3a678c3bb Reviewed-on: https://webrtc-review.googlesource.com/1365 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Elad Alon <eladalon@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20118}
26 lines
882 B
C++
26 lines
882 B
C++
/*
|
|
* Copyright 2017 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.
|
|
*/
|
|
|
|
#include "logging/rtc_event_log/rtc_event_log_factory.h"
|
|
|
|
#include "logging/rtc_event_log/rtc_event_log.h"
|
|
|
|
namespace webrtc {
|
|
|
|
std::unique_ptr<RtcEventLog> RtcEventLogFactory::CreateRtcEventLog(
|
|
RtcEventLog::EncodingType encoding_type) {
|
|
return RtcEventLog::Create(encoding_type);
|
|
}
|
|
|
|
std::unique_ptr<RtcEventLogFactoryInterface> CreateRtcEventLogFactory() {
|
|
return std::unique_ptr<RtcEventLogFactoryInterface>(new RtcEventLogFactory());
|
|
}
|
|
|
|
} // namespace webrtc
|