forked from JumpingYang001/webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Adaptation] Move deg.pref. out of ResourceAdaptationProcessor
This patch creates a new class which provides the DegradationPreference thread safe to all classes that need if (BalancedConstraint and QpScalerResource). It also broadcasts to all listeners when the preferences are updated, so the ResourceAdaptationProcessor can update the video if needed. In future work, this could be used to remove the need for two task queues for the VideoStreamEncoder resources. Bug: webrtc:11700 Change-Id: I05480db8b7157b5643f6f86ec9c64850839b3e76 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177522 Commit-Queue: Evan Shrubsole <[email protected]> Reviewed-by: Ilya Nikolaevskiy <[email protected]> Reviewed-by: Henrik Boström <[email protected]> Cr-Commit-Position: refs/heads/master@{#31623}
- Loading branch information
Showing
17 changed files
with
281 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright 2020 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. | ||
*/ | ||
|
||
#include "call/adaptation/degradation_preference_listener.h" | ||
|
||
namespace webrtc { | ||
|
||
DegradationPreferenceListener::~DegradationPreferenceListener() = default; | ||
|
||
} // namespace webrtc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2020 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 CALL_ADAPTATION_DEGRADATION_PREFERENCE_LISTENER_H_ | ||
#define CALL_ADAPTATION_DEGRADATION_PREFERENCE_LISTENER_H_ | ||
|
||
#include "api/rtp_parameters.h" | ||
|
||
namespace webrtc { | ||
|
||
class DegradationPreferenceListener { | ||
public: | ||
virtual ~DegradationPreferenceListener(); | ||
|
||
virtual void OnDegradationPreferenceUpdated( | ||
DegradationPreference degradation_preference) = 0; | ||
}; | ||
|
||
} // namespace webrtc | ||
|
||
#endif // CALL_ADAPTATION_DEGRADATION_PREFERENCE_LISTENER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright 2020 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. | ||
*/ | ||
|
||
#include "call/adaptation/degradation_preference_provider.h" | ||
|
||
webrtc::DegradationPreferenceProvider::~DegradationPreferenceProvider() = | ||
default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2020 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 CALL_ADAPTATION_DEGRADATION_PREFERENCE_PROVIDER_H_ | ||
#define CALL_ADAPTATION_DEGRADATION_PREFERENCE_PROVIDER_H_ | ||
|
||
#include "api/rtp_parameters.h" | ||
|
||
namespace webrtc { | ||
|
||
// Thread-safe retrieval of degradation preferences. | ||
class DegradationPreferenceProvider { | ||
public: | ||
virtual ~DegradationPreferenceProvider(); | ||
|
||
virtual DegradationPreference degradation_preference() const = 0; | ||
}; | ||
|
||
} // namespace webrtc | ||
|
||
#endif // CALL_ADAPTATION_DEGRADATION_PREFERENCE_PROVIDER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.