webrtc_m130/webrtc/call/bitrate_allocator.h

177 lines
7.1 KiB
C
Raw Normal View History

/*
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_CALL_BITRATE_ALLOCATOR_H_
#define WEBRTC_CALL_BITRATE_ALLOCATOR_H_
#include <stdint.h>
#include <map>
#include <utility>
#include <vector>
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/thread_annotations.h"
namespace webrtc {
class Clock;
// Used by all send streams with adaptive bitrate, to get the currently
// allocated bitrate for the send stream. The current network properties are
// given at the same time, to let the send stream decide about possible loss
// protection.
class BitrateAllocatorObserver {
public:
// Returns the amount of protection used by the BitrateAllocatorObserver
// implementation, as bitrate in bps.
virtual uint32_t OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt) = 0;
protected:
virtual ~BitrateAllocatorObserver() {}
};
// Usage: this class will register multiple RtcpBitrateObserver's one at each
// RTCP module. It will aggregate the results and run one bandwidth estimation
// and push the result to the encoders via BitrateAllocatorObserver(s).
class BitrateAllocator {
public:
// Used to get notified when send stream limits such as the minimum send
// bitrate and max padding bitrate is changed.
class LimitObserver {
public:
virtual void OnAllocationLimitsChanged(
uint32_t min_send_bitrate_bps,
uint32_t max_padding_bitrate_bps) = 0;
protected:
virtual ~LimitObserver() {}
};
explicit BitrateAllocator(LimitObserver* limit_observer);
~BitrateAllocator();
// Allocate target_bitrate across the registered BitrateAllocatorObservers.
void OnNetworkChanged(uint32_t target_bitrate_bps,
uint8_t fraction_loss,
int64_t rtt);
// Set the start and max send bitrate used by the bandwidth management.
//
// |observer| updates bitrates if already in use.
// |min_bitrate_bps| = 0 equals no min bitrate.
// |max_bitrate_bps| = 0 equals no max bitrate.
// |enforce_min_bitrate| = 'true' will allocate at least |min_bitrate_bps| for
// this observer, even if the BWE is too low, 'false' will allocate 0 to
// the observer if BWE doesn't allow |min_bitrate_bps|.
// Note that |observer|->OnBitrateUpdated() will be called within the scope of
// this method with the current rtt, fraction_loss and available bitrate and
// that the bitrate in OnBitrateUpdated will be zero if the |observer| is
// currently not allowed to send data.
void AddObserver(BitrateAllocatorObserver* observer,
uint32_t min_bitrate_bps,
uint32_t max_bitrate_bps,
uint32_t pad_up_bitrate_bps,
bool enforce_min_bitrate);
// Removes a previously added observer, but will not trigger a new bitrate
// allocation.
void RemoveObserver(BitrateAllocatorObserver* observer);
// Returns initial bitrate allocated for |observer|. If |observer| is not in
// the list of added observers, a best guess is returned.
int GetStartBitrate(BitrateAllocatorObserver* observer);
private:
// Note: All bitrates for member variables and methods are in bps.
struct ObserverConfig {
ObserverConfig(BitrateAllocatorObserver* observer,
uint32_t min_bitrate_bps,
uint32_t max_bitrate_bps,
uint32_t pad_up_bitrate_bps,
bool enforce_min_bitrate)
: observer(observer),
min_bitrate_bps(min_bitrate_bps),
max_bitrate_bps(max_bitrate_bps),
pad_up_bitrate_bps(pad_up_bitrate_bps),
enforce_min_bitrate(enforce_min_bitrate),
allocated_bitrate_bps(-1),
media_ratio(1.0) {}
BitrateAllocatorObserver* observer;
uint32_t min_bitrate_bps;
uint32_t max_bitrate_bps;
uint32_t pad_up_bitrate_bps;
bool enforce_min_bitrate;
int64_t allocated_bitrate_bps;
double media_ratio; // Part of the total bitrate used for media [0.0, 1.0].
};
// Calculates the minimum requested send bitrate and max padding bitrate and
// calls LimitObserver::OnAllocationLimitsChanged.
void UpdateAllocationLimits();
typedef std::vector<ObserverConfig> ObserverConfigs;
ObserverConfigs::iterator FindObserverConfig(
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
const BitrateAllocatorObserver* observer)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
typedef std::multimap<uint32_t, const ObserverConfig*> ObserverSortingMap;
typedef std::map<BitrateAllocatorObserver*, int> ObserverAllocation;
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
ObserverAllocation AllocateBitrates(uint32_t bitrate)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
ObserverAllocation ZeroRateAllocation() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
ObserverAllocation LowRateAllocation(uint32_t bitrate)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
ObserverAllocation NormalRateAllocation(uint32_t bitrate,
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
uint32_t sum_min_bitrates)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
ObserverAllocation MaxRateAllocation(uint32_t bitrate,
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
uint32_t sum_max_bitrates)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
uint32_t LastAllocatedBitrate(const ObserverConfig& observer_config)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
// The minimum bitrate required by this observer, including enable-hysteresis
// if the observer is in a paused state.
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
uint32_t MinBitrateWithHysteresis(const ObserverConfig& observer_config)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
// Splits |bitrate| evenly to observers already in |allocation|.
// |include_zero_allocations| decides if zero allocations should be part of
// the distribution or not. The allowed max bitrate is |max_multiplier| x
// observer max bitrate.
void DistributeBitrateEvenly(uint32_t bitrate,
bool include_zero_allocations,
int max_multiplier,
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
ObserverAllocation* allocation)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
bool EnoughBitrateForAllObservers(uint32_t bitrate, uint32_t sum_min_bitrates)
EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
LimitObserver* const limit_observer_;
rtc::CriticalSection crit_sect_;
// Stored in a list to keep track of the insertion order.
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
ObserverConfigs bitrate_observer_configs_ GUARDED_BY(crit_sect_);
uint32_t last_bitrate_bps_ GUARDED_BY(crit_sect_);
uint32_t last_non_zero_bitrate_bps_ GUARDED_BY(crit_sect_);
uint8_t last_fraction_loss_ GUARDED_BY(crit_sect_);
int64_t last_rtt_ GUARDED_BY(crit_sect_);
// Number of mute events based on too low BWE, not network up/down.
Revert of Add task queue to Call. (patchset #42 id:840001 of https://codereview.webrtc.org/2060403002/ ) Reason for revert: Failed on Win 10 Chrome FYI. https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/3847/steps/content_browsertests/logs/stdio # # Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\base\task_queue_win.cc, line 138 # last system error: 87 # Check failed: ((DWORD)0xFFFFFFFF) != result (4294967295 vs. 4294967295) # WebRtcBrowserTest # Original issue's description: > - Add task queue to Call with the intent of replacing the use of one of the process threads. > > - Split VideoSendStream in two. VideoSendStreamInternal is created and used on the new task queue. > > - BitrateAllocator is now created on libjingle's worker thread but always used on the new task queue instead of both encoder threads and the process thread. > > - VideoEncoderConfig and VideoSendStream::Config support move semantics. > > - The encoder thread is moved from VideoSendStream to ViEEncoder. Frames are forwarded directly to ViEEncoder which is responsible for timestamping ? and encoding the frames. > > BUG=webrtc:5687 > > Committed: https://crrev.com/cc168360f41322332860cb075edeb1cde21aa473 > Cr-Commit-Position: refs/heads/master@{#13767} TBR=tommi@webrtc.org,mflodman@webrtc.org,stefan@webrtc.org,sprang@webrtc.org,pbos@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5687 Review-Url: https://codereview.webrtc.org/2248713003 Cr-Commit-Position: refs/heads/master@{#13774}
2016-08-16 02:40:55 -07:00
int num_pause_events_ GUARDED_BY(crit_sect_);
Clock* const clock_;
int64_t last_bwe_log_time_;
};
} // namespace webrtc
#endif // WEBRTC_CALL_BITRATE_ALLOCATOR_H_