Changeset 259452 in webkit


Ignore:
Timestamp:
Apr 3, 2020, 3:46:02 AM (5 years ago)
Author:
youenn@apple.com
Message:

Add initial support for WebRTC HEVC
https://bugs.webkit.org/show_bug.cgi?id=204283

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Add H265 packetization/depacketization and ObjC H265 encoder/decoder.
Support is switchable using a boolean given to the decoder/encoder factories.

  • Source/webrtc/api/video/video_codec_type.h:
  • Source/webrtc/api/video_codecs/video_codec.cc:
  • Source/webrtc/api/video_codecs/video_codec.h:

(webrtc::VideoCodecH265::operator!= const):

  • Source/webrtc/api/video_codecs/video_encoder.cc:
  • Source/webrtc/api/video_codecs/video_encoder.h:
  • Source/webrtc/api/video_codecs/video_encoder_config.cc:
  • Source/webrtc/api/video_codecs/video_encoder_config.h:
  • Source/webrtc/build_overrides/build.gni:
  • Source/webrtc/call/rtp_payload_params.cc:
  • Source/webrtc/common_video/BUILD.gn:
  • Source/webrtc/common_video/h265/h265_common.cc: Added.
  • Source/webrtc/common_video/h265/h265_common.h: Added.
  • Source/webrtc/common_video/h265/h265_pps_parser.cc: Added.
  • Source/webrtc/common_video/h265/h265_pps_parser.h: Added.
  • Source/webrtc/common_video/h265/h265_sps_parser.cc: Added.
  • Source/webrtc/common_video/h265/h265_sps_parser.h: Added.
  • Source/webrtc/common_video/h265/h265_vps_parser.cc: Added.
  • Source/webrtc/common_video/h265/h265_vps_parser.h: Added.
  • Source/webrtc/media/base/media_constants.cc:
  • Source/webrtc/media/base/media_constants.h:
  • Source/webrtc/modules/rtp_rtcp/BUILD.gn:
  • Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc:
  • Source/webrtc/modules/rtp_rtcp/source/h265_sps_parser.cc: Added.
  • Source/webrtc/modules/rtp_rtcp/source/h265_sps_parser.h: Added.

(webrtc::H265SpsParser::width):
(webrtc::H265SpsParser::height):

  • Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.cc: Added.
  • Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.h: Added.

(webrtc::RtpPacketizerH265::Packet::Packet):
(webrtc::RtpPacketizerH265::PacketUnit::PacketUnit):
(webrtc::VideoRtpDepacketizerH265::~VideoRtpDepacketizerH265):

  • Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h:
  • Source/webrtc/modules/video_coding/BUILD.gn:
  • Source/webrtc/modules/video_coding/codecs/h265/include/h265_globals.h: Added.
  • Source/webrtc/modules/video_coding/encoded_frame.cc:
  • Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc: Added.
  • Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.h: Added.
  • Source/webrtc/modules/video_coding/include/video_codec_interface.h:
  • Source/webrtc/modules/video_coding/jitter_buffer_common.h:
  • Source/webrtc/modules/video_coding/packet.cc:
  • Source/webrtc/modules/video_coding/packet_buffer.cc:
  • Source/webrtc/modules/video_coding/session_info.cc:
  • Source/webrtc/modules/video_coding/session_info.h:
  • Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::createWebKitEncoderFactory):
(webrtc::createWebKitDecoderFactory):

  • Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265+Private.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265.h: Added.
  • Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265.mm: Added.

(-[RTCCodecSpecificInfoH265 nativeCodecSpecificInfo]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m:

(-[RTCDefaultVideoDecoderFactory initWithH265:]):
(-[RTCDefaultVideoDecoderFactory supportedCodecs]):
(-[RTCDefaultVideoDecoderFactory createDecoder:]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m:

(-[RTCDefaultVideoEncoderFactory initWithH265:]):
(+[RTCDefaultVideoEncoderFactory supportedCodecs]):
(-[RTCDefaultVideoEncoderFactory createEncoder:]):
(-[RTCDefaultVideoEncoderFactory supportedCodecs]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.mm: Added.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm: Added.

(RTCH265FrameDecodeParams::RTCH265FrameDecodeParams):
(h265DecompressionOutputCallback):
(-[RTCVideoDecoderH265 init]):
(-[RTCVideoDecoderH265 dealloc]):
(-[RTCVideoDecoderH265 startDecodeWithNumberOfCores:]):
(-[RTCVideoDecoderH265 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderH265 setCallback:]):
(-[RTCVideoDecoderH265 releaseDecoder]):
(-[RTCVideoDecoderH265 resetDecompressionSession]):
(-[RTCVideoDecoderH265 configureDecompressionSession]):
(-[RTCVideoDecoderH265 destroyDecompressionSession]):
(-[RTCVideoDecoderH265 setVideoFormat:]):
(-[RTCVideoDecoderH265 implementationName]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.mm: Added.

(-[RTCVideoEncoderH265 initWithCodecInfo:]):
(-[RTCVideoEncoderH265 dealloc]):
(-[RTCVideoEncoderH265 startEncodeWithSettings:numberOfCores:]):
(-[RTCVideoEncoderH265 encode:codecSpecificInfo:frameTypes:]):
(-[RTCVideoEncoderH265 setCallback:]):
(-[RTCVideoEncoderH265 setBitrate:framerate:]):
(-[RTCVideoEncoderH265 releaseEncoder]):
(-[RTCVideoEncoderH265 resetCompressionSession]):
(-[RTCVideoEncoderH265 configureCompressionSession]):
(-[RTCVideoEncoderH265 destroyCompressionSession]):
(-[RTCVideoEncoderH265 implementationName]):
(-[RTCVideoEncoderH265 setBitrateBps:]):
(-[RTCVideoEncoderH265 setEncoderBitrateBps:]):
(-[RTCVideoEncoderH265 frameWasEncoded:flags:sampleBuffer:width:height:renderTimeMs:timestamp:rotation:]):
(-[RTCVideoEncoderH265 scalingSettings]):

  • Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc:
  • Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h:
  • Source/webrtc/sdk/objc/native/src/objc_video_decoder_factory.mm:

(webrtc::ObjCVideoDecoderFactory::CreateVideoDecoder):

  • Source/webrtc/sdk/objc/native/src/objc_video_encoder_factory.mm:

(webrtc::ObjCVideoEncoderFactory::CreateVideoEncoder):

  • Source/webrtc/video/rtp_video_stream_receiver.cc:
  • Source/webrtc/video/rtp_video_stream_receiver.h:
  • Source/webrtc/video/send_statistics_proxy.cc:
  • Source/webrtc/video/video_receive_stream.cc:
  • Source/webrtc/video/video_stream_encoder.cc:
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Add a runtime flag for H265 in lieu of VP8 and pipe it to libwebrtc factories.
Test: webrtc/h265.html

  • page/Page.cpp:

(WebCore::m_deviceOrientationUpdateProvider):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webRTCH265CodecEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCH265CodecEnabled):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

Source/WebKit:

Remove VP8 runtime flag and add a H365 runtime flag instead.

  • Shared/WebPreferences.yaml:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

LayoutTests:

Location:
trunk
Files:
25 added
55 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259440 r259452  
     12020-04-03  youenn fablet  <youenn@apple.com>
     2
     3        Add initial support for WebRTC HEVC
     4        https://bugs.webkit.org/show_bug.cgi?id=204283
     5
     6        Reviewed by Eric Carlson.
     7
     8        * TestExpectations:
     9        * webrtc/h265-expected.txt: Added.
     10        * webrtc/h265.html: Added.
     11
    1122020-04-02  John Wilander  <wilander@apple.com>
    213
  • trunk/LayoutTests/TestExpectations

    r259261 r259452  
    17781778# Media Sessions is not yet enabled by default: ENABLE(MEDIA_SESSION)
    17791779media/session [ Skip ]
     1780
     1781# Experimental H265 support.
     1782webrtc/h265.html [ Pass Failure ]
    17801783
    17811784webrtc/simulcast-h264.html [ Slow ]
  • trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt

    r259345 r259452  
    14051405target_compile_definitions(webrtc PRIVATE
    14061406  OPENSSL_NO_ASM
     1407  DISABLE_H265
    14071408  DYNAMIC_ANNOTATIONS_ENABLED=1
    14081409  EXPAT_RELATIVE_PATH
  • trunk/Source/ThirdParty/libwebrtc/ChangeLog

    r259422 r259452  
     12020-04-03  youenn fablet  <youenn@apple.com>
     2
     3        Add initial support for WebRTC HEVC
     4        https://bugs.webkit.org/show_bug.cgi?id=204283
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add H265 packetization/depacketization and ObjC H265 encoder/decoder.
     9        Support is switchable using a boolean given to the decoder/encoder factories.
     10
     11        * Source/webrtc/api/video/video_codec_type.h:
     12        * Source/webrtc/api/video_codecs/video_codec.cc:
     13        * Source/webrtc/api/video_codecs/video_codec.h:
     14        (webrtc::VideoCodecH265::operator!= const):
     15        * Source/webrtc/api/video_codecs/video_encoder.cc:
     16        * Source/webrtc/api/video_codecs/video_encoder.h:
     17        * Source/webrtc/api/video_codecs/video_encoder_config.cc:
     18        * Source/webrtc/api/video_codecs/video_encoder_config.h:
     19        * Source/webrtc/build_overrides/build.gni:
     20        * Source/webrtc/call/rtp_payload_params.cc:
     21        * Source/webrtc/common_video/BUILD.gn:
     22        * Source/webrtc/common_video/h265/h265_common.cc: Added.
     23        * Source/webrtc/common_video/h265/h265_common.h: Added.
     24        * Source/webrtc/common_video/h265/h265_pps_parser.cc: Added.
     25        * Source/webrtc/common_video/h265/h265_pps_parser.h: Added.
     26        * Source/webrtc/common_video/h265/h265_sps_parser.cc: Added.
     27        * Source/webrtc/common_video/h265/h265_sps_parser.h: Added.
     28        * Source/webrtc/common_video/h265/h265_vps_parser.cc: Added.
     29        * Source/webrtc/common_video/h265/h265_vps_parser.h: Added.
     30        * Source/webrtc/media/base/media_constants.cc:
     31        * Source/webrtc/media/base/media_constants.h:
     32        * Source/webrtc/modules/rtp_rtcp/BUILD.gn:
     33        * Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc:
     34        * Source/webrtc/modules/rtp_rtcp/source/h265_sps_parser.cc: Added.
     35        * Source/webrtc/modules/rtp_rtcp/source/h265_sps_parser.h: Added.
     36        (webrtc::H265SpsParser::width):
     37        (webrtc::H265SpsParser::height):
     38        * Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc:
     39        * Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.cc: Added.
     40        * Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.h: Added.
     41        (webrtc::RtpPacketizerH265::Packet::Packet):
     42        (webrtc::RtpPacketizerH265::PacketUnit::PacketUnit):
     43        (webrtc::VideoRtpDepacketizerH265::~VideoRtpDepacketizerH265):
     44        * Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc:
     45        * Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h:
     46        * Source/webrtc/modules/video_coding/BUILD.gn:
     47        * Source/webrtc/modules/video_coding/codecs/h265/include/h265_globals.h: Added.
     48        * Source/webrtc/modules/video_coding/encoded_frame.cc:
     49        * Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc: Added.
     50        * Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.h: Added.
     51        * Source/webrtc/modules/video_coding/include/video_codec_interface.h:
     52        * Source/webrtc/modules/video_coding/jitter_buffer_common.h:
     53        * Source/webrtc/modules/video_coding/packet.cc:
     54        * Source/webrtc/modules/video_coding/packet_buffer.cc:
     55        * Source/webrtc/modules/video_coding/session_info.cc:
     56        * Source/webrtc/modules/video_coding/session_info.h:
     57        * Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc:
     58        * Source/webrtc/sdk/WebKit/WebKitUtilities.h:
     59        * Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
     60        (webrtc::createWebKitEncoderFactory):
     61        (webrtc::createWebKitDecoderFactory):
     62        * Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265+Private.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
     63        * Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265.h: Added.
     64        * Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265.mm: Added.
     65        (-[RTCCodecSpecificInfoH265 nativeCodecSpecificInfo]):
     66        * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h:
     67        * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m:
     68        (-[RTCDefaultVideoDecoderFactory initWithH265:]):
     69        (-[RTCDefaultVideoDecoderFactory supportedCodecs]):
     70        (-[RTCDefaultVideoDecoderFactory createDecoder:]):
     71        * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h:
     72        * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m:
     73        (-[RTCDefaultVideoEncoderFactory initWithH265:]):
     74        (+[RTCDefaultVideoEncoderFactory supportedCodecs]):
     75        (-[RTCDefaultVideoEncoderFactory createEncoder:]):
     76        (-[RTCDefaultVideoEncoderFactory supportedCodecs]):
     77        * Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
     78        * Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.mm: Added.
     79        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
     80        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm: Added.
     81        (RTCH265FrameDecodeParams::RTCH265FrameDecodeParams):
     82        (h265DecompressionOutputCallback):
     83        (-[RTCVideoDecoderH265 init]):
     84        (-[RTCVideoDecoderH265 dealloc]):
     85        (-[RTCVideoDecoderH265 startDecodeWithNumberOfCores:]):
     86        (-[RTCVideoDecoderH265 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
     87        (-[RTCVideoDecoderH265 setCallback:]):
     88        (-[RTCVideoDecoderH265 releaseDecoder]):
     89        (-[RTCVideoDecoderH265 resetDecompressionSession]):
     90        (-[RTCVideoDecoderH265 configureDecompressionSession]):
     91        (-[RTCVideoDecoderH265 destroyDecompressionSession]):
     92        (-[RTCVideoDecoderH265 setVideoFormat:]):
     93        (-[RTCVideoDecoderH265 implementationName]):
     94        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
     95        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.mm: Added.
     96        (-[RTCVideoEncoderH265 initWithCodecInfo:]):
     97        (-[RTCVideoEncoderH265 dealloc]):
     98        (-[RTCVideoEncoderH265 startEncodeWithSettings:numberOfCores:]):
     99        (-[RTCVideoEncoderH265 encode:codecSpecificInfo:frameTypes:]):
     100        (-[RTCVideoEncoderH265 setCallback:]):
     101        (-[RTCVideoEncoderH265 setBitrate:framerate:]):
     102        (-[RTCVideoEncoderH265 releaseEncoder]):
     103        (-[RTCVideoEncoderH265 resetCompressionSession]):
     104        (-[RTCVideoEncoderH265 configureCompressionSession]):
     105        (-[RTCVideoEncoderH265 destroyCompressionSession]):
     106        (-[RTCVideoEncoderH265 implementationName]):
     107        (-[RTCVideoEncoderH265 setBitrateBps:]):
     108        (-[RTCVideoEncoderH265 setEncoderBitrateBps:]):
     109        (-[RTCVideoEncoderH265 frameWasEncoded:flags:sampleBuffer:width:height:renderTimeMs:timestamp:rotation:]):
     110        (-[RTCVideoEncoderH265 scalingSettings]):
     111        * Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc:
     112        * Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h:
     113        * Source/webrtc/sdk/objc/native/src/objc_video_decoder_factory.mm:
     114        (webrtc::ObjCVideoDecoderFactory::CreateVideoDecoder):
     115        * Source/webrtc/sdk/objc/native/src/objc_video_encoder_factory.mm:
     116        (webrtc::ObjCVideoEncoderFactory::CreateVideoEncoder):
     117        * Source/webrtc/video/rtp_video_stream_receiver.cc:
     118        * Source/webrtc/video/rtp_video_stream_receiver.h:
     119        * Source/webrtc/video/send_statistics_proxy.cc:
     120        * Source/webrtc/video/video_receive_stream.cc:
     121        * Source/webrtc/video/video_stream_encoder.cc:
     122        * libwebrtc.xcodeproj/project.pbxproj:
     123
    11242020-04-02  Keith Rollin  <krollin@apple.com>
    2125
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video/video_codec_type.h

    r259345 r259452  
    2323  kVideoCodecAV1,
    2424  kVideoCodecH264,
     25#ifndef DISABLE_H265
     26  kVideoCodecH265,
     27#endif
    2528  kVideoCodecMultiplex,
    2629};
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.cc

    r259345 r259452  
    2626constexpr char kPayloadNameAv1[] = "AV1X";
    2727constexpr char kPayloadNameH264[] = "H264";
     28#ifndef DISABLE_H265
     29constexpr char kPayloadNameH265[] = "H265";
     30#endif
    2831constexpr char kPayloadNameGeneric[] = "Generic";
    2932constexpr char kPayloadNameMultiplex[] = "Multiplex";
     
    5659          numberOfTemporalLayers == other.numberOfTemporalLayers);
    5760}
     61
     62#ifndef DISABLE_H265
     63bool VideoCodecH265::operator==(const VideoCodecH265& other) const {
     64  return (frameDroppingOn == other.frameDroppingOn &&
     65          keyFrameInterval == other.keyFrameInterval &&
     66          vpsLen == other.vpsLen && spsLen == other.spsLen &&
     67          ppsLen == other.ppsLen &&
     68          (spsLen == 0 || memcmp(spsData, other.spsData, spsLen) == 0) &&
     69          (ppsLen == 0 || memcmp(ppsData, other.ppsData, ppsLen) == 0));
     70}
     71#endif
    5872
    5973bool SpatialLayer::operator==(const SpatialLayer& other) const {
     
    116130}
    117131
     132#ifndef DISABLE_H265
     133VideoCodecH265* VideoCodec::H265() {
     134  RTC_DCHECK_EQ(codecType, kVideoCodecH265);
     135  return &codec_specific_.H265;
     136}
     137
     138const VideoCodecH265& VideoCodec::H265() const {
     139  RTC_DCHECK_EQ(codecType, kVideoCodecH265);
     140  return codec_specific_.H265;
     141}
     142#endif
     143
    118144const char* CodecTypeToPayloadString(VideoCodecType type) {
    119145  switch (type) {
     
    126152    case kVideoCodecH264:
    127153      return kPayloadNameH264;
     154#ifndef DISABLE_H265
     155    case kVideoCodecH265:
     156      return kPayloadNameH265;
     157#endif
    128158    case kVideoCodecMultiplex:
    129159      return kPayloadNameMultiplex;
     
    142172  if (absl::EqualsIgnoreCase(name, kPayloadNameH264))
    143173    return kVideoCodecH264;
     174#ifndef DISABLE_H265
     175  if (absl::EqualsIgnoreCase(name, kPayloadNameH265))
     176    return kVideoCodecH265;
     177#endif
    144178  if (absl::EqualsIgnoreCase(name, kPayloadNameMultiplex))
    145179    return kVideoCodecMultiplex;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_codec.h

    r259345 r259452  
    8585};
    8686
     87#ifndef DISABLE_H265
     88struct VideoCodecH265 {
     89  bool operator==(const VideoCodecH265& other) const;
     90  bool operator!=(const VideoCodecH265& other) const {
     91    return !(*this == other);
     92  }
     93  bool frameDroppingOn;
     94  int keyFrameInterval;
     95  const uint8_t* vpsData;
     96  size_t vpsLen;
     97  const uint8_t* spsData;
     98  size_t spsLen;
     99  const uint8_t* ppsData;
     100  size_t ppsLen;
     101};
     102#endif
     103
    87104// Translates from name of codec to codec type and vice versa.
    88105RTC_EXPORT const char* CodecTypeToPayloadString(VideoCodecType type);
     
    93110  VideoCodecVP9 VP9;
    94111  VideoCodecH264 H264;
     112#ifndef DISABLE_H265
     113  VideoCodecH265 H265;
     114#endif
    95115};
    96116
     
    160180  VideoCodecH264* H264();
    161181  const VideoCodecH264& H264() const;
     182#ifndef DISABLE_H265
     183  VideoCodecH265* H265();
     184  const VideoCodecH265& H265() const;
     185#endif
    162186
    163187 private:
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.cc

    r259345 r259452  
    6060  return h264_settings;
    6161}
     62
     63#ifndef DISABLE_H265
     64VideoCodecH265 VideoEncoder::GetDefaultH265Settings() {
     65  VideoCodecH265 h265_settings;
     66  memset(&h265_settings, 0, sizeof(h265_settings));
     67
     68  // h265_settings.profile = kProfileBase;
     69  h265_settings.frameDroppingOn = true;
     70  h265_settings.keyFrameInterval = 3000;
     71  h265_settings.spsData = nullptr;
     72  h265_settings.spsLen = 0;
     73  h265_settings.ppsData = nullptr;
     74  h265_settings.ppsLen = 0;
     75
     76  return h265_settings;
     77}
     78#endif
    6279
    6380VideoEncoder::ScalingSettings::ScalingSettings() = default;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder.h

    r259345 r259452  
    321321  static VideoCodecVP9 GetDefaultVp9Settings();
    322322  static VideoCodecH264 GetDefaultH264Settings();
     323#ifndef DISABLE_H265
     324  static VideoCodecH265 GetDefaultH265Settings();
     325#endif
    323326
    324327  virtual ~VideoEncoder() {}
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder_config.cc

    r259345 r259452  
    9494  } else if (codec->codecType == kVideoCodecVP9) {
    9595    FillVideoCodecVp9(codec->VP9());
     96#ifndef DISABLE_H265
     97  } else if (codec->codecType == kVideoCodecH265) {
     98    FillVideoCodecH265(codec->H265());
     99#endif
    96100  } else {
    97101    RTC_NOTREACHED() << "Encoder specifics set/used for unknown codec type.";
     
    103107  RTC_NOTREACHED();
    104108}
     109
     110#ifndef DISABLE_H265
     111void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecH265(
     112    VideoCodecH265* h265_settings) const {
     113  RTC_NOTREACHED();
     114}
     115#endif
    105116
    106117void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecVp8(
     
    123134}
    124135
     136#ifndef DISABLE_H265
     137VideoEncoderConfig::H265EncoderSpecificSettings::H265EncoderSpecificSettings(
     138    const VideoCodecH265& specifics)
     139    : specifics_(specifics) {}
     140
     141void VideoEncoderConfig::H265EncoderSpecificSettings::FillVideoCodecH265(
     142    VideoCodecH265* h265_settings) const {
     143  *h265_settings = specifics_;
     144}
     145#endif
     146
    125147VideoEncoderConfig::Vp8EncoderSpecificSettings::Vp8EncoderSpecificSettings(
    126148    const VideoCodecVP8& specifics)
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/api/video_codecs/video_encoder_config.h

    r259345 r259452  
    8585    virtual void FillVideoCodecVp9(VideoCodecVP9* vp9_settings) const;
    8686    virtual void FillVideoCodecH264(VideoCodecH264* h264_settings) const;
     87#ifndef DISABLE_H265
     88    virtual void FillVideoCodecH265(VideoCodecH265* h265_settings) const;
     89#endif
    8790
    8891   private:
     
    99102    VideoCodecH264 specifics_;
    100103  };
     104
     105#ifndef DISABLE_H265
     106  class H265EncoderSpecificSettings : public EncoderSpecificSettings {
     107   public:
     108    explicit H265EncoderSpecificSettings(const VideoCodecH265& specifics);
     109    void FillVideoCodecH265(VideoCodecH265* h265_settings) const override;
     110
     111   private:
     112    VideoCodecH265 specifics_;
     113  };
     114#endif
    101115
    102116  class Vp8EncoderSpecificSettings : public EncoderSpecificSettings {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/build_overrides/build.gni

    r238967 r259452  
    3636ignore_elf32_limitations = true
    3737
     38if (is_win || is_ios || is_android) {
     39  rtc_use_h265 = true
     40} else {
     41  rtc_use_h265 = false
     42}
     43
    3844# Use bundled hermetic Xcode installation maintainted by Chromium,
    3945# except for local iOS builds where it's unsupported.
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/call/rtp_payload_params.cc

    r259345 r259452  
    106106      return;
    107107    }
     108#ifndef DISABLE_H265
     109    case kVideoCodecH265: {
     110      auto h265_header = rtp->video_type_header.emplace<RTPVideoHeaderH265>();
     111      h265_header.packetization_mode =
     112          info.codecSpecific.H265.packetization_mode;
     113    }
     114    return;
     115#endif
    108116    case kVideoCodecMultiplex:
    109117    case kVideoCodecGeneric:
     
    301309      }
    302310      return;
     311#ifndef DISABLE_H265
     312    case VideoCodecType::kVideoCodecH265:
     313#endif
    303314    case VideoCodecType::kVideoCodecMultiplex:
    304315      return;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/common_video/BUILD.gn

    r259345 r259452  
    4141    "video_render_frames.h",
    4242  ]
     43
     44  if (rtc_use_h265) {
     45    sources += [
     46      "h265/h265_common.cc",
     47      "h265/h265_common.h",
     48      "h265/h265_pps_parser.cc",
     49      "h265/h265_pps_parser.h",
     50      "h265/h265_sps_parser.cc",
     51      "h265/h265_sps_parser.h",
     52      "h265/h265_vps_parser.cc",
     53      "h265/h265_vps_parser.h",
     54    ]
     55  }
    4356
    4457  deps = [
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.cc

    r259345 r259452  
    108108const char kAv1CodecName[] = "AV1X";
    109109const char kH264CodecName[] = "H264";
     110#ifndef DISABLE_H265
     111const char kH265CodecName[] = "H265";
     112#endif
    110113
    111114// RFC 6184 RTP Payload Format for H.264 video
     
    115118const char kH264FmtpSpropParameterSets[] = "sprop-parameter-sets";
    116119const char kH264ProfileLevelConstrainedBaseline[] = "42e01f";
     120#ifndef DISABLE_H265
     121// RFC 7798 RTP Payload Format for H.265 video
     122const char kH265FmtpProfileSpace[] = "profile-space";
     123const char kH265FmtpProfileId[] = "profile-id";
     124const char kH265FmtpTierFlag[] = "tier-flag";
     125const char kH265FmtpLevelId[] = "level-id";
     126#endif
    117127
    118128const int kDefaultVideoMaxFramerate = 60;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/media/base/media_constants.h

    r259345 r259452  
    137137RTC_EXPORT extern const char kAv1CodecName[];
    138138RTC_EXPORT extern const char kH264CodecName[];
     139#ifndef DISABLE_H265
     140RTC_EXPORT extern const char kH265CodecName[];
     141#endif
    139142
    140143// RFC 6184 RTP Payload Format for H.264 video
     
    144147extern const char kH264FmtpSpropParameterSets[];
    145148extern const char kH264ProfileLevelConstrainedBaseline[];
     149
     150#ifndef DISABLE_H265
     151// RFC 7798 RTP Payload Format for H.265 video
     152RTC_EXPORT extern const char kH265FmtpProfileSpace[];
     153RTC_EXPORT extern const char kH265FmtpProfileId[];
     154RTC_EXPORT extern const char kH265FmtpTierFlag[];
     155RTC_EXPORT extern const char kH265FmtpLevelId[];
     156#endif
    146157
    147158extern const int kDefaultVideoMaxFramerate;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/BUILD.gn

    r259345 r259452  
    235235  } else {
    236236    defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
     237  }
     238
     239  if (rtc_use_h265) {
     240    sources += [
     241      "source/rtp_format_h265.cc",
     242      "source/rtp_format_h265.h",
     243    ]
     244  }
     245
     246  if (!rtc_use_h265) {
     247    defines += ["DISABLE_H265"]
    237248  }
    238249
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc

    r259345 r259452  
    1414
    1515#include "api/video/video_codec_type.h"
     16#ifndef DISABLE_H265
     17#include "modules/rtp_rtcp/source/rtp_format_h265.h"
     18#endif
    1619#include "modules/rtp_rtcp/source/video_rtp_depacketizer.h"
    1720#include "modules/rtp_rtcp/source/video_rtp_depacketizer_av1.h"
     
    2831    case kVideoCodecH264:
    2932      return std::make_unique<VideoRtpDepacketizerH264>();
     33#ifndef DISABLE_H265
     34    case kVideoCodecH265:
     35      return std::make_unique<VideoRtpDepacketizerH265>();
     36#endif
    3037    case kVideoCodecVP8:
    3138      return std::make_unique<VideoRtpDepacketizerVp8>();
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc

    r259345 r259452  
    1515#include "absl/types/variant.h"
    1616#include "modules/rtp_rtcp/source/rtp_format_h264.h"
     17#ifndef DISABLE_H265
     18#include "modules/rtp_rtcp/source/rtp_format_h265.h"
     19#endif
    1720#include "modules/rtp_rtcp/source/rtp_format_video_generic.h"
    1821#include "modules/rtp_rtcp/source/rtp_format_vp8.h"
     
    2023#include "modules/rtp_rtcp/source/rtp_packetizer_av1.h"
    2124#include "modules/video_coding/codecs/h264/include/h264_globals.h"
     25#ifndef DISABLE_H265
     26#include "modules/video_coding/codecs/h265/include/h265_globals.h"
     27#endif
    2228#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
    2329#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
     
    4652          payload, limits, h264.packetization_mode, *fragmentation);
    4753    }
     54#ifndef DISABLE_H265
     55    case kVideoCodecH265: {
     56      RTC_CHECK(fragmentation);
     57      const auto& h265 =
     58          absl::get<RTPVideoHeaderH265>(rtp_video_header.video_type_header);
     59      return absl::make_unique<RtpPacketizerH265>(
     60          payload, limits, h265.packetization_mode, *fragmentation);
     61    }
     62#endif
    4863    case kVideoCodecVP8: {
    4964      const auto& vp8 =
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc

    r259345 r259452  
    800800    }
    801801    uint8_t operator()(const RTPVideoHeaderH264&) { return kNoTemporalIdx; }
     802#ifndef DISABLE_H265
     803    uint8_t operator()(const RTPVideoHeaderH265&) { return kNoTemporalIdx; }
     804#endif
    802805    uint8_t operator()(const RTPVideoHeaderLegacyGeneric&) {
    803806      return kNoTemporalIdx;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h

    r259345 r259452  
    2626#include "common_types.h"  // NOLINT(build/include)
    2727#include "modules/video_coding/codecs/h264/include/h264_globals.h"
     28#ifndef DISABLE_H265
     29#include "modules/video_coding/codecs/h265/include/h265_globals.h"
     30#endif
    2831#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
    2932#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
     
    3740};
    3841
     42#ifndef DISABLE_H265
     43using RTPVideoTypeHeader = absl::variant<absl::monostate,
     44                                         RTPVideoHeaderVP8,
     45                                         RTPVideoHeaderVP9,
     46                                         RTPVideoHeaderH264,
     47                                         RTPVideoHeaderH265,
     48                                         RTPVideoHeaderLegacyGeneric>;
     49#else
    3950using RTPVideoTypeHeader = absl::variant<absl::monostate,
    4051                                         RTPVideoHeaderVP8,
     
    4253                                         RTPVideoHeaderH264,
    4354                                         RTPVideoHeaderLegacyGeneric>;
     55#endif
    4456
    4557struct RTPVideoHeader {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/BUILD.gn

    r259345 r259452  
    1515    "encoded_frame.h",
    1616  ]
     17
     18  if (rtc_use_h265) {
     19    sources += [
     20      "h265_vps_sps_pps_tracker.cc",
     21      "h265_vps_sps_pps_tracker.h",
     22    ]
     23  }
     24
    1725  deps = [
    1826    ":codec_globals_headers",
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/encoded_frame.cc

    r259345 r259452  
    152152        break;
    153153      }
     154#ifndef DISABLE_H265
     155      case kVideoCodecH265: {
     156        _codecSpecificInfo.codecType = kVideoCodecH265;
     157        break;
     158      }
     159#endif
    154160      default: {
    155161        _codecSpecificInfo.codecType = kVideoCodecGeneric;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/include/video_codec_interface.h

    r259345 r259452  
    2121#include "modules/include/module_common_types.h"
    2222#include "modules/video_coding/codecs/h264/include/h264_globals.h"
     23#ifndef DISABLE_H265
     24#include "modules/video_coding/codecs/h265/include/h265_globals.h"
     25#endif
    2326#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
    2427#include "modules/video_coding/include/video_error_codes.h"
     
    9396static_assert(std::is_pod<CodecSpecificInfoH264>::value, "");
    9497
     98#ifndef DISABLE_H265
     99struct CodecSpecificInfoH265 {
     100  H265PacketizationMode packetization_mode;
     101  bool idr_frame;
     102};
     103#endif
     104
    95105union CodecSpecificInfoUnion {
    96106  CodecSpecificInfoVP8 VP8;
    97107  CodecSpecificInfoVP9 VP9;
    98108  CodecSpecificInfoH264 H264;
     109#ifndef DISABLE_H265
     110  CodecSpecificInfoH265 H265;
     111#endif
    99112};
    100113static_assert(std::is_pod<CodecSpecificInfoUnion>::value, "");
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/jitter_buffer_common.h

    r252472 r259452  
    5555
    5656enum { kH264StartCodeLengthBytes = 4 };
     57#ifndef DISABLE_H265
     58enum { kH265StartCodeLengthBytes = 4 };
     59#endif
    5760}  // namespace webrtc
    5861
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/packet.cc

    r252472 r259452  
    4545      timesNacked(-1),
    4646      completeNALU(kNaluIncomplete),
    47       insertStartCode(videoHeader.codec == kVideoCodecH264 &&
     47#ifndef DISABLE_H265
     48      insertStartCode((videoHeader.codec == kVideoCodecH264 || videoHeader.codec == kVideoCodecH265) &&
    4849                      videoHeader.is_first_packet_in_frame),
     50#else
     51       insertStartCode(videoHeader.codec == kVideoCodecH264 &&
     52                       videoHeader.is_first_packet_in_frame),
     53#endif
    4954      video_header(videoHeader),
    5055      packet_info(rtp_header, receive_time_ms) {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/packet_buffer.cc

    r259345 r259452  
    2525#include "api/video/video_frame_type.h"
    2626#include "common_video/h264/h264_common.h"
     27#ifndef DISABLE_H265
     28#include "common_video/h265/h265_common.h"
     29#endif
    2730#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
    2831#include "modules/rtp_rtcp/source/rtp_packet_received.h"
     
    3033#include "modules/rtp_rtcp/source/video_rtp_depacketizer_av1.h"
    3134#include "modules/video_coding/codecs/h264/include/h264_globals.h"
     35#ifndef DISABLE_H265
     36#include "modules/video_coding/codecs/h265/include/h265_globals.h"
     37#endif
    3238#include "modules/video_coding/frame_object.h"
    3339#include "rtc_base/checks.h"
     
    290296      bool has_h264_idr = false;
    291297      bool is_h264_keyframe = false;
     298      bool is_h265 = false;
     299#ifndef DISABLE_H265
     300      is_h265 = buffer_[start_index].packet->codec() == kVideoCodecH265;
     301      bool has_h265_sps = false;
     302      bool has_h265_pps = false;
     303      bool has_h265_idr = false;
     304      bool is_h265_keyframe = false;
     305#endif
    292306      int idr_width = -1;
    293307      int idr_height = -1;
     
    295309        ++tested_packets;
    296310
    297         if (!is_h264 && buffer_[start_index].frame_begin())
     311        if (!is_h264 && !is_h265 && buffer_[start_index].frame_begin())
    298312          break;
    299313
     
    328342          }
    329343        }
    330 
     344#ifndef DISABLE_H265
     345        if (is_h265 && !is_h265_keyframe) {
     346          const auto* h265_header = absl::get_if<RTPVideoHeaderH265>(
     347              &buffer_[start_index].packet->video_header.video_type_header);
     348          if (!h265_header || h265_header->nalus_length >= kMaxNalusPerPacket)
     349            return found_frames;
     350          for (size_t j = 0; j < h265_header->nalus_length; ++j) {
     351            if (h265_header->nalus[j].type == H265::NaluType::kSps) {
     352              has_h265_sps = true;
     353            } else if (h265_header->nalus[j].type == H265::NaluType::kPps) {
     354              has_h265_pps = true;
     355            } else if (h265_header->nalus[j].type == H265::NaluType::kIdrWRadl
     356                       || h265_header->nalus[j].type == H265::NaluType::kIdrNLp
     357                       || h265_header->nalus[j].type == H265::NaluType::kCra) {
     358              has_h265_idr = true;
     359            }
     360          }
     361          if ((has_h265_sps && has_h265_pps) || has_h265_idr) {
     362            is_h265_keyframe = true;
     363          }
     364        }
     365#endif
    331366        if (tested_packets == buffer_.size())
    332367          break;
     
    340375        // the PacketBuffer to hand out incomplete frames.
    341376        // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=7106
    342         if (is_h264 &&
     377        if ((is_h264 || is_h265) &&
    343378            (!buffer_[start_index].used() ||
    344379             buffer_[start_index].packet->timestamp != frame_timestamp)) {
     
    394429      }
    395430
     431#ifndef DISABLE_H265
     432      if (is_h265) {
     433        // Warn if this is an unsafe frame.
     434        if (has_h265_idr && (!has_h265_sps || !has_h265_pps)) {
     435          std::stringstream ss;
     436          ss << "Received H.265-IDR frame "
     437             << "(SPS: " << has_h265_sps << ", PPS: " << has_h265_pps << "). ";
     438          ss << "Treating as delta frame since "
     439                "WebRTC-SpsPpsIdrIsH265Keyframe is always enabled.";
     440          RTC_LOG(LS_WARNING) << ss.str();
     441        }
     442
     443        // Now that we have decided whether to treat this frame as a key frame
     444        // or delta frame in the frame buffer, we update the field that
     445        // determines if the RtpFrameObject is a key frame or delta frame.
     446        const size_t first_packet_index = start_seq_num % buffer_.size();
     447        RTC_CHECK_LT(first_packet_index, buffer_.size());
     448        if (is_h265_keyframe) {
     449          buffer_[first_packet_index].packet->video_header.frame_type = VideoFrameType::kVideoFrameKey;
     450        } else {
     451          buffer_[first_packet_index].packet->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
     452        }
     453
     454        // If this is not a key frame, make sure there are no gaps in the
     455        // packet sequence numbers up until this point.
     456        if (!is_h265_keyframe && missing_packets_.upper_bound(start_seq_num) !=
     457                                     missing_packets_.begin()) {
     458          uint16_t stop_index = (index + 1) % buffer_.size();
     459          while (start_index != stop_index) {
     460            // FIXME: find what it does.
     461            //sequence_buffer_[start_index].frame_created = false;
     462            start_index = (start_index + 1) % buffer_.size();
     463          }
     464
     465          return found_frames;
     466        }
     467      }
     468#endif
     469
    396470      if (auto frame = AssembleFrame(start_seq_num, seq_num)) {
    397471        found_frames.push_back(std::move(frame));
     
    400474                          << start_seq_num << "-" << seq_num;
    401475      }
     476
    402477
    403478      missing_packets_.erase(missing_packets_.begin(),
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/session_info.cc

    r259345 r259452  
    154154}
    155155
     156#ifndef DISABLE_H265
     157std::vector<H265NaluInfo> VCMSessionInfo::GetH265NaluInfos() const {
     158  if (packets_.empty() || packets_.front().video_header.codec != kVideoCodecH265)
     159    return std::vector<H265NaluInfo>();
     160  std::vector<H265NaluInfo> nalu_infos;
     161  for (const VCMPacket& packet : packets_) {
     162    const auto& h265 =
     163        absl::get<RTPVideoHeaderH265>(packet.video_header.video_type_header);
     164    for (size_t i = 0; i < h265.nalus_length; ++i) {
     165      nalu_infos.push_back(h265.nalus[i]);
     166    }
     167  }
     168  return nalu_infos;
     169}
     170#endif
     171
    156172void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) {
    157173  if (packets_.empty())
     
    212228  // header supplied by the H264 depacketizer.
    213229  const size_t kH264NALHeaderLengthInBytes = 1;
     230#ifndef DISABLE_H265
     231  const size_t kH265NALHeaderLengthInBytes = 2;
     232  const auto* h265 =
     233      absl::get_if<RTPVideoHeaderH265>(&packet.video_header.video_type_header);
     234#endif
    214235  const size_t kLengthFieldLength = 2;
    215236  const auto* h264 =
     
    237258    return packet.sizeBytes;
    238259  }
     260#ifndef DISABLE_H265
     261  else if (h265 && h265->packetization_type == kH265AP) {
     262    // Similar to H264, for H265 aggregation packets, we rely on jitter buffer
     263    // to remove the two length bytes between each NAL unit, and potentially add
     264    // start codes.
     265    size_t required_length = 0;
     266    const uint8_t* nalu_ptr =
     267        packet_buffer + kH265NALHeaderLengthInBytes;  // skip payloadhdr
     268    while (nalu_ptr < packet_buffer + packet.sizeBytes) {
     269      size_t length = BufferToUWord16(nalu_ptr);
     270      required_length +=
     271          length + (packet.insertStartCode ? kH265StartCodeLengthBytes : 0);
     272      nalu_ptr += kLengthFieldLength + length;
     273    }
     274    ShiftSubsequentPackets(packet_it, required_length);
     275    nalu_ptr = packet_buffer + kH265NALHeaderLengthInBytes;
     276    uint8_t* frame_buffer_ptr = frame_buffer + offset;
     277    while (nalu_ptr < packet_buffer + packet.sizeBytes) {
     278      size_t length = BufferToUWord16(nalu_ptr);
     279      nalu_ptr += kLengthFieldLength;
     280      // since H265 shares the same start code as H264, use the same Insert
     281      // function to handle start code.
     282      frame_buffer_ptr += Insert(nalu_ptr, length, packet.insertStartCode,
     283                                 const_cast<uint8_t*>(frame_buffer_ptr));
     284      nalu_ptr += length;
     285    }
     286    packet.sizeBytes = required_length;
     287    return packet.sizeBytes;
     288  }
     289#endif
    239290  ShiftSubsequentPackets(
    240291      packet_it, packet.sizeBytes +
     
    463514      last_packet_seq_num_ = packet.seqNum;
    464515    }
     516#ifndef DISABLE_H265
     517  } else if (packet.codec() == kVideoCodecH265) {
     518    frame_type_ = packet.video_header.frame_type;
     519    if (packet.is_first_packet_in_frame() &&
     520        (first_packet_seq_num_ == -1 ||
     521         IsNewerSequenceNumber(first_packet_seq_num_, packet.seqNum))) {
     522      first_packet_seq_num_ = packet.seqNum;
     523    }
     524    if (packet.markerBit &&
     525        (last_packet_seq_num_ == -1 ||
     526         IsNewerSequenceNumber(packet.seqNum, last_packet_seq_num_))) {
     527      last_packet_seq_num_ = packet.seqNum;
     528    }
     529#else
    465530  } else {
     531#endif
    466532    // Only insert media packets between first and last packets (when
    467533    // available).
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/session_info.h

    r252472 r259452  
    6666
    6767  std::vector<NaluInfo> GetNaluInfos() const;
    68 
     68#ifndef DISABLE_H265
     69  std::vector<H265NaluInfo> GetH265NaluInfos() const;
     70#endif
    6971  void SetGofInfo(const GofInfoVP9& gof_info, size_t idx);
    7072
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc

    r259345 r259452  
    101101      case kVideoCodecH264:
    102102        return min_bitrate_h264.GetOptional();
     103#ifndef DISABLE_H265
     104      case kVideoCodecH265:
     105#endif
    103106      case kVideoCodecGeneric:
    104107      case kVideoCodecMultiplex:
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h

    r254050 r259452  
    4040class VideoFrame;
    4141
    42 enum class WebKitCodecSupport { H264, H264AndVP8 };
     42enum class WebKitCodecSupport { H264VP8AndH265, H264AndVP8 };
    4343
    4444std::unique_ptr<webrtc::VideoEncoderFactory> createWebKitEncoderFactory(WebKitCodecSupport);
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm

    r254050 r259452  
    117117#endif
    118118
    119     auto internalFactory = ObjCToNativeVideoEncoderFactory(codecSupport == WebKitCodecSupport::H264AndVP8 ? [[RTCDefaultVideoEncoderFactory alloc] init] : [[RTCVideoEncoderFactoryH264 alloc] init]);
     119    auto internalFactory = ObjCToNativeVideoEncoderFactory([[RTCDefaultVideoEncoderFactory alloc] initWithH265: codecSupport == WebKitCodecSupport::H264VP8AndH265]);
    120120    return std::make_unique<VideoEncoderFactoryWithSimulcast>(std::move(internalFactory));
    121121}
     
    272272std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitCodecSupport codecSupport)
    273273{
    274     auto internalFactory = ObjCToNativeVideoDecoderFactory(codecSupport == WebKitCodecSupport::H264AndVP8 ? [[RTCDefaultVideoDecoderFactory alloc] init] : [[RTCVideoDecoderFactoryH264 alloc] init]);
     274    auto internalFactory = ObjCToNativeVideoDecoderFactory([[RTCDefaultVideoDecoderFactory alloc] initWithH265: codecSupport == WebKitCodecSupport::H264VP8AndH265]);
    275275    if (videoDecoderCallbacks().createCallback)
    276276        return std::make_unique<RemoteVideoDecoderFactory>(std::move(internalFactory));
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265+Private.h

    r259451 r259452  
    88 *  be found in the AUTHORS file in the root of the source tree.
    99 */
     10/* This file is borrowed from sdk/objc/components/video_codec/RTCCodecSpecificInfoH264+Private.h */
    1011
    11 #import <Foundation/Foundation.h>
     12#import "RTCCodecSpecificInfoH265.h"
    1213
    13 #import "RTCMacros.h"
    14 #import "RTCVideoDecoderFactory.h"
     14#include "modules/video_coding/include/video_codec_interface.h"
    1515
    1616NS_ASSUME_NONNULL_BEGIN
    1717
    18 /** This decoder factory include support for all codecs bundled with WebRTC. If using custom
    19  *  codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory.
    20  */
    21 RTC_OBJC_EXPORT
    22 __attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory")))
    23 @interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory>
     18/* Interfaces for converting to/from internal C++ formats. */
     19@interface RTCCodecSpecificInfoH265 ()
     20
     21- (webrtc::CodecSpecificInfo)nativeCodecSpecificInfo;
     22
    2423@end
    2524
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h

    r237075 r259452  
    2222__attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory")))
    2323@interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory>
     24- (id)initWithH265:(bool)supportH265;
    2425@end
    2526
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m

    r259345 r259452  
    1919#import "api/video_codec/RTCVideoDecoderVP9.h"
    2020#endif
     21#if !defined(RTC_DISABLE_H265)
     22#import "RTCH265ProfileLevelId.h"
     23#import "RTCVideoDecoderH265.h"
     24#endif
    2125
    22 @implementation RTCDefaultVideoDecoderFactory
     26@implementation RTCDefaultVideoDecoderFactory {
     27  bool _supportH265;
     28}
     29
     30- (id)initWithH265:(bool)supportH265
     31{
     32  self = [super init];
     33  if (self) {
     34      _supportH265 = supportH265;
     35  }
     36  return self;
     37}
    2338
    2439- (NSArray<RTCVideoCodecInfo *> *)supportedCodecs {
     
    4358  RTCVideoCodecInfo *vp8Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp8Name];
    4459
     60#if !defined(RTC_DISABLE_H265)
     61  RTCVideoCodecInfo *h265Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecH265Name];
     62#endif
     63 
    4564#if defined(RTC_ENABLE_VP9)
    4665  RTCVideoCodecInfo *vp9Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name];
    4766#endif
    4867
     68  if (!_supportH265) {
     69    return @[
     70      constrainedHighInfo,
     71      constrainedBaselineInfo,
     72      vp8Info,
     73#if defined(RTC_ENABLE_VP9)
     74      vp9Info,
     75#endif
     76    ];
     77  }
    4978  return @[
    5079    constrainedHighInfo,
    5180    constrainedBaselineInfo,
     81#if !defined(RTC_DISABLE_H265)
     82    h265Info,
     83#endif
    5284    vp8Info,
    5385#if defined(RTC_ENABLE_VP9)
     
    6294  } else if ([info.name isEqualToString:kRTCVideoCodecVp8Name]) {
    6395    return [RTCVideoDecoderVP8 vp8Decoder];
     96#if !defined(RTC_DISABLE_H265)
     97  } else if ([info.name isEqualToString:kRTCVideoCodecH265Name]) {
     98    return [[RTCVideoDecoderH265 alloc] init];
     99#endif
    64100#if defined(RTC_ENABLE_VP9)
    65101  } else if ([info.name isEqualToString:kRTCVideoCodecVp9Name]) {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h

    r237075 r259452  
    2323@interface RTCDefaultVideoEncoderFactory : NSObject <RTCVideoEncoderFactory>
    2424
    25 @property(nonatomic, retain) RTCVideoCodecInfo *preferredCodec;
    26 
     25- (id)initWithH265:(bool)supportH265;
    2726+ (NSArray<RTCVideoCodecInfo *> *)supportedCodecs;
    2827
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m

    r252472 r259452  
    1919#import "api/video_codec/RTCVideoEncoderVP9.h"
    2020#endif
     21#if !defined(DISABLE_H265)
     22#import "RTCH265ProfileLevelId.h"
     23#import "RTCVideoEncoderH265.h"
     24#endif
    2125
    22 @implementation RTCDefaultVideoEncoderFactory
     26@implementation RTCDefaultVideoEncoderFactory {
     27  bool _supportH265;
     28}
    2329
    24 @synthesize preferredCodec;
     30- (id)initWithH265:(bool)supportH265
     31{
     32  self = [super init];
     33  if (self) {
     34      _supportH265 = supportH265;
     35  }
     36  return self;
     37}
    2538
    2639+ (NSArray<RTCVideoCodecInfo *> *)supportedCodecs {
     
    4356                                   parameters:constrainedBaselineParams];
    4457
     58#if !defined(DISABLE_H265)
     59  RTCVideoCodecInfo *h265Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecH265Name];
     60#endif
     61
    4562  RTCVideoCodecInfo *vp8Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp8Name];
    4663
     
    5269    constrainedHighInfo,
    5370    constrainedBaselineInfo,
     71#if !defined(DISABLE_H265)
     72    h265Info,
     73#endif
    5474    vp8Info,
    5575#if defined(RTC_ENABLE_VP9)
     
    6888    return [RTCVideoEncoderVP9 vp9Encoder];
    6989#endif
     90#if !defined(DISABLE_H265)
     91  } else if (@available(iOS 11, *)) {
     92    if ([info.name isEqualToString:kRTCVideoCodecH265Name]) {
     93      return [[RTCVideoEncoderH265 alloc] initWithCodecInfo:info];
     94    }
     95#endif
    7096  }
    7197
     
    77103
    78104  NSMutableArray<RTCVideoCodecInfo *> *orderedCodecs = [NSMutableArray array];
    79   NSUInteger index = [codecs indexOfObject:self.preferredCodec];
    80   if (index != NSNotFound) {
    81     [orderedCodecs addObject:[codecs objectAtIndex:index]];
    82     [codecs removeObjectAtIndex:index];
    83   }
    84105  [orderedCodecs addObjectsFromArray:codecs];
     106  if (!_supportH265)
     107    [orderedCodecs removeObjectAtIndex:0];
    85108
    86109  return [orderedCodecs copy];
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.h

    r259451 r259452  
    1212
    1313#import "RTCMacros.h"
    14 #import "RTCVideoDecoderFactory.h"
    1514
    16 NS_ASSUME_NONNULL_BEGIN
    17 
    18 /** This decoder factory include support for all codecs bundled with WebRTC. If using custom
    19  *  codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory.
    20  */
    21 RTC_OBJC_EXPORT
    22 __attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory")))
    23 @interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory>
    24 @end
    25 
    26 NS_ASSUME_NONNULL_END
     15RTC_OBJC_EXPORT extern NSString *const kRTCVideoCodecH265Name;
     16RTC_OBJC_EXPORT extern NSString *const kRTCLevel31Main;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.h

    r259451 r259452  
    1212
    1313#import "RTCMacros.h"
    14 #import "RTCVideoDecoderFactory.h"
     14#import "RTCVideoDecoder.h"
    1515
    16 NS_ASSUME_NONNULL_BEGIN
    17 
    18 /** This decoder factory include support for all codecs bundled with WebRTC. If using custom
    19  *  codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory.
    20  */
    2116RTC_OBJC_EXPORT
    22 __attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory")))
    23 @interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory>
     17__attribute__((objc_runtime_name("WK_RTCVideoDecoderH265")))
     18@interface RTCVideoDecoderH265 : NSObject <RTCVideoDecoder>
    2419@end
    25 
    26 NS_ASSUME_NONNULL_END
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.h

    r259451 r259452  
    1212
    1313#import "RTCMacros.h"
    14 #import "RTCVideoDecoderFactory.h"
     14#import "RTCVideoCodecInfo.h"
     15#import "RTCVideoEncoder.h"
    1516
    16 NS_ASSUME_NONNULL_BEGIN
     17RTC_OBJC_EXPORT
     18__attribute__((objc_runtime_name("WK_RTCVideoEncoderH265")))
     19@interface RTCVideoEncoderH265 : NSObject <RTCVideoEncoder>
    1720
    18 /** This decoder factory include support for all codecs bundled with WebRTC. If using custom
    19  *  codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory.
    20  */
    21 RTC_OBJC_EXPORT
    22 __attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory")))
    23 @interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory>
     21- (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo;
     22
    2423@end
    25 
    26 NS_ASSUME_NONNULL_END
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc

    r252472 r259452  
    249249}
    250250
     251#ifndef DISABLE_H265
     252bool H265CMSampleBufferToAnnexBBuffer(
     253    CMSampleBufferRef hvcc_sample_buffer,
     254    bool is_keyframe,
     255    rtc::Buffer* annexb_buffer,
     256    std::unique_ptr<RTPFragmentationHeader> *out_header) {
     257  RTC_DCHECK(hvcc_sample_buffer);
     258  RTC_DCHECK(out_header);
     259  out_header->reset(nullptr);
     260
     261  // Get format description from the sample buffer.
     262  CMVideoFormatDescriptionRef description =
     263      CMSampleBufferGetFormatDescription(hvcc_sample_buffer);
     264  if (description == nullptr) {
     265    RTC_LOG(LS_ERROR) << "Failed to get sample buffer's description.";
     266    return false;
     267  }
     268
     269  // Get parameter set information.
     270  int nalu_header_size = 0;
     271  size_t param_set_count = 0;
     272  OSStatus status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
     273      description, 0, nullptr, nullptr, &param_set_count, &nalu_header_size);
     274  if (status != noErr) {
     275    RTC_LOG(LS_ERROR) << "Failed to get parameter set.";
     276    return false;
     277  }
     278  RTC_CHECK_EQ(nalu_header_size, kAvccHeaderByteSize);
     279  RTC_DCHECK_EQ(param_set_count, 3);
     280
     281  // Truncate any previous data in the buffer without changing its capacity.
     282  annexb_buffer->SetSize(0);
     283
     284  size_t nalu_offset = 0;
     285  std::vector<size_t> frag_offsets;
     286  std::vector<size_t> frag_lengths;
     287
     288  // Place all parameter sets at the front of buffer.
     289  if (is_keyframe) {
     290    size_t param_set_size = 0;
     291    const uint8_t* param_set = nullptr;
     292    for (size_t i = 0; i < param_set_count; ++i) {
     293      status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
     294          description, i, &param_set, &param_set_size, nullptr, nullptr);
     295      if (status != noErr) {
     296        RTC_LOG(LS_ERROR) << "Failed to get parameter set.";
     297        return false;
     298      }
     299      // Update buffer.
     300      annexb_buffer->AppendData(kAnnexBHeaderBytes, sizeof(kAnnexBHeaderBytes));
     301      annexb_buffer->AppendData(reinterpret_cast<const char*>(param_set),
     302                                param_set_size);
     303      // Update fragmentation.
     304      frag_offsets.push_back(nalu_offset + sizeof(kAnnexBHeaderBytes));
     305      frag_lengths.push_back(param_set_size);
     306      nalu_offset += sizeof(kAnnexBHeaderBytes) + param_set_size;
     307    }
     308  }
     309
     310  // Get block buffer from the sample buffer.
     311  CMBlockBufferRef block_buffer =
     312      CMSampleBufferGetDataBuffer(hvcc_sample_buffer);
     313  if (block_buffer == nullptr) {
     314    RTC_LOG(LS_ERROR) << "Failed to get sample buffer's block buffer.";
     315    return false;
     316  }
     317  CMBlockBufferRef contiguous_buffer = nullptr;
     318  // Make sure block buffer is contiguous.
     319  if (!CMBlockBufferIsRangeContiguous(block_buffer, 0, 0)) {
     320    status = CMBlockBufferCreateContiguous(
     321        nullptr, block_buffer, nullptr, nullptr, 0, 0, 0, &contiguous_buffer);
     322    if (status != noErr) {
     323      RTC_LOG(LS_ERROR) << "Failed to flatten non-contiguous block buffer: "
     324                        << status;
     325      return false;
     326    }
     327  } else {
     328    contiguous_buffer = block_buffer;
     329    // Retain to make cleanup easier.
     330    CFRetain(contiguous_buffer);
     331    block_buffer = nullptr;
     332  }
     333
     334  // Now copy the actual data.
     335  char* data_ptr = nullptr;
     336  size_t block_buffer_size = CMBlockBufferGetDataLength(contiguous_buffer);
     337  status = CMBlockBufferGetDataPointer(contiguous_buffer, 0, nullptr, nullptr,
     338                                       &data_ptr);
     339  if (status != noErr) {
     340    RTC_LOG(LS_ERROR) << "Failed to get block buffer data.";
     341    CFRelease(contiguous_buffer);
     342    return false;
     343  }
     344  size_t bytes_remaining = block_buffer_size;
     345  while (bytes_remaining > 0) {
     346    // The size type here must match |nalu_header_size|, we expect 4 bytes.
     347    // Read the length of the next packet of data. Must convert from big endian
     348    // to host endian.
     349    RTC_DCHECK_GE(bytes_remaining, (size_t)nalu_header_size);
     350    uint32_t* uint32_data_ptr = reinterpret_cast<uint32_t*>(data_ptr);
     351    uint32_t packet_size = CFSwapInt32BigToHost(*uint32_data_ptr);
     352    // Update buffer.
     353    annexb_buffer->AppendData(kAnnexBHeaderBytes, sizeof(kAnnexBHeaderBytes));
     354    annexb_buffer->AppendData(data_ptr + nalu_header_size, packet_size);
     355    // Update fragmentation.
     356    frag_offsets.push_back(nalu_offset + sizeof(kAnnexBHeaderBytes));
     357    frag_lengths.push_back(packet_size);
     358    nalu_offset += sizeof(kAnnexBHeaderBytes) + packet_size;
     359
     360    size_t bytes_written = packet_size + sizeof(kAnnexBHeaderBytes);
     361    bytes_remaining -= bytes_written;
     362    data_ptr += bytes_written;
     363  }
     364  RTC_DCHECK_EQ(bytes_remaining, (size_t)0);
     365
     366  std::unique_ptr<RTPFragmentationHeader> header(new RTPFragmentationHeader());
     367  header->VerifyAndAllocateFragmentationHeader(frag_offsets.size());
     368  RTC_DCHECK_EQ(frag_lengths.size(), frag_offsets.size());
     369  for (size_t i = 0; i < frag_offsets.size(); ++i) {
     370    header->fragmentationOffset[i] = frag_offsets[i];
     371    header->fragmentationLength[i] = frag_lengths[i];
     372  }
     373  *out_header = std::move(header);
     374  CFRelease(contiguous_buffer);
     375  return true;
     376}
     377
     378bool H265AnnexBBufferToCMSampleBuffer(const uint8_t* annexb_buffer,
     379                                      size_t annexb_buffer_size,
     380                                      CMVideoFormatDescriptionRef video_format,
     381                                      CMSampleBufferRef* out_sample_buffer) {
     382  RTC_DCHECK(annexb_buffer);
     383  RTC_DCHECK(out_sample_buffer);
     384  RTC_DCHECK(video_format);
     385  *out_sample_buffer = nullptr;
     386
     387  AnnexBBufferReader reader(annexb_buffer, annexb_buffer_size);
     388  if (reader.SeekToNextNaluOfType(H265::kVps)) {
     389    // Buffer contains an SPS NALU - skip it and the following PPS
     390    const uint8_t* data;
     391    size_t data_len;
     392    if (!reader.ReadNalu(&data, &data_len)) {
     393      RTC_LOG(LS_ERROR) << "Failed to read VPS";
     394      return false;
     395    }
     396    if (!reader.ReadNalu(&data, &data_len)) {
     397      RTC_LOG(LS_ERROR) << "Failed to read SPS";
     398      return false;
     399    }
     400    if (!reader.ReadNalu(&data, &data_len)) {
     401      RTC_LOG(LS_ERROR) << "Failed to read PPS";
     402      return false;
     403    }
     404  } else {
     405    // No SPS NALU - start reading from the first NALU in the buffer
     406    reader.SeekToStart();
     407  }
     408
     409  // Allocate memory as a block buffer.
     410  // TODO(tkchin): figure out how to use a pool.
     411  CMBlockBufferRef block_buffer = nullptr;
     412  OSStatus status = CMBlockBufferCreateWithMemoryBlock(
     413      nullptr, nullptr, reader.BytesRemaining(), nullptr, nullptr, 0,
     414      reader.BytesRemaining(), kCMBlockBufferAssureMemoryNowFlag,
     415      &block_buffer);
     416  if (status != kCMBlockBufferNoErr) {
     417    RTC_LOG(LS_ERROR) << "Failed to create block buffer.";
     418    return false;
     419  }
     420
     421  // Make sure block buffer is contiguous.
     422  CMBlockBufferRef contiguous_buffer = nullptr;
     423  if (!CMBlockBufferIsRangeContiguous(block_buffer, 0, 0)) {
     424    status = CMBlockBufferCreateContiguous(
     425        nullptr, block_buffer, nullptr, nullptr, 0, 0, 0, &contiguous_buffer);
     426    if (status != noErr) {
     427      RTC_LOG(LS_ERROR) << "Failed to flatten non-contiguous block buffer: "
     428                        << status;
     429      CFRelease(block_buffer);
     430      return false;
     431    }
     432  } else {
     433    contiguous_buffer = block_buffer;
     434    block_buffer = nullptr;
     435  }
     436
     437  // Get a raw pointer into allocated memory.
     438  size_t block_buffer_size = 0;
     439  char* data_ptr = nullptr;
     440  status = CMBlockBufferGetDataPointer(contiguous_buffer, 0, nullptr,
     441                                       &block_buffer_size, &data_ptr);
     442  if (status != kCMBlockBufferNoErr) {
     443    RTC_LOG(LS_ERROR) << "Failed to get block buffer data pointer.";
     444    CFRelease(contiguous_buffer);
     445    return false;
     446  }
     447  RTC_DCHECK(block_buffer_size == reader.BytesRemaining());
     448
     449  // Write Avcc NALUs into block buffer memory.
     450  AvccBufferWriter writer(reinterpret_cast<uint8_t*>(data_ptr),
     451                          block_buffer_size);
     452  while (reader.BytesRemaining() > 0) {
     453    const uint8_t* nalu_data_ptr = nullptr;
     454    size_t nalu_data_size = 0;
     455    if (reader.ReadNalu(&nalu_data_ptr, &nalu_data_size)) {
     456      writer.WriteNalu(nalu_data_ptr, nalu_data_size);
     457    }
     458  }
     459
     460  // Create sample buffer.
     461  status = CMSampleBufferCreate(nullptr, contiguous_buffer, true, nullptr,
     462                                nullptr, video_format, 1, 0, nullptr, 0,
     463                                nullptr, out_sample_buffer);
     464  if (status != noErr) {
     465    RTC_LOG(LS_ERROR) << "Failed to create sample buffer.";
     466    CFRelease(contiguous_buffer);
     467    return false;
     468  }
     469  CFRelease(contiguous_buffer);
     470  return true;
     471}
     472#endif
     473
    251474CMVideoFormatDescriptionRef CreateVideoFormatDescription(
    252475    const uint8_t* annexb_buffer,
     
    279502}
    280503
     504#ifndef DISABLE_H265
     505CMVideoFormatDescriptionRef CreateH265VideoFormatDescription(
     506    const uint8_t* annexb_buffer,
     507    size_t annexb_buffer_size) {
     508  const uint8_t* param_set_ptrs[3] = {};
     509  size_t param_set_sizes[3] = {};
     510  AnnexBBufferReader reader(annexb_buffer, annexb_buffer_size);
     511  // Skip everyting before the VPS, then read the VPS, SPS and PPS
     512  if (!reader.SeekToNextNaluOfType(H265::kVps)) {
     513    return nullptr;
     514  }
     515  if (!reader.ReadNalu(&param_set_ptrs[0], &param_set_sizes[0])) {
     516    RTC_LOG(LS_ERROR) << "Failed to read VPS";
     517    return nullptr;
     518  }
     519  if (!reader.ReadNalu(&param_set_ptrs[1], &param_set_sizes[1])) {
     520    RTC_LOG(LS_ERROR) << "Failed to read SPS";
     521    return nullptr;
     522  }
     523  if (!reader.ReadNalu(&param_set_ptrs[2], &param_set_sizes[2])) {
     524    RTC_LOG(LS_ERROR) << "Failed to read PPS";
     525    return nullptr;
     526  }
     527
     528  // Parse the SPS and PPS into a CMVideoFormatDescription.
     529  CMVideoFormatDescriptionRef description = nullptr;
     530  OSStatus status = CMVideoFormatDescriptionCreateFromHEVCParameterSets(
     531      kCFAllocatorDefault, 3, param_set_ptrs, param_set_sizes, 4, nullptr,
     532      &description);
     533  if (status != noErr) {
     534    RTC_LOG(LS_ERROR) << "Failed to create video format description.";
     535    return nullptr;
     536  }
     537  return description;
     538}
     539#endif
     540
    281541AnnexBBufferReader::AnnexBBufferReader(const uint8_t* annexb_buffer,
    282542                                       size_t length)
     
    325585  return false;
    326586}
     587
     588#ifndef DISABLE_H265
     589bool AnnexBBufferReader::SeekToNextNaluOfType(H265::NaluType type) {
     590  for (; offset_ != offsets_.end(); ++offset_) {
     591    if (offset_->payload_size < 1)
     592      continue;
     593    if (H265::ParseNaluType(*(start_ + offset_->payload_start_offset)) == type)
     594      return true;
     595  }
     596  return false;
     597}
     598#endif
     599
    327600AvccBufferWriter::AvccBufferWriter(uint8_t* const avcc_buffer, size_t length)
    328601    : start_(avcc_buffer), offset_(0), length_(length) {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h

    r238967 r259452  
    1919
    2020#include "common_video/h264/h264_common.h"
     21#ifndef DISABLE_H265
     22#include "common_video/h265/h265_common.h"
     23#endif
    2124#include "modules/include/module_common_types.h"
    2225#include "rtc_base/buffer.h"
     
    4851                                      CMMemoryPoolRef memory_pool);
    4952
     53#ifndef DISABLE_H265
     54// Converts a sample buffer emitted from the VideoToolbox encoder into a buffer
     55// suitable for RTP. The sample buffer is in hvcc format whereas the rtp buffer
     56// needs to be in Annex B format. Data is written directly to |annexb_buffer|
     57// and a new RTPFragmentationHeader is returned in |out_header|.
     58bool H265CMSampleBufferToAnnexBBuffer(
     59    CMSampleBufferRef hvcc_sample_buffer,
     60    bool is_keyframe,
     61    rtc::Buffer* annexb_buffer,
     62    std::unique_ptr<RTPFragmentationHeader> *out_header)
     63    __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_11_0);
     64
     65 // Converts a buffer received from RTP into a sample buffer suitable for the
     66// VideoToolbox decoder. The RTP buffer is in annex b format whereas the sample
     67// buffer is in hvcc format.
     68// If |is_keyframe| is true then |video_format| is ignored since the format will
     69// be read from the buffer. Otherwise |video_format| must be provided.
     70// Caller is responsible for releasing the created sample buffer.
     71bool H265AnnexBBufferToCMSampleBuffer(const uint8_t* annexb_buffer,
     72                                      size_t annexb_buffer_size,
     73                                      CMVideoFormatDescriptionRef video_format,
     74                                      CMSampleBufferRef* out_sample_buffer)
     75    __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_11_0);
     76#endif
     77
    5078// Returns a video format description created from the sps/pps information in
    5179// the Annex B buffer. If there is no such information, nullptr is returned.
     
    5482    const uint8_t* annexb_buffer,
    5583    size_t annexb_buffer_size);
     84
     85#ifndef DISABLE_H265
     86CMVideoFormatDescriptionRef CreateH265VideoFormatDescription(
     87    const uint8_t* annexb_buffer,
     88    size_t annexb_buffer_size)
     89    __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_11_0);
     90#endif
    5691
    5792// Helper class for reading NALUs from an RTP Annex B buffer.
     
    79114  // reached the end instead
    80115  bool SeekToNextNaluOfType(H264::NaluType type);
     116#ifndef DISABLE_H265
     117  bool SeekToNextNaluOfType(H265::NaluType type);
     118#endif
    81119
    82120 private:
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/native/src/objc_video_decoder_factory.mm

    r259345 r259452  
    9898      id<RTCVideoDecoder> decoder = [decoder_factory_ createDecoder:codecInfo];
    9999
    100       if ([decoder isKindOfClass:[RTCWrappedNativeVideoDecoder class]]) {
     100      // Because of symbol conflict, isKindOfClass doesn't work as expected.
     101      // See https://bugs.webkit.org/show_bug.cgi?id=198782.
     102      // if ([decoder isKindOfClass:[RTCWrappedNativeVideoDecoder class]]) {
     103      if ([codecName isEqual:@"VP8"] || [codecName isEqual:@"VP9"]) {
    101104        return [(RTCWrappedNativeVideoDecoder *)decoder releaseWrappedDecoder];
    102105      } else {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/native/src/objc_video_encoder_factory.mm

    r252472 r259452  
    1616#import "base/RTCVideoEncoderFactory.h"
    1717#import "components/video_codec/RTCCodecSpecificInfoH264+Private.h"
     18#ifndef DISABLE_H265
     19#import "components/video_codec/RTCCodecSpecificInfoH265+Private.h"
     20#endif
    1821#import "sdk/objc/api/peerconnection/RTCEncodedImage+Private.h"
    1922#import "sdk/objc/api/peerconnection/RTCRtpFragmentationHeader+Private.h"
     
    6669      // Handle types that can be converted into one of CodecSpecificInfo's hard coded cases.
    6770      CodecSpecificInfo codecSpecificInfo;
    68       if ([info isKindOfClass:[RTCCodecSpecificInfoH264 class]]) {
     71      // Because of symbol conflict, isKindOfClass doesn't work as expected.
     72      // See https://bugs.webkit.org/show_bug.cgi?id=198782.
     73      if ([NSStringFromClass([info class]) isEqual:@"WK_RTCCodecSpecificInfoH264"]) {
     74        // if ([info isKindOfClass:[RTCCodecSpecificInfoH264 class]]) {
    6975        codecSpecificInfo = [(RTCCodecSpecificInfoH264 *)info nativeCodecSpecificInfo];
     76#ifndef DISABLE_H265
     77      } else if ([NSStringFromClass([info class]) isEqual:@"WK_RTCCodecSpecificInfoH265"]) {
     78        // if ([info isKindOfClass:[RTCCodecSpecificInfoH265 class]]) {
     79        codecSpecificInfo = [(RTCCodecSpecificInfoH265 *)info nativeCodecSpecificInfo];
     80#endif
    7081      }
    7182
     
    168179  RTCVideoCodecInfo *info = [[RTCVideoCodecInfo alloc] initWithNativeSdpVideoFormat:format];
    169180  id<RTCVideoEncoder> encoder = [encoder_factory_ createEncoder:info];
    170   if ([encoder isKindOfClass:[RTCWrappedNativeVideoEncoder class]]) {
     181  // Because of symbol conflict, isKindOfClass doesn't work as expected.
     182  // See https://bugs.webkit.org/show_bug.cgi?id=198782.
     183  // if ([encoder isKindOfClass:[RTCWrappedNativeVideoEncoder class]]) {
     184  if ([info.name isEqual:@"VP8"] || [info.name isEqual:@"VP9"]) {
    171185    return [(RTCWrappedNativeVideoEncoder *)encoder releaseWrappedEncoder];
    172186  } else {
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver.cc

    r259345 r259452  
    588588        break;
    589589    }
    590 
     590#ifndef DISABLE_H265
     591  } else if (packet->codec() == kVideoCodecH265) {
     592    video_coding::H265VpsSpsPpsTracker::FixedBitstream fixed =
     593        h265_tracker_.CopyAndFixBitstream(
     594            rtc::MakeArrayView(codec_payload.cdata(), codec_payload.size()),
     595            &packet->video_header);
     596    switch (fixed.action) {
     597      case video_coding::H265VpsSpsPpsTracker::kRequestKeyframe:
     598        rtcp_feedback_buffer_.RequestKeyFrame();
     599        rtcp_feedback_buffer_.SendBufferedRtcpFeedback();
     600        ABSL_FALLTHROUGH_INTENDED;
     601      case video_coding::H265VpsSpsPpsTracker::kDrop:
     602        return;
     603      case video_coding::H265VpsSpsPpsTracker::kInsert:
     604        packet->video_payload = std::move(fixed.bitstream);
     605        break;
     606    }
     607#endif
    591608  } else {
    592609    packet->video_payload = std::move(codec_payload);
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/video/rtp_video_stream_receiver.h

    r259345 r259452  
    3939#include "modules/video_coding/h264_sps_pps_tracker.h"
    4040#include "modules/video_coding/loss_notification_controller.h"
     41#ifndef DISABLE_H265
     42#include "modules/video_coding/h265_vps_sps_pps_tracker.h"
     43#endif
    4144#include "modules/video_coding/packet_buffer.h"
    4245#include "modules/video_coding/rtp_frame_reference_finder.h"
     
    318321  std::map<uint8_t, std::unique_ptr<VideoRtpDepacketizer>> payload_type_map_;
    319322
     323#ifndef DISABLE_H265
     324  video_coding::H265VpsSpsPpsTracker h265_tracker_;
     325#endif
     326
    320327  // TODO(johan): Remove pt_codec_params_ once
    321328  // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved.
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/video/send_statistics_proxy.cc

    r259345 r259452  
    4848  kVideoVp9 = 2,
    4949  kVideoH264 = 3,
     50  kVideoH265 = 4,
    5051  kVideoMax = 64,
    5152};
     
    7576    case kVideoCodecH264:
    7677      return kVideoH264;
     78#ifndef DISABLE_H265
     79    case kVideoCodecH265:
     80      return kVideoH265;
     81#endif
    7782    default:
    7883      return kVideoUnknown;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/video/video_receive_stream.cc

    r259345 r259452  
    135135    return associated_codec;
    136136  }
     137#ifndef DISABLE_H265
     138  else if (codec.codecType == kVideoCodecH265) {
     139    *(codec.H265()) = VideoEncoder::GetDefaultH265Settings();
     140  }
     141#endif
    137142
    138143  codec.width = 320;
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/video/video_stream_encoder.cc

    r259345 r259452  
    101101      }
    102102      break;
    103 
     103#ifndef DISABLE_H265
     104    case kVideoCodecH265:
     105      if (new_send_codec.H265() != prev_send_codec.H265()) {
     106        return true;
     107      }
     108      break;
     109#endif
    104110    default:
    105111      break;
     
    14041410      (codec_specific_info->codecType == kVideoCodecVP8 ||
    14051411       codec_specific_info->codecType == kVideoCodecH264 ||
     1412#ifndef DISABLE_H265
     1413       codec_specific_info->codecType == kVideoCodecH265 ||
     1414#endif
    14061415       codec_specific_info->codecType == kVideoCodecGeneric)) {
    14071416    simulcast_id = encoded_image.SpatialIndex().value_or(0);
  • trunk/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj

    r259422 r259452  
    3030                410091DD242E0BBC00C5EDA2 /* recordable_encoded_frame.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091D8242E0BBB00C5EDA2 /* recordable_encoded_frame.h */; };
    3131                410091DE242E0BBC00C5EDA2 /* video_frame_type.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091D9242E0BBB00C5EDA2 /* video_frame_type.h */; };
     32                410091E6242E2AA300C5EDA2 /* rtp_format_h265.cc in Sources */ = {isa = PBXBuildFile; fileRef = 410091E0242E2AA100C5EDA2 /* rtp_format_h265.cc */; };
     33                410091E7242E2AA300C5EDA2 /* rtp_format_h265.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091E1242E2AA200C5EDA2 /* rtp_format_h265.h */; };
     34                410091ED242E317400C5EDA2 /* h265_vps_sps_pps_tracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091EB242E317300C5EDA2 /* h265_vps_sps_pps_tracker.h */; };
     35                410091F9242E362200C5EDA2 /* h265_sps_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091F1242E362100C5EDA2 /* h265_sps_parser.h */; };
     36                410091FD242E362200C5EDA2 /* h265_common.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091F5242E362100C5EDA2 /* h265_common.h */; };
     37                410091FE242E362200C5EDA2 /* h265_vps_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 410091F6242E362200C5EDA2 /* h265_vps_parser.h */; };
     38                410091FF242E362200C5EDA2 /* h265_common.cc in Sources */ = {isa = PBXBuildFile; fileRef = 410091F7242E362200C5EDA2 /* h265_common.cc */; };
     39                41009209242E3A4600C5EDA2 /* RTCVideoDecoderH265.h in Headers */ = {isa = PBXBuildFile; fileRef = 41009200242E3A4300C5EDA2 /* RTCVideoDecoderH265.h */; };
     40                4100920A242E3A4600C5EDA2 /* RTCH265ProfileLevelId.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41009201242E3A4400C5EDA2 /* RTCH265ProfileLevelId.mm */; };
     41                4100920E242E3A4600C5EDA2 /* RTCH265ProfileLevelId.h in Headers */ = {isa = PBXBuildFile; fileRef = 41009205242E3A4500C5EDA2 /* RTCH265ProfileLevelId.h */; };
    3242                4102F6A121273262006AE8D7 /* remix_resample.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4102F69721273260006AE8D7 /* remix_resample.cc */; };
    3343                4102F6A221273262006AE8D7 /* audio_level.h in Headers */ = {isa = PBXBuildFile; fileRef = 4102F69821273260006AE8D7 /* audio_level.h */; };
     
    19651975                41E02CD32127360700C27CD6 /* sample_counter.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E02CD12127360600C27CD6 /* sample_counter.h */; };
    19661976                41E02CD42127360700C27CD6 /* sample_counter.cc in Sources */ = {isa = PBXBuildFile; fileRef = 41E02CD22127360700C27CD6 /* sample_counter.cc */; };
     1977                41E84BCE24373BDE00D34E41 /* h265_pps_parser.cc in Sources */ = {isa = PBXBuildFile; fileRef = 410091F3242E362100C5EDA2 /* h265_pps_parser.cc */; };
     1978                41E84BCF24373BE200D34E41 /* h265_sps_parser.cc in Sources */ = {isa = PBXBuildFile; fileRef = 410091F0242E362000C5EDA2 /* h265_sps_parser.cc */; };
     1979                41E84BD024373BE600D34E41 /* h265_vps_parser.cc in Sources */ = {isa = PBXBuildFile; fileRef = 410091F4242E362100C5EDA2 /* h265_vps_parser.cc */; };
     1980                41E84BD124373C0700D34E41 /* h265_vps_sps_pps_tracker.cc in Sources */ = {isa = PBXBuildFile; fileRef = 410091EC242E317300C5EDA2 /* h265_vps_sps_pps_tracker.cc */; };
     1981                41E84BD224373C1400D34E41 /* RTCVideoDecoderH265.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41009207242E3A4500C5EDA2 /* RTCVideoDecoderH265.mm */; };
     1982                41E84BD324373C1A00D34E41 /* RTCVideoEncoderH265.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41009206242E3A4500C5EDA2 /* RTCVideoEncoderH265.mm */; };
     1983                41E84BD424373C2900D34E41 /* RTCCodecSpecificInfoH265.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41009208242E3A4600C5EDA2 /* RTCCodecSpecificInfoH265.mm */; };
    19671984                41EA53A51EFC2C14002FF04C /* hmac.c in Sources */ = {isa = PBXBuildFile; fileRef = 41EA53A41EFC2BFD002FF04C /* hmac.c */; };
    19681985                41EA53AB1EFC2C4D002FF04C /* digest.c in Sources */ = {isa = PBXBuildFile; fileRef = 41EA53A71EFC2C4D002FF04C /* digest.c */; };
     
    39273944                410091D8242E0BBB00C5EDA2 /* recordable_encoded_frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = recordable_encoded_frame.h; sourceTree = "<group>"; };
    39283945                410091D9242E0BBB00C5EDA2 /* video_frame_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = video_frame_type.h; sourceTree = "<group>"; };
     3946                410091E0242E2AA100C5EDA2 /* rtp_format_h265.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rtp_format_h265.cc; sourceTree = "<group>"; };
     3947                410091E1242E2AA200C5EDA2 /* rtp_format_h265.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rtp_format_h265.h; sourceTree = "<group>"; };
     3948                410091EB242E317300C5EDA2 /* h265_vps_sps_pps_tracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = h265_vps_sps_pps_tracker.h; sourceTree = "<group>"; };
     3949                410091EC242E317300C5EDA2 /* h265_vps_sps_pps_tracker.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = h265_vps_sps_pps_tracker.cc; sourceTree = "<group>"; };
     3950                410091F0242E362000C5EDA2 /* h265_sps_parser.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = h265_sps_parser.cc; sourceTree = "<group>"; };
     3951                410091F1242E362100C5EDA2 /* h265_sps_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = h265_sps_parser.h; sourceTree = "<group>"; };
     3952                410091F2242E362100C5EDA2 /* h265_pps_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = h265_pps_parser.h; sourceTree = "<group>"; };
     3953                410091F3242E362100C5EDA2 /* h265_pps_parser.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = h265_pps_parser.cc; sourceTree = "<group>"; };
     3954                410091F4242E362100C5EDA2 /* h265_vps_parser.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = h265_vps_parser.cc; sourceTree = "<group>"; };
     3955                410091F5242E362100C5EDA2 /* h265_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = h265_common.h; sourceTree = "<group>"; };
     3956                410091F6242E362200C5EDA2 /* h265_vps_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = h265_vps_parser.h; sourceTree = "<group>"; };
     3957                410091F7242E362200C5EDA2 /* h265_common.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = h265_common.cc; sourceTree = "<group>"; };
     3958                41009200242E3A4300C5EDA2 /* RTCVideoDecoderH265.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCVideoDecoderH265.h; sourceTree = "<group>"; };
     3959                41009201242E3A4400C5EDA2 /* RTCH265ProfileLevelId.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCH265ProfileLevelId.mm; sourceTree = "<group>"; };
     3960                41009202242E3A4400C5EDA2 /* RTCCodecSpecificInfoH265.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCCodecSpecificInfoH265.h; sourceTree = "<group>"; };
     3961                41009203242E3A4400C5EDA2 /* RTCCodecSpecificInfoH265+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RTCCodecSpecificInfoH265+Private.h"; sourceTree = "<group>"; };
     3962                41009204242E3A4500C5EDA2 /* RTCVideoEncoderH265.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCVideoEncoderH265.h; sourceTree = "<group>"; };
     3963                41009205242E3A4500C5EDA2 /* RTCH265ProfileLevelId.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCH265ProfileLevelId.h; sourceTree = "<group>"; };
     3964                41009206242E3A4500C5EDA2 /* RTCVideoEncoderH265.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCVideoEncoderH265.mm; sourceTree = "<group>"; };
     3965                41009207242E3A4500C5EDA2 /* RTCVideoDecoderH265.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCVideoDecoderH265.mm; sourceTree = "<group>"; };
     3966                41009208242E3A4600C5EDA2 /* RTCCodecSpecificInfoH265.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCCodecSpecificInfoH265.mm; sourceTree = "<group>"; };
    39293967                4100CDE521CACFD000F9B87D /* LPC_fit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = LPC_fit.c; path = silk/LPC_fit.c; sourceTree = "<group>"; };
    39303968                4100CDE821CAD03300F9B87D /* vq_sse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vq_sse.h; path = x86/vq_sse.h; sourceTree = "<group>"; };
     
    78587896
    78597897/* Begin PBXGroup section */
     7898                410091EF242E360800C5EDA2 /* h265 */ = {
     7899                        isa = PBXGroup;
     7900                        children = (
     7901                                410091F7242E362200C5EDA2 /* h265_common.cc */,
     7902                                410091F5242E362100C5EDA2 /* h265_common.h */,
     7903                                410091F3242E362100C5EDA2 /* h265_pps_parser.cc */,
     7904                                410091F2242E362100C5EDA2 /* h265_pps_parser.h */,
     7905                                410091F0242E362000C5EDA2 /* h265_sps_parser.cc */,
     7906                                410091F1242E362100C5EDA2 /* h265_sps_parser.h */,
     7907                                410091F4242E362100C5EDA2 /* h265_vps_parser.cc */,
     7908                                410091F6242E362200C5EDA2 /* h265_vps_parser.h */,
     7909                        );
     7910                        path = h265;
     7911                        sourceTree = "<group>";
     7912                };
    78607913                4105EB64212E018C008C0C20 /* libvpx */ = {
    78617914                        isa = PBXGroup;
     
    91199172                                417953AC2169823D0028266B /* nalu_rewriter.cc */,
    91209173                                411521D521698220000ABAF7 /* nalu_rewriter.h */,
    9121                                 417953B2216982410028266B /* RTCCodecSpecificInfoH264+Private.h */,
    91229174                                416225F1216981F300A91C9B /* RTCCodecSpecificInfoH264.h */,
    91239175                                416225ED216981F200A91C9B /* RTCCodecSpecificInfoH264.mm */,
     9176                                417953B2216982410028266B /* RTCCodecSpecificInfoH264+Private.h */,
     9177                                41009202242E3A4400C5EDA2 /* RTCCodecSpecificInfoH265.h */,
     9178                                41009208242E3A4600C5EDA2 /* RTCCodecSpecificInfoH265.mm */,
     9179                                41009203242E3A4400C5EDA2 /* RTCCodecSpecificInfoH265+Private.h */,
    91249180                                417953B3216982420028266B /* RTCDefaultVideoDecoderFactory.h */,
    91259181                                417953AD2169823E0028266B /* RTCDefaultVideoDecoderFactory.m */,
     
    91289184                                411521D42169821F000ABAF7 /* RTCH264ProfileLevelId.h */,
    91299185                                411521D621698220000ABAF7 /* RTCH264ProfileLevelId.mm */,
     9186                                41009205242E3A4500C5EDA2 /* RTCH265ProfileLevelId.h */,
     9187                                41009201242E3A4400C5EDA2 /* RTCH265ProfileLevelId.mm */,
    91309188                                416225F2216981F300A91C9B /* RTCVideoDecoderFactoryH264.h */,
    91319189                                417953B0216982400028266B /* RTCVideoDecoderFactoryH264.m */,
    91329190                                416225F3216981F300A91C9B /* RTCVideoDecoderH264.h */,
    91339191                                416225F4216981F300A91C9B /* RTCVideoDecoderH264.mm */,
     9192                                41009200242E3A4300C5EDA2 /* RTCVideoDecoderH265.h */,
     9193                                41009207242E3A4500C5EDA2 /* RTCVideoDecoderH265.mm */,
    91349194                                416225EF216981F200A91C9B /* RTCVideoEncoderFactoryH264.h */,
    91359195                                417953B1216982400028266B /* RTCVideoEncoderFactoryH264.m */,
    91369196                                416225EC216981F200A91C9B /* RTCVideoEncoderH264.h */,
    91379197                                416225F6216981F400A91C9B /* RTCVideoEncoderH264.mm */,
     9198                                41009204242E3A4500C5EDA2 /* RTCVideoEncoderH265.h */,
     9199                                41009206242E3A4500C5EDA2 /* RTCVideoEncoderH265.mm */,
    91389200                                416225EE216981F200A91C9B /* UIDevice+H264Profile.h */,
    91399201                                417953AE2169823F0028266B /* UIDevice+H264Profile.mm */,
     
    1171011772                                4131C42A234C7D700028A615 /* generic_frame_descriptor */,
    1171111773                                5CDD83411E43256400621E92 /* h264 */,
     11774                                410091EF242E360800C5EDA2 /* h265 */,
    1171211775                                41109AA41E5FA18100C0955A /* include */,
    1171311776                                5CDD83651E4325C200621E92 /* libyuv */,
     
    1263312696                                5CDD839A1E439A6F00621E92 /* h264_sps_pps_tracker.cc */,
    1263412697                                5CDD839B1E439A6F00621E92 /* h264_sps_pps_tracker.h */,
     12698                                410091EC242E317300C5EDA2 /* h265_vps_sps_pps_tracker.cc */,
     12699                                410091EB242E317300C5EDA2 /* h265_vps_sps_pps_tracker.h */,
    1263512700                                5CDD839C1E439A6F00621E92 /* histogram.cc */,
    1263612701                                5CDD839D1E439A6F00621E92 /* histogram.h */,
     
    1332313388                                5CDD882E1E43BE3C00621E92 /* rtp_format_h264.cc */,
    1332413389                                5CDD882F1E43BE3C00621E92 /* rtp_format_h264.h */,
     13390                                410091E0242E2AA100C5EDA2 /* rtp_format_h265.cc */,
     13391                                410091E1242E2AA200C5EDA2 /* rtp_format_h265.h */,
    1332513392                                5CDD88301E43BE3C00621E92 /* rtp_format_video_generic.cc */,
    1332613393                                5CDD88311E43BE3C00621E92 /* rtp_format_video_generic.h */,
     
    1462614693                                5CDD85E81E43B81000621E92 /* aecm_core.h in Headers */,
    1462714694                                5CDD85E91E43B81000621E92 /* aecm_defines.h in Headers */,
     14695                                410091E7242E2AA300C5EDA2 /* rtp_format_h265.h in Headers */,
    1462814696                                5C0885271E4A99D200403995 /* aes.h in Headers */,
    1462914697                                5C0885241E4A99D200403995 /* aes_gcm_ossl.h in Headers */,
     
    1496515033                                5CDD8B971E43C2B500621E92 /* encode.h in Headers */,
    1496615034                                5CDD87B61E43BC0500621E92 /* encode_lpc_swb.h in Headers */,
     15035                                41009209242E3A4600C5EDA2 /* RTCVideoDecoderH265.h in Headers */,
    1496715036                                5CDD8A961E43C00F00621E92 /* encode_neteq_input.h in Headers */,
    1496815037                                418938D8242A69CC007FDC41 /* encode_usage_resource.h in Headers */,
     
    1499715066                                41BE71A6215C463700A7B196 /* expr.h in Headers */,
    1499815067                                5CDD894B1E43BF3A00621E92 /* extended_jitter_report.h in Headers */,
     15068                                410091FE242E362200C5EDA2 /* h265_vps_parser.h in Headers */,
    1499915069                                5CDD894E1E43BF3A00621E92 /* extended_reports.h in Headers */,
    1500015070                                4131BF46234B88200028A615 /* external_hmac.h in Headers */,
     
    1543515505                                4131C4B7234C83DD0028A615 /* remote_estimate.h in Headers */,
    1543615506                                5CDD8FE21E43CD6600621E92 /* remote_estimator_proxy.h in Headers */,
     15507                                410091F9242E362200C5EDA2 /* h265_sps_parser.h in Headers */,
    1543715508                                419C83C51FE247B40040C30F /* remote_ntp_time_estimator.h in Headers */,
    1543815509                                4145E4DA1EF8CC9B00FCF6E6 /* render_buffer.h in Headers */,
     
    1556715638                                4131C4EF234C86110028A615 /* rtcp_statistics.h in Headers */,
    1556815639                                419C83031FE20F020040C30F /* rtcp_transceiver.h in Headers */,
     15640                                410091FD242E362200C5EDA2 /* h265_common.h in Headers */,
    1556915641                                419C83011FE20F020040C30F /* rtcp_transceiver_config.h in Headers */,
    1557015642                                419C83051FE20F020040C30F /* rtcp_transceiver_impl.h in Headers */,
     
    1561215684                                413E678F216987DB00EF37ED /* RTCVideoFrame.h in Headers */,
    1561315685                                413E6791216987DB00EF37ED /* RTCVideoFrameBuffer.h in Headers */,
     15686                                410091ED242E317400C5EDA2 /* h265_vps_sps_pps_tracker.h in Headers */,
    1561415687                                413A24411FE1991A00373E99 /* RTCVideoFrameBuffer.h in Headers */,
    1561515688                                413A246F1FE1991A00373E99 /* RTCVideoRenderer.h in Headers */,
     
    1595016023                                4102F6CF212733B7006AE8D7 /* video_quality_observer.h in Headers */,
    1595116024                                419C82C41FE20DCD0040C30F /* video_receive_stream.h in Headers */,
     16025                                4100920E242E3A4600C5EDA2 /* RTCH265ProfileLevelId.h in Headers */,
    1595216026                                5CDD85CB1E43B5C000621E92 /* video_receive_stream.h in Headers */,
    1595316027                                41893A17242A757A007FDC41 /* video_receiver2.h in Headers */,
     
    1734717421                                5CDD86401E43B8B500621E92 /* auto_corr_to_refl_coef.c in Sources */,
    1734817422                                5CDD86411E43B8B500621E92 /* auto_correlation.c in Sources */,
     17423                                41E84BD324373C1A00D34E41 /* RTCVideoEncoderH265.mm in Sources */,
    1734917424                                4131C405234C7B7E0028A615 /* auto_correlation.cc in Sources */,
    1735017425                                5CDD8A071E43BFB300621E92 /* background_noise.cc in Sources */,
     
    1752417599                                5CD285BE1E6A63430094FDC8 /* echo_remover_metrics.cc in Sources */,
    1752517600                                5CDD8B961E43C2B500621E92 /* encode.c in Sources */,
     17601                                41E84BD224373C1400D34E41 /* RTCVideoDecoderH265.mm in Sources */,
    1752617602                                5CDD87B71E43BC0500621E92 /* encode.c in Sources */,
    1752717603                                41433D121F79B33400387B4D /* encode.c in Sources */,
     
    1768617762                                5CDD8BBF1E43C2B500621E92 /* interpolate.c in Sources */,
    1768717763                                5CDD8BBD1E43C2B500621E92 /* interpolate_samples.c in Sources */,
     17764                                41E84BD424373C2900D34E41 /* RTCCodecSpecificInfoH265.mm in Sources */,
    1768817765                                415F1FB221272FBA00064CBF /* interpolated_gain_curve.cc in Sources */,
    1768917766                                419C829A1FE20CA10040C30F /* interval_budget.cc in Sources */,
     
    1771517792                                41294092212E128D00AD95E7 /* libvpx_vp8_encoder.cc in Sources */,
    1771617793                                416D3BE6212731C200775F09 /* limiter.cc in Sources */,
     17794                                41E84BCF24373BE200D34E41 /* h265_sps_parser.cc in Sources */,
    1771717795                                4131C4C5234C84520028A615 /* link_capacity_estimator.cc in Sources */,
    1771817796                                4131BF4A234B88200028A615 /* local_audio_source.cc in Sources */,
     
    1773017808                                5CDD8BC11E43C2B500621E92 /* lpc_encode.c in Sources */,
    1773117809                                5CDD87C71E43BC0500621E92 /* lpc_gain_swb_tables.c in Sources */,
     17810                                410091E6242E2AA300C5EDA2 /* rtp_format_h265.cc in Sources */,
    1773217811                                41433CEE1F79B33400387B4D /* lpc_masking_model.c in Sources */,
    1773317812                                5CDD87C91E43BC0500621E92 /* lpc_shape_swb12_tables.c in Sources */,
     
    1775817837                                4131C315234B8DC20028A615 /* media_stream_interface.cc in Sources */,
    1775917838                                4131BF25234B88200028A615 /* media_stream_observer.cc in Sources */,
     17839                                41E84BD024373BE600D34E41 /* h265_vps_parser.cc in Sources */,
    1776017840                                418939F7242A74F8007FDC41 /* media_transport_config.cc in Sources */,
    1776117841                                418939F6242A74F8007FDC41 /* media_transport_interface.cc in Sources */,
     
    1782617906                                4131C1B5234B8A4A0028A615 /* p2p_constants.cc in Sources */,
    1782717907                                4131C1D4234B8A4B0028A615 /* p2p_transport_channel.cc in Sources */,
     17908                                41E84BD124373C0700D34E41 /* h265_vps_sps_pps_tracker.cc in Sources */,
    1782817909                                41F2639A21267F5E00274F59 /* pa_ringbuffer.c in Sources */,
    1782917910                                5CDD8FA21E43CCBE00621E92 /* paced_sender.cc in Sources */,
     
    1802718108                                413E67982169883900EF37ED /* RTCVideoCodecInfo.m in Sources */,
    1802818109                                417953B8216982420028266B /* RTCVideoDecoderFactoryH264.m in Sources */,
     18110                                41E84BCE24373BDE00D34E41 /* h265_pps_parser.cc in Sources */,
    1802918111                                417953C72169824B0028266B /* RTCVideoDecoderH264.mm in Sources */,
    1803018112                                413E67682169854B00EF37ED /* RTCVideoDecoderVP8.mm in Sources */,
     
    1823018312                                5CDD8A5A1E43BFB300621E92 /* time_stretch.cc in Sources */,
    1823118313                                5CDD88DA1E43BE3D00621E92 /* time_util.cc in Sources */,
     18314                                4100920A242E3A4600C5EDA2 /* RTCH265ProfileLevelId.mm in Sources */,
    1823218315                                4131C14A234B89E20028A615 /* time_utils.cc in Sources */,
    1823318316                                419241E321275A3000634FCF /* timestamp.cc in Sources */,
     
    1835418437                                4131C27A234B8CC40028A615 /* webrtc_media_engine.cc in Sources */,
    1835518438                                4131C278234B8CC40028A615 /* webrtc_media_engine_defaults.cc in Sources */,
     18439                                410091FF242E362200C5EDA2 /* h265_common.cc in Sources */,
    1835618440                                4131BF50234B88200028A615 /* webrtc_sdp.cc in Sources */,
    1835718441                                4131BEF4234B88200028A615 /* webrtc_session_description_factory.cc in Sources */,
  • trunk/Source/WebCore/ChangeLog

    r259449 r259452  
     12020-04-03  youenn fablet  <youenn@apple.com>
     2
     3        Add initial support for WebRTC HEVC
     4        https://bugs.webkit.org/show_bug.cgi?id=204283
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add a runtime flag for H265 in lieu of VP8 and pipe it to libwebrtc factories.
     9        Test: webrtc/h265.html
     10
     11        * page/Page.cpp:
     12        (WebCore::m_deviceOrientationUpdateProvider):
     13        * page/RuntimeEnabledFeatures.h:
     14        (WebCore::RuntimeEnabledFeatures::webRTCH265CodecEnabled const):
     15        (WebCore::RuntimeEnabledFeatures::setWebRTCH265CodecEnabled):
     16        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
     17        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
     18        (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
     19        (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
     20        * testing/Internals.cpp:
     21        (WebCore::Internals::resetToConsistentState):
     22
    1232020-04-03  Yousuke Kimoto  <yousuke.kimoto@sony.com>
    224
  • trunk/Source/WebCore/page/Page.cpp

    r259435 r259452  
    328328
    329329#if USE(LIBWEBRTC)
    330     m_libWebRTCProvider->supportsVP8(RuntimeEnabledFeatures::sharedFeatures().webRTCVP8CodecEnabled());
     330    m_libWebRTCProvider->supportsH265(RuntimeEnabledFeatures::sharedFeatures().webRTCH265CodecEnabled());
    331331#endif
    332332
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r258498 r259452  
    237237    bool webRTCDTMFEnabled() const { return m_isWebRTCDTMFEnabled; }
    238238    void setWebRTCDTMFEnabled(bool isEnabled) { m_isWebRTCDTMFEnabled = isEnabled; }
    239     bool webRTCVP8CodecEnabled() const { return m_isWebRTCVP8CodecEnabled; }
    240     void setWebRTCVP8CodecEnabled(bool isEnabled) { m_isWebRTCVP8CodecEnabled = isEnabled; }
     239    bool webRTCH265CodecEnabled() const { return m_isWebRTCH265CodecEnabled; }
     240    void setWebRTCH265CodecEnabled(bool isEnabled) { m_isWebRTCH265CodecEnabled = isEnabled; }
    241241    bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
    242242    void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
     
    503503#if ENABLE(WEB_RTC)
    504504    bool m_isWebRTCDTMFEnabled { true };
    505     bool m_isWebRTCVP8CodecEnabled { true };
     505    bool m_isWebRTCH265CodecEnabled { true };
    506506    bool m_isPeerConnectionEnabled { true };
    507507    bool m_isWebRTCMDNSICECandidatesEnabled { false };
  • trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h

    r257234 r259452  
    104104    void enableEnumeratingAllNetworkInterfaces();
    105105
    106     void supportsVP8(bool value) { m_supportsVP8 = value; }
     106    void supportsH265(bool value) { m_supportsH265 = value; }
    107107    virtual void disableNonLocalhostConnections() { m_disableNonLocalhostConnections = true; }
    108108
     
    141141    rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> m_factory;
    142142    bool m_disableNonLocalhostConnections { false };
    143     bool m_supportsVP8 { false };
     143    bool m_supportsH265 { false };
    144144    bool m_enableLogging { true };
    145145    bool m_useDTLS10 { false };
  • trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp

    r256377 r259452  
    5555    ASSERT(isMainThread());
    5656
    57     auto codecSupport = m_supportsVP8 ? webrtc::WebKitCodecSupport::H264AndVP8 : webrtc::WebKitCodecSupport::H264;
     57    auto codecSupport = m_supportsH265 ? webrtc::WebKitCodecSupport::H264VP8AndH265 : webrtc::WebKitCodecSupport::H264AndVP8;
    5858    return webrtc::createWebKitDecoderFactory(codecSupport);
    5959}
     
    6363    ASSERT(isMainThread());
    6464
    65     auto codecSupport = m_supportsVP8 ? webrtc::WebKitCodecSupport::H264AndVP8 : webrtc::WebKitCodecSupport::H264;
     65    auto codecSupport = m_supportsH265 ? webrtc::WebKitCodecSupport::H264VP8AndH265 : webrtc::WebKitCodecSupport::H264AndVP8;
    6666    return webrtc::createWebKitEncoderFactory(codecSupport);
    6767}
  • trunk/Source/WebCore/testing/Internals.cpp

    r259435 r259452  
    554554    WebCore::useRealRTCPeerConnectionFactory(rtcProvider);
    555555    rtcProvider.disableNonLocalhostConnections();
    556     RuntimeEnabledFeatures::sharedFeatures().setWebRTCVP8CodecEnabled(true);
     556    RuntimeEnabledFeatures::sharedFeatures().setWebRTCH265CodecEnabled(true);
    557557    page.settings().setWebRTCEncryptionEnabled(true);
    558558#endif
  • trunk/Source/WebKit/ChangeLog

    r259449 r259452  
     12020-04-03  youenn fablet  <youenn@apple.com>
     2
     3        Add initial support for WebRTC HEVC
     4        https://bugs.webkit.org/show_bug.cgi?id=204283
     5
     6        Reviewed by Eric Carlson.
     7
     8        Remove VP8 runtime flag and add a H365 runtime flag instead.
     9
     10        * Shared/WebPreferences.yaml:
     11        * WebProcess/WebPage/WebPage.cpp:
     12        (WebKit::WebPage::updatePreferences):
     13
    1142020-04-03  Yousuke Kimoto  <yousuke.kimoto@sony.com>
    215
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r259275 r259452  
    582582  condition: ENABLE(MEDIA_STREAM)
    583583
    584 WebRTCVP8CodecEnabled:
    585   type: bool
    586   defaultValue: true
     584WebRTCH265CodecEnabled:
     585  type: bool
     586  defaultValue: false
    587587  webcoreBinding: RuntimeEnabledFeatures
    588588  condition: ENABLE(WEB_RTC)
    589   humanReadableName: "WebRTC VP8 codec"
    590   humanReadableDescription: "Enable WebRTC VP8 codec"
    591   category: internal
     589  humanReadableName: "WebRTC H265 codec"
     590  humanReadableDescription: "Enable WebRTC H265 codec"
     591  category: experimental
    592592
    593593WebRTCPlatformCodecsInGPUProcessEnabled:
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r259392 r259452  
    36663666        m_drawingArea->updatePreferences(store);
    36673667
     3668#if USE(LIBWEBRTC)
     3669    m_page->libWebRTCProvider().supportsH265(RuntimeEnabledFeatures::sharedFeatures().webRTCH265CodecEnabled());
     3670#endif
     3671
    36683672#if ENABLE(GPU_PROCESS)
    36693673    // FIXME: useGPUProcessForMedia should be a RuntimeEnabledFeature since it's global.
Note: See TracChangeset for help on using the changeset viewer.