Skip to content

Commit

Permalink
[macOS] Remove unneeded deprecated declaration guards from ScreenCapt…
Browse files Browse the repository at this point in the history
…ureKitCaptureSource

https://bugs.webkit.org/show_bug.cgi?id=259596
rdar://113036793

Reviewed by Youenn Fablet.

Remove unnecessary deprecated declaration guards from ScreenCaptureKitCaptureSource since
it no longer used deprecated APIs. Minor cleanup of some logging.

* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
(WebCore::ScreenCaptureKitCaptureSource::streamConfiguration): Remove logging, all of the
methods that call this already log.
(WebCore::ScreenCaptureKitCaptureSource::commitConfiguration): Add logging so we know when
the configuration is changed.

Canonical link: https://commits.webkit.org/266402@main
  • Loading branch information
eric-carlson committed Jul 28, 2023
1 parent 92ab433 commit 01d1f20
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ - (void)stream:(SCStream *)stream didOutputSampleBuffer:(CMSampleBufferRef)sampl
namespace WebCore {

ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
ALLOW_DEPRECATED_DECLARATIONS_BEGIN

bool ScreenCaptureKitCaptureSource::isAvailable()
{
Expand Down Expand Up @@ -266,8 +265,6 @@ - (void)stream:(SCStream *)stream didOutputSampleBuffer:(CMSampleBufferRef)sampl
if (m_streamConfiguration)
return m_streamConfiguration;

ALWAYS_LOG_IF_POSSIBLE(LOGIDENTIFIER);

m_streamConfiguration = adoptNS([PAL::allocSCStreamConfigurationInstance() init]);
[m_streamConfiguration setPixelFormat:preferedPixelBufferFormat()];
[m_streamConfiguration setShowsCursor:YES];
Expand Down Expand Up @@ -391,6 +388,8 @@ - (void)stream:(SCStream *)stream didOutputSampleBuffer:(CMSampleBufferRef)sampl
m_height = settings.height();
m_frameRate = settings.frameRate();

ALWAYS_LOG_IF_POSSIBLE(LOGIDENTIFIER, IntSize(m_width, m_height), ", ", m_frameRate);

if (!contentStream())
return;

Expand Down Expand Up @@ -479,7 +478,6 @@ - (void)stream:(SCStream *)stream didOutputSampleBuffer:(CMSampleBufferRef)sampl
return CaptureDevice(String::number(windowID.value()), CaptureDevice::DeviceType::Window, emptyString(), emptyString(), true);
}

ALLOW_DEPRECATED_DECLARATIONS_END
ALLOW_NEW_API_WITHOUT_GUARDS_END

} // namespace WebCore
Expand Down

0 comments on commit 01d1f20

Please sign in to comment.