Skip to content

Commit

Permalink
Unreviewed, reverting 275736@main
Browse files Browse the repository at this point in the history
rdar://124143076

breaks the builds

Reverted change:

Screen share / getDisplayMedia() buggy behavior and usability issues
https://bugs.webkit.org/show_bug.cgi?id=269961
rdar://123492622
https://commits.webkit.org/275736@main

Canonical link: https://commits.webkit.org/275742@main
  • Loading branch information
martadarbinyan committed Mar 6, 2024
1 parent 5c97e0d commit 8bdf938
Showing 1 changed file with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,26 +320,9 @@ - (void)stream:(SCStream *)stream didOutputSampleBuffer:(CMSampleBufferRef)sampl
if (m_frameRate)
[m_streamConfiguration setMinimumFrameInterval:PAL::CMTimeMakeWithSeconds(1 / m_frameRate, 1000)];

auto width = m_width;
auto height = m_height;
if (m_contentFilter) {
auto contentSize = m_contentFilter.get().contentRect.size;
contentSize.width *= m_contentFilter.get().pointPixelScale;
contentSize.height *= m_contentFilter.get().pointPixelScale;
if (!width && !height) {
width = contentSize.width;
height = contentSize.height;
} else if (contentSize.width && contentSize.height) {
if (!width)
width = height * contentSize.width / contentSize.height;
else if (!height)
height = width * contentSize.height / contentSize.width;
}
}

if (width && height) {
[m_streamConfiguration setWidth:width];
[m_streamConfiguration setHeight:height];
if (m_width && m_height) {
[m_streamConfiguration setWidth:m_width];
[m_streamConfiguration setHeight:m_height];
}

return m_streamConfiguration;
Expand Down

0 comments on commit 8bdf938

Please sign in to comment.