Split iOS sdk in to separate targets
This CL splits the iOS sdk into separate static libraries for video, audio, ui, common, and peerconnection-related code. This will in the future make it easier to compile WebRTC without unneeded components. BUG=webrtc:4867 Review-Url: https://codereview.webrtc.org/2862543002 Cr-Commit-Position: refs/heads/master@{#18166}
This commit is contained in:
@ -1,5 +1,12 @@
|
||||
include_rules = [
|
||||
"+WebRTC",
|
||||
"+Common",
|
||||
"+Video",
|
||||
"+Audio",
|
||||
"+UI",
|
||||
"+PeerConnection",
|
||||
"+VideoToolbox",
|
||||
"+Metal",
|
||||
"+webrtc/api",
|
||||
"+webrtc/common_video/h264",
|
||||
"+webrtc/common_video/include",
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_BASE_OBJC_RTC_UI_APPLICATION_H_
|
||||
#define WEBRTC_BASE_OBJC_RTC_UI_APPLICATION_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_UI_RTCUIAPPLICATION_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_UI_RTCUIAPPLICATION_H_
|
||||
|
||||
#include "WebRTC/RTCMacros.h"
|
||||
|
||||
@ -18,4 +18,4 @@
|
||||
RTC_EXTERN bool RTCIsUIApplicationActive();
|
||||
#endif // WEBRTC_IOS
|
||||
|
||||
#endif // WEBRTC_BASE_OBJC_RTC_UI_APPLICATION_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_UI_RTCUIAPPLICATION_H_
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_COMMON_HELPERS_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_COMMON_HELPERS_H_
|
||||
|
||||
#if defined(WEBRTC_IOS)
|
||||
|
||||
@ -33,8 +33,6 @@ std::string GetThreadInfo();
|
||||
// Example: <NSThread: 0x170066d80>{number = 1, name = main}
|
||||
std::string GetCurrentThreadDescription();
|
||||
|
||||
std::string GetAudioSessionCategory();
|
||||
|
||||
// Returns the current name of the operating system.
|
||||
std::string GetSystemName();
|
||||
|
||||
@ -75,4 +73,4 @@ bool GetLowPowerModeEnabled();
|
||||
|
||||
#endif // defined(WEBRTC_IOS)
|
||||
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_HELPERS_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_COMMON_HELPERS_H_
|
||||
@ -9,7 +9,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <sys/sysctl.h>
|
||||
#if defined(WEBRTC_IOS)
|
||||
@ -20,7 +19,7 @@
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/helpers.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Common/helpers.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace ios {
|
||||
@ -65,11 +64,6 @@ std::string GetCurrentThreadDescription() {
|
||||
}
|
||||
|
||||
#if defined(WEBRTC_IOS)
|
||||
std::string GetAudioSessionCategory() {
|
||||
NSString* category = [[AVAudioSession sharedInstance] category];
|
||||
return StdStringFromNSString(category);
|
||||
}
|
||||
|
||||
std::string GetSystemName() {
|
||||
NSString* osName = [[UIDevice currentDevice] systemName];
|
||||
return StdStringFromNSString(osName);
|
||||
@ -11,7 +11,6 @@
|
||||
#import "RTCPeerConnectionFactory+Private.h"
|
||||
|
||||
#import "NSString+StdString.h"
|
||||
#import "RTCAVFoundationVideoSource+Private.h"
|
||||
#import "RTCAudioSource+Private.h"
|
||||
#import "RTCAudioTrack+Private.h"
|
||||
#import "RTCMediaConstraints+Private.h"
|
||||
@ -19,10 +18,11 @@
|
||||
#import "RTCPeerConnection+Private.h"
|
||||
#import "RTCVideoSource+Private.h"
|
||||
#import "RTCVideoTrack+Private.h"
|
||||
#import "RTCAVFoundationVideoSource+Private.h"
|
||||
#import "WebRTC/RTCLogging.h"
|
||||
|
||||
#include "objcvideotracksource.h"
|
||||
#include "videotoolboxvideocodecfactory.h"
|
||||
#include "Video/objcvideotracksource.h"
|
||||
#include "VideoToolbox/videocodecfactory.h"
|
||||
|
||||
@implementation RTCPeerConnectionFactory {
|
||||
std::unique_ptr<rtc::Thread> _networkThread;
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#import "RTCVideoFrame+Private.h"
|
||||
|
||||
#include "webrtc/sdk/objc/Framework/Classes/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h"
|
||||
|
||||
@implementation RTCVideoFrame {
|
||||
rtc::scoped_refptr<webrtc::VideoFrameBuffer> _videoBuffer;
|
||||
@ -11,7 +11,7 @@
|
||||
#import "RTCVideoSource+Private.h"
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/objcvideotracksource.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/objcvideotracksource.h"
|
||||
|
||||
// TODO(magjed): Refactor this class and target ObjcVideoTrackSource only once
|
||||
// RTCAVFoundationVideoSource is gone. See http://crbug/webrtc/7177 for more
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_
|
||||
#define WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_AVFOUNDATIONVIDEOCAPTURER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_AVFOUNDATIONVIDEOCAPTURER_H_
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
@ -69,4 +69,4 @@ class AVFoundationVideoCapturer : public cricket::VideoCapturer {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_API_OBJC_AVFOUNDATION_VIDEO_CAPTURER_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_AVFOUNDATIONVIDEOCAPTURER_H_
|
||||
@ -23,7 +23,7 @@
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/thread.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/sdk/objc/Framework/Classes/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h"
|
||||
|
||||
#include "libyuv/convert.h"
|
||||
#include "webrtc/api/video/i420_buffer.h"
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_COREVIDEO_FRAME_BUFFER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_COREVIDEO_FRAME_BUFFER_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_COREVIDEO_FRAME_BUFFER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_COREVIDEO_FRAME_BUFFER_H_
|
||||
|
||||
#include <CoreVideo/CoreVideo.h>
|
||||
|
||||
@ -56,4 +56,4 @@ class CoreVideoFrameBuffer : public NativeHandleBuffer {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_COREVIDEO_FRAME_BUFFER_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_COREVIDEO_FRAME_BUFFER_H_
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_OBJCVIDEOTRACKSOURCE_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_OBJCVIDEOTRACKSOURCE_H_
|
||||
|
||||
#include "WebRTC/RTCMacros.h"
|
||||
#include "webrtc/base/timestampaligner.h"
|
||||
@ -49,4 +49,4 @@ class ObjcVideoTrackSource : public rtc::AdaptedVideoTrackSource {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEO_OBJCVIDEOTRACKSOURCE_H_
|
||||
@ -8,12 +8,12 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/sdk/objc/Framework/Classes/objcvideotracksource.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/objcvideotracksource.h"
|
||||
|
||||
#import "RTCVideoFrame+Private.h"
|
||||
|
||||
#include "webrtc/api/video/i420_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -9,20 +9,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_decoder.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/decoder.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if defined(WEBRTC_IOS)
|
||||
#include "RTCUIApplication.h"
|
||||
#include "Common/RTCUIApplication.h"
|
||||
#endif
|
||||
#include "libyuv/convert.h"
|
||||
#include "webrtc/api/video/video_frame.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/common_video/include/video_frame.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
@ -9,8 +9,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_DECODER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_DECODER_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_DECODER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_DECODER_H_
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
|
||||
|
||||
@ -56,4 +56,4 @@ class H264VideoToolboxDecoder : public H264Decoder {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_DECODER_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_DECODER_H_
|
||||
@ -9,8 +9,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_ENCODER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_ENCODER_H_
|
||||
#ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_ENCODER_H_
|
||||
#define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_ENCODER_H_
|
||||
|
||||
#include "webrtc/api/video/video_rotation.h"
|
||||
#include "webrtc/base/criticalsection.h"
|
||||
@ -94,4 +94,4 @@ class H264VideoToolboxEncoder : public H264Encoder {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_H264_VIDEO_TOOLBOX_ENCODER_H_
|
||||
#endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_ENCODER_H_
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/encoder.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -17,14 +17,14 @@
|
||||
|
||||
#if defined(WEBRTC_IOS)
|
||||
#import "WebRTC/UIDevice+RTCDevice.h"
|
||||
#include "RTCUIApplication.h"
|
||||
#include "Common/RTCUIApplication.h"
|
||||
#endif
|
||||
#include "libyuv/convert_from.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/common_video/h264/profile_level_id.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/Video/corevideo_frame_buffer.h"
|
||||
#include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h"
|
||||
#include "webrtc/system_wrappers/include/clock.h"
|
||||
|
||||
namespace internal {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user