⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278415 in webkit


Ignore:
Timestamp:
Jun 3, 2021, 12:40:39 PM (5 years ago)
Author:
youenn@apple.com
Message:

Do not recalibrate camera if the settings are the same
​https://bugs.webkit.org/show_bug.cgi?id=226585

Reviewed by Eric Carlson.

Make sure to not update the preset if the constraints are equal to the current settings.
Manually tested.

  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r278411 r278415  
     12021-06-03  Youenn Fablet  <youenn@apple.com>
     2
     3        Do not recalibrate camera if the settings are the same
     4        https://bugs.webkit.org/show_bug.cgi?id=226585
     5
     6        Reviewed by Eric Carlson.
     7
     8        Make sure to not update the preset if the constraints are equal to the current settings.
     9        Manually tested.
     10
     11        * platform/mediastream/RealtimeVideoCaptureSource.cpp:
     12        (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):
     13
    1142021-06-03  Alan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp

    r278253 r278415  
    408408    // FIXME: We only change settings if capture resolution is below requested one. We should get the best preset for all clients.
    409409    auto& settings = this->settings();
    410     if (width && *width < static_cast<int>(settings.width()))
     410    if (width && *width <= static_cast<int>(settings.width()))
    411411        width = { };
    412     if (height && *height < static_cast<int>(settings.height()))
     412    if (height && *height <= static_cast<int>(settings.height()))
    413413        height = { };
    414     if (frameRate && *frameRate < static_cast<double>(settings.frameRate()))
     414    if (frameRate && *frameRate <= static_cast<double>(settings.frameRate()))
    415415        frameRate = { };
    416416
Note: See TracChangeset for help on using the changeset viewer.