0d5ea21325
These methods are called on the VideoSender's construction thread, which is the same thread as modifies the value of _encoder. It's therefore safe to not require a lock to access _encoder on this thread. I'm making access to the rate variables from VCMGenericEncoder, thread safe, by using a lock that's not associated with the encoder. There should be little to no contention there. While modifying VCMGenericEncoder, I noticed that a couple of member variables weren't needed, so I removed them. The reason for this change is that getStats is currently contending with the encoder when Bitrate() is called. On my machine, this means that getStats can take about 25-30ms instead of ~1ms. Also adding some documentation for other methods and a suggestion for how we could avoid contention between the encoder and the network thread. BUG=2822 R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43479004 Cr-Commit-Position: refs/heads/master@{#8631} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8631 4adac7df-926f-26a2-2b94-8c16560cd09d |
||
---|---|---|
chromium | ||
data | ||
resources | ||
talk | ||
third_party | ||
tools | ||
webrtc | ||
.clang-format | ||
.gitignore | ||
all.gyp | ||
AUTHORS | ||
BUILD.gn | ||
check_root_dir.py | ||
codereview.settings | ||
COPYING | ||
DEPS | ||
drover.properties | ||
libvpx.mk | ||
LICENSE | ||
license_template.txt | ||
LICENSE_THIRD_PARTY | ||
OWNERS | ||
PATENTS | ||
PRESUBMIT.py | ||
setup_links.py | ||
sync_chromium.py | ||
WATCHLISTS |