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

Changeset 268805 in webkit


Ignore:
Timestamp:
Oct 21, 2020, 10:14:25 AM (6 years ago)
Author:
youenn@apple.com
Message:

WebRTC VP9 Decoder should be able to use VTB
https://bugs.webkit.org/show_bug.cgi?id=217811

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Add RTCVideoDecoderVTBVP9 as a VP9 decoder using the VTB API.
Enable this code path by default if VP9 is enabled and hardware VP9 decoding is supported.
Allow to override this setting for testing purposes.

Add SPI header files in case they are not available.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/CMBaseObjectSPI.h: Added.
  • Source/webrtc/sdk/WebKit/VTVideoDecoderSPI.h: Added.
  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm:

(webrtc::createWebKitDecoderFactory):

  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:

(webrtc::createWebKitVP9Decoder):

  • Source/webrtc/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm:

(-[RTCWrappedNativeVideoDecoder implementationName]):

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

(-[RTCDefaultVideoDecoderFactory initWithH265:vp9:vp9VTB:]):
(-[RTCDefaultVideoDecoderFactory createDecoder:]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.h: Added.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm: Added.

(RTCFrameDecodeParams::RTCFrameDecodeParams):
(VP9BufferToCMSampleBuffer):
(vp9DecompressionOutputCallback):
(-[RTCVideoDecoderVTBVP9 dealloc]):
(-[RTCVideoDecoderVTBVP9 startDecodeWithNumberOfCores:]):
(-[RTCVideoDecoderVTBVP9 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderVTBVP9 decodeData:size:timeStamp:]):
(-[RTCVideoDecoderVTBVP9 setCallback:]):
(-[RTCVideoDecoderVTBVP9 setError:]):
(-[RTCVideoDecoderVTBVP9 releaseDecoder]):
(-[RTCVideoDecoderVTBVP9 resetDecompressionSession]):
(-[RTCVideoDecoderVTBVP9 configureDecompressionSession]):
(-[RTCVideoDecoderVTBVP9 destroyDecompressionSession]):
(-[RTCVideoDecoderVTBVP9 setVideoFormat:]):
(-[RTCVideoDecoderVTBVP9 implementationName]):

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

(webrtc::ObjCVideoDecoderFactory::CreateVideoDecoder):

  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Add testing support to enable VP9 decoding through VTB for WebRTC.

Test: webrtc/vp9-vtb.html

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

(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):

  • testing/Internals.cpp:

(WebCore::Internals::setWebRTCVP9VTBSupport):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • webrtc/vp9-vtb-expected.txt: Added.
  • webrtc/vp9-vtb.html: Added.
Location:
trunk
Files:
5 added
21 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r268803 r268805  
     12020-10-21  Youenn Fablet  <youenn@apple.com>
     2
     3        WebRTC VP9 Decoder should be able to use VTB
     4        https://bugs.webkit.org/show_bug.cgi?id=217811
     5
     6        Reviewed by Eric Carlson.
     7
     8        * TestExpectations:
     9        * platform/mac-wk1/TestExpectations:
     10        * platform/mac-wk2/TestExpectations:
     11        * webrtc/vp9-vtb-expected.txt: Added.
     12        * webrtc/vp9-vtb.html: Added.
     13
    1142020-10-21  Hector Lopez  <hector_i_lopez@apple.com>
    215
  • trunk/LayoutTests/TestExpectations

    r268746 r268805  
    19231923# Experimental H265 support.
    19241924webrtc/h265.html [ Pass Failure ]
     1925
     1926webrtc/vp9-vtb.html [ Skip ]
    19251927
    19261928webrtc/simulcast-h264.html [ Slow ]
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r268707 r268805  
    12741274# rdar://65269589 ([ macOS and iOS ] media/vp9.html is failing consistently.)
    12751275[ BigSur+ ] media/vp9.html [ Pass ]
     1276[ BigSur+ ] webrtc/vp9-vtb.html [ Pass ]
    12761277
    12771278webkit.org/b/215700 [ Debug ] fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html [ Pass Failure Timeout ]
  • trunk/Source/ThirdParty/libwebrtc/ChangeLog

    r268420 r268805  
     12020-10-21  Youenn Fablet  <youenn@apple.com>
     2
     3        WebRTC VP9 Decoder should be able to use VTB
     4        https://bugs.webkit.org/show_bug.cgi?id=217811
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add RTCVideoDecoderVTBVP9 as a VP9 decoder using the VTB API.
     9        Enable this code path by default if VP9 is enabled and hardware VP9 decoding is supported.
     10        Allow to override this setting for testing purposes.
     11
     12        Add SPI header files in case they are not available.
     13
     14        * Configurations/libwebrtc.iOS.exp:
     15        * Configurations/libwebrtc.iOSsim.exp:
     16        * Configurations/libwebrtc.mac.exp:
     17        * Source/webrtc/sdk/WebKit/CMBaseObjectSPI.h: Added.
     18        * Source/webrtc/sdk/WebKit/VTVideoDecoderSPI.h: Added.
     19        * Source/webrtc/sdk/WebKit/WebKitDecoder.mm:
     20        (webrtc::createWebKitDecoderFactory):
     21        * Source/webrtc/sdk/WebKit/WebKitUtilities.h:
     22        * Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:
     23        (webrtc::createWebKitVP9Decoder):
     24        * Source/webrtc/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm:
     25        (-[RTCWrappedNativeVideoDecoder implementationName]):
     26        * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h:
     27        * Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m:
     28        (-[RTCDefaultVideoDecoderFactory initWithH265:vp9:vp9VTB:]):
     29        (-[RTCDefaultVideoDecoderFactory createDecoder:]):
     30        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.h: Added.
     31        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm: Added.
     32        (RTCFrameDecodeParams::RTCFrameDecodeParams):
     33        (VP9BufferToCMSampleBuffer):
     34        (vp9DecompressionOutputCallback):
     35        (-[RTCVideoDecoderVTBVP9 dealloc]):
     36        (-[RTCVideoDecoderVTBVP9 startDecodeWithNumberOfCores:]):
     37        (-[RTCVideoDecoderVTBVP9 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
     38        (-[RTCVideoDecoderVTBVP9 decodeData:size:timeStamp:]):
     39        (-[RTCVideoDecoderVTBVP9 setCallback:]):
     40        (-[RTCVideoDecoderVTBVP9 setError:]):
     41        (-[RTCVideoDecoderVTBVP9 releaseDecoder]):
     42        (-[RTCVideoDecoderVTBVP9 resetDecompressionSession]):
     43        (-[RTCVideoDecoderVTBVP9 configureDecompressionSession]):
     44        (-[RTCVideoDecoderVTBVP9 destroyDecompressionSession]):
     45        (-[RTCVideoDecoderVTBVP9 setVideoFormat:]):
     46        (-[RTCVideoDecoderVTBVP9 implementationName]):
     47        * Source/webrtc/sdk/objc/native/src/objc_video_decoder_factory.mm:
     48        (webrtc::ObjCVideoDecoderFactory::CreateVideoDecoder):
     49        * libwebrtc.xcodeproj/project.pbxproj:
     50
    1512020-10-13  Keith Rollin  <krollin@apple.com>
    252
  • trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp

    r268288 r268805  
    105105__ZNK6webrtc21IceCandidateInterface10server_urlEv
    106106__ZN6webrtc20setApplicationStatusEb
    107 __ZN6webrtc26createWebKitDecoderFactoryENS_10WebKitH265ENS_9WebKitVP9E
     107__ZN6webrtc26createWebKitDecoderFactoryENS_10WebKitH265ENS_9WebKitVP9ENS_12WebKitVP9VTBE
    108108__ZN6webrtc26createWebKitEncoderFactoryENS_10WebKitH265ENS_9WebKitVP9E
    109109__ZN6webrtc29setH264HardwareEncoderAllowedEb
  • trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp

    r268288 r268805  
    105105__ZNK6webrtc21IceCandidateInterface10server_urlEv
    106106__ZN6webrtc20setApplicationStatusEb
    107 __ZN6webrtc26createWebKitDecoderFactoryENS_10WebKitH265ENS_9WebKitVP9E
     107__ZN6webrtc26createWebKitDecoderFactoryENS_10WebKitH265ENS_9WebKitVP9ENS_12WebKitVP9VTBE
    108108__ZN6webrtc26createWebKitEncoderFactoryENS_10WebKitH265ENS_9WebKitVP9E
    109109__ZN6webrtc29setH264HardwareEncoderAllowedEb
  • trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp

    r268288 r268805  
    105105__ZNK6webrtc21IceCandidateInterface10server_urlEv
    106106__ZN6webrtc20setApplicationStatusEb
    107 __ZN6webrtc26createWebKitDecoderFactoryENS_10WebKitH265ENS_9WebKitVP9E
     107__ZN6webrtc26createWebKitDecoderFactoryENS_10WebKitH265ENS_9WebKitVP9ENS_12WebKitVP9VTBE
    108108__ZN6webrtc26createWebKitEncoderFactoryENS_10WebKitH265ENS_9WebKitVP9E
    109109__ZN6webrtc29setH264HardwareEncoderAllowedEb
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitDecoder.mm

    r263734 r268805  
    168168}
    169169
    170 std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitH265 supportsH265, WebKitVP9 supportsVP9)
    171 {
    172     auto internalFactory = ObjCToNativeVideoDecoderFactory([[RTCDefaultVideoDecoderFactory alloc] initWithH265: supportsH265 == WebKitH265::On vp9: supportsVP9 == WebKitVP9::On]);
     170std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitH265 supportsH265, WebKitVP9 supportsVP9, WebKitVP9VTB supportsVP9VTB)
     171{
     172    auto internalFactory = ObjCToNativeVideoDecoderFactory([[RTCDefaultVideoDecoderFactory alloc] initWithH265: supportsH265 == WebKitH265::On vp9: supportsVP9 == WebKitVP9::On vp9VTB: supportsVP9VTB == WebKitVP9VTB::On]);
    173173    if (videoDecoderCallbacks().createCallback)
    174174        return std::make_unique<RemoteVideoDecoderFactory>(std::move(internalFactory));
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h

    r268288 r268805  
    4343enum class WebKitH265 { Off, On };
    4444enum class WebKitVP9 { Off, On };
     45enum class WebKitVP9VTB { Off, On };
    4546
    4647std::unique_ptr<webrtc::VideoEncoderFactory> createWebKitEncoderFactory(WebKitH265, WebKitVP9);
    47 std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitH265, WebKitVP9);
     48std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitH265, WebKitVP9, WebKitVP9VTB);
    4849
    4950void setApplicationStatus(bool isActive);
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp

    r265073 r268805  
    2626#include "WebKitVP9Decoder.h"
    2727
    28 #if defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)
    29 
    3028#include "WebKitUtilities.h"
    31 #include <CoreMedia/CMBaseObject.h>
    32 #include <VideoToolbox/VTVideoDecoder.h>
    33 #include <VideoToolbox/VTVideoDecoderRegistration.h>
     29#include <VideoToolbox/VideoToolbox.h>
    3430#include "modules/video_coding/codecs/vp9/vp9_impl.h"
    3531#include "rtc_base/logging.h"
    3632#include "system_wrappers/include/cpu_info.h"
     33
     34#include "CMBaseObjectSPI.h"
     35#include "VTVideoDecoderSPI.h"
    3736
    3837namespace webrtc {
     
    8685    copyVP9DecoderDebugDescription,
    8786    nullptr, // CopyProperty
    88     nullptr // SetProperty
     87    nullptr, // SetProperty
     88    nullptr,
     89    nullptr
    8990};
    9091
     
    9293static OSStatus decodeVP9DecoderFrame(VTVideoDecoderRef, VTVideoDecoderFrame, CMSampleBufferRef, VTDecodeFrameFlags, VTDecodeInfoFlags*);
    9394
    94 static const VTVideoDecoderClass WebKitVP9Decoder_VideoEncoderClass =
    95 {
    96     kVTVideoDecoder_ClassVersion_3,
     95static const VTVideoDecoderClass WebKitVP9Decoder_VideoDecoderClass =
     96{
     97    kVTVideoDecoder_ClassVersion_1,
    9798    startVP9DecoderSession,
    9899    decodeVP9DecoderFrame,
     
    110111{
    111112    { nullptr, &WebKitVP9Decoder_BaseClass },
    112     &WebKitVP9Decoder_VideoEncoderClass
     113    &WebKitVP9Decoder_VideoDecoderClass
    113114};
    114115
     
    388389
    389390}
    390 
    391 #else // defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)
    392 
    393 namespace webrtc {
    394 
    395 void registerWebKitVP9Decoder()
    396 {
    397 }
    398 
    399 }
    400 #endif // defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm

    r252472 r268805  
    5555
    5656- (NSString *)implementationName {
     57#if !defined(WEBRTC_WEBKIT_BUILD)
    5758  RTC_NOTREACHED();
     59#endif
    5860  return nil;
    5961}
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h

    r263734 r268805  
    2222__attribute__((objc_runtime_name("WK_RTCDefaultVideoDecoderFactory")))
    2323@interface RTCDefaultVideoDecoderFactory : NSObject <RTCVideoDecoderFactory>
    24 - (id)initWithH265:(bool)supportH265 vp9:(bool)supportsVP9;
     24- (id)initWithH265:(bool)supportH265 vp9:(bool)supportsVP9 vp9VTB:(bool)supportsVP9VTB;
    2525@end
    2626
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m

    r263734 r268805  
    1818#if defined(RTC_ENABLE_VP9)
    1919#import "api/video_codec/RTCVideoDecoderVP9.h"
     20#import "RTCVideoDecoderVTBVP9.h"
    2021#endif
    2122#if !defined(RTC_DISABLE_H265)
     
    2425#endif
    2526
     27#import <VideoToolbox/VideoToolbox.h>
     28
    2629@implementation RTCDefaultVideoDecoderFactory {
    2730  bool _supportsH265;
    2831  bool _supportsVP9;
     32  bool _supportsVP9VTB;
    2933}
    3034
    31 - (id)initWithH265:(bool)supportsH265 vp9:(bool)supportsVP9
     35- (id)initWithH265:(bool)supportsH265 vp9:(bool)supportsVP9 vp9VTB:(bool)supportsVP9VTB
    3236{
    3337  self = [super init];
     
    3539      _supportsH265 = supportsH265;
    3640      _supportsVP9 = supportsVP9;
     41      // Use kCMVideoCodecType_VP9 once added to CMFormatDescription.h
     42      _supportsVP9VTB = supportsVP9 && (supportsVP9VTB || VTIsHardwareDecodeSupported('vp09'));
     43;
    3744  }
    3845  return self;
     
    9299#if defined(RTC_ENABLE_VP9)
    93100  } else if ([info.name isEqualToString:kRTCVideoCodecVp9Name]) {
    94     return [RTCVideoDecoderVP9 vp9Decoder];
     101      if (_supportsVP9VTB) {
     102        return [[RTCVideoDecoderVTBVP9 alloc] init];
     103      } else {
     104        return [RTCVideoDecoderVP9 vp9Decoder];
     105      }
    95106#endif
    96107  }
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.h

    r268804 r268805  
    11/*
    2  * Copyright (C) 2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #pragma once
     26#import <Foundation/Foundation.h>
    2727
    28 #include "api/video/video_frame_buffer.h"
    29 #include "api/scoped_refptr.h"
    30 #include "api/video_codecs/video_decoder_factory.h"
    31 #include "api/video_codecs/video_encoder_factory.h"
    32 #include "media/engine/encoder_simulcast_proxy.h"
     28#import "RTCMacros.h"
     29#import "RTCVideoDecoder.h"
    3330
    34 using CVPixelBufferRef = struct __CVBuffer*;
    35 using CVPixelBufferPoolRef = struct __CVPixelBufferPool*;
    36 
    37 namespace webrtc {
    38 
    39 class VideoDecoderFactory;
    40 class VideoEncoderFactory;
    41 class VideoFrame;
    42 
    43 enum class WebKitH265 { Off, On };
    44 enum class WebKitVP9 { Off, On };
    45 
    46 std::unique_ptr<webrtc::VideoEncoderFactory> createWebKitEncoderFactory(WebKitH265, WebKitVP9);
    47 std::unique_ptr<webrtc::VideoDecoderFactory> createWebKitDecoderFactory(WebKitH265, WebKitVP9);
    48 
    49 void setApplicationStatus(bool isActive);
    50 
    51 void setH264HardwareEncoderAllowed(bool);
    52 bool isH264HardwareEncoderAllowed();
    53 
    54 void setH264LowLatencyEncoderEnabled(bool);
    55 bool isH264LowLatencyEncoderEnabled();
    56 
    57 CVPixelBufferRef pixelBufferFromFrame(const VideoFrame&, const std::function<CVPixelBufferRef(size_t, size_t)>&);
    58 rtc::scoped_refptr<webrtc::VideoFrameBuffer> pixelBufferToFrame(CVPixelBufferRef);
    59 
    60 CVPixelBufferPoolRef createPixelBufferPool(size_t width, size_t height);
    61 
    62 }
     31RTC_OBJC_EXPORT
     32__attribute__((objc_runtime_name("WK_RTCVideoDecoderVTBVP9")))
     33@interface RTCVideoDecoderVTBVP9 : NSObject <RTCVideoDecoder>
     34- (NSInteger)decodeData:(const uint8_t *)data
     35    size:(size_t)size
     36    timeStamp:(uint32_t)timeStamp;
     37@end
  • trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/native/src/objc_video_decoder_factory.mm

    r259452 r268805  
    101101      // See https://bugs.webkit.org/show_bug.cgi?id=198782.
    102102      // if ([decoder isKindOfClass:[RTCWrappedNativeVideoDecoder class]]) {
    103       if ([codecName isEqual:@"VP8"] || [codecName isEqual:@"VP9"]) {
     103#if !defined(WEBRTC_WEBKIT_BUILD)
     104        if ([codecName isEqual:@"VP8"] || [codecName isEqual:@"VP9"]) {
     105#else
     106        if (![decoder.implementationName isEqual:@"VideoToolbox"]) {
     107#endif
    104108        return [(RTCWrappedNativeVideoDecoder *)decoder releaseWrappedDecoder];
    105109      } else {
  • trunk/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj

    r268163 r268805  
    9090                41299B932127367B00B3414B /* pitch_filter.h in Headers */ = {isa = PBXBuildFile; fileRef = 41299B902127367B00B3414B /* pitch_filter.h */; };
    9191                41299B972127369100B3414B /* fake_network_pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 41299B952127369100B3414B /* fake_network_pipe.h */; };
     92                412FF9342539B764001DF036 /* RTCVideoDecoderVTBVP9.mm in Sources */ = {isa = PBXBuildFile; fileRef = 412FF9322539B3C9001DF036 /* RTCVideoDecoderVTBVP9.mm */; };
     93                412FF937253D8F0A001DF036 /* VTVideoDecoderSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 412FF935253D8F0A001DF036 /* VTVideoDecoderSPI.h */; };
     94                412FF938253D8F0A001DF036 /* CMBaseObjectSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 412FF936253D8F0A001DF036 /* CMBaseObjectSPI.h */; };
    9295                413091F31EF8CF9200757C55 /* rtp_video_stream_receiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 413091F11EF8CF9100757C55 /* rtp_video_stream_receiver.h */; };
    9396                413091F41EF8CF9200757C55 /* rtp_video_stream_receiver.cc in Sources */ = {isa = PBXBuildFile; fileRef = 413091F21EF8CF9100757C55 /* rtp_video_stream_receiver.cc */; };
     
    14231426                417953B9216982420028266B /* RTCVideoEncoderFactoryH264.m in Sources */ = {isa = PBXBuildFile; fileRef = 417953B1216982400028266B /* RTCVideoEncoderFactoryH264.m */; };
    14241427                417953BA216982420028266B /* RTCCodecSpecificInfoH264+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 417953B2216982410028266B /* RTCCodecSpecificInfoH264+Private.h */; };
    1425                 417953BB216982420028266B /* RTCDefaultVideoDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 417953B3216982420028266B /* RTCDefaultVideoDecoderFactory.h */; };
    14261428                417953BC2169824B0028266B /* helpers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 411521D32169821F000ABAF7 /* helpers.cc */; };
    14271429                417953BD2169824B0028266B /* helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 416225F5216981F400A91C9B /* helpers.h */; };
     
    22372239                41ECEABE20640498009D5141 /* WebKitUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEABD20640498009D5141 /* WebKitUtilities.mm */; };
    22382240                41ECEAC120640F28009D5141 /* NSString+StdString.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEABF20640F27009D5141 /* NSString+StdString.h */; };
    2239                 41ECEAFC20646664009D5141 /* EncoderUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEAF920646663009D5141 /* EncoderUtilities.h */; };
    22402241                41ECEAFD20646664009D5141 /* VideoProcessingSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAFA20646663009D5141 /* VideoProcessingSoftLink.cpp */; };
    22412242                41ECEAFE20646664009D5141 /* VideoProcessingSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEAFB20646664009D5141 /* VideoProcessingSoftLink.h */; };
     
    43464347                41299B9C212736DE00B3414B /* rnn.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = rnn.cc; sourceTree = "<group>"; };
    43474348                41299B9D212736DF00B3414B /* spectral_features_internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = spectral_features_internal.h; sourceTree = "<group>"; };
     4349                412FF9322539B3C9001DF036 /* RTCVideoDecoderVTBVP9.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RTCVideoDecoderVTBVP9.mm; sourceTree = "<group>"; };
     4350                412FF9332539B3C9001DF036 /* RTCVideoDecoderVTBVP9.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCVideoDecoderVTBVP9.h; sourceTree = "<group>"; };
     4351                412FF935253D8F0A001DF036 /* VTVideoDecoderSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTVideoDecoderSPI.h; sourceTree = "<group>"; };
     4352                412FF936253D8F0A001DF036 /* CMBaseObjectSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMBaseObjectSPI.h; sourceTree = "<group>"; };
    43484353                413091F11EF8CF9100757C55 /* rtp_video_stream_receiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rtp_video_stream_receiver.h; sourceTree = "<group>"; };
    43494354                413091F21EF8CF9100757C55 /* rtp_video_stream_receiver.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rtp_video_stream_receiver.cc; sourceTree = "<group>"; };
     
    66956700                41ECEABD20640498009D5141 /* WebKitUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitUtilities.mm; sourceTree = "<group>"; };
    66966701                41ECEABF20640F27009D5141 /* NSString+StdString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+StdString.h"; path = "Common/NSString+StdString.h"; sourceTree = "<group>"; };
    6697                 41ECEAF920646663009D5141 /* EncoderUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncoderUtilities.h; sourceTree = "<group>"; };
    66986702                41ECEAFA20646663009D5141 /* VideoProcessingSoftLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VideoProcessingSoftLink.cpp; sourceTree = "<group>"; };
    66996703                41ECEAFB20646664009D5141 /* VideoProcessingSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoProcessingSoftLink.h; sourceTree = "<group>"; };
     
    1005710061                                41009200242E3A4300C5EDA2 /* RTCVideoDecoderH265.h */,
    1005810062                                41009207242E3A4500C5EDA2 /* RTCVideoDecoderH265.mm */,
     10063                                412FF9332539B3C9001DF036 /* RTCVideoDecoderVTBVP9.h */,
     10064                                412FF9322539B3C9001DF036 /* RTCVideoDecoderVTBVP9.mm */,
    1005910065                                416225EF216981F200A91C9B /* RTCVideoEncoderFactoryH264.h */,
    1006010066                                417953B1216982400028266B /* RTCVideoEncoderFactoryH264.m */,
     
    1075210758                        isa = PBXGroup;
    1075310759                        children = (
    10754                                 41ECEAF920646663009D5141 /* EncoderUtilities.h */,
     10760                                412FF936253D8F0A001DF036 /* CMBaseObjectSPI.h */,
    1075510761                                41ECEAFA20646663009D5141 /* VideoProcessingSoftLink.cpp */,
    1075610762                                41ECEAFB20646664009D5141 /* VideoProcessingSoftLink.h */,
     10763                                412FF935253D8F0A001DF036 /* VTVideoDecoderSPI.h */,
    1075710764                                41E84BC92434C4A200D34E41 /* WebKitDecoder.h */,
    1075810765                                41E84BCA2434C4A300D34E41 /* WebKitDecoder.mm */,
     
    1602916036                                5CDD86A21E43B99400621E92 /* circular_buffer.h in Headers */,
    1603016037                                4131C373234B957D0028A615 /* clockdrift_detector.h in Headers */,
     16038                                412FF938253D8F0A001DF036 /* CMBaseObjectSPI.h in Headers */,
    1603116039                                41FCBB7621B1FFA400A5DF27 /* cocoa_threading.h in Headers */,
    1603216040                                5CDD87B01E43BC0500621E92 /* codec.h in Headers */,
     
    1616916177                                4189393E242A70AE007FDC41 /* encoder_settings.h in Headers */,
    1617016178                                4131C283234B8CC40028A615 /* encoder_simulcast_proxy.h in Headers */,
    16171                                 41ECEAFC20646664009D5141 /* EncoderUtilities.h in Headers */,
    1617216179                                5CDD8B991E43C2B500621E92 /* energy_inverse.h in Headers */,
    1617316180                                5CDD8B9B1E43C2B500621E92 /* enh_upsample.h in Headers */,
     
    1672716734                                413A24551FE1991A00373E99 /* RTCDataChannel.h in Headers */,
    1672816735                                413A24701FE1991A00373E99 /* RTCDataChannelConfiguration.h in Headers */,
    16729                                 417953BB216982420028266B /* RTCDefaultVideoDecoderFactory.h in Headers */,
    1673016736                                417953C22169824B0028266B /* RTCDefaultVideoEncoderFactory.h in Headers */,
    1673116737                                413A24521FE1991A00373E99 /* RTCDispatcher.h in Headers */,
     
    1720517211                                5CDD8BF41E43C2B500621E92 /* vq3.h in Headers */,
    1720617212                                5CDD8BF61E43C2B500621E92 /* vq4.h in Headers */,
     17213                                412FF937253D8F0A001DF036 /* VTVideoDecoderSPI.h in Headers */,
    1720717214                                5C4B4C811E431F9C002651C8 /* wav_file.h in Headers */,
    1720817215                                5C4B4C841E431F9C002651C8 /* wav_header.h in Headers */,
     
    1940019407                                413E67682169854B00EF37ED /* RTCVideoDecoderVP8.mm in Sources */,
    1940119408                                414035EF24AA0EBC00BCE9B2 /* RTCVideoDecoderVP9.mm in Sources */,
     19409                                412FF9342539B764001DF036 /* RTCVideoDecoderVTBVP9.mm in Sources */,
    1940219410                                417953B9216982420028266B /* RTCVideoEncoderFactoryH264.m in Sources */,
    1940319411                                417953CA2169824B0028266B /* RTCVideoEncoderH264.mm in Sources */,
  • trunk/Source/WebCore/ChangeLog

    r268804 r268805  
     12020-10-21  Youenn Fablet  <youenn@apple.com>
     2
     3        WebRTC VP9 Decoder should be able to use VTB
     4        https://bugs.webkit.org/show_bug.cgi?id=217811
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add testing support to enable VP9 decoding through VTB for WebRTC.
     9
     10        Test: webrtc/vp9-vtb.html
     11
     12        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
     13        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
     14        (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
     15        * testing/Internals.cpp:
     16        (WebCore::Internals::setWebRTCVP9VTBSupport):
     17        * testing/Internals.h:
     18        * testing/Internals.idl:
     19
    1202020-10-21  Zalan Bujtas  <zalan@apple.com>
    221
  • trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h

    r267799 r268805  
    109109    void setH265Support(bool value) { m_supportsH265 = value; }
    110110    void setVP9Support(bool value) { m_supportsVP9 = value; }
     111    void setVP9VTBSupport(bool value) { m_supportsVP9VTB = value; }
    111112    bool isSupportingH265() const { return m_supportsH265; }
    112113    bool isSupportingVP9() const { return m_supportsVP9; }
     114    bool isSupportingVP9VTB() const { return m_supportsVP9VTB; }
    113115    virtual void disableNonLocalhostConnections() { m_disableNonLocalhostConnections = true; }
    114116
     
    154156    bool m_supportsH265 { false };
    155157    bool m_supportsVP9 { false };
     158    bool m_supportsVP9VTB { false };
    156159    bool m_enableLogging { true };
    157160    bool m_useDTLS10 { false };
  • trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp

    r268288 r268805  
    6464        return nullptr;
    6565
    66     return webrtc::createWebKitDecoderFactory(isSupportingH265() ? webrtc::WebKitH265::On : webrtc::WebKitH265::Off, isSupportingVP9() ? webrtc::WebKitVP9::On : webrtc::WebKitVP9::Off);
     66    return webrtc::createWebKitDecoderFactory(isSupportingH265() ? webrtc::WebKitH265::On : webrtc::WebKitH265::Off, isSupportingVP9() ? webrtc::WebKitVP9::On : webrtc::WebKitVP9::Off, isSupportingVP9VTB() ? webrtc::WebKitVP9VTB::On : webrtc::WebKitVP9VTB::Off);
    6767}
    6868
  • trunk/Source/WebCore/testing/Internals.cpp

    r268769 r268805  
    15691569}
    15701570
     1571void Internals::setWebRTCVP9VTBSupport(bool value)
     1572{
     1573#if USE(LIBWEBRTC)
     1574    if (auto* page = contextDocument()->page()) {
     1575        page->libWebRTCProvider().setVP9VTBSupport(value);
     1576        page->libWebRTCProvider().clearFactory();
     1577    }
     1578#endif
     1579}
     1580
    15711581void Internals::setEnableWebRTCEncryption(bool value)
    15721582{
  • trunk/Source/WebCore/testing/Internals.h

    r268769 r268805  
    600600    void setWebRTCH265Support(bool);
    601601    void setWebRTCVP9Support(bool);
     602    void setWebRTCVP9VTBSupport(bool);
    602603    void setEnableWebRTCEncryption(bool);
    603604    void setUseDTLS10(bool);
  • trunk/Source/WebCore/testing/Internals.idl

    r268769 r268805  
    794794    [Conditional=WEB_RTC] undefined setWebRTCH265Support(boolean allowed);
    795795    [Conditional=WEB_RTC] undefined setWebRTCVP9Support(boolean allowed);
     796    [Conditional=WEB_RTC] undefined setWebRTCVP9VTBSupport(boolean allowed);
    796797
    797798    [Conditional=MEDIA_STREAM] undefined setMockAudioTrackChannelNumber(MediaStreamTrack track, unsigned short count);
Note: See TracChangeset for help on using the changeset viewer.