Move direct use of VideoCapturer::VideoAdapter to VideoSinkWants.
The purose of this cl is to remove dependency on cricket::VideoCapturer from WebRtcVideoChannel2. This cl change CPU adaptation to use a new VideoSinkWants.Resolution Cl is WIP and uploaded to start the discussion. Tested on a N5 with hw acceleration turned off. BUG=webrtc:5426 Review URL: https://codereview.webrtc.org/1695263002 Cr-Commit-Position: refs/heads/master@{#11804}
This commit is contained in:
@ -13,20 +13,25 @@
|
||||
|
||||
#include "webrtc/media/base/videosinkinterface.h"
|
||||
#include "webrtc/base/callback.h"
|
||||
#include "webrtc/base/optional.h"
|
||||
|
||||
namespace rtc {
|
||||
|
||||
// VideoSinkWants is used for notifying the source of properties a video frame
|
||||
// should have when it is delivered to a certain sink.
|
||||
struct VideoSinkWants {
|
||||
bool operator==(const VideoSinkWants& rh) const {
|
||||
return rotation_applied == rh.rotation_applied;
|
||||
}
|
||||
bool operator!=(const VideoSinkWants& rh) const { return !operator==(rh); }
|
||||
|
||||
// Tells the source whether the sink wants frames with rotation applied.
|
||||
// By default, the rotation is applied by the source.
|
||||
bool rotation_applied = true;
|
||||
|
||||
// Tells the source the maximum number of pixels the sink wants.
|
||||
rtc::Optional<int> max_pixel_count;
|
||||
// Like |max_pixel_count| but relative to the given value. The source is
|
||||
// requested to produce frames with a resolution one "step up" from the given
|
||||
// value. In practice, this means that the sink can consume this amount of
|
||||
// pixels but wants more and the source should produce a resolution one
|
||||
// "step" higher than this but not higher.
|
||||
rtc::Optional<int> max_pixel_count_step_up;
|
||||
};
|
||||
|
||||
template <typename VideoFrameT>
|
||||
|
||||
Reference in New Issue
Block a user