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

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

Issue 2855143002: Removed RtcEventLog deps to call:call_interfaces. (Closed)
Patch Set: Formatting. 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..fea3e685f839450a5fd39a4e66d47125076b340a 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,42 +94,48 @@ 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;
// Reads a config event to a (non-NULL) StreamConfig struct.
// Only the fields that are stored in the protobuf will be written.
+ void GetVideoReceiveConfig(const rtclog::Event& event,
terelius 2017/05/30 08:11:19 Could we make these helper functions private?
perkj_webrtc 2017/05/30 10:17:54 yes
+ rtclog::StreamConfig* config) const;
void GetVideoReceiveConfig(size_t index, rtclog::StreamConfig* config) const;
// Reads a config event to a (non-NULL) StreamConfig struct.
// Only the fields that are stored in the protobuf will be written.
+ void GetVideoSendConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
void GetVideoSendConfig(size_t index, rtclog::StreamConfig* config) const;
// Reads a config event to a (non-NULL) StreamConfig struct.
// Only the fields that are stored in the protobuf will be written.
+ void GetAudioReceiveConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
void GetAudioReceiveConfig(size_t index, rtclog::StreamConfig* config) const;
// Reads a config event to a (non-NULL) StreamConfig struct.
// Only the fields that are stored in the protobuf will be written.
+ void GetAudioSendConfig(const rtclog::Event& event,
+ rtclog::StreamConfig* config) const;
void GetAudioSendConfig(size_t index, rtclog::StreamConfig* config) const;
// Reads the SSRC from the audio playout event at |index|. The SSRC is stored
@@ -158,13 +166,27 @@ class ParsedRtcEventLog {
void GetAudioNetworkAdaptation(size_t index,
AudioEncoderRuntimeConfig* config) const;
- ParsedRtcEventLog::BweProbeClusterCreatedEvent GetBweProbeClusterCreated(
- size_t index) const;
+ BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const;
+
+ BweProbeResultEvent GetBweProbeResult(size_t index) const;
- ParsedRtcEventLog::BweProbeResultEvent GetBweProbeResult(size_t index) const;
+ MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const;
private:
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