Unreviewed, rolling out r229876.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 05:11:45 +0000 (05:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 05:11:45 +0000 (05:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183929

Some webrtc tests are timing out on iOS simulator (Requested
by youenn on #webkit).

Reverted changeset:

"Use libwebrtc ObjectiveC H264 encoder and decoder"
https://bugs.webkit.org/show_bug.cgi?id=183912
https://trac.webkit.org/changeset/229876

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h [deleted file]
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm [deleted file]
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
Source/ThirdParty/libwebrtc/WebKit/0001-Adapting-libwebrtc-H264-codec.patch [deleted file]
Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h
Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp [moved from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm with 84% similarity]
Source/WebCore/testing/Internals.cpp

index 13f59f9..1ac9e06 100644 (file)
@@ -1,3 +1,17 @@
+2018-03-22  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r229876.
+        https://bugs.webkit.org/show_bug.cgi?id=183929
+
+        Some webrtc tests are timing out on iOS simulator (Requested
+        by youenn on #webkit).
+
+        Reverted changeset:
+
+        "Use libwebrtc ObjectiveC H264 encoder and decoder"
+        https://bugs.webkit.org/show_bug.cgi?id=183912
+        https://trac.webkit.org/changeset/229876
+
 2018-03-22  Youenn Fablet  <youenn@apple.com>
 
         Use libwebrtc ObjectiveC H264 encoder and decoder
index 10f3173..5aa5147 100644 (file)
@@ -125,8 +125,3 @@ __ZNK6webrtc21IceCandidateInterface10server_urlEv
 __ZNK6webrtc27SessionDescriptionInterface7GetTypeEv
 __ZTVN6webrtc21IceCandidateInterfaceE
 __ZTVN6webrtc27SessionDescriptionInterfaceE
-__ZN6webrtc20setApplicationStatusEb
-__ZN6webrtc32createVideoToolboxDecoderFactoryEv
-__ZN6webrtc32createVideoToolboxEncoderFactoryEv
-__ZN6webrtc29setH264HardwareEncoderAllowedEb
-__ZN6webrtc20pixelBufferFromFrameERKNS_10VideoFrameE
index 10f3173..5aa5147 100644 (file)
@@ -125,8 +125,3 @@ __ZNK6webrtc21IceCandidateInterface10server_urlEv
 __ZNK6webrtc27SessionDescriptionInterface7GetTypeEv
 __ZTVN6webrtc21IceCandidateInterfaceE
 __ZTVN6webrtc27SessionDescriptionInterfaceE
-__ZN6webrtc20setApplicationStatusEb
-__ZN6webrtc32createVideoToolboxDecoderFactoryEv
-__ZN6webrtc32createVideoToolboxEncoderFactoryEv
-__ZN6webrtc29setH264HardwareEncoderAllowedEb
-__ZN6webrtc20pixelBufferFromFrameERKNS_10VideoFrameE
index a77ebf1..e11ecba 100644 (file)
@@ -126,8 +126,3 @@ __ZNK6webrtc21IceCandidateInterface10server_urlEv
 __ZNK6webrtc27SessionDescriptionInterface7GetTypeEv
 __ZTVN6webrtc21IceCandidateInterfaceE
 __ZTVN6webrtc27SessionDescriptionInterfaceE
-__ZN6webrtc20setApplicationStatusEb
-__ZN6webrtc32createVideoToolboxDecoderFactoryEv
-__ZN6webrtc32createVideoToolboxEncoderFactoryEv
-__ZN6webrtc29setH264HardwareEncoderAllowedEb
-__ZN6webrtc20pixelBufferFromFrameERKNS_10VideoFrameE
diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h
deleted file mode 100644 (file)
index 33efac6..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "api/video_codecs/video_encoder_factory.h"
-
-typedef struct __CVBuffer* CVPixelBufferRef;
-
-namespace webrtc {
-
-class VideoDecoderFactory;
-class VideoEncoderFactory;
-class VideoFrame;
-
-std::unique_ptr<webrtc::VideoEncoderFactory> createVideoToolboxEncoderFactory();
-std::unique_ptr<webrtc::VideoDecoderFactory> createVideoToolboxDecoderFactory();
-
-void setApplicationStatus(bool isActive);
-
-void setH264HardwareEncoderAllowed(bool);
-bool isH264HardwareEncoderAllowed();
-
-CVPixelBufferRef pixelBufferFromFrame(const VideoFrame&);
-
-}
diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm
deleted file mode 100644 (file)
index 3e58ebb..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "WebKitUtilities.h"
-#include "Common/RTCUIApplicationStatusObserver.h"
-#include "VideoToolbox/objc_video_decoder_factory.h"
-#include "VideoToolbox/objc_video_encoder_factory.h"
-#import "WebRTC/RTCVideoCodecH264.h"
-#include "api/video/video_frame.h"
-#include <webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.h>
-#include <webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h>
-
-#if !defined(WEBRTC_IOS)
-@interface RTCUIApplicationStatusObserver : NSObject
-
-+ (instancetype)sharedInstance;
-+ (void)prepareForUse;
-
-- (BOOL)isApplicationActive;
-
-@end
-#endif
-
-@implementation RTCUIApplicationStatusObserver {
-    BOOL _isActive;
-}
-
-+ (instancetype)sharedInstance {
-    static id sharedInstance;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        sharedInstance = [[self alloc] init];
-    });
-
-    return sharedInstance;
-}
-
-+ (void)prepareForUse {
-    __unused RTCUIApplicationStatusObserver *observer = [self sharedInstance];
-}
-
-- (void)setActive {
-    _isActive = YES;
-}
-
-- (void)setInactive {
-    _isActive = NO;
-}
-
-- (BOOL)isApplicationActive {
-    return _isActive;
-}
-
-@end
-
-namespace webrtc {
-
-void setApplicationStatus(bool isActive)
-{
-    if (isActive)
-        [[RTCUIApplicationStatusObserver sharedInstance] setActive];
-    else
-        [[RTCUIApplicationStatusObserver sharedInstance] setInactive];
-}
-
-std::unique_ptr<webrtc::VideoEncoderFactory> createVideoToolboxEncoderFactory()
-{
-    return std::make_unique<webrtc::ObjCVideoEncoderFactory>([[RTCVideoEncoderFactoryH264 alloc] init]);
-}
-
-std::unique_ptr<webrtc::VideoDecoderFactory> createVideoToolboxDecoderFactory()
-{
-    return std::make_unique<webrtc::ObjCVideoDecoderFactory>([[RTCVideoDecoderFactoryH264 alloc] init]);
-}
-
-static bool h264HardwareEncoderAllowed = true;
-void setH264HardwareEncoderAllowed(bool allowed)
-{
-    h264HardwareEncoderAllowed = allowed;
-}
-
-bool isH264HardwareEncoderAllowed()
-{
-    return h264HardwareEncoderAllowed;
-}
-
-CVPixelBufferRef pixelBufferFromFrame(const VideoFrame& frame)
-{
-    auto buffer = frame.video_frame_buffer();
-    auto frameBuffer = static_cast<webrtc::ObjCFrameBuffer&>(*buffer).wrapped_frame_buffer();
-    if ([frameBuffer isKindOfClass: [RTCCVPixelBuffer class]])
-        return [(RTCCVPixelBuffer *)frameBuffer pixelBuffer];
-    return nullptr;
-}
-
-}
index 34d08db..2f4b6bd 100644 (file)
@@ -90,10 +90,6 @@ void decompressionOutputCallback(void *decoderRef,
 - (void)dealloc {
   [self destroyDecompressionSession];
   [self setVideoFormat:nullptr];
-  if (_callback) {
-    Block_release(_callback);
-  }
-  [super dealloc];
 }
 
 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
@@ -182,7 +178,7 @@ void decompressionOutputCallback(void *decoderRef,
 }
 
 - (void)setCallback:(RTCVideoDecoderCallback)callback {
-  _callback = Block_copy(callback);
+  _callback = callback;
 }
 
 - (void)setError:(OSStatus)error {
@@ -194,7 +190,6 @@ void decompressionOutputCallback(void *decoderRef,
   // is safe to null out the callback.
   [self destroyDecompressionSession];
   [self setVideoFormat:nullptr];
-  Block_release(_callback);
   _callback = nullptr;
   return WEBRTC_VIDEO_CODEC_OK;
 }
@@ -265,7 +260,9 @@ void decompressionOutputCallback(void *decoderRef,
 - (void)destroyDecompressionSession {
   if (_decompressionSession) {
 #if defined(WEBRTC_IOS)
-    VTDecompressionSessionWaitForAsynchronousFrames(_decompressionSession);
+    if ([UIDevice isIOS11OrLater]) {
+      VTDecompressionSessionWaitForAsynchronousFrames(_decompressionSession);
+    }
 #endif
     VTDecompressionSessionInvalidate(_decompressionSession);
     CFRelease(_decompressionSession);
index 8099480..a818c27 100644 (file)
@@ -34,7 +34,6 @@
 #include "sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h"
 #include "system_wrappers/include/clock.h"
 #include "third_party/libyuv/include/libyuv/convert_from.h"
-#include "sdk/WebKit/WebKitUtilities.h"
 
 @interface RTCVideoEncoderH264 ()
 
@@ -319,10 +318,6 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
 
 - (void)dealloc {
   [self destroyCompressionSession];
-  if (_callback) {
-    Block_release(_callback);
-  }
-  [super dealloc];
 }
 
 - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings
@@ -468,7 +463,7 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
 }
 
 - (void)setCallback:(RTCVideoEncoderCallback)callback {
-  _callback = Block_copy(callback);
+  _callback = callback;
 }
 
 - (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate {
@@ -485,7 +480,6 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
   // callback anymore. Do not remove callback until the session is invalidated
   // since async encoder callbacks can occur until invalidation.
   [self destroyCompressionSession];
-  Block_release(_callback);
   _callback = nullptr;
   return WEBRTC_VIDEO_CODEC_OK;
 }
@@ -579,7 +573,7 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
       nullptr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
   CFDictionarySetValue(encoder_specs,
                        kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder,
-                       webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse);
+                       kCFBooleanTrue);
 #endif
   OSStatus status =
       VTCompressionSessionCreate(nullptr,  // use default allocator
diff --git a/Source/ThirdParty/libwebrtc/WebKit/0001-Adapting-libwebrtc-H264-codec.patch b/Source/ThirdParty/libwebrtc/WebKit/0001-Adapting-libwebrtc-H264-codec.patch
deleted file mode 100644 (file)
index 0363861..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-From c5debd83bb3933413d0a3dd2417f5fd9d64a3205 Mon Sep 17 00:00:00 2001
-From: Youenn Fablet <youenn@apple.com>
-Date: Thu, 22 Mar 2018 16:38:14 -0700
-Subject: [PATCH] Adapting-libwebrtc-H264-codec
-
----
- .../sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm      |  1 +
- .../Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm     | 11 +++++++----
- .../Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm     | 10 ++++++++--
- 3 files changed, 16 insertions(+), 6 deletions(-)
-
-diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm
-index 203896758e8..537a65e17d3 100644
---- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm
-+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm
-@@ -73,6 +73,7 @@ - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
- - (void)dealloc {
-   CVBufferRelease(_pixelBuffer);
-+  [super dealloc];
- }
- - (int)width {
-diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm
-index 2f4b6bd72c6..34d08db0e3b 100644
---- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm
-+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm
-@@ -90,6 +90,10 @@ - (instancetype)init {
- - (void)dealloc {
-   [self destroyDecompressionSession];
-   [self setVideoFormat:nullptr];
-+  if (_callback) {
-+    Block_release(_callback);
-+  }
-+  [super dealloc];
- }
- - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
-@@ -178,7 +182,7 @@ - (NSInteger)decode:(RTCEncodedImage *)inputImage
- }
- - (void)setCallback:(RTCVideoDecoderCallback)callback {
--  _callback = callback;
-+  _callback = Block_copy(callback);
- }
- - (void)setError:(OSStatus)error {
-@@ -190,6 +194,7 @@ - (NSInteger)releaseDecoder {
-   // is safe to null out the callback.
-   [self destroyDecompressionSession];
-   [self setVideoFormat:nullptr];
-+  Block_release(_callback);
-   _callback = nullptr;
-   return WEBRTC_VIDEO_CODEC_OK;
- }
-@@ -260,9 +265,7 @@ - (void)configureDecompressionSession {
- - (void)destroyDecompressionSession {
-   if (_decompressionSession) {
- #if defined(WEBRTC_IOS)
--    if ([UIDevice isIOS11OrLater]) {
--      VTDecompressionSessionWaitForAsynchronousFrames(_decompressionSession);
--    }
-+    VTDecompressionSessionWaitForAsynchronousFrames(_decompressionSession);
- #endif
-     VTDecompressionSessionInvalidate(_decompressionSession);
-     CFRelease(_decompressionSession);
-diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
-index a818c27d1e6..809948011a6 100644
---- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
-+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
-@@ -34,6 +34,7 @@
- #include "sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h"
- #include "system_wrappers/include/clock.h"
- #include "third_party/libyuv/include/libyuv/convert_from.h"
-+#include "sdk/WebKit/WebKitUtilities.h"
- @interface RTCVideoEncoderH264 ()
-@@ -318,6 +319,10 @@ - (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo {
- - (void)dealloc {
-   [self destroyCompressionSession];
-+  if (_callback) {
-+    Block_release(_callback);
-+  }
-+  [super dealloc];
- }
- - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings
-@@ -463,7 +468,7 @@ - (NSInteger)encode:(RTCVideoFrame *)frame
- }
- - (void)setCallback:(RTCVideoEncoderCallback)callback {
--  _callback = callback;
-+  _callback = Block_copy(callback);
- }
- - (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate {
-@@ -480,6 +485,7 @@ - (NSInteger)releaseEncoder {
-   // callback anymore. Do not remove callback until the session is invalidated
-   // since async encoder callbacks can occur until invalidation.
-   [self destroyCompressionSession];
-+  Block_release(_callback);
-   _callback = nullptr;
-   return WEBRTC_VIDEO_CODEC_OK;
- }
-@@ -573,7 +579,7 @@ - (int)resetCompressionSessionWithPixelFormat:(OSType)framePixelFormat {
-       nullptr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-   CFDictionarySetValue(encoder_specs,
-                        kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder,
--                       kCFBooleanTrue);
-+                       webrtc::isH264HardwareEncoderAllowed() ? kCFBooleanTrue : kCFBooleanFalse);
- #endif
-   OSStatus status =
-       VTCompressionSessionCreate(nullptr,  // use default allocator
--- 
-2.15.1 (Apple Git-101)
-
index 145db1b..9eb8a5c 100644 (file)
                413A243C1FE1991A00373E99 /* RTCVideoCodecH264.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A24041FE1990300373E99 /* RTCVideoCodecH264.h */; };
                413A243D1FE1991A00373E99 /* RTCVideoCapturer.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A24051FE1990300373E99 /* RTCVideoCapturer.h */; };
                413A243E1FE1991A00373E99 /* RTCPeerConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A24061FE1990400373E99 /* RTCPeerConnection.h */; };
+               413A243F1FE1991A00373E99 /* WebRTC.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A24071FE1990400373E99 /* WebRTC.h */; };
                413A24401FE1991A00373E99 /* RTCFieldTrials.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A24081FE1990400373E99 /* RTCFieldTrials.h */; };
                413A24411FE1991A00373E99 /* RTCVideoFrameBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A24091FE1990400373E99 /* RTCVideoFrameBuffer.h */; };
                413A24421FE1991A00373E99 /* RTCLegacyStatsReport.h in Headers */ = {isa = PBXBuildFile; fileRef = 413A240A1FE1990400373E99 /* RTCLegacyStatsReport.h */; };
                41EA54111EFC2D1B002FF04C /* sqrt.c in Sources */ = {isa = PBXBuildFile; fileRef = 41EA53FB1EFC2D1B002FF04C /* sqrt.c */; };
                41EA54191EFC2D53002FF04C /* md4.c in Sources */ = {isa = PBXBuildFile; fileRef = 41EA54131EFC2D4F002FF04C /* md4.c */; };
                41EA541A1EFC2D53002FF04C /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 41EA54181EFC2D53002FF04C /* md5.c */; };
-               41ECEAB620630108009D5141 /* RTCVideoCodec+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEAB320630107009D5141 /* RTCVideoCodec+Private.h */; };
-               41ECEAB720630108009D5141 /* RTCVideoCodec.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAB420630107009D5141 /* RTCVideoCodec.mm */; };
-               41ECEAB820630108009D5141 /* RTCVideoCodecH264.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAB520630108009D5141 /* RTCVideoCodecH264.mm */; };
-               41ECEABC206403C2009D5141 /* WebKitUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEABB206403C1009D5141 /* WebKitUtilities.h */; };
-               41ECEABE20640498009D5141 /* WebKitUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEABD20640498009D5141 /* WebKitUtilities.mm */; };
-               41ECEAC120640F28009D5141 /* NSString+StdString.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEABF20640F27009D5141 /* NSString+StdString.h */; };
-               41ECEAC220640F28009D5141 /* NSString+StdString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAC020640F28009D5141 /* NSString+StdString.mm */; };
-               41ECEAC3206411E2009D5141 /* RTCVideoDecoderH264.mm in Sources */ = {isa = PBXBuildFile; fileRef = 413A23F81FE1987C00373E99 /* RTCVideoDecoderH264.mm */; };
-               41ECEAC4206411E5009D5141 /* RTCVideoEncoderH264.mm in Sources */ = {isa = PBXBuildFile; fileRef = 413A23F41FE1987B00373E99 /* RTCVideoEncoderH264.mm */; };
-               41ECEAC620641303009D5141 /* RTCCVPixelBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAC520641302009D5141 /* RTCCVPixelBuffer.mm */; };
-               41ECEAC820641328009D5141 /* RTCEncodedImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAC720641328009D5141 /* RTCEncodedImage.mm */; };
-               41ECEACB2064134F009D5141 /* RTCVideoFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAC92064134E009D5141 /* RTCVideoFrame.mm */; };
-               41ECEACC2064134F009D5141 /* RTCVideoFrame+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEACA2064134E009D5141 /* RTCVideoFrame+Private.h */; };
-               41ECEACF20641370009D5141 /* RTCI420Buffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEACD2064136F009D5141 /* RTCI420Buffer.mm */; };
-               41ECEAD020641370009D5141 /* RTCI420Buffer+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEACE2064136F009D5141 /* RTCI420Buffer+Private.h */; };
-               41ECEAD320641458009D5141 /* objc_frame_buffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAD120641457009D5141 /* objc_frame_buffer.mm */; };
-               41ECEAD420641458009D5141 /* objc_frame_buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEAD220641458009D5141 /* objc_frame_buffer.h */; };
-               41ECEAD72064147C009D5141 /* helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEAD52064147C009D5141 /* helpers.h */; };
-               41ECEAD82064147C009D5141 /* helpers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAD62064147C009D5141 /* helpers.cc */; };
-               41ECEADA206414A6009D5141 /* RTCRtpFragmentationHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAD9206414A6009D5141 /* RTCRtpFragmentationHeader.mm */; };
-               41ECEADB206415EA009D5141 /* objc_video_decoder_factory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 413A23F91FE1987C00373E99 /* objc_video_decoder_factory.mm */; };
-               41ECEADC206415EE009D5141 /* objc_video_encoder_factory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 413A23F51FE1987B00373E99 /* objc_video_encoder_factory.mm */; };
-               41ECEAE1206416FF009D5141 /* RTCWrappedNativeVideoEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEADD206416FD009D5141 /* RTCWrappedNativeVideoEncoder.h */; };
-               41ECEAE2206416FF009D5141 /* RTCWrappedNativeVideoEncoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEADE206416FE009D5141 /* RTCWrappedNativeVideoEncoder.mm */; };
-               41ECEAE3206416FF009D5141 /* RTCWrappedNativeVideoDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 41ECEADF206416FE009D5141 /* RTCWrappedNativeVideoDecoder.h */; };
-               41ECEAE4206416FF009D5141 /* RTCWrappedNativeVideoDecoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAE0206416FE009D5141 /* RTCWrappedNativeVideoDecoder.mm */; };
-               41ECEAE7206417E9009D5141 /* webrtcvideoencoderfactory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAE5206417E8009D5141 /* webrtcvideoencoderfactory.cc */; };
-               41ECEAE8206417E9009D5141 /* webrtcvideodecoderfactory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAE6206417E9009D5141 /* webrtcvideodecoderfactory.cc */; };
-               41ECEAEA20641812009D5141 /* RTCVideoEncoderSettings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41ECEAE920641812009D5141 /* RTCVideoEncoderSettings.mm */; };
                41F411AD1EF8D91F00343C26 /* null_aec_dump_factory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 41F411AC1EF8D91E00343C26 /* null_aec_dump_factory.cc */; };
                41F411B01EF8DA0100343C26 /* rtcerror.cc in Sources */ = {isa = PBXBuildFile; fileRef = 41F411AE1EF8DA0000343C26 /* rtcerror.cc */; };
                41F411B11EF8DA0200343C26 /* rtcerror.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F411AF1EF8DA0000343C26 /* rtcerror.h */; };
                413A24041FE1990300373E99 /* RTCVideoCodecH264.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCVideoCodecH264.h; path = sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h; sourceTree = "<group>"; };
                413A24051FE1990300373E99 /* RTCVideoCapturer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCVideoCapturer.h; path = sdk/objc/Framework/Headers/WebRTC/RTCVideoCapturer.h; sourceTree = "<group>"; };
                413A24061FE1990400373E99 /* RTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCPeerConnection.h; path = sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h; sourceTree = "<group>"; };
+               413A24071FE1990400373E99 /* WebRTC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebRTC.h; path = sdk/objc/Framework/Headers/WebRTC/WebRTC.h; sourceTree = "<group>"; };
                413A24081FE1990400373E99 /* RTCFieldTrials.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCFieldTrials.h; path = sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h; sourceTree = "<group>"; };
                413A24091FE1990400373E99 /* RTCVideoFrameBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCVideoFrameBuffer.h; path = sdk/objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h; sourceTree = "<group>"; };
                413A240A1FE1990400373E99 /* RTCLegacyStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCLegacyStatsReport.h; path = sdk/objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h; sourceTree = "<group>"; };
                41EA54161EFC2D53002FF04C /* md5-586.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "md5-586.pl"; sourceTree = "<group>"; };
                41EA54171EFC2D53002FF04C /* md5-x86_64.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "md5-x86_64.pl"; sourceTree = "<group>"; };
                41EA54181EFC2D53002FF04C /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = md5.c; sourceTree = "<group>"; };
-               41ECEAB320630107009D5141 /* RTCVideoCodec+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "RTCVideoCodec+Private.h"; path = "PeerConnection/RTCVideoCodec+Private.h"; sourceTree = "<group>"; };
-               41ECEAB420630107009D5141 /* RTCVideoCodec.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCVideoCodec.mm; path = PeerConnection/RTCVideoCodec.mm; sourceTree = "<group>"; };
-               41ECEAB520630108009D5141 /* RTCVideoCodecH264.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCVideoCodecH264.mm; path = PeerConnection/RTCVideoCodecH264.mm; sourceTree = "<group>"; };
-               41ECEAB920630365009D5141 /* RTCUIApplicationStatusObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RTCUIApplicationStatusObserver.m; path = Common/RTCUIApplicationStatusObserver.m; sourceTree = "<group>"; };
-               41ECEABB206403C1009D5141 /* WebKitUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitUtilities.h; sourceTree = "<group>"; };
-               41ECEABD20640498009D5141 /* WebKitUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitUtilities.mm; sourceTree = "<group>"; };
-               41ECEABF20640F27009D5141 /* NSString+StdString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+StdString.h"; path = "Common/NSString+StdString.h"; sourceTree = "<group>"; };
-               41ECEAC020640F28009D5141 /* NSString+StdString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "NSString+StdString.mm"; path = "Common/NSString+StdString.mm"; sourceTree = "<group>"; };
-               41ECEAC520641302009D5141 /* RTCCVPixelBuffer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCCVPixelBuffer.mm; path = Video/RTCCVPixelBuffer.mm; sourceTree = "<group>"; };
-               41ECEAC720641328009D5141 /* RTCEncodedImage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCEncodedImage.mm; path = PeerConnection/RTCEncodedImage.mm; sourceTree = "<group>"; };
-               41ECEAC92064134E009D5141 /* RTCVideoFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCVideoFrame.mm; path = PeerConnection/RTCVideoFrame.mm; sourceTree = "<group>"; };
-               41ECEACA2064134E009D5141 /* RTCVideoFrame+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "RTCVideoFrame+Private.h"; path = "PeerConnection/RTCVideoFrame+Private.h"; sourceTree = "<group>"; };
-               41ECEACD2064136F009D5141 /* RTCI420Buffer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCI420Buffer.mm; path = Video/RTCI420Buffer.mm; sourceTree = "<group>"; };
-               41ECEACE2064136F009D5141 /* RTCI420Buffer+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "RTCI420Buffer+Private.h"; path = "Video/RTCI420Buffer+Private.h"; sourceTree = "<group>"; };
-               41ECEAD120641457009D5141 /* objc_frame_buffer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = objc_frame_buffer.mm; path = Video/objc_frame_buffer.mm; sourceTree = "<group>"; };
-               41ECEAD220641458009D5141 /* objc_frame_buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = objc_frame_buffer.h; path = Video/objc_frame_buffer.h; sourceTree = "<group>"; };
-               41ECEAD52064147C009D5141 /* helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = helpers.h; sourceTree = "<group>"; };
-               41ECEAD62064147C009D5141 /* helpers.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = helpers.cc; sourceTree = "<group>"; };
-               41ECEAD9206414A6009D5141 /* RTCRtpFragmentationHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCRtpFragmentationHeader.mm; path = PeerConnection/RTCRtpFragmentationHeader.mm; sourceTree = "<group>"; };
-               41ECEADD206416FD009D5141 /* RTCWrappedNativeVideoEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCWrappedNativeVideoEncoder.h; path = PeerConnection/RTCWrappedNativeVideoEncoder.h; sourceTree = "<group>"; };
-               41ECEADE206416FE009D5141 /* RTCWrappedNativeVideoEncoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCWrappedNativeVideoEncoder.mm; path = PeerConnection/RTCWrappedNativeVideoEncoder.mm; sourceTree = "<group>"; };
-               41ECEADF206416FE009D5141 /* RTCWrappedNativeVideoDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RTCWrappedNativeVideoDecoder.h; path = PeerConnection/RTCWrappedNativeVideoDecoder.h; sourceTree = "<group>"; };
-               41ECEAE0206416FE009D5141 /* RTCWrappedNativeVideoDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCWrappedNativeVideoDecoder.mm; path = PeerConnection/RTCWrappedNativeVideoDecoder.mm; sourceTree = "<group>"; };
-               41ECEAE5206417E8009D5141 /* webrtcvideoencoderfactory.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = webrtcvideoencoderfactory.cc; path = engine/webrtcvideoencoderfactory.cc; sourceTree = "<group>"; };
-               41ECEAE6206417E9009D5141 /* webrtcvideodecoderfactory.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = webrtcvideodecoderfactory.cc; path = engine/webrtcvideodecoderfactory.cc; sourceTree = "<group>"; };
-               41ECEAE920641812009D5141 /* RTCVideoEncoderSettings.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RTCVideoEncoderSettings.mm; path = PeerConnection/RTCVideoEncoderSettings.mm; sourceTree = "<group>"; };
-               41ECEAF620645CE6009D5141 /* UIDevice+RTCDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UIDevice+RTCDevice.mm"; path = "Common/UIDevice+RTCDevice.mm"; sourceTree = "<group>"; };
                41F411AC1EF8D91E00343C26 /* null_aec_dump_factory.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = null_aec_dump_factory.cc; path = Source/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc; sourceTree = SOURCE_ROOT; };
                41F411AE1EF8DA0000343C26 /* rtcerror.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rtcerror.cc; sourceTree = "<group>"; };
                41F411AF1EF8DA0000343C26 /* rtcerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rtcerror.h; sourceTree = "<group>"; };
                                413A24181FE1990800373E99 /* RTCVideoTrack.h */,
                                413A24021FE1990300373E99 /* RTCVideoViewShading.h */,
                                413A24331FE1991600373E99 /* UIDevice+RTCDevice.h */,
+                               413A24071FE1990400373E99 /* WebRTC.h */,
                        );
                        name = WebRTC;
                        sourceTree = "<group>";
                        children = (
                                4145E4A81EF8933C00FCF6E6 /* corevideo_frame_buffer.cc */,
                                4145E4A91EF8933C00FCF6E6 /* corevideo_frame_buffer.h */,
-                               41ECEAD220641458009D5141 /* objc_frame_buffer.h */,
-                               41ECEAD120641457009D5141 /* objc_frame_buffer.mm */,
-                               41ECEAC520641302009D5141 /* RTCCVPixelBuffer.mm */,
-                               41ECEACE2064136F009D5141 /* RTCI420Buffer+Private.h */,
-                               41ECEACD2064136F009D5141 /* RTCI420Buffer.mm */,
                        );
                        name = Video;
                        sourceTree = "<group>";
                4145E4971EF8918600FCF6E6 /* VideoToolbox */ = {
                        isa = PBXGroup;
                        children = (
-                               41ECEAD62064147C009D5141 /* helpers.cc */,
-                               41ECEAD52064147C009D5141 /* helpers.h */,
                                4145E4B21EF8943D00FCF6E6 /* nalu_rewriter.cc */,
                                4145E4AF1EF8943D00FCF6E6 /* nalu_rewriter.h */,
                                413A23F61FE1987B00373E99 /* objc_video_decoder_factory.h */,
                417DA4551EF9CCD800E869DB /* Common */ = {
                        isa = PBXGroup;
                        children = (
-                               41ECEABF20640F27009D5141 /* NSString+StdString.h */,
-                               41ECEAC020640F28009D5141 /* NSString+StdString.mm */,
                                417DA4561EF9CD0A00E869DB /* RTCUIApplicationStatusObserver.h */,
-                               41ECEAB920630365009D5141 /* RTCUIApplicationStatusObserver.m */,
-                               41ECEAF620645CE6009D5141 /* UIDevice+RTCDevice.mm */,
                        );
                        name = Common;
                        sourceTree = "<group>";
                                419C84AD1FE304C60040C30F /* VideoToolBoxDecoderFactory.h */,
                                419C84AE1FE304C60040C30F /* VideoToolBoxEncoderFactory.cpp */,
                                419C84AC1FE304C60040C30F /* VideoToolBoxEncoderFactory.h */,
-                               41ECEABB206403C1009D5141 /* WebKitUtilities.h */,
-                               41ECEABD20640498009D5141 /* WebKitUtilities.mm */,
                        );
                        name = WebKit;
                        path = sdk/WebKit;
                        path = asm;
                        sourceTree = "<group>";
                };
-               41ECEAB2206300E3009D5141 /* PeerConnection */ = {
-                       isa = PBXGroup;
-                       children = (
-                               41ECEAC720641328009D5141 /* RTCEncodedImage.mm */,
-                               41ECEAD9206414A6009D5141 /* RTCRtpFragmentationHeader.mm */,
-                               41ECEAB320630107009D5141 /* RTCVideoCodec+Private.h */,
-                               41ECEAB420630107009D5141 /* RTCVideoCodec.mm */,
-                               41ECEAB520630108009D5141 /* RTCVideoCodecH264.mm */,
-                               41ECEAE920641812009D5141 /* RTCVideoEncoderSettings.mm */,
-                               41ECEACA2064134E009D5141 /* RTCVideoFrame+Private.h */,
-                               41ECEAC92064134E009D5141 /* RTCVideoFrame.mm */,
-                               41ECEADF206416FE009D5141 /* RTCWrappedNativeVideoDecoder.h */,
-                               41ECEAE0206416FE009D5141 /* RTCWrappedNativeVideoDecoder.mm */,
-                               41ECEADD206416FD009D5141 /* RTCWrappedNativeVideoEncoder.h */,
-                               41ECEADE206416FE009D5141 /* RTCWrappedNativeVideoEncoder.mm */,
-                       );
-                       name = PeerConnection;
-                       sourceTree = "<group>";
-               };
                41F411BD1EF8DB8200343C26 /* vp8 */ = {
                        isa = PBXGroup;
                        children = (
                                5C4B486A1E42C1BA002651C8 /* webrtcvideocapturer.h */,
                                5C4B486B1E42C1BA002651C8 /* webrtcvideocapturerfactory.cc */,
                                5C4B486C1E42C1BA002651C8 /* webrtcvideocapturerfactory.h */,
-                               41ECEAE6206417E9009D5141 /* webrtcvideodecoderfactory.cc */,
                                5C4B486D1E42C1BA002651C8 /* webrtcvideodecoderfactory.h */,
-                               41ECEAE5206417E8009D5141 /* webrtcvideoencoderfactory.cc */,
                                5C4B486F1E42C1BA002651C8 /* webrtcvideoencoderfactory.h */,
                                4145E4CF1EF8CC1700FCF6E6 /* webrtcvideoengine.cc */,
                                4145E4D01EF8CC1F00FCF6E6 /* webrtcvideoengine.h */,
                        isa = PBXGroup;
                        children = (
                                417DA4551EF9CCD800E869DB /* Common */,
-                               41ECEAB2206300E3009D5141 /* PeerConnection */,
                                4145E4931EF890E500FCF6E6 /* Video */,
                                4145E4971EF8918600FCF6E6 /* VideoToolbox */,
                        );
                                5CD285EB1E6A639F0094FDC8 /* h264_sprop_parameter_sets.h in Headers */,
                                5CDD83DA1E439A6F00621E92 /* h264_sps_pps_tracker.h in Headers */,
                                413A22D81FE18E0700373E99 /* helpers.h in Headers */,
-                               41ECEAD72064147C009D5141 /* helpers.h in Headers */,
                                5CDD83DC1E439A6F00621E92 /* histogram.h in Headers */,
                                419C83581FE246650040C30F /* histogram_percentile_counter.h in Headers */,
                                5CDD8BAF1E43C2B500621E92 /* hp_input.h in Headers */,
                                5CDD86A81E43B99400621E92 /* normalized_covariance_estimator.h in Headers */,
                                5C63F9541E41737B002CA531 /* notifier.h in Headers */,
                                5CDD86011E43B84E00621E92 /* ns_core.h in Headers */,
-                               41ECEAC120640F28009D5141 /* NSString+StdString.h in Headers */,
                                5CDD86061E43B84E00621E92 /* nsx_core.h in Headers */,
                                5CDD86071E43B84E00621E92 /* nsx_defines.h in Headers */,
                                419C83B41FE2472E0040C30F /* null_audio_poller.h in Headers */,
                                5C0885321E4A99D200403995 /* null_cipher.h in Headers */,
                                413A23C01FE18E0800373E99 /* nullsocketserver.h in Headers */,
                                5CD285331E6A61110094FDC8 /* nullwebrtcvideoengine.h in Headers */,
-                               41ECEAD420641458009D5141 /* objc_frame_buffer.h in Headers */,
                                413A23FC1FE1987F00373E99 /* objc_video_decoder_factory.h in Headers */,
                                413A23FD1FE1987F00373E99 /* objc_video_encoder_factory.h in Headers */,
                                413A23361FE18E0700373E99 /* onetimeevent.h in Headers */,
                                413A24401FE1991A00373E99 /* RTCFieldTrials.h in Headers */,
                                413A245A1FE1991A00373E99 /* RTCFileLogger.h in Headers */,
                                413A24561FE1991A00373E99 /* RTCFileVideoCapturer.h in Headers */,
-                               41ECEAD020641370009D5141 /* RTCI420Buffer+Private.h in Headers */,
                                413A244E1FE1991A00373E99 /* RTCIceCandidate.h in Headers */,
                                413A245E1FE1991A00373E99 /* RTCIceServer.h in Headers */,
                                413A24481FE1991A00373E99 /* RTCIntervalRange.h in Headers */,
                                413A245F1FE1991A00373E99 /* RTCTracing.h in Headers */,
                                417DA4581EF9CD0D00E869DB /* RTCUIApplicationStatusObserver.h in Headers */,
                                413A243D1FE1991A00373E99 /* RTCVideoCapturer.h in Headers */,
-                               41ECEAB620630108009D5141 /* RTCVideoCodec+Private.h in Headers */,
                                413A24431FE1991A00373E99 /* RTCVideoCodec.h in Headers */,
                                413A24531FE1991A00373E99 /* RTCVideoCodecFactory.h in Headers */,
                                413A243C1FE1991A00373E99 /* RTCVideoCodecH264.h in Headers */,
                                413A24601FE1991A00373E99 /* RTCVideoDecoderVP9.h in Headers */,
                                413A246E1FE1991A00373E99 /* RTCVideoEncoderVP8.h in Headers */,
                                413A24461FE1991A00373E99 /* RTCVideoEncoderVP9.h in Headers */,
-                               41ECEACC2064134F009D5141 /* RTCVideoFrame+Private.h in Headers */,
                                413A244F1FE1991A00373E99 /* RTCVideoFrame.h in Headers */,
                                413A24411FE1991A00373E99 /* RTCVideoFrameBuffer.h in Headers */,
                                413A246F1FE1991A00373E99 /* RTCVideoRenderer.h in Headers */,
                                413A24611FE1991A00373E99 /* RTCVideoSource.h in Headers */,
                                413A24501FE1991A00373E99 /* RTCVideoTrack.h in Headers */,
                                413A243A1FE1991A00373E99 /* RTCVideoViewShading.h in Headers */,
-                               41ECEAE3206416FF009D5141 /* RTCWrappedNativeVideoDecoder.h in Headers */,
-                               41ECEAE1206416FF009D5141 /* RTCWrappedNativeVideoEncoder.h in Headers */,
                                419C82B81FE20DCD0040C30F /* rtp_config.h in Headers */,
                                419C83C91FE247B40040C30F /* rtp_cvo.h in Headers */,
                                413092011EF8D0A600757C55 /* rtp_demuxer.h in Headers */,
                                5CDD8BF61E43C2B500621E92 /* vq4.h in Headers */,
                                5C4B4C811E431F9C002651C8 /* wav_file.h in Headers */,
                                5C4B4C841E431F9C002651C8 /* wav_header.h in Headers */,
-                               41ECEABC206403C2009D5141 /* WebKitUtilities.h in Headers */,
+                               413A243F1FE1991A00373E99 /* WebRTC.h in Headers */,
                                5CDD8CAB1E43C6F700621E92 /* webrtc_cng.h in Headers */,
                                4145E4911EF88EF700FCF6E6 /* webrtc_libyuv.h in Headers */,
                                41F9BFC72051DCE900ABF0B9 /* webrtc_vad.h in Headers */,
                                419C84691FE255FA0040C30F /* handshake.cc in Sources */,
                                419C84891FE2574D0040C30F /* handshake_client.cc in Sources */,
                                419C848B1FE2574D0040C30F /* handshake_server.cc in Sources */,
-                               41ECEAD82064147C009D5141 /* helpers.cc in Sources */,
                                413A236E1FE18E0700373E99 /* helpers.cc in Sources */,
                                5CDD83DB1E439A6F00621E92 /* histogram.cc in Sources */,
                                419C83511FE246650040C30F /* histogram_percentile_counter.cc in Sources */,
                                5CDD8A3D1E43BFB300621E92 /* normal.cc in Sources */,
                                5CDD86A71E43B99400621E92 /* normalized_covariance_estimator.cc in Sources */,
                                5CDD86001E43B84E00621E92 /* ns_core.c in Sources */,
-                               41ECEAC220640F28009D5141 /* NSString+StdString.mm in Sources */,
                                5CDD86051E43B84E00621E92 /* nsx_core.c in Sources */,
                                5CDD86021E43B84E00621E92 /* nsx_core_c.c in Sources */,
                                41F411AD1EF8D91F00343C26 /* null_aec_dump_factory.cc in Sources */,
                                419C83B31FE2472E0040C30F /* null_audio_poller.cc in Sources */,
                                413A23D21FE18E0800373E99 /* nullsocketserver.cc in Sources */,
-                               41ECEAD320641458009D5141 /* objc_frame_buffer.mm in Sources */,
-                               41ECEADB206415EA009D5141 /* objc_video_decoder_factory.mm in Sources */,
-                               41ECEADC206415EE009D5141 /* objc_video_encoder_factory.mm in Sources */,
                                5CDD86941E43B93900621E92 /* ooura_fft.cc in Sources */,
                                5CDD86911E43B93900621E92 /* ooura_fft_sse2.cc in Sources */,
                                419C84271FE24BD10040C30F /* openssladapter.cc in Sources */,
                                419C841D1FE24AEF0040C30F /* rtc_stream_config.cc in Sources */,
                                413A230F1FE18E0700373E99 /* rtccertificate.cc in Sources */,
                                413A22BE1FE18E0700373E99 /* rtccertificategenerator.cc in Sources */,
-                               41ECEAC620641303009D5141 /* RTCCVPixelBuffer.mm in Sources */,
-                               41ECEAC820641328009D5141 /* RTCEncodedImage.mm in Sources */,
                                41F411B01EF8DA0100343C26 /* rtcerror.cc in Sources */,
-                               41ECEACF20641370009D5141 /* RTCI420Buffer.mm in Sources */,
                                5CDD8A4F1E43BFB300621E92 /* rtcp.cc in Sources */,
                                419C82B91FE20DCD0040C30F /* rtcp_demuxer.cc in Sources */,
                                5CD285FA1E6A64520094FDC8 /* rtcp_nack_stats.cc in Sources */,
                                419C82FF1FE20F020040C30F /* rtcp_transceiver.cc in Sources */,
                                419C83021FE20F020040C30F /* rtcp_transceiver_config.cc in Sources */,
                                419C83001FE20F020040C30F /* rtcp_transceiver_impl.cc in Sources */,
-                               41ECEADA206414A6009D5141 /* RTCRtpFragmentationHeader.mm in Sources */,
                                5C63FA781E417AED002CA531 /* rtcstats.cc in Sources */,
                                5C63FA771E417AED002CA531 /* rtcstats_objects.cc in Sources */,
                                5CD285071E6A60570094FDC8 /* rtcstatscollector.cc in Sources */,
                                5C63FA791E417AED002CA531 /* rtcstatsreport.cc in Sources */,
-                               41ECEAB720630108009D5141 /* RTCVideoCodec.mm in Sources */,
-                               41ECEAB820630108009D5141 /* RTCVideoCodecH264.mm in Sources */,
-                               41ECEAC3206411E2009D5141 /* RTCVideoDecoderH264.mm in Sources */,
-                               41ECEAC4206411E5009D5141 /* RTCVideoEncoderH264.mm in Sources */,
-                               41ECEAEA20641812009D5141 /* RTCVideoEncoderSettings.mm in Sources */,
-                               41ECEACB2064134F009D5141 /* RTCVideoFrame.mm in Sources */,
-                               41ECEAE4206416FF009D5141 /* RTCWrappedNativeVideoDecoder.mm in Sources */,
-                               41ECEAE2206416FF009D5141 /* RTCWrappedNativeVideoEncoder.mm in Sources */,
                                419C82B41FE20DCD0040C30F /* rtp_config.cc in Sources */,
                                413092021EF8D0A600757C55 /* rtp_demuxer.cc in Sources */,
                                5CDD88B01E43BE3C00621E92 /* rtp_format.cc in Sources */,
                                5C4B4C801E431F9C002651C8 /* wav_file.cc in Sources */,
                                5C4B4C831E431F9C002651C8 /* wav_header.cc in Sources */,
                                413A22E91FE18E0700373E99 /* weak_ptr.cc in Sources */,
-                               41ECEABE20640498009D5141 /* WebKitUtilities.mm in Sources */,
                                5CDD8CAA1E43C6F700621E92 /* webrtc_cng.cc in Sources */,
                                5CDD83671E4325D500621E92 /* webrtc_libyuv.cc in Sources */,
                                5CDD86E41E43BA2800621E92 /* webrtc_vad.c in Sources */,
                                5CD2851A1E6A60570094FDC8 /* webrtcsessiondescriptionfactory.cc in Sources */,
                                5C4B48901E42C1BA002651C8 /* webrtcvideocapturer.cc in Sources */,
                                5C4B48921E42C1BA002651C8 /* webrtcvideocapturerfactory.cc in Sources */,
-                               41ECEAE8206417E9009D5141 /* webrtcvideodecoderfactory.cc in Sources */,
-                               41ECEAE7206417E9009D5141 /* webrtcvideoencoderfactory.cc in Sources */,
                                4145E4D11EF8CC2000FCF6E6 /* webrtcvideoengine.cc in Sources */,
                                5C4B489D1E42C1BA002651C8 /* webrtcvoiceengine.cc in Sources */,
                                5CDD8BF71E43C2B500621E92 /* window32_w32.c in Sources */,
                                        Source/webrtc,
                                        Source/webrtc/sdk/objc/Framework/Classes/,
                                        Source/third_party/libsrtp/config,
-                                       Source/webrtc/sdk/objc/Framework/Classes/Common,
-                                       Source/webrtc/sdk/objc/Framework/Classes/Video,
-                                       Source/webrtc/sdk/objc/Framework/Classes/PeerConnection,
                                );
                                OTHER_CFLAGS = "";
                        };
                                        Source/webrtc,
                                        Source/webrtc/sdk/objc/Framework/Classes/,
                                        Source/third_party/libsrtp/config,
-                                       Source/webrtc/sdk/objc/Framework/Classes/Common,
-                                       Source/webrtc/sdk/objc/Framework/Classes/Video,
-                                       Source/webrtc/sdk/objc/Framework/Classes/PeerConnection,
                                );
                        };
                        name = Debug;
                                        Source/webrtc,
                                        Source/webrtc/sdk/objc/Framework/Classes/,
                                        Source/third_party/libsrtp/config,
-                                       Source/webrtc/sdk/objc/Framework/Classes/Common,
-                                       Source/webrtc/sdk/objc/Framework/Classes/Video,
-                                       Source/webrtc/sdk/objc/Framework/Classes/PeerConnection,
                                );
                                OTHER_CFLAGS = "";
                        };
index ec639e1..1198eef 100644 (file)
@@ -1,3 +1,17 @@
+2018-03-22  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r229876.
+        https://bugs.webkit.org/show_bug.cgi?id=183929
+
+        Some webrtc tests are timing out on iOS simulator (Requested
+        by youenn on #webkit).
+
+        Reverted changeset:
+
+        "Use libwebrtc ObjectiveC H264 encoder and decoder"
+        https://bugs.webkit.org/show_bug.cgi?id=183912
+        https://trac.webkit.org/changeset/229876
+
 2018-03-22  Megan Gardner  <megan_gardner@apple.com>
 
         Expose more system colors via CSS
index 5402f7e..ea9d0f1 100644 (file)
@@ -46,7 +46,7 @@ OTHER_CFLAGS = $(inherited) $(ADDITIONAL_CFLAGS);
 OTHER_CPLUSPLUSFLAGS = $(inherited) $(ADDITIONAL_CFLAGS);
 
 WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
-LIBWEBRTC_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc $(SDKROOT)/usr/local/include/webrtc $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc/sdk/objc/Framework/Headers $(SDKROOT)/usr/local/include/webrtc/sdk/objc/Framework/Headers;
+LIBWEBRTC_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc $(SDKROOT)/usr/local/include/webrtc;
 
 HEADER_SEARCH_PATHS = PAL ForwardingHeaders /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(LIBWEBRTC_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS) $(SRCROOT);
 INFOPLIST_FILE = Info.plist;
index 08ed554..8778f4b 100644 (file)
@@ -542,7 +542,7 @@ platform/mediastream/mac/CoreAudioCaptureSource.cpp
 platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp
 platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp
 platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp
-platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm
+platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp
 platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp
 platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp
 platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp
index c336fda..cdc6235 100644 (file)
                DE5F86571FA2AF24006DB63A /* UnifiedSource58-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = DE5F86391FA2AF07006DB63A /* UnifiedSource58-mm.mm */; };
                DE5F86581FA2AF24006DB63A /* UnifiedSource59-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = DE5F86321FA2AEFF006DB63A /* UnifiedSource59-mm.mm */; };
                DE5F86591FA2AF24006DB63A /* UnifiedSource60-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = DE5F863A1FA2AF07006DB63A /* UnifiedSource60-mm.mm */; };
-               DE5F86591FA2AF24006DB63B /* UnifiedSource61-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = DE5F863A1FA2AF07006DB63B /* UnifiedSource61-mm.mm */; };
                DE7710861FA2F0D600460016 /* WebArchiveDumpSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1763F3C1E205234001D58DE /* WebArchiveDumpSupport.mm */; };
                DEBCCDD216646E8200A452E1 /* RenderMediaControlElements.h in Headers */ = {isa = PBXBuildFile; fileRef = DE49B308165F2FE10010338D /* RenderMediaControlElements.h */; };
                DEBCCDD416646EAF00A452E1 /* MediaControlElementTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = DE49B300165F2FC60010338D /* MediaControlElementTypes.h */; };
                5CB37FFD1C62D27800F20188 /* ScrollAnimatorMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAnimatorMock.h; sourceTree = "<group>"; };
                5CBC8DAA1AAA302200E1C803 /* MediaAccessibilitySoftLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaAccessibilitySoftLink.cpp; sourceTree = "<group>"; };
                5CBC8DAB1AAA302200E1C803 /* MediaAccessibilitySoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaAccessibilitySoftLink.h; sourceTree = "<group>"; };
-               5CDD83391E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RealtimeIncomingVideoSourceCocoa.mm; sourceTree = "<group>"; };
+               5CDD83391E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RealtimeIncomingVideoSourceCocoa.cpp; sourceTree = "<group>"; };
                5CDD83391E4324BB00621E92 /* RealtimeIncomingVideoSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RealtimeIncomingVideoSource.cpp; sourceTree = "<group>"; };
                5CDD833A1E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealtimeIncomingVideoSourceCocoa.h; sourceTree = "<group>"; };
                5CDD833A1E4324BB00621E92 /* RealtimeIncomingVideoSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealtimeIncomingVideoSource.h; sourceTree = "<group>"; };
                DE5F86381FA2AF06006DB63A /* UnifiedSource57-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource57-mm.mm"; sourceTree = "<group>"; };
                DE5F86391FA2AF07006DB63A /* UnifiedSource58-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource58-mm.mm"; sourceTree = "<group>"; };
                DE5F863A1FA2AF07006DB63A /* UnifiedSource60-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource60-mm.mm"; sourceTree = "<group>"; };
-               DE5F863A1FA2AF07006DB63B /* UnifiedSource61-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource61-mm.mm"; sourceTree = "<group>"; };
                DE5F863B1FA2AF08006DB63A /* UnifiedSource55-mm.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UnifiedSource55-mm.mm"; sourceTree = "<group>"; };
                DEC2975D1B4DEB2A005F5945 /* JSCustomEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomEventCustom.cpp; sourceTree = "<group>"; };
                DECA7D6A1F9E61CB00E3B661 /* UnifiedSource144.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource144.cpp; sourceTree = "<group>"; };
                                07EE76EE1BEA619800F89133 /* MockRealtimeVideoSourceMac.mm */,
                                41103AAA1E39790A00769F14 /* RealtimeIncomingAudioSourceCocoa.cpp */,
                                41103AA91E39790A00769F14 /* RealtimeIncomingAudioSourceCocoa.h */,
+                               5CDD83391E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.cpp */,
                                5CDD833A1E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.h */,
-                               5CDD83391E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.mm */,
                                4A0FFAA31AAF5EF60062803B /* RealtimeMediaSourceCenterMac.cpp */,
                                4A0FFAA41AAF5EF60062803B /* RealtimeMediaSourceCenterMac.h */,
                                41103AA71E39790A00769F14 /* RealtimeOutgoingAudioSourceCocoa.cpp */,
                                538EC86B1F993F29004D22A8 /* UnifiedSource59.cpp */,
                                DE5F863A1FA2AF07006DB63A /* UnifiedSource60-mm.mm */,
                                538EC8791F993F31004D22A8 /* UnifiedSource60.cpp */,
-                               DE5F863A1FA2AF07006DB63B /* UnifiedSource61-mm.mm */,
                                538EC87E1F993F33004D22A8 /* UnifiedSource61.cpp */,
                                538EC85A1F993F20004D22A8 /* UnifiedSource62.cpp */,
                                538EC8611F993F24004D22A8 /* UnifiedSource63.cpp */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "set -e\n\ncd $SRCROOT\n\nif [ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]; then\nBUILD_SCRIPTS_DIR=\"${SDKROOT}/usr/local/include/wtf/Scripts\"\nelse\nBUILD_SCRIPTS_DIR=\"${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts\"\nfi\n\nUnifiedSourceCppFileCount=530\nUnifiedSourceMmFileCount=61\n\necho \"Using unified source list files: Sources.txt, SourcesCocoa.txt\"\n\n/usr/bin/env ruby \"${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb\" \"--derived-sources-path\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\" \"--source-tree-path\" \"${SRCROOT}\" \"--feature-flags\" \"${FEATURE_DEFINES}\" \"--max-cpp-bundle-count\" \"${UnifiedSourceCppFileCount}\" \"--max-obj-c-bundle-count\" \"${UnifiedSourceMmFileCount}\" \"Sources.txt\" \"SourcesCocoa.txt\" > /dev/null\n";
+                       shellScript = "set -e\n\ncd $SRCROOT\n\nif [ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]; then\nBUILD_SCRIPTS_DIR=\"${SDKROOT}/usr/local/include/wtf/Scripts\"\nelse\nBUILD_SCRIPTS_DIR=\"${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts\"\nfi\n\nUnifiedSourceCppFileCount=530\nUnifiedSourceMmFileCount=60\n\necho \"Using unified source list files: Sources.txt, SourcesCocoa.txt\"\n\n/usr/bin/env ruby \"${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb\" \"--derived-sources-path\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\" \"--source-tree-path\" \"${SRCROOT}\" \"--feature-flags\" \"${FEATURE_DEFINES}\" \"--max-cpp-bundle-count\" \"${UnifiedSourceCppFileCount}\" \"--max-obj-c-bundle-count\" \"${UnifiedSourceMmFileCount}\" \"Sources.txt\" \"SourcesCocoa.txt\" > /dev/null\n";
                };
                5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */ = {
                        isa = PBXShellScriptBuildPhase;
                                538EC8AC1F993F9D004D22A8 /* UnifiedSource59.cpp in Sources */,
                                DE5F86591FA2AF24006DB63A /* UnifiedSource60-mm.mm in Sources */,
                                538EC8AD1F993F9D004D22A8 /* UnifiedSource60.cpp in Sources */,
-                               DE5F86591FA2AF24006DB63B /* UnifiedSource61-mm.mm in Sources */,
                                538EC8AE1F993F9D004D22A8 /* UnifiedSource61.cpp in Sources */,
                                538EC8AF1F993F9D004D22A8 /* UnifiedSource62.cpp in Sources */,
                                538EC8B01F993F9D004D22A8 /* UnifiedSource63.cpp in Sources */,
index db1adec..dc7d179 100644 (file)
@@ -29,7 +29,6 @@
 #if USE(LIBWEBRTC)
 #include <webrtc/media/engine/webrtcvideodecoderfactory.h>
 #include <webrtc/media/engine/webrtcvideoencoderfactory.h>
-#include <webrtc/sdk/WebKit/WebKitUtilities.h>
 #include <wtf/darwin/WeakLinking.h>
 #endif
 
@@ -48,26 +47,49 @@ UniqueRef<LibWebRTCProvider> LibWebRTCProvider::create()
 
 LibWebRTCProviderCocoa::~LibWebRTCProviderCocoa()
 {
+    if (m_encoderFactory)
+        m_encoderFactory->ClearDestructorObserver();
+    if (m_decoderFactory)
+        m_decoderFactory->ClearDestructorObserver();
 }
 
 void LibWebRTCProviderCocoa::setH264HardwareEncoderAllowed(bool allowed)
 {
-    webrtc::setH264HardwareEncoderAllowed(allowed);
+    m_h264HardwareEncoderAllowed = allowed;
+#if PLATFORM(MAC)
+    if (m_encoderFactory)
+        m_encoderFactory->setH264HardwareEncoderAllowed(allowed);
+#endif
 }
 
 std::unique_ptr<webrtc::VideoDecoderFactory> LibWebRTCProviderCocoa::createDecoderFactory()
 {
-    return webrtc::createVideoToolboxDecoderFactory();
+    ASSERT(!m_decoderFactory);
+    auto decoderFactory = std::make_unique<webrtc::VideoToolboxVideoDecoderFactory>(this);
+    m_decoderFactory = decoderFactory.get();
+
+    return WTFMove(decoderFactory);
 }
 
 std::unique_ptr<webrtc::VideoEncoderFactory> LibWebRTCProviderCocoa::createEncoderFactory()
 {
-    return webrtc::createVideoToolboxEncoderFactory();
+    ASSERT(!m_encoderFactory);
+    auto encoderFactory = std::make_unique<webrtc::VideoToolboxVideoEncoderFactory>(this);
+    m_encoderFactory = encoderFactory.get();
+
+#if PLATFORM(MAC)
+    m_encoderFactory->setH264HardwareEncoderAllowed(m_h264HardwareEncoderAllowed);
+#endif
+
+    return WTFMove(encoderFactory);
 }
 
 void LibWebRTCProviderCocoa::setActive(bool value)
 {
-    webrtc::setApplicationStatus(value);
+    if (m_decoderFactory)
+        m_decoderFactory->SetActive(value);
+    if (m_encoderFactory)
+        m_encoderFactory->SetActive(value);
 }
 
 #endif // USE(LIBWEBRTC)
index 0cdb8a0..6c4950e 100644 (file)
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-class WEBCORE_EXPORT LibWebRTCProviderCocoa : public LibWebRTCProvider {
+class WEBCORE_EXPORT LibWebRTCProviderCocoa : public LibWebRTCProvider, public webrtc::VideoToolboxVideoDecoderFactory::DestructorObserver, public webrtc::VideoToolboxVideoEncoderFactory::DestructorObserver {
 public:
     LibWebRTCProviderCocoa() = default;
     ~LibWebRTCProviderCocoa();
@@ -45,6 +45,22 @@ private:
     std::unique_ptr<webrtc::VideoEncoderFactory> createEncoderFactory() final;
 
     void setH264HardwareEncoderAllowed(bool allowed) final;
+
+    void notifyOfDecoderFactoryDestruction(webrtc::VideoToolboxVideoDecoderFactory& factory) final
+    {
+        ASSERT_UNUSED(factory, &factory == m_decoderFactory);
+        m_decoderFactory = nullptr;
+    }
+
+    void notifyOfEncoderFactoryDestruction(webrtc::VideoToolboxVideoEncoderFactory& factory) final
+    {
+        ASSERT_UNUSED(factory, &factory == m_encoderFactory);
+        m_encoderFactory = nullptr;
+    }
+
+    webrtc::VideoToolboxVideoDecoderFactory* m_decoderFactory { nullptr };
+    webrtc::VideoToolboxVideoEncoderFactory* m_encoderFactory { nullptr };
+    bool m_h264HardwareEncoderAllowed { true };
 };
 
 } // namespace WebCore
 
 #include "Logging.h"
 #include "MediaSampleAVFObjC.h"
-#include <pal/cf/CoreMediaSoftLink.h>
-#include <webrtc/sdk/WebKit/WebKitUtilities.h>
+#include <webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h>
 #include <wtf/cf/TypeCastsCF.h>
 
+#include <pal/cf/CoreMediaSoftLink.h>
 #include "CoreVideoSoftLink.h"
 
 namespace WebCore {
@@ -58,36 +58,33 @@ RealtimeIncomingVideoSourceCocoa::RealtimeIncomingVideoSourceCocoa(rtc::scoped_r
 {
 }
 
-static inline CVPixelBufferRef createBlackFrame(int width, int height)
-{
-    CVPixelBufferRef pixelBuffer = nullptr;
-    auto status = CVPixelBufferCreate(kCFAllocatorDefault, width, height, kCVPixelFormatType_420YpCbCr8Planar, nullptr, &pixelBuffer);
-    ASSERT_UNUSED(status, status == noErr);
-
-    status = CVPixelBufferLockBaseAddress(pixelBuffer, 0);
-    ASSERT(status == noErr);
-    void* data = CVPixelBufferGetBaseAddress(pixelBuffer);
-    size_t yLength = width * height;
-    memset(data, 0, yLength);
-    memset(static_cast<uint8_t*>(data) + yLength, 128, yLength / 2);
-
-    status = CVPixelBufferUnlockBaseAddress(pixelBuffer, 0);
-    ASSERT(!status);
-    return pixelBuffer;
-}
-
 CVPixelBufferRef RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame(const webrtc::VideoFrame& frame)
 {
     if (muted()) {
         if (!m_blackFrame || m_blackFrameWidth != frame.width() || m_blackFrameHeight != frame.height()) {
+            CVPixelBufferRef pixelBuffer = nullptr;
+            auto status = CVPixelBufferCreate(kCFAllocatorDefault, frame.width(), frame.height(), kCVPixelFormatType_420YpCbCr8Planar, nullptr, &pixelBuffer);
+            ASSERT_UNUSED(status, status == noErr);
+
+            m_blackFrame = adoptCF(pixelBuffer);
             m_blackFrameWidth = frame.width();
             m_blackFrameHeight = frame.height();
-            m_blackFrame = adoptCF(createBlackFrame(m_blackFrameWidth, m_blackFrameHeight));
+
+            status = CVPixelBufferLockBaseAddress(pixelBuffer, 0);
+            ASSERT(status == noErr);
+            void* data = CVPixelBufferGetBaseAddress(pixelBuffer);
+            size_t yLength = frame.width() * frame.height();
+            memset(data, 0, yLength);
+            memset(static_cast<uint8_t*>(data) + yLength, 128, yLength / 2);
+
+            status = CVPixelBufferUnlockBaseAddress(pixelBuffer, 0);
+            ASSERT(!status);
         }
         return m_blackFrame.get();
     }
-    ASSERT(frame.video_frame_buffer()->type() == webrtc::VideoFrameBuffer::Type::kNative);
-    return webrtc::pixelBufferFromFrame(frame);
+    auto buffer = frame.video_frame_buffer();
+    ASSERT(buffer->type() == webrtc::VideoFrameBuffer::Type::kNative);
+    return static_cast<webrtc::CoreVideoFrameBuffer&>(*buffer).pixel_buffer();
 }
 
 void RealtimeIncomingVideoSourceCocoa::OnFrame(const webrtc::VideoFrame& frame)
@@ -101,10 +98,6 @@ void RealtimeIncomingVideoSourceCocoa::OnFrame(const webrtc::VideoFrame& frame)
 #endif
 
     auto pixelBuffer = pixelBufferFromVideoFrame(frame);
-    if (!pixelBuffer) {
-        LOG_ERROR("Failed to get a pixel buffer from a frame");
-        return;
-    }
 
     // FIXME: Convert timing information from VideoFrame to CMSampleTimingInfo.
     // For the moment, we will pretend that frames should be rendered asap.
@@ -157,6 +150,7 @@ void RealtimeIncomingVideoSourceCocoa::OnFrame(const webrtc::VideoFrame& frame)
         break;
     }
 
+    RefPtr<RealtimeIncomingVideoSourceCocoa> protectedThis(this);
     callOnMainThread([protectedThis = makeRef(*this), sample = WTFMove(sample), width, height, rotation] {
         protectedThis->processNewSample(sample.get(), width, height, rotation);
     });
index aa8a52e..68f419b 100644 (file)
 #include "MockMediaPlayerMediaSource.h"
 #endif
 
+#if USE(LIBWEBRTC) && PLATFORM(COCOA)
+//#include "H264VideoToolboxEncoder.h"
+#endif
+
 #if PLATFORM(MAC)
 #include "DictionaryLookup.h"
 #endif