mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Allow disabling output format request
This commit is contained in:
parent
ff4a9d3e8e
commit
54a3523d81
1 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,11 @@ void VideoSource::PushVideoFrame(const webrtc::VideoFrame& frame) {
|
|||
|
||||
|
||||
void VideoSource::OnOutputFormatRequest(int width, int height, int fps) {
|
||||
video_adapter()->OnOutputFormatRequest(std::make_pair(width, height), width * height, fps);
|
||||
if (width > 0 && height > 0 && fps > 0) {
|
||||
video_adapter()->OnOutputFormatRequest(std::make_pair(width, height), width * height, fps);
|
||||
} else {
|
||||
video_adapter()->OnOutputFormatRequest(absl::nullopt, absl::nullopt, absl::nullopt);
|
||||
}
|
||||
}
|
||||
|
||||
MediaSourceInterface::SourceState VideoSource::state() const {
|
||||
|
|
Loading…
Reference in a new issue