Commit graph

56 commits

Author SHA1 Message Date
Danil Chapovalov
e45cfb45b1 Delete RtcpPacketTypeCounter::first_packet_time_ms as unused
Bug: webrtc:13757
Change-Id: I358ab99c899b9de5f0135d5293101e7abda4aa31
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265682
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37198}
2022-06-13 14:24:07 +00:00
Jonas Oreland
8ca06137dc WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 4/inf
convert almost all of video/ (and the collateral)

Bug: webrtc:10335
Change-Id: Ic94e05937f54d11ee8a635b6b66fd146962d9f11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36192}
2022-03-14 14:36:35 +00:00
Åsa Persson
603e6e3ffc Update StreamStats.encode_frame_rate when GetStats is called.
Currently encode_frame_rate is updated (ComputeRate called) when a frame is encoded.

If a stream is stopped, encode_frame_rate will have an old value (the framerate at the time of the last encoded frame) instead of zero.

Bug: webrtc:13037
Change-Id: I1a2122df61e3e8187e57155dda71c0173cda4c5b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228220
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34695}
2021-08-10 09:37:33 +00:00
Åsa Persson
8d564722d7 Fix for encoded framerate stats per layer.
Update framerate for top spatial layer instead of per timestamp (to ensure all simulcast layers are updated).

Bug: webrtc:13037
Change-Id: I4fa423dee40d74aee22a87855207b885f0536e25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227344
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34634}
2021-08-03 14:12:52 +00:00
Artem Titov
ab30d72b72 Use backticks not vertical bars to denote variables in comments for /video
Bug: webrtc:12338
Change-Id: I47958800407482894ff6f17c1887dce907fdf35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227030
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34585}
2021-07-28 13:22:27 +00:00
Danil Chapovalov
ea7474ee74 Remove redundant VideoSendStream::rtcp_stats field
its content is duplicated in the report_block_data member

Bug: webrtc:10678
Change-Id: I89421ae4ab5f727a233161924372105e222ed404
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219080
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34039}
2021-05-18 13:37:51 +00:00
Danil Chapovalov
f01c2c96f2 Delete RtcpStatisticsCallback in favor of ReportBlockDataObserver
Bug: webrtc:10678
Change-Id: Ie016cbc47dbba15176fc5e7ad7d01a438db7dfb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218842
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34013}
2021-05-16 15:09:29 +00:00
Åsa Persson
9071957da3 Remove unused members in tests.
VideoStreamEncoderTest: Remove unneeded set_timestamp_rtp in CreateFrame methods (the timestamp is set based on ntp_time_ms in VideoStreamEncoder::OnFrame).

Bug: none
Change-Id: I6b5531a9ac21cde5dac54df6de9b9d43261e90c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214488
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33683}
2021-04-12 07:21:03 +00:00
Di Wu
668dbf66ce [Stats] Populate "frames" stats for video source.
Spec: https://www.w3.org/TR/webrtc-stats/#dom-rtcvideosourcestats-frames

Wiring up the "frames" stats with the cumulative fps counter on the video source.

Tests:
./out/Default/peerconnection_unittests
./out/Default/video_engine_tests

Bug: webrtc:12499
Change-Id: I4103f56ed04cb464f5f7e70fbf2d77c25a867a68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208782
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33404}
2021-03-09 08:54:38 +00:00
Danil Chapovalov
06bbeb3398 in Av1 encoder wrapper communicate end_of_picture flag similar to VP9
In particular move end_of_picture flag out of vp9 specific information
since VP9 is not the only codec that can use spatial scalability and
thus need to distinguish layer frame and picture (aka temporal unit).

Bug: webrtc:12167
Change-Id: I0d046d8785fbea55281209ad099738c03ea7db96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192542
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32588}
2020-11-11 14:00:52 +00:00
Henrik Boström
a0ff50c031 Reland "Improve outbound-rtp statistics for simulcast"
This reverts commit 9a925c9ce3.

Reason for revert: The original CL is updated in PS #2 to
fix the googRtt issue which was that when the legacy sender
stats were put in "aggregated_senders" we forgot to update
rtt_ms the same way that we do it for "senders".

Original change's description:
> Revert "Improve outbound-rtp statistics for simulcast"
>
> This reverts commit da6cda839d.
>
> Reason for revert: Breaks googRtt in legacy getStats API
>
> Original change's description:
> > Improve outbound-rtp statistics for simulcast
> >
> > Bug: webrtc:9547
> > Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Eldar Rello <elrello@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#31097}
>
> TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:9547
> Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31165}

TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com

# Not skipping CQ checks because this is a reland.

Bug: webrtc:9547
Change-Id: I723744c496c3c65f95ab6a8940862c8b9f544338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174480
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31169}
2020-05-05 20:22:19 +00:00
Henrik Boström
9a925c9ce3 Revert "Improve outbound-rtp statistics for simulcast"
This reverts commit da6cda839d.

Reason for revert: Breaks googRtt in legacy getStats API

Original change's description:
> Improve outbound-rtp statistics for simulcast
> 
> Bug: webrtc:9547
> Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#31097}

TBR=hbos@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,hta@webrtc.org,elrello@microsoft.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9547
Change-Id: I06673328c2a5293a7eef03b3aaf2ded9d13df1b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174443
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31165}
2020-05-05 13:38:51 +00:00
Eldar Rello
da6cda839d Improve outbound-rtp statistics for simulcast
Bug: webrtc:9547
Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#31097}
2020-04-17 11:28:00 +00:00
Evan Shrubsole
ce0a11d5f9 Unify AdaptationReason and AdaptReason enums.
Moves the unified AdaptationReason to the api/ folder.

Bug: webrtc:11392
Change-Id: I28782e82ef6cc3ca3b061f65b0bbdc3766df1f9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172583
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31084}
2020-04-16 13:33:49 +00:00
Evan Shrubsole
dff792591f Remove VideoStreamEncoderObserver::AdaptationReason::kNone
Replaces this with 2 methods instead, adding clarity.

ClearAdaptationStats
- Resets the adaptations statistics to 0. This is done,
when the degredation is reset, for example when the preference
is changed to/from BALANCED.

UpdateAdaptationMaskingSettings
- Updates the settings for adaptation statistics reporting.
This way we don't report quality adaptations if quality scaling
is not enabled (same for resolution/fps scaling).

The adaptation counting inside the SendStatisticsProxy is
now done in a struct that counts the totals, and then masks
out these counts based on the adaptation settings. The
MaskedAdaptationSteps uses optionals to hide the values we
shoudn't report, while the AdaptationSteps always hold the real
totals.

All tests have been updated to use the Reset/Clear method as needed.

Now that AdaptationCounters and AdaptSteps use the same structure,
AdaptationCounters was moved to api/video and replaces AdaptSteps.

The AdaptReason enum is also redundant now, and will be removed
in a follow-up CL.

R=hbos@webrtc.org

Bug: webrtc:11392
Change-Id: Iaed6488581325d341a056b5bbf76a01c19d6c282
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171685
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31083}
2020-04-16 13:27:50 +00:00
Henrik Boström
f45ca3787f [Stats] Explicit RTP-RTX and RTP-FEC mappings. Unblocks simulcast stats.
--- Background ---
The webrtc::VideoSendStream::StreamStats are converted into
VideoSenderInfo objects which turn into "outbound-rtp" stats objects in
getStats() (or "ssrc" objects in legacy getStats()).

StreamStats are created for each type of substream: RTP media streams,
RTX streams and FlexFEC streams - each with individual packet counters.

The RTX stream is responsible for retransmissions of a referenced media
stream and the FlexFEC stream is responsible for FEC of a referenced
media stream. RTX/FEC streams do not show up as separate objects in
getStats(). Only the media streams become "outbound-rtp" objects, but
their packet and byte counters have to include the RTX and FEC counters.

--- Overview of this CL ---
This CL adds MergeInfoAboutOutboundRtpSubstreams(). It takes
StreamStats of all kinds as input, and outputs media-only StreamStats
- incorporating the RTX and FEC counters into the relevant media
StreamStats.

The merged StreamStats objects is a smaller set of objects than the
non-merged counterparts, but when aggregating all packet counters
together we end up with exact same packet and count as before.

Because WebRtcVideoSendStream::GetVideoSenderInfo() currently aggregates
the StreamStats into a single VideoSenderInfo (single "outbound-rtp"),
this CL should not have any observable side-effects. Prior to this CL:
aggregate StreamStats. After this CL: merge StreamStats and then
aggregate them.

However, when simulcast stats are implemented (WIP CL:
https://webrtc-review.googlesource.com/c/src/+/168120) each RTP media
stream should turn into an individual "outbound-rtp" object. We will
then no longer aggregate all StreamStats into a single "info". This CL
unblocks simulcast stats by providing StreamStats objects that could be
turned into individual VideoSenderInfos.

--- The Changes ---
1. Methods added to RtpConfig to be able to easily tell the relationship
   between RTP, RTX and FEC ssrcs.
2. StreamStats gets a StreamType (kMedia, kRtx or kFlexfec) that
   replaces the booleans (is_rtx, is_flexfec).
3. "referenced_media_ssrc" is added to StreamStats, making it possible
   to tell which kRtx/kFlexFec stream stats need to be merged with which
   kMedia StreamStats.
4. MergeInfoAboutOutboundRtpSubstreams() added and used.

Bug: webrtc:11439
Change-Id: Iaf9002041169a054ddfd32c7ea06bd1dc36c6bca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170826
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30869}
2020-03-24 13:31:54 +00:00
Ilya Nikolaevskiy
eac08bfe23 Reland "Wire up internal libvpx VP9 scaler to statistics proxy"
This reverts commit a2cb93d8b9.

Reason for revert: Reland with no changes after downstream projects are
updated.

Original change's description:
> Revert "Wire up internal libvpx VP9 scaler to statistics proxy"
> 
> This reverts commit 50327a5100.
> 
> Reason for revert: Breaks downstream tests
> 
> Original change's description:
> > Wire up internal libvpx VP9 scaler to statistics proxy
> > 
> > Bug: webrtc:11396
> > Change-Id: I5ac69208b00cc75d4e5dbb3ab86f234b3e1f29f8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169922
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30725}
> 
> TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org
> 
> Change-Id: I53dcb41bdf8f8dccfcd43b717509ec047f590648
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11396
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170102
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30734}

TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org,srte@webrtc.org

Change-Id: Ie47df4aec199701256c1dba8fa64176683becabc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11396
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170105
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30738}
2020-03-10 11:15:51 +00:00
Sebastian Jansson
a2cb93d8b9 Revert "Wire up internal libvpx VP9 scaler to statistics proxy"
This reverts commit 50327a5100.

Reason for revert: Breaks downstream tests

Original change's description:
> Wire up internal libvpx VP9 scaler to statistics proxy
> 
> Bug: webrtc:11396
> Change-Id: I5ac69208b00cc75d4e5dbb3ab86f234b3e1f29f8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169922
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30725}

TBR=ilnik@webrtc.org,hbos@webrtc.org,nisse@webrtc.org

Change-Id: I53dcb41bdf8f8dccfcd43b717509ec047f590648
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11396
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170102
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30734}
2020-03-10 08:09:50 +00:00
Ilya Nikolaevskiy
50327a5100 Wire up internal libvpx VP9 scaler to statistics proxy
Bug: webrtc:11396
Change-Id: I5ac69208b00cc75d4e5dbb3ab86f234b3e1f29f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169922
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30725}
2020-03-09 13:47:25 +00:00
Danil Chapovalov
0c626afcf3 Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-10 12:21:17 +00:00
Ying Wang
ef3998ffd1 Add directive to make webrtc metrics optional.
Bug: webrtc:11144
Change-Id: I4e75e6aec033784685de3670e880bb9f2b6ee8d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30040}
2019-12-09 13:55:50 +00:00
Ilya Nikolaevskiy
840394c6eb Fix bw_limited_resolution in SendStatisticsProxy GetStats
Removed old code, which took care of VP8 case, but actually interferes with
VP9 case.

Now regardless of codec bw_limited_resolution is calculated based on signals
from the bitrate allocator.

Bug: webrtc:11015
Change-Id: Ic99dbb504ab2d1a4b5f15ca93193a1af05ae5924
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160651
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29937}
2019-11-27 16:49:54 +00:00
Ilya Nikolaevskiy
5963c7cf0a Count disabled due to low bw streams or layers as bw limited quality in GetStats
Bug: webrtc:11015
Change-Id: I65cd890706f765366d89ded8c21fa7507797fc23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155964
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29421}
2019-10-09 16:58:34 +00:00
Evan Shrubsole
cc62b16658 Add qualityLimitationResolutionChanges stat
Implements the stat qualityLimitationResolutionChanges [1].

[1] https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-qualitylimitationresolutionchanges

Bug: webrtc:10935
Change-Id: I391f2be5958a96b442e32c40ab7043752f3f71dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150882
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#29113}
2019-09-09 15:22:57 +00:00
Henrik Boström
ce33b6a4cf Implement QualityLimitationReasonTracker and expose "reason".
This CL implements the logic behind qualityLimitationReason[1] and
qualityLimitationDurations[2]

This CL also exposes qualityLimitationReason in the standard getStats()
API, but does not expose qualityLimitationDurations because that is
blocked on supporting the "record<>" type in RTCStatsMember[3].

[1] https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-qualitylimitationreason
[2] https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-qualitylimitationdurations
[3] https://crbug.com/webrtc/10685

TBR=stefan@webrtc.org

Bug: webrtc:10451, webrtc:10686
Change-Id: Ifff0be4ddd64eaec23d59c02af99fdbb1feb3841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138825
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28090}
2019-05-28 16:23:55 +00:00
Henrik Boström
23aff9b737 Implement RTCOutboundRtpStreamStats.totalEncodedBytesTarget.
This is a standardized metric:
https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-totalencodedbytestarget

We estimate the target frame size in bytes from the current encoder
target bitrate and encoder framerate.

We would expect that the average bytes produced by the encoder would
over time match the average target, which is calculated by polling
getStats() twice and dividing the delta totalEncodedBytesTarget with
the delta framesEncoded. This is meant to make googTargetEncBitrate
obsolete.

Bug: webrtc:10446
Change-Id: Ib10ce236476a2f965582d5c536f419952926d4e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137200
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28022}
2019-05-22 10:59:39 +00:00
Henrik Boström
9fe1834d5d Implement RTCOutboundRtpStreamStats.totalPacketSendDelay for video.
This is a standardized metric. Spec:
https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-totalpacketsenddelay

It is meant to replace the legacy googBucketDelay. The average
packet delay over any interval can be calculated as the delta
totalPacketSendDelay divided by the delta packetsSent between two
calls to getStats().

Bug: webrtc:10506
Change-Id: I3d6c6d66e5a06937d0ea8d182a82cd255084ad19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137044
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27979}
2019-05-17 18:53:20 +00:00
Henrik Boström
5684af5d63 VideoSendStream::Stats::total_encode_time_ms added.
This is a standard stat:
https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-totalencodetime

This is collected by SendStatisticsProxy. A follow-up CL will plumb
this to the RTCStatsCollector.

Bug: webrtc:10448
Change-Id: I236afa5576edc26afd54bd166f7faaf7e38e7c7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130517
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27459}
2019-04-05 10:16:14 +00:00
Steve Anton
bd631a00c0 Use Abseil container algorithms in video/
Bug: None
Change-Id: Ia1419e14004d4a849dc0960a0501c25e6e50aeee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129560
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27362}
2019-03-29 16:48:38 +00:00
Erik Språng
e2fd86a79c Move encoder metadata into EncoderInfo struct.
This deprecates the following methods in VideoEncoder:
  virtual ScalingSettings GetScalingSettings() const;
  virtual bool SupportsNativeHandle() const;
  virtual const char* ImplementationName() const;

Though they are not marked RTC_DEPRECATED since we still want to call
them from within the default GetEncoderInfo() until downstream
projects have been updated.

Furthmore, implementation name is changed from const char* to
std:string, which prevents some lifetime issues with dynamic encoder
names, and CodecSpecificInfo.codec_name is removed in favor of getting
the implementation name via GetEncoderInfo().

This CL removes calls to these deprecated methods, follow-ups will also
remove implementations of the methods and replace them with new
GetEncoderInfo() substitutions.

Bug: webrtc:9890
Change-Id: I6fd6e531480c0b952f53dbd5105e0b0adc3e3b0c
Reviewed-on: https://webrtc-review.googlesource.com/c/106905
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25351}
2018-10-25 08:51:53 +00:00
Mirko Bonadei
17f4878419 Remove deprecated field_trial_default and metrics_default.
This CL removes some deprecated build targets (and their headers)
from system_wrappers:
- field_trial_api
- field_trial_default
- metrics_api
- metrics_default

It also refreshes all the dependencies on field_trial.h and metrics.h.

A nice side effect is that it is finally possible to remove 'nogncheck'
from the following files (when it was used with field_trial_default
and metrics_default):
- sdk/objc/api/peerconnection/RTCMetricsSampleInfo+Private.h
- sdk/android/src/jni/pc/peerconnectionfactory.cc
- sdk/objc/api/peerconnection/RTCFieldTrials.mm

Bug: webrtc:9631
Change-Id: Ib621f41ef8ad0aba4fe1c1d7e749c044afc956c3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/100524
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24878}
2018-09-28 07:21:07 +00:00
Sergey Silkin
bb081a62dc Update sending resolution only on top spatial layer frame.
Don't update frame resolution in sender stats if current frame is not
top spatial layer frame.

Bug: webrtc:9715
Change-Id: I8361f8ccf7e7d092d143291fc54ab20ae091954b
Reviewed-on: https://webrtc-review.googlesource.com/97608
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24595}
2018-09-06 08:36:58 +00:00
Niels Möller
d3b8c63b58 Reland "Add spatial index to EncodedImage."
This is a reland of da0898dfae

Original change's description:
> Add spatial index to EncodedImage.
>
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
>
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

Tbr: magjed@webrtc.org
Bug: webrtc:9378
Change-Id: Iff20b656581ef63317e073833d1a326f7118fdfd
Reviewed-on: https://webrtc-review.googlesource.com/96780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24507}
2018-08-31 07:35:52 +00:00
Niels Moller
5a998d7246 Revert "Add spatial index to EncodedImage."
This reverts commit da0898dfae.

Reason for revert: Broke downstream tests.

Original change's description:
> Add spatial index to EncodedImage.
> 
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
> 
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,philipel@webrtc.org,srte@webrtc.org

Change-Id: Idb4fb9d72e5574d7353c631cb404a1311f3fd148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9378
Reviewed-on: https://webrtc-review.googlesource.com/96664
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24486}
2018-08-29 14:36:05 +00:00
Niels Möller
da0898dfae Add spatial index to EncodedImage.
Replaces the VP8 simulcast index and VP9 spatial index formely part of
CodecSpecificInfo.

Bug: webrtc:9378
Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
Reviewed-on: https://webrtc-review.googlesource.com/83161
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24485}
2018-08-29 13:50:17 +00:00
Niels Möller
2377588c82 Add accessor methods for RTP timestamp of EncodedImage.
Intention is to make the member private, but downstream callers
must be updated to use the accessor methods first.

Bug: webrtc:9378
Change-Id: I3495bd8d545b7234fbea10abfd14f082caa420b6
Reviewed-on: https://webrtc-review.googlesource.com/82160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24352}
2018-08-21 09:15:51 +00:00
Åsa Persson
20317f9ca4 Clear encoded frame map on gap in timestamp.
Keep a small window in order to distinguish old and new timestamp.

Bug: chromium:816819
Change-Id: Iefa694c744e8e4b19d3857c567162cdc9410b4da
Reviewed-on: https://webrtc-review.googlesource.com/94141
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24285}
2018-08-15 09:31:39 +00:00
Niels Möller
213618e37e New api function CreateVideoStreamEncoder.
Bug: webrtc:8830
Change-Id: I01de86f601e48f76e6b41b4182ce006d397a190c
Reviewed-on: https://webrtc-review.googlesource.com/78260
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24079}
2018-07-24 09:14:26 +00:00
Sergio Garcia Murillo
43800f95bf Generalize SimulcastEncoderAdapter, use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
  under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.

TBR=sprang@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org

Bug: webrtc:5840
Change-Id: I2d3b130622dd7ceec5528f3ab6c46f109e6bafb8
Reviewed-on: https://webrtc-review.googlesource.com/84743
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23715}
2018-06-21 15:57:43 +00:00
Mirko Bonadei
6f440ed5b5 Revert "Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8."
This reverts commit 07efe436c9.

Reason for revert: Breaks downstream project.

cricket::GetSimulcastConfig method signature has been updated.
I think you can get away with a default value for temporal_layers_supported (and then you can remove it after a few days when projects will be updated).


Original change's description:
> Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
> 
> * Move SimulcastEncoderAdapter out under modules/video_coding
> * Move SimulcastRateAllocator back out to modules/video_coding/utility
> * Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
> * Move any VP8 specific code - such as temporal layer bitrate budgeting -
>   under codec type dependent conditionals.
> * Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
> 
> Bug: webrtc:5840
> Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
> Reviewed-on: https://webrtc-review.googlesource.com/64100
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23705}

TBR=sprang@webrtc.org,stefan@webrtc.org,mflodman@webrtc.org,hta@webrtc.org,sergio.garcia.murillo@gmail.com,titovartem@webrtc.org,agouaillard@gmail.com

Change-Id: Ic9d3b1eeaf195bb5ec2063954421f5e77866d663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5840
Reviewed-on: https://webrtc-review.googlesource.com/84760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23710}
2018-06-21 13:41:14 +00:00
Sergio Garcia Murillo
07efe436c9 Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
  under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.

Bug: webrtc:5840
Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
Reviewed-on: https://webrtc-review.googlesource.com/64100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23705}
2018-06-21 12:23:03 +00:00
Danil Chapovalov
b9b146c9fe Replace rtc::Optional with absl::optional in audio, call and video
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameters 'audio call video':
#!/bin/bash
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I02c5db956846a88a268a300ba086703a02d62e36
Reviewed-on: https://webrtc-review.googlesource.com/83722
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23628}
2018-06-15 12:09:49 +00:00
Niels Möller
97e04884bd Delete unused stats for preferred_bitrate.
Bug: webrtc:8830
Change-Id: Iaa30488255f2e09e269274136d370740cd030902
Reviewed-on: https://webrtc-review.googlesource.com/78880
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23529}
2018-06-07 08:11:07 +00:00
Åsa Persson
875841d9d8 Exclude initial adapt downs in stats for quality adapt changes per minute.
Make WebRTC.Video.AdaptChangesPerMinute.Quality stats only based on changes during a call.

Discard initial quality adapt changes due to bitrate (MaximumFrameSizeForBitrate).
Makes stats only based on changes determined by the quality scaler.

Bug: none
Change-Id: I461b65e65634565ade87b1336cf5206aa14926ff
Reviewed-on: https://webrtc-review.googlesource.com/37660
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21585}
2018-01-11 14:53:01 +00:00
Oskar Sundbom
8e07c134ab Optional: Use nullopt and implicit construction in /video
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

Bug: None
Change-Id: Ie622c215e06956d8d5629733c76f531b7af45012
Reviewed-on: https://webrtc-review.googlesource.com/23568
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21535}
2018-01-09 15:14:10 +00:00
Åsa Persson
aa329e7cc3 Reland: googBandwidthLimitedResolution stat is not always set depending on configuration.
TBR=brandtr@webrtc.org,stefan@webrtc.org

Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via
OnEncodedImage callback.

Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based
on info that is reported to SendStatisticsProxy::OnEncodedImage.

Bug: webrtc:8643
Change-Id: I553cea30dcda34b753b5224f15094a1b7b70a750
Reviewed-on: https://webrtc-review.googlesource.com/31460
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#21249}
Reviewed-on: https://webrtc-review.googlesource.com/33360
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21319}
2017-12-18 11:20:13 +00:00
Guido Urdaneta
62e9ebe589 Revert "googBandwidthLimitedResolution stat is not always set depending on configuration."
This reverts commit 59283e4c66.

Reason for revert: This CL is preventing rolls into Chromium because it fails to compile with MSVC.

Sample error log:

[13258/43857] CXX obj/third_party/webrtc/video/video/send_statistics_proxy.obj
FAILED: obj/third_party/webrtc/video/video/send_statistics_proxy.obj 
ninja -t msvc -e environment.x64 -- E:\b\c\goma_client/gomacc.exe "e:\b\c\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\bin\hostx64\x64/cl.exe" /nologo /showIncludes  @obj/third_party/webrtc/video/video/send_statistics_proxy.obj.rsp /c ../../third_party/webrtc/video/send_statistics_proxy.cc /Foobj/third_party/webrtc/video/video/send_statistics_proxy.obj /Fd"obj/third_party/webrtc/video/video_cc.pdb"
../../third_party/webrtc/video/send_statistics_proxy.cc(217): error C2220: warning treated as error - no 'object' file generated
../../third_party/webrtc/video/send_statistics_proxy.cc(217): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
../../third_party/webrtc/video/send_statistics_proxy.cc(632): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data


Original change's description:
> googBandwidthLimitedResolution stat is not always set depending on configuration.
> 
> Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via
> OnEncodedImage callback.
> 
> Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based
> on info that is reported to SendStatisticsProxy::OnEncodedImage.
> 
> Bug: webrtc:8643
> Change-Id: I6c148e3507a0f04a793775b9f84ce54028b64d0f
> Reviewed-on: https://webrtc-review.googlesource.com/31460
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21249}

TBR=brandtr@webrtc.org,asapersson@webrtc.org,stefan@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:8643
Change-Id: Ib9ef55b8894ea72236a5dc1e9a839adecd401afb
Reviewed-on: https://webrtc-review.googlesource.com/33100
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21284}
2017-12-14 17:35:53 +00:00
Åsa Persson
59283e4c66 googBandwidthLimitedResolution stat is not always set depending on configuration.
Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via
OnEncodedImage callback.

Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based
on info that is reported to SendStatisticsProxy::OnEncodedImage.

Bug: webrtc:8643
Change-Id: I6c148e3507a0f04a793775b9f84ce54028b64d0f
Reviewed-on: https://webrtc-review.googlesource.com/31460
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21249}
2017-12-13 14:32:21 +00:00
Åsa Persson
c3ed630560 Add stats googHasEnteredLowResolution.
Indicates if the forced sw fallback has had an effect (or would have had an effect if it had been
enabled).


Bug: webrtc:6634
Change-Id: I574b9001a2fae650fb894a1caa0d0f84257658e3
Reviewed-on: https://webrtc-review.googlesource.com/23300
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20729}
2017-11-17 13:02:07 +00:00
Åsa Persson
45bbc8ac19 Change forced software encoder fallback for VP8 to be only based on resolution and not bitrate.
Switches from VP8 HW to VP8 SW for resolutions <= max_pixels. 

|<- min_pixels  VP8 SW  max_pixels ->|  VP8 HW  |

Bug: webrtc:6634
Change-Id: Ib324df2b8418659c29d999259c0ed47448310696
Reviewed-on: https://webrtc-review.googlesource.com/7362
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20646}
2017-11-13 10:58:42 +00:00