Reason for revert:
Breaks perf tests:
https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
Original issue's description:
> Add framerate to VideoSinkWants and ability to signal on overuse
>
> In ViEEncoder, try to reduce framerate instead of resolution if the
> current degradation preference is maintain-resolution rather than
> balanced.
>
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2716643002
> Cr-Commit-Position: refs/heads/master@{#17327}
> Committed: 72acf25261
TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2764133002
Cr-Commit-Position: refs/heads/master@{#17331}
54 lines
2.0 KiB
C++
54 lines
2.0 KiB
C++
/*
|
|
* Copyright (c) 2016 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_MEDIA_BASE_VIDEOSOURCEINTERFACE_H_
|
|
#define WEBRTC_MEDIA_BASE_VIDEOSOURCEINTERFACE_H_
|
|
|
|
#include "webrtc/media/base/videosinkinterface.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 {
|
|
// Tells the source whether the sink wants frames with rotation applied.
|
|
// By default, any rotation must be applied by the sink.
|
|
bool rotation_applied = false;
|
|
|
|
// Tells the source that the sink only wants black frames.
|
|
bool black_frames = false;
|
|
|
|
// Tells the source the maximum number of pixels the sink wants.
|
|
rtc::Optional<int> max_pixel_count;
|
|
// Tells the source the desired number of pixels the sinks wants. This will
|
|
// typically be used when stepping the resolution up again when conditions
|
|
// have improved after an earlier downgrade. The source should select the
|
|
// closest resolution to this pixel count, but if max_pixel_count is set, it
|
|
// still sets the absolute upper bound.
|
|
rtc::Optional<int> target_pixel_count;
|
|
};
|
|
|
|
template <typename VideoFrameT>
|
|
class VideoSourceInterface {
|
|
public:
|
|
virtual void AddOrUpdateSink(VideoSinkInterface<VideoFrameT>* sink,
|
|
const VideoSinkWants& wants) = 0;
|
|
// RemoveSink must guarantee that at the time the method returns,
|
|
// there is no current and no future calls to VideoSinkInterface::OnFrame.
|
|
virtual void RemoveSink(VideoSinkInterface<VideoFrameT>* sink) = 0;
|
|
|
|
protected:
|
|
virtual ~VideoSourceInterface() {}
|
|
};
|
|
|
|
} // namespace rtc
|
|
#endif // WEBRTC_MEDIA_BASE_VIDEOSOURCEINTERFACE_H_
|