/* * Copyright (c) 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_ENCODER_RTC_EVENT_LOG_ENCODER_NEW_FORMAT_H_ #define LOGGING_RTC_EVENT_LOG_ENCODER_RTC_EVENT_LOG_ENCODER_NEW_FORMAT_H_ #include #include #include #include #include #include "api/array_view.h" #include "logging/rtc_event_log/encoder/rtc_event_log_encoder.h" namespace webrtc { namespace rtclog2 { class EventStream; // Auto-generated from protobuf. } // namespace rtclog2 class RtcEventAlrState; class RtcEventRouteChange; class RtcEventRemoteEstimate; class RtcEventAudioNetworkAdaptation; class RtcEventAudioPlayout; class RtcEventAudioReceiveStreamConfig; class RtcEventAudioSendStreamConfig; class RtcEventBweUpdateDelayBased; class RtcEventBweUpdateLossBased; class RtcEventDtlsTransportState; class RtcEventDtlsWritableState; class RtcEventLoggingStarted; class RtcEventLoggingStopped; class RtcEventNetEqSetMinimumDelay; class RtcEventProbeClusterCreated; class RtcEventProbeResultFailure; class RtcEventProbeResultSuccess; class RtcEventRtcpPacketIncoming; class RtcEventRtcpPacketOutgoing; class RtcEventRtpPacketIncoming; class RtcEventRtpPacketOutgoing; class RtcEventVideoReceiveStreamConfig; class RtcEventVideoSendStreamConfig; class RtcEventIceCandidatePairConfig; class RtcEventIceCandidatePair; class RtpPacket; class RtcEventFrameDecoded; class RtcEventGenericAckReceived; class RtcEventGenericPacketReceived; class RtcEventGenericPacketSent; class RtcEventLogEncoderNewFormat final : public RtcEventLogEncoder { public: RtcEventLogEncoderNewFormat(); ~RtcEventLogEncoderNewFormat() override = default; std::string EncodeBatch( std::deque>::const_iterator begin, std::deque>::const_iterator end) override; std::string EncodeLogStart(int64_t timestamp_us, int64_t utc_time_us) override; std::string EncodeLogEnd(int64_t timestamp_us) override; private: bool encode_neteq_set_minimum_delay_kill_switch_ = false; // Encoding entry-point for the various RtcEvent subclasses. void EncodeAlrState(rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeAudioNetworkAdaptation( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeAudioPlayout(rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeAudioRecvStreamConfig( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeAudioSendStreamConfig( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeBweUpdateDelayBased( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeBweUpdateLossBased( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeDtlsTransportState( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeDtlsWritableState( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeFramesDecoded( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeGenericAcksReceived( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeGenericPacketsReceived( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeGenericPacketsSent( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeIceCandidatePairConfig( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeIceCandidatePairEvent( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeLoggingStarted(rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeLoggingStopped(rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeNetEqSetMinimumDelay( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeProbeClusterCreated( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeProbeResultFailure( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeProbeResultSuccess( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeRouteChange(rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeRemoteEstimate(rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeRtcpPacketIncoming( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeRtcpPacketOutgoing( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeRtpPacketIncoming( const std::map>& batch, rtclog2::EventStream* event_stream); void EncodeRtpPacketOutgoing( const std::map>& batch, rtclog2::EventStream* event_stream); void EncodeVideoRecvStreamConfig( rtc::ArrayView batch, rtclog2::EventStream* event_stream); void EncodeVideoSendStreamConfig( rtc::ArrayView batch, rtclog2::EventStream* event_stream); }; } // namespace webrtc #endif // LOGGING_RTC_EVENT_LOG_ENCODER_RTC_EVENT_LOG_ENCODER_NEW_FORMAT_H_