Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: webrtc/logging/rtc_event_log/rtc_event_log_parser.h

Issue 2855143002: Removed RtcEventLog deps to call:call_interfaces. (Closed)
Patch Set: Made GetSend/ReceiveConfig private. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/logging/rtc_event_log/rtc_event_log_parser.h
diff --git a/webrtc/logging/rtc_event_log/rtc_event_log_parser.h b/webrtc/logging/rtc_event_log/rtc_event_log_parser.h
index 966f00dfe031132ec9592190694bfbb3d01358b9..9e273ffbab1a1f6e0843c01ef87dd5af37971a15 100644
--- a/webrtc/logging/rtc_event_log/rtc_event_log_parser.h
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_parser.h
@@ -74,6 +74,8 @@ class ParsedRtcEventLog {
BWE_PROBE_RESULT_EVENT = 18
};
+ enum class MediaType { ANY, AUDIO, VIDEO, DATA };
+
// Reads an RtcEventLog file and returns true if parsing was successful.
bool ParseFile(const std::string& file_name);
@@ -92,25 +94,23 @@ class ParsedRtcEventLog {
// Reads the event type of the rtclog::Event at |index|.
EventType GetEventType(size_t index) const;
- // Reads the header, direction, media type, header length and packet length
- // from the RTP event at |index|, and stores the values in the corresponding
- // output parameters. Each output parameter can be set to nullptr if that
- // value isn't needed.
+ // Reads the header, direction, header length and packet length from the RTP
+ // event at |index|, and stores the values in the corresponding output
+ // parameters. Each output parameter can be set to nullptr if that value
+ // isn't needed.
// NB: The header must have space for at least IP_PACKET_SIZE bytes.
void GetRtpHeader(size_t index,
PacketDirection* incoming,
- MediaType* media_type,
uint8_t* header,
size_t* header_length,
size_t* total_length) const;
- // Reads packet, direction, media type and packet length from the RTCP event
- // at |index|, and stores the values in the corresponding output parameters.
+ // Reads packet, direction and packet length from the RTCP event at |index|,
+ // and stores the values in the corresponding output parameters.
// Each output parameter can be set to nullptr if that value isn't needed.
// NB: The packet must have space for at least IP_PACKET_SIZE bytes.
void GetRtcpPacket(size_t index,
PacketDirection* incoming,
- MediaType* media_type,
uint8_t* packet,
size_t* length) const;
@@ -158,13 +158,36 @@ class ParsedRtcEventLog {
void GetAudioNetworkAdaptation(size_t index,
AudioEncoderRuntimeConfig* config) const;
- ParsedRtcEventLog::BweProbeClusterCreatedEvent GetBweProbeClusterCreated(
- size_t index) const;
+ BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const;
- ParsedRtcEventLog::BweProbeResultEvent GetBweProbeResult(size_t index) const;
+ BweProbeResultEvent GetBweProbeResult(size_t index) const;
+
+ MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const;
private:
+ void GetVideoReceiveConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
+ void GetVideoSendConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
+ void GetAudioReceiveConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
+ void GetAudioSendConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
+
std::vector<rtclog::Event> events_;
+
+ struct Stream {
+ Stream(uint32_t ssrc,
+ MediaType media_type,
+ webrtc::PacketDirection direction)
+ : ssrc(ssrc), media_type(media_type), direction(direction) {}
+ uint32_t ssrc;
+ MediaType media_type;
+ webrtc::PacketDirection direction;
+ };
+
+ // All configured streams found in the event log.
+ std::vector<Stream> streams_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log2text.cc ('k') | webrtc/logging/rtc_event_log/rtc_event_log_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698