首页 > 其他分享 >mac os 编译webrtc 报错screen_capturer_mac.mm:500:5: error: 'CGDisplayStreamStop' is only avail

mac os 编译webrtc 报错screen_capturer_mac.mm:500:5: error: 'CGDisplayStreamStop' is only avail

时间:2023-11-06 15:25:45浏览次数:52  
标签:available macOS .. capturer mac 报错 display 13.0

../../modules/desktop_capture/mac/screen_capturer_mac.mm:462:11: error: 'CGDisplayStreamUpdateGetRects' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  462 |           CGDisplayStreamUpdateGetRects(updateRef, kCGDisplayStreamUpdateDirtyRects, &count);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:106:37: note: 'CGDisplayStreamUpdateGetRects' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  106 | CG_EXTERN const CGRect * __nullable CGDisplayStreamUpdateGetRects(CGDisplayStreamUpdateRef __nullable updateRef,
      |                                     ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:462:11: note: enclose 'CGDisplayStreamUpdateGetRects' in an @available check to silence this warning
  461 |       const CGRect* rects =
  462 |           CGDisplayStreamUpdateGetRects(updateRef, kCGDisplayStreamUpdateDirtyRects, &count);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  463 |       if (count != 0) {
  464 |         // According to CGDisplayStream.h, it's safe to call
  465 |         // CGDisplayStreamStop() from within the callback.
  466 |         ScreenRefresh(display_id, count, rects, display_origin, frame_surface);
  467 |       }
      |
../../modules/desktop_capture/mac/screen_capturer_mac.mm:472:44: error: 'kCGDisplayStreamShowCursor' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  472 |                            (const void*[]){kCGDisplayStreamShowCursor},
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:195:30: note: 'kCGDisplayStreamShowCursor' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  195 | CG_EXTERN const CFStringRef  kCGDisplayStreamShowCursor CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration showsCursor property instead");  /* CFBoolean - defaults to false */
      |                              ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:472:44: note: enclose 'kCGDisplayStreamShowCursor' in an @available check to silence this warning
  470 |     rtc::ScopedCFTypeRef<CFDictionaryRef> properties_dict(
  471 |         CFDictionaryCreate(kCFAllocatorDefault,
  472 |                            (const void*[]){kCGDisplayStreamShowCursor},
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
  473 |                            (const void*[]){kCFBooleanFalse},
  474 |                            1,
  475 |                            &kCFTypeDictionaryKeyCallBacks,
  476 |                            &kCFTypeDictionaryValueCallBacks));
  477 |
  478 |     CGDisplayStreamRef display_stream = CGDisplayStreamCreate(
  479 |         display_id, pixel_width, pixel_height, 'BGRA', properties_dict.get(), handler);
      |
../../modules/desktop_capture/mac/screen_capturer_mac.mm:478:41: error: 'CGDisplayStreamCreate' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  478 |     CGDisplayStreamRef display_stream = CGDisplayStreamCreate(
      |                                         ^~~~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:243:41: note: 'CGDisplayStreamCreate' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  243 | CG_EXTERN CGDisplayStreamRef __nullable CGDisplayStreamCreate(CGDirectDisplayID display,
      |                                         ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:478:41: note: enclose 'CGDisplayStreamCreate' in an @available check to silence this warning
  478 |     CGDisplayStreamRef display_stream = CGDisplayStreamCreate(
      |                                         ^~~~~~~~~~~~~~~~~~~~~
  479 |         display_id, pixel_width, pixel_height, 'BGRA', properties_dict.get(), handler);
  480 |
  481 |     if (display_stream) {
  482 |       CGError error = CGDisplayStreamStart(display_stream);
  483 |       if (error != kCGErrorSuccess) return false;
  484 |
  485 |       CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(display_stream);
  486 |       CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopCommonModes);
  487 |       display_streams_.push_back(display_stream);
  488 |     }
      |
../../modules/desktop_capture/mac/screen_capturer_mac.mm:482:23: error: 'CGDisplayStreamStart' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  482 |       CGError error = CGDisplayStreamStart(display_stream);
      |                       ^~~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:273:19: note: 'CGDisplayStreamStart' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  273 | CG_EXTERN CGError CGDisplayStreamStart(CGDisplayStreamRef cg_nullable displayStream)
      |                   ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:482:23: note: enclose 'CGDisplayStreamStart' in an @available check to silence this warning
  482 |       CGError error = CGDisplayStreamStart(display_stream);
      |                       ^~~~~~~~~~~~~~~~~~~~
  483 |       if (error != kCGErrorSuccess) return false;
      |
../../modules/desktop_capture/mac/screen_capturer_mac.mm:485:35: error: 'CGDisplayStreamGetRunLoopSource' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  485 |       CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(display_stream);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:295:41: note: 'CGDisplayStreamGetRunLoopSource' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  295 | CG_EXTERN CFRunLoopSourceRef __nullable CGDisplayStreamGetRunLoopSource(CGDisplayStreamRef cg_nullable displayStream)
      |                                         ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:485:35: note: enclose 'CGDisplayStreamGetRunLoopSource' in an @available check to silence this warning
  485 |       CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(display_stream);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  486 |       CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopCommonModes);
      |
../../modules/desktop_capture/mac/screen_capturer_mac.mm:498:33: error: 'CGDisplayStreamGetRunLoopSource' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  498 |     CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(stream);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:295:41: note: 'CGDisplayStreamGetRunLoopSource' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  295 | CG_EXTERN CFRunLoopSourceRef __nullable CGDisplayStreamGetRunLoopSource(CGDisplayStreamRef cg_nullable displayStream)
      |                                         ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:498:33: note: enclose 'CGDisplayStreamGetRunLoopSource' in an @available check to silence this warning
  498 |     CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(stream);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  499 |     CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopCommonModes);
      |
../../modules/desktop_capture/mac/screen_capturer_mac.mm:500:5: error: 'CGDisplayStreamStop' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
  500 |     CGDisplayStreamStop(stream);
      |     ^~~~~~~~~~~~~~~~~~~
../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:285:19: note: 'CGDisplayStreamStop' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.15.0
  285 | CG_EXTERN CGError CGDisplayStreamStop(CGDisplayStreamRef cg_nullable displayStream)
      |                   ^
../../modules/desktop_capture/mac/screen_capturer_mac.mm:500:5: note: enclose 'CGDisplayStreamStop' in an @available check to silence this warning
  500 |     CGDisplayStreamStop(stream);
      |     ^~~~~~~~~~~~~~~~~~~
7 errors generated.
[15/6442] CXX obj/modules/pacing/pacing_unittests/packet_router_unittest.o
ninja: build stopped: subcommand failed.

报错信息如上.

解决方法: 

refs: https://hg.mozilla.org/mozilla-central/rev/8443a5cec0ac (看这个就够了)

 https://bugzilla.mozilla.org/show_bug.cgi?id=1832717

标签:available,macOS,..,capturer,mac,报错,display,13.0
From: https://www.cnblogs.com/micoblog/p/17812770.html

相关文章

  • jupyter 下 bitandbytes报错记录
    背景:在jupyter中加载baichuan大模型时报错报错一:frompeftimportPeftModel 报错报错提示:python-mbitsandbytes执行python-mbitsandbytes时又报错,报错内容为:Traceback(mostrecentcalllast):File"/home/miniconda3/envs/vllm/lib/python3.10/runpy.py",lin......
  • 使用uniapp开发小程序getLocation报错
    uniapp中使用uni.getLocation()报错,报错如下:getLocation:failtheapineedtobedeclaredintherequiredPrivateInfosfieldinapp.json/ext.json 首先检查uniapp的manifest文件发现位置权限已经开启: 后翻阅微信文档后发现原来是微信官方做了调整,uniapp只勾选这个还......
  • jsqlparser v4.6 版本下sql解析报错
    项目版本:springboot2.7.2mybatis-plus3.5.2jsqlparser4.6该版本下mybatis-plus生成的sql文件带有连续\n\n\nCCJSqlParserUtil.parseStatements("select\n\n\n*from\n\ndual\n")再使用jsqlparser进行sql解析时会出现如下报错net.sf.jsqlparser.parser.ParseExc......
  • Python_pytest +文件名,报错—— zsh: command not found: pytest
     原因:由于“通过pip安装pytest不会使其成为系统命令,而是会将其安装到python”“-m命令将pytest作为其自己的命令运行,然后任何后续脚本都将作为参数。”解决:所以我们在命令窗口执行时应该在.py文件所在路径下执行  python-mpytest-vtest_wework.py这个问题终于......
  • mac m1上java调用opencv
    mac1openjdk17官网上没有编译好的macm1上二进制库.需要自己下载源代码编译.https://opencv.org/releases/从这里下载源代码.如opencv-4.7.0.zip解压把opencv-4.7.0文件夹重命名为opencv在opencv同级目录下建一个文件夹build_opencvcd到build_opencv,然后执行cmake-DBU......
  • 解决适用EntityFramework生成时报错“无法解析依赖项。"EntityFramework 6.4.4" 与 '
    点击添加,出现错误提示:......
  • R语言install.packages("jpeg")报错
    R语言install.packages("jpeg")时报错Infileincludedfromread.c:1:0:rjcommon.h:11:21:fatalerror:jpeglib.h:Nosuchfileordirectoryrjcommon.h:11:21:致命错误:jpeglib.h:没有那个文件或目录#include<jpeglib.h>compilationterminated.make:***[read.o]Error......
  • 在Mac OS上如何运行jar文件
     问题1:%java-jarTASTS-MacOS-X64.jar***WARNING:DisplaymustbecreatedonmainthreadduetoCocoarestrictions.Exceptioninthread"main"org.eclipse.swt.SWTException:Invalidthreadaccess   atorg.eclipse.swt.SWT.error(SWT.java:4533)   at......
  • Mac OS 10.15 安装 java 1.8
     1.到Oracle官网下载JDK1.8安装包 选择接受证书协议,然后选择对应的MacOSX一栏下载SDK,下载sdk必须要登录才可以下载,大家有需要的可以点击这里,百度网盘提取码:c62d下载完成后,我们得到一个dmg的安装包,名称为jdk-8u211-macosx-x64.dmg,表示这是java8版本号为211的JDK安装包。 2......
  • 关于Mac OS虚拟机下共享文件夹的方法
     1、确保左上角苹果标志的旁边是“Finder”;2、点击"Finder";3、选择“偏好设置设置”;4、然后在“通用”标签下勾选“已连接服务器”;5、重启。    FinderPreference--General--连接服务器 设置边栏: 重启之后可以看到共享文件夹: ......