mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 07:10:38 +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}
31 lines
1,004 B
C++
31 lines
1,004 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.
|
|
*/
|
|
|
|
#ifndef LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_H_
|
|
#define LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "logging/rtc_event_log/rtc_event_log_factory_interface.h"
|
|
|
|
namespace webrtc {
|
|
|
|
class RtcEventLogFactory : public RtcEventLogFactoryInterface {
|
|
public:
|
|
~RtcEventLogFactory() override {}
|
|
|
|
std::unique_ptr<RtcEventLog> CreateRtcEventLog(
|
|
RtcEventLog::EncodingType encoding_type) override;
|
|
};
|
|
|
|
std::unique_ptr<RtcEventLogFactoryInterface> CreateRtcEventLogFactory();
|
|
} // namespace webrtc
|
|
|
|
#endif // LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_H_
|