Plot bitrate allocation per layer based on RTCP XR target bitrate.

Bug: webrtc:10312
Change-Id: Ic0221e71d27d1fdc35c50a93e7e2303953c4fbf5
Reviewed-on: https://webrtc-review.googlesource.com/c/123222
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26717}
This commit is contained in:
Bjorn Terelius
2019-02-15 17:29:58 +01:00
committed by Commit Bot
parent b03ab7107c
commit 9775a58a76
3 changed files with 86 additions and 0 deletions

View File

@ -81,6 +81,7 @@ class EventLogAnalyzer {
bool show_alr_state = false);
void CreateStreamBitrateGraph(PacketDirection direction, Plot* plot);
void CreateBitrateAllocationGraph(PacketDirection direction, Plot* plot);
void CreateSendSideBweSimulationGraph(Plot* plot);
void CreateReceiveSideBweSimulationGraph(Plot* plot);
@ -132,6 +133,25 @@ class EventLogAnalyzer {
void PrintNotifications(FILE* file);
private:
struct LayerDescription {
LayerDescription(uint32_t ssrc,
uint8_t spatial_layer,
uint8_t temporal_layer)
: ssrc(ssrc),
spatial_layer(spatial_layer),
temporal_layer(temporal_layer) {}
bool operator<(const LayerDescription& other) const {
if (ssrc != other.ssrc)
return ssrc < other.ssrc;
if (spatial_layer != other.spatial_layer)
return spatial_layer < other.spatial_layer;
return temporal_layer < other.temporal_layer;
}
uint32_t ssrc;
uint8_t spatial_layer;
uint8_t temporal_layer;
};
bool IsRtxSsrc(PacketDirection direction, uint32_t ssrc) const {
if (direction == kIncomingPacket) {
return parsed_log_.incoming_rtx_ssrcs().find(ssrc) !=
@ -200,6 +220,14 @@ class EventLogAnalyzer {
return name.str();
}
std::string GetLayerName(LayerDescription layer) const {
char buffer[100];
rtc::SimpleStringBuilder name(buffer);
name << "SSRC " << layer.ssrc << " sl " << layer.spatial_layer << ", tl "
<< layer.temporal_layer;
return name.str();
}
void Alert_RtpLogTimeGap(PacketDirection direction,
float time_seconds,
int64_t duration) {