├── .gitignore ├── .swift-version ├── AppRTC.podspec ├── AppRTC.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── AppRTC.xcworkspace └── contents.xcworkspacedata ├── AppRTC ├── ARTCRoomTextInputViewCell.h ├── ARTCRoomTextInputViewCell.m ├── ARTCRoomViewController.h ├── ARTCRoomViewController.m ├── ARTCVideoChatViewController.h ├── ARTCVideoChatViewController.m ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-72.png │ │ ├── Icon-72@2x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon.png │ │ └── Icon@2x.png │ ├── audioOff.imageset │ │ ├── Contents.json │ │ └── audioOff@2x.png │ ├── audioOn.imageset │ │ ├── Contents.json │ │ └── audioOn@2x.png │ ├── hangup.imageset │ │ ├── Contents.json │ │ └── hangup@2x.png │ ├── logo.imageset │ │ ├── Contents.json │ │ └── webrtc-icon-192x192.png │ ├── videoOff.imageset │ │ ├── Contents.json │ │ └── videoOff@2x.png │ └── videoOn.imageset │ │ ├── Contents.json │ │ └── videoOn@2x.png ├── Info.plist └── main.m ├── LICENSE ├── Lib ├── ARDAppClient.h ├── ARDAppClient.m ├── ARDMessageResponse.h ├── ARDMessageResponse.m ├── ARDRegisterResponse.h ├── ARDRegisterResponse.m ├── ARDSignalingMessage.h ├── ARDSignalingMessage.m ├── ARDUtilities.h ├── ARDUtilities.m ├── ARDWebSocketChannel.h ├── ARDWebSocketChannel.m ├── RTCICECandidate+JSON.h ├── RTCICECandidate+JSON.m ├── RTCICEServer+JSON.h ├── RTCICEServer+JSON.m ├── RTCMediaConstraints+JSON.h ├── RTCMediaConstraints+JSON.m ├── RTCSessionDescription+JSON.h └── RTCSessionDescription+JSON.m ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ ├── AppRTC │ │ │ ├── ARDAppClient.h │ │ │ ├── ARDMessageResponse.h │ │ │ ├── ARDRegisterResponse.h │ │ │ ├── ARDSignalingMessage.h │ │ │ ├── ARDUtilities.h │ │ │ ├── ARDWebSocketChannel.h │ │ │ ├── RTCICECandidate+JSON.h │ │ │ ├── RTCICEServer+JSON.h │ │ │ ├── RTCMediaConstraints+JSON.h │ │ │ └── RTCSessionDescription+JSON.h │ │ ├── SocketRocket │ │ │ └── SRWebSocket.h │ │ └── libjingle_peerconnection │ │ │ ├── RTCAVFoundationVideoSource.h │ │ │ ├── RTCAudioSource.h │ │ │ ├── RTCAudioTrack.h │ │ │ ├── RTCDataChannel.h │ │ │ ├── RTCEAGLVideoView.h │ │ │ ├── RTCFileLogger.h │ │ │ ├── RTCI420Frame.h │ │ │ ├── RTCICECandidate.h │ │ │ ├── RTCICEServer.h │ │ │ ├── RTCLogging.h │ │ │ ├── RTCMediaConstraints.h │ │ │ ├── RTCMediaSource.h │ │ │ ├── RTCMediaStream.h │ │ │ ├── RTCMediaStreamTrack.h │ │ │ ├── RTCNSGLVideoView.h │ │ │ ├── RTCOpenGLVideoRenderer.h │ │ │ ├── RTCPair.h │ │ │ ├── RTCPeerConnection.h │ │ │ ├── RTCPeerConnectionDelegate.h │ │ │ ├── RTCPeerConnectionFactory.h │ │ │ ├── RTCPeerConnectionInterface.h │ │ │ ├── RTCSessionDescription.h │ │ │ ├── RTCSessionDescriptionDelegate.h │ │ │ ├── RTCStatsDelegate.h │ │ │ ├── RTCStatsReport.h │ │ │ ├── RTCTypes.h │ │ │ ├── RTCVideoCapturer.h │ │ │ ├── RTCVideoRenderer.h │ │ │ ├── RTCVideoSource.h │ │ │ └── RTCVideoTrack.h │ └── Public │ │ ├── AppRTC │ │ ├── ARDAppClient.h │ │ ├── ARDMessageResponse.h │ │ ├── ARDRegisterResponse.h │ │ ├── ARDSignalingMessage.h │ │ ├── ARDUtilities.h │ │ ├── ARDWebSocketChannel.h │ │ ├── RTCICECandidate+JSON.h │ │ ├── RTCICEServer+JSON.h │ │ ├── RTCMediaConstraints+JSON.h │ │ └── RTCSessionDescription+JSON.h │ │ ├── SocketRocket │ │ └── SRWebSocket.h │ │ └── libjingle_peerconnection │ │ ├── RTCAVFoundationVideoSource.h │ │ ├── RTCAudioSource.h │ │ ├── RTCAudioTrack.h │ │ ├── RTCDataChannel.h │ │ ├── RTCEAGLVideoView.h │ │ ├── RTCFileLogger.h │ │ ├── RTCI420Frame.h │ │ ├── RTCICECandidate.h │ │ ├── RTCICEServer.h │ │ ├── RTCLogging.h │ │ ├── RTCMediaConstraints.h │ │ ├── RTCMediaSource.h │ │ ├── RTCMediaStream.h │ │ ├── RTCMediaStreamTrack.h │ │ ├── RTCNSGLVideoView.h │ │ ├── RTCOpenGLVideoRenderer.h │ │ ├── RTCPair.h │ │ ├── RTCPeerConnection.h │ │ ├── RTCPeerConnectionDelegate.h │ │ ├── RTCPeerConnectionFactory.h │ │ ├── RTCPeerConnectionInterface.h │ │ ├── RTCSessionDescription.h │ │ ├── RTCSessionDescriptionDelegate.h │ │ ├── RTCStatsDelegate.h │ │ ├── RTCStatsReport.h │ │ ├── RTCTypes.h │ │ ├── RTCVideoCapturer.h │ │ ├── RTCVideoRenderer.h │ │ ├── RTCVideoSource.h │ │ └── RTCVideoTrack.h ├── Local Podspecs │ └── AppRTC.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── AppRTC.xcscheme ├── SocketRocket │ ├── LICENSE │ ├── README.rst │ └── SocketRocket │ │ ├── SRWebSocket.h │ │ └── SRWebSocket.m ├── Target Support Files │ ├── AppRTC │ │ ├── AppRTC-dummy.m │ │ ├── AppRTC-prefix.pch │ │ └── AppRTC.xcconfig │ ├── Pods │ │ ├── Pods-acknowledgements.markdown │ │ ├── Pods-acknowledgements.plist │ │ ├── Pods-dummy.m │ │ ├── Pods-frameworks.sh │ │ ├── Pods-resources.sh │ │ ├── Pods.debug.xcconfig │ │ └── Pods.release.xcconfig │ └── SocketRocket │ │ ├── SocketRocket-dummy.m │ │ ├── SocketRocket-prefix.pch │ │ └── SocketRocket.xcconfig └── libjingle_peerconnection │ └── libjingle_peerconnection │ ├── Headers │ ├── RTCAVFoundationVideoSource.h │ ├── RTCAudioSource.h │ ├── RTCAudioTrack.h │ ├── RTCDataChannel.h │ ├── RTCEAGLVideoView.h │ ├── RTCFileLogger.h │ ├── RTCI420Frame.h │ ├── RTCICECandidate.h │ ├── RTCICEServer.h │ ├── RTCLogging.h │ ├── RTCMediaConstraints.h │ ├── RTCMediaSource.h │ ├── RTCMediaStream.h │ ├── RTCMediaStreamTrack.h │ ├── RTCNSGLVideoView.h │ ├── RTCOpenGLVideoRenderer.h │ ├── RTCPair.h │ ├── RTCPeerConnection.h │ ├── RTCPeerConnectionDelegate.h │ ├── RTCPeerConnectionFactory.h │ ├── RTCPeerConnectionInterface.h │ ├── RTCSessionDescription.h │ ├── RTCSessionDescriptionDelegate.h │ ├── RTCStatsDelegate.h │ ├── RTCStatsReport.h │ ├── RTCTypes.h │ ├── RTCVideoCapturer.h │ ├── RTCVideoRenderer.h │ ├── RTCVideoSource.h │ └── RTCVideoTrack.h │ └── libWebRTC.a ├── README.md └── screenshots └── screenshots.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | # created by XCode 3 2 | *.pbxuser 3 | *.mode1 4 | *.mode1v3 5 | *.mode2v3 6 | *.perspectivev3 7 | *.xcclassmodel/ 8 | 9 | # created by Xcode 4 10 | xcuserdata/ 11 | 12 | # created by Xcode 5 13 | *.xccheckout 14 | 15 | # build products 16 | *.build/ 17 | build/ 18 | DerivedData/ 19 | *.pbxuser 20 | !default.pbxuser 21 | *.mode1v3 22 | !default.mode1v3 23 | *.mode2v3 24 | !default.mode2v3 25 | *.perspectivev3 26 | !default.perspectivev3 27 | xcuserdata 28 | *.xccheckout 29 | *.moved-aside 30 | *.hmap 31 | *.ipa 32 | *.xcuserstate 33 | 34 | # Misc 35 | .DS_Store 36 | #*.lock 37 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 2.3 2 | -------------------------------------------------------------------------------- /AppRTC.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AppRTC" 3 | s.version = "1.0.3" 4 | s.summary = "iOS video chat based on WebRTC" 5 | s.homepage = "https://github.com/ISBX/apprtc-ios" 6 | s.author = "ISBX" 7 | s.license = { :type => "BSD", :file => "LICENSE" } 8 | s.platform = :ios, "7.0" 9 | s.source = { :git => 'https://github.com/ISBX/apprtc-ios.git', :tag => '1.0.3' } 10 | s.source_files = "Lib/*.{h,m,c}" 11 | s.requires_arc = true 12 | s.frameworks = "QuartzCore", "OpenGLES", "CoreGraphics", "CoreVideo", "CoreMedia", "CoreAudio", "AVFoundation", "AudioToolbox", "GLKit", "CFNetwork", "Security" 13 | s.libraries = "sqlite3", "stdc++.6", "icucore", "c++" 14 | s.dependency "libjingle_peerconnection" 15 | s.dependency "SocketRocket" 16 | end 17 | 18 | # Publishing Pod use flags 19 | # pod trunk push AppRTC.podspec --use-libraries --allow-warnings -------------------------------------------------------------------------------- /AppRTC.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppRTC.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AppRTC/ARTCRoomTextInputViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARTCRoomTextInputViewCell.h 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol ARTCRoomTextInputViewCellDelegate; 12 | 13 | @interface ARTCRoomTextInputViewCell : UITableViewCell 14 | 15 | @property (assign, nonatomic) id delegate; 16 | 17 | @property (strong, nonatomic) IBOutlet UITextField *textField; 18 | @property (strong, nonatomic) IBOutlet UIView *textFieldBorderView; 19 | @property (strong, nonatomic) IBOutlet UIButton *joinButton; 20 | @property (strong, nonatomic) IBOutlet UILabel *errorLabel; 21 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *errorLabelHeightConstraint; //used for animating 22 | 23 | - (IBAction)touchButtonPressed:(id)sender; 24 | 25 | @end 26 | 27 | @protocol ARTCRoomTextInputViewCellDelegate 28 | @optional 29 | - (void)roomTextInputViewCell:(ARTCRoomTextInputViewCell *)cell shouldJoinRoom:(NSString *)room; 30 | @end -------------------------------------------------------------------------------- /AppRTC/ARTCRoomTextInputViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ARTCRoomTextInputViewCell.m 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import "ARTCRoomTextInputViewCell.h" 10 | 11 | @implementation ARTCRoomTextInputViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | [self.errorLabelHeightConstraint setConstant:0.0f]; 16 | [self.textField setDelegate:self]; 17 | [self.textField becomeFirstResponder]; 18 | [self.joinButton setBackgroundColor:[UIColor colorWithWhite:100.0f/255.0f alpha:1.0f]]; 19 | [self.joinButton setEnabled:NO]; 20 | [self.joinButton.layer setCornerRadius:3.0f]; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 24 | [super setSelected:selected animated:animated]; 25 | 26 | // Configure the view for the selected state 27 | } 28 | 29 | - (IBAction)touchButtonPressed:(id)sender { 30 | if ([self.delegate respondsToSelector:@selector(roomTextInputViewCell:shouldJoinRoom:)]) { 31 | [self.delegate roomTextInputViewCell:self shouldJoinRoom:self.textField.text]; 32 | } 33 | } 34 | 35 | #pragma mark - UITextFieldDelegate Methods 36 | 37 | - (void)textFieldDidBeginEditing:(UITextField *)textField { 38 | 39 | } 40 | 41 | - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { 42 | BOOL isBackspace = [string isEqualToString:@""] && range.length == 1; 43 | NSString *text = [NSString stringWithFormat:@"%@%@", textField.text, string]; 44 | if (isBackspace && text.length > 1) { 45 | text = [text substringWithRange:NSMakeRange(0, text.length-2)]; 46 | } 47 | if (text.length >= 5) { 48 | [UIView animateWithDuration:0.3f animations:^{ 49 | [self.errorLabelHeightConstraint setConstant:0.0f]; 50 | [self.textFieldBorderView setBackgroundColor:[UIColor colorWithRed:66.0f/255.0f green:133.0f/255.0f blue:244.0f/255.0f alpha:1.0f]]; 51 | [self.joinButton setBackgroundColor:[UIColor colorWithRed:66.0f/255.0f green:133.0f/255.0f blue:244.0f/255.0f alpha:1.0f]]; 52 | [self.joinButton setEnabled:YES]; 53 | [self layoutIfNeeded]; 54 | }]; 55 | } else { 56 | [UIView animateWithDuration:0.3f animations:^{ 57 | [self.errorLabelHeightConstraint setConstant:40.0f]; 58 | [self.textFieldBorderView setBackgroundColor:[UIColor colorWithRed:244.0f/255.0f green:67.0f/255.0f blue:54.0f/255.0f alpha:1.0f]]; 59 | [self.joinButton setBackgroundColor:[UIColor colorWithWhite:100.0f/255.0f alpha:1.0f]]; 60 | [self.joinButton setEnabled:NO]; 61 | [self layoutIfNeeded]; 62 | }]; 63 | } 64 | return YES; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /AppRTC/ARTCRoomViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARTCRoomViewController.h 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ARTCRoomTextInputViewCell.h" 11 | 12 | @interface ARTCRoomViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /AppRTC/ARTCRoomViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ARTCRoomViewController.m 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import "ARTCRoomViewController.h" 10 | #import "ARTCVideoChatViewController.h" 11 | 12 | 13 | @implementation ARTCRoomViewController 14 | 15 | - (void)viewDidLoad { 16 | [super viewDidLoad]; 17 | 18 | } 19 | 20 | - (void)viewWillAppear:(BOOL)animated { 21 | [super viewWillAppear:animated]; 22 | [[self navigationController] setNavigationBarHidden:NO animated:YES]; 23 | } 24 | 25 | - (void)didReceiveMemoryWarning { 26 | [super didReceiveMemoryWarning]; 27 | } 28 | 29 | #pragma mark - Table view data source 30 | 31 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 32 | return 1; 33 | } 34 | 35 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 36 | return 1; 37 | } 38 | 39 | 40 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 41 | if (indexPath.row == 0) { 42 | ARTCRoomTextInputViewCell *cell = (ARTCRoomTextInputViewCell *)[tableView dequeueReusableCellWithIdentifier:@"RoomInputCell" forIndexPath:indexPath]; 43 | [cell setDelegate:self]; 44 | 45 | return cell; 46 | } 47 | 48 | return nil; 49 | } 50 | 51 | 52 | 53 | #pragma mark - Navigation 54 | 55 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 56 | ARTCVideoChatViewController *viewController = (ARTCVideoChatViewController *)[segue destinationViewController]; 57 | [viewController setRoomName:sender]; 58 | } 59 | 60 | #pragma mark - ARTCRoomTextInputViewCellDelegate Methods 61 | 62 | - (void)roomTextInputViewCell:(ARTCRoomTextInputViewCell *)cell shouldJoinRoom:(NSString *)room { 63 | [self performSegueWithIdentifier:@"ARTCVideoChatViewController" sender:room]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /AppRTC/ARTCVideoChatViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ARTCVideoChatViewController.h 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface ARTCVideoChatViewController : UIViewController 14 | 15 | //Views, Labels, and Buttons 16 | @property (strong, nonatomic) IBOutlet RTCEAGLVideoView *remoteView; 17 | @property (strong, nonatomic) IBOutlet RTCEAGLVideoView *localView; 18 | @property (strong, nonatomic) IBOutlet UIView *footerView; 19 | @property (strong, nonatomic) IBOutlet UILabel *urlLabel; 20 | @property (strong, nonatomic) IBOutlet UIView *buttonContainerView; 21 | @property (strong, nonatomic) IBOutlet UIButton *audioButton; 22 | @property (strong, nonatomic) IBOutlet UIButton *videoButton; 23 | @property (strong, nonatomic) IBOutlet UIButton *hangupButton; 24 | 25 | //Auto Layout Constraints used for animations 26 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *remoteViewTopConstraint; 27 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *remoteViewRightConstraint; 28 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *remoteViewLeftConstraint; 29 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *remoteViewBottomConstraint; 30 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *localViewWidthConstraint; 31 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *localViewHeightConstraint; 32 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *localViewRightConstraint; 33 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *localViewBottomConstraint; 34 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *footerViewBottomConstraint; 35 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *buttonContainerViewLeftConstraint; 36 | 37 | @property (strong, nonatomic) NSString *roomUrl; 38 | @property (strong, nonatomic) NSString *roomName; 39 | @property (strong, nonatomic) ARDAppClient *client; 40 | @property (strong, nonatomic) RTCVideoTrack *localVideoTrack; 41 | @property (strong, nonatomic) RTCVideoTrack *remoteVideoTrack; 42 | @property (assign, nonatomic) CGSize localVideoSize; 43 | @property (assign, nonatomic) CGSize remoteVideoSize; 44 | @property (assign, nonatomic) BOOL isZoom; //used for double tap remote view 45 | 46 | //togle button parameter 47 | @property (assign, nonatomic) BOOL isAudioMute; 48 | @property (assign, nonatomic) BOOL isVideoMute; 49 | 50 | - (IBAction)audioButtonPressed:(id)sender; 51 | - (IBAction)videoButtonPressed:(id)sender; 52 | - (IBAction)hangupButtonPressed:(id)sender; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /AppRTC/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AppRTC/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "RTCPeerConnectionFactory.h" 11 | 12 | 13 | @implementation AppDelegate 14 | 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 17 | 18 | [RTCPeerConnectionFactory initializeSSL]; 19 | 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | 44 | [RTCPeerConnectionFactory deinitializeSSL]; 45 | 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /AppRTC/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "3x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "3x" 27 | }, 28 | { 29 | "size" : "57x57", 30 | "idiom" : "iphone", 31 | "filename" : "Icon.png", 32 | "scale" : "1x" 33 | }, 34 | { 35 | "size" : "57x57", 36 | "idiom" : "iphone", 37 | "filename" : "Icon@2x.png", 38 | "scale" : "2x" 39 | }, 40 | { 41 | "size" : "60x60", 42 | "idiom" : "iphone", 43 | "filename" : "Icon-60@2x.png", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "size" : "60x60", 48 | "idiom" : "iphone", 49 | "filename" : "Icon-60@3x.png", 50 | "scale" : "3x" 51 | }, 52 | { 53 | "idiom" : "ipad", 54 | "size" : "29x29", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "idiom" : "ipad", 59 | "size" : "29x29", 60 | "scale" : "2x" 61 | }, 62 | { 63 | "idiom" : "ipad", 64 | "size" : "40x40", 65 | "scale" : "1x" 66 | }, 67 | { 68 | "idiom" : "ipad", 69 | "size" : "40x40", 70 | "scale" : "2x" 71 | }, 72 | { 73 | "idiom" : "ipad", 74 | "size" : "50x50", 75 | "scale" : "1x" 76 | }, 77 | { 78 | "idiom" : "ipad", 79 | "size" : "50x50", 80 | "scale" : "2x" 81 | }, 82 | { 83 | "size" : "72x72", 84 | "idiom" : "ipad", 85 | "filename" : "Icon-72.png", 86 | "scale" : "1x" 87 | }, 88 | { 89 | "size" : "72x72", 90 | "idiom" : "ipad", 91 | "filename" : "Icon-72@2x.png", 92 | "scale" : "2x" 93 | }, 94 | { 95 | "size" : "76x76", 96 | "idiom" : "ipad", 97 | "filename" : "Icon-76.png", 98 | "scale" : "1x" 99 | }, 100 | { 101 | "size" : "76x76", 102 | "idiom" : "ipad", 103 | "filename" : "Icon-76@2x.png", 104 | "scale" : "2x" 105 | } 106 | ], 107 | "info" : { 108 | "version" : 1, 109 | "author" : "xcode" 110 | } 111 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon-72.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/audioOff.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "audioOff@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/audioOff.imageset/audioOff@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/audioOff.imageset/audioOff@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/audioOn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "audioOn@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/audioOn.imageset/audioOn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/audioOn.imageset/audioOn@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/hangup.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "hangup@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/hangup.imageset/hangup@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/hangup.imageset/hangup@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "webrtc-icon-192x192.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/logo.imageset/webrtc-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/logo.imageset/webrtc-icon-192x192.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/videoOff.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "videoOff@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/videoOff.imageset/videoOff@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/videoOff.imageset/videoOff@2x.png -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/videoOn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "videoOn@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AppRTC/Images.xcassets/videoOn.imageset/videoOn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/AppRTC/Images.xcassets/videoOn.imageset/videoOn@2x.png -------------------------------------------------------------------------------- /AppRTC/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.isbx.ios.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | NSCameraUsageDescription 31 | 32 | NSMicrophoneUsageDescription 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | UIRequiredDeviceCapabilities 39 | 40 | armv7 41 | 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UISupportedInterfaceOrientations~ipad 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationPortraitUpsideDown 52 | UIInterfaceOrientationLandscapeLeft 53 | UIInterfaceOrientationLandscapeRight 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /AppRTC/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AppRTC 4 | // 5 | // Created by Kelly Chu on 3/7/15. 6 | // Copyright (c) 2015 ISBX. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, The WebRTC project authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | * Neither the name of Google nor the names of its contributors may 16 | be used to endorse or promote products derived from this software 17 | without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Lib/ARDAppClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | #import "RTCVideoTrack.h" 31 | 32 | typedef NS_ENUM(NSInteger, ARDAppClientState) { 33 | // Disconnected from servers. 34 | kARDAppClientStateDisconnected, 35 | // Connecting to servers. 36 | kARDAppClientStateConnecting, 37 | // Connected to servers. 38 | kARDAppClientStateConnected, 39 | }; 40 | 41 | @class ARDAppClient; 42 | @protocol ARDAppClientDelegate 43 | 44 | - (void)appClient:(ARDAppClient *)client 45 | didChangeState:(ARDAppClientState)state; 46 | 47 | - (void)appClient:(ARDAppClient *)client 48 | didReceiveLocalVideoTrack:(RTCVideoTrack *)localVideoTrack; 49 | 50 | - (void)appClient:(ARDAppClient *)client 51 | didReceiveRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack; 52 | 53 | - (void)appClient:(ARDAppClient *)client 54 | didError:(NSError *)error; 55 | 56 | @end 57 | 58 | // Handles connections to the AppRTC server for a given room. 59 | @interface ARDAppClient : NSObject 60 | 61 | @property(nonatomic, readonly) ARDAppClientState state; 62 | @property(nonatomic, weak) id delegate; 63 | @property(nonatomic, strong) NSString *serverHostUrl; 64 | 65 | - (instancetype)initWithDelegate:(id)delegate; 66 | 67 | // Establishes a connection with the AppRTC servers for the given room id. 68 | // TODO(tkchin): provide available keys/values for options. This will be used 69 | // for call configurations such as overriding server choice, specifying codecs 70 | // and so on. 71 | - (void)connectToRoomWithId:(NSString *)roomId 72 | options:(NSDictionary *)options; 73 | 74 | // Mute and unmute Audio-In 75 | - (void)muteAudioIn; 76 | - (void)unmuteAudioIn; 77 | 78 | // Mute and unmute Video-In 79 | - (void)muteVideoIn; 80 | - (void)unmuteVideoIn; 81 | 82 | // Enabling / Disabling Speakerphone 83 | - (void)enableSpeaker; 84 | - (void)disableSpeaker; 85 | 86 | // Swap camera functionality 87 | - (void)swapCameraToFront; 88 | - (void)swapCameraToBack; 89 | 90 | // Disconnects from the AppRTC servers and any connected clients. 91 | - (void)disconnect; 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /Lib/ARDMessageResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | typedef NS_ENUM(NSInteger, ARDMessageResultType) { 31 | kARDMessageResultTypeUnknown, 32 | kARDMessageResultTypeSuccess, 33 | kARDMessageResultTypeInvalidRoom, 34 | kARDMessageResultTypeInvalidClient 35 | }; 36 | 37 | @interface ARDMessageResponse : NSObject 38 | 39 | @property(nonatomic, readonly) ARDMessageResultType result; 40 | 41 | + (ARDMessageResponse *)responseFromJSONData:(NSData *)data; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Lib/ARDMessageResponse.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "ARDMessageResponse.h" 29 | 30 | #import "ARDUtilities.h" 31 | 32 | static NSString const *kARDMessageResultKey = @"result"; 33 | 34 | @interface ARDMessageResponse () 35 | 36 | @property(nonatomic, assign) ARDMessageResultType result; 37 | 38 | @end 39 | 40 | @implementation ARDMessageResponse 41 | 42 | @synthesize result = _result; 43 | 44 | + (ARDMessageResponse *)responseFromJSONData:(NSData *)data { 45 | NSDictionary *responseJSON = [NSDictionary dictionaryWithJSONData:data]; 46 | if (!responseJSON) { 47 | return nil; 48 | } 49 | ARDMessageResponse *response = [[ARDMessageResponse alloc] init]; 50 | response.result = 51 | [[self class] resultTypeFromString:responseJSON[kARDMessageResultKey]]; 52 | return response; 53 | } 54 | 55 | #pragma mark - Private 56 | 57 | + (ARDMessageResultType)resultTypeFromString:(NSString *)resultString { 58 | ARDMessageResultType result = kARDMessageResultTypeUnknown; 59 | if ([resultString isEqualToString:@"SUCCESS"]) { 60 | result = kARDMessageResultTypeSuccess; 61 | } else if ([resultString isEqualToString:@"INVALID_CLIENT"]) { 62 | result = kARDMessageResultTypeInvalidClient; 63 | } else if ([resultString isEqualToString:@"INVALID_ROOM"]) { 64 | result = kARDMessageResultTypeInvalidRoom; 65 | } 66 | return result; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Lib/ARDRegisterResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | typedef NS_ENUM(NSInteger, ARDRegisterResultType) { 31 | kARDRegisterResultTypeUnknown, 32 | kARDRegisterResultTypeSuccess, 33 | kARDRegisterResultTypeFull 34 | }; 35 | 36 | // Result of registering with the GAE server. 37 | @interface ARDRegisterResponse : NSObject 38 | 39 | @property(nonatomic, readonly) ARDRegisterResultType result; 40 | @property(nonatomic, readonly) BOOL isInitiator; 41 | @property(nonatomic, readonly) NSString *roomId; 42 | @property(nonatomic, readonly) NSString *clientId; 43 | @property(nonatomic, readonly) NSArray *messages; 44 | @property(nonatomic, readonly) NSURL *webSocketURL; 45 | @property(nonatomic, readonly) NSURL *webSocketRestURL; 46 | 47 | + (ARDRegisterResponse *)responseFromJSONData:(NSData *)data; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Lib/ARDRegisterResponse.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "ARDRegisterResponse.h" 29 | 30 | #import "ARDSignalingMessage.h" 31 | #import "ARDUtilities.h" 32 | #import "RTCICEServer+JSON.h" 33 | 34 | static NSString const *kARDRegisterResultKey = @"result"; 35 | static NSString const *kARDRegisterResultParamsKey = @"params"; 36 | static NSString const *kARDRegisterInitiatorKey = @"is_initiator"; 37 | static NSString const *kARDRegisterRoomIdKey = @"room_id"; 38 | static NSString const *kARDRegisterClientIdKey = @"client_id"; 39 | static NSString const *kARDRegisterMessagesKey = @"messages"; 40 | static NSString const *kARDRegisterWebSocketURLKey = @"wss_url"; 41 | static NSString const *kARDRegisterWebSocketRestURLKey = @"wss_post_url"; 42 | 43 | @interface ARDRegisterResponse () 44 | 45 | @property(nonatomic, assign) ARDRegisterResultType result; 46 | @property(nonatomic, assign) BOOL isInitiator; 47 | @property(nonatomic, strong) NSString *roomId; 48 | @property(nonatomic, strong) NSString *clientId; 49 | @property(nonatomic, strong) NSArray *messages; 50 | @property(nonatomic, strong) NSURL *webSocketURL; 51 | @property(nonatomic, strong) NSURL *webSocketRestURL; 52 | 53 | @end 54 | 55 | @implementation ARDRegisterResponse 56 | 57 | @synthesize result = _result; 58 | @synthesize isInitiator = _isInitiator; 59 | @synthesize roomId = _roomId; 60 | @synthesize clientId = _clientId; 61 | @synthesize messages = _messages; 62 | @synthesize webSocketURL = _webSocketURL; 63 | @synthesize webSocketRestURL = _webSocketRestURL; 64 | 65 | + (ARDRegisterResponse *)responseFromJSONData:(NSData *)data { 66 | NSDictionary *responseJSON = [NSDictionary dictionaryWithJSONData:data]; 67 | if (!responseJSON) { 68 | return nil; 69 | } 70 | ARDRegisterResponse *response = [[ARDRegisterResponse alloc] init]; 71 | NSString *resultString = responseJSON[kARDRegisterResultKey]; 72 | response.result = [[self class] resultTypeFromString:resultString]; 73 | NSDictionary *params = responseJSON[kARDRegisterResultParamsKey]; 74 | 75 | response.isInitiator = [params[kARDRegisterInitiatorKey] boolValue]; 76 | response.roomId = params[kARDRegisterRoomIdKey]; 77 | response.clientId = params[kARDRegisterClientIdKey]; 78 | 79 | // Parse messages. 80 | NSArray *messages = params[kARDRegisterMessagesKey]; 81 | NSMutableArray *signalingMessages = 82 | [NSMutableArray arrayWithCapacity:messages.count]; 83 | for (NSString *message in messages) { 84 | ARDSignalingMessage *signalingMessage = 85 | [ARDSignalingMessage messageFromJSONString:message]; 86 | // Add non nil signaling message 87 | if (signalingMessage) { 88 | [signalingMessages addObject:signalingMessage]; 89 | } 90 | } 91 | // Error parsing signaling message JSON. 92 | if ([messages count] > 0 && [signalingMessages count] == 0) { 93 | response.result = kARDRegisterResultTypeUnknown; 94 | } 95 | response.messages = signalingMessages; 96 | 97 | // Parse websocket urls. 98 | NSString *webSocketURLString = params[kARDRegisterWebSocketURLKey]; 99 | response.webSocketURL = [NSURL URLWithString:webSocketURLString]; 100 | NSString *webSocketRestURLString = params[kARDRegisterWebSocketRestURLKey]; 101 | response.webSocketRestURL = [NSURL URLWithString:webSocketRestURLString]; 102 | 103 | return response; 104 | } 105 | 106 | #pragma mark - Private 107 | 108 | + (ARDRegisterResultType)resultTypeFromString:(NSString *)resultString { 109 | ARDRegisterResultType result = kARDRegisterResultTypeUnknown; 110 | if ([resultString isEqualToString:@"SUCCESS"]) { 111 | result = kARDRegisterResultTypeSuccess; 112 | } else if ([resultString isEqualToString:@"FULL"]) { 113 | result = kARDRegisterResultTypeFull; 114 | } 115 | return result; 116 | } 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /Lib/ARDSignalingMessage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | #import "RTCICECandidate.h" 31 | #import "RTCSessionDescription.h" 32 | 33 | typedef enum { 34 | kARDSignalingMessageTypeCandidate, 35 | kARDSignalingMessageTypeOffer, 36 | kARDSignalingMessageTypeAnswer, 37 | kARDSignalingMessageTypeBye, 38 | } ARDSignalingMessageType; 39 | 40 | @interface ARDSignalingMessage : NSObject 41 | 42 | @property(nonatomic, readonly) ARDSignalingMessageType type; 43 | 44 | + (ARDSignalingMessage *)messageFromJSONString:(NSString *)jsonString; 45 | - (NSData *)JSONData; 46 | 47 | @end 48 | 49 | @interface ARDICECandidateMessage : ARDSignalingMessage 50 | 51 | @property(nonatomic, readonly) RTCICECandidate *candidate; 52 | 53 | - (instancetype)initWithCandidate:(RTCICECandidate *)candidate; 54 | 55 | @end 56 | 57 | @interface ARDSessionDescriptionMessage : ARDSignalingMessage 58 | 59 | @property(nonatomic, readonly) RTCSessionDescription *sessionDescription; 60 | 61 | - (instancetype)initWithDescription:(RTCSessionDescription *)description; 62 | 63 | @end 64 | 65 | @interface ARDByeMessage : ARDSignalingMessage 66 | @end 67 | -------------------------------------------------------------------------------- /Lib/ARDSignalingMessage.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "ARDSignalingMessage.h" 29 | 30 | #import "ARDUtilities.h" 31 | #import "RTCICECandidate+JSON.h" 32 | #import "RTCSessionDescription+JSON.h" 33 | 34 | static NSString const *kARDSignalingMessageTypeKey = @"type"; 35 | 36 | @implementation ARDSignalingMessage 37 | 38 | @synthesize type = _type; 39 | 40 | - (instancetype)initWithType:(ARDSignalingMessageType)type { 41 | if (self = [super init]) { 42 | _type = type; 43 | } 44 | return self; 45 | } 46 | 47 | - (NSString *)description { 48 | return [[NSString alloc] initWithData:[self JSONData] 49 | encoding:NSUTF8StringEncoding]; 50 | } 51 | 52 | + (ARDSignalingMessage *)messageFromJSONString:(NSString *)jsonString { 53 | NSDictionary *values = [NSDictionary dictionaryWithJSONString:jsonString]; 54 | if (!values) { 55 | NSLog(@"Error parsing signaling message JSON."); 56 | return nil; 57 | } 58 | 59 | NSString *typeString = values[kARDSignalingMessageTypeKey]; 60 | ARDSignalingMessage *message = nil; 61 | if ([typeString isEqualToString:@"candidate"]) { 62 | RTCICECandidate *candidate = 63 | [RTCICECandidate candidateFromJSONDictionary:values]; 64 | message = [[ARDICECandidateMessage alloc] initWithCandidate:candidate]; 65 | } else if ([typeString isEqualToString:@"offer"] || 66 | [typeString isEqualToString:@"answer"]) { 67 | RTCSessionDescription *description = 68 | [RTCSessionDescription descriptionFromJSONDictionary:values]; 69 | message = 70 | [[ARDSessionDescriptionMessage alloc] initWithDescription:description]; 71 | } else if ([typeString isEqualToString:@"bye"]) { 72 | message = [[ARDByeMessage alloc] init]; 73 | } else { 74 | NSLog(@"Unexpected type: %@", typeString); 75 | } 76 | return message; 77 | } 78 | 79 | - (NSData *)JSONData { 80 | return nil; 81 | } 82 | 83 | @end 84 | 85 | @implementation ARDICECandidateMessage 86 | 87 | @synthesize candidate = _candidate; 88 | 89 | - (instancetype)initWithCandidate:(RTCICECandidate *)candidate { 90 | if (self = [super initWithType:kARDSignalingMessageTypeCandidate]) { 91 | _candidate = candidate; 92 | } 93 | return self; 94 | } 95 | 96 | - (NSData *)JSONData { 97 | return [_candidate JSONData]; 98 | } 99 | 100 | @end 101 | 102 | @implementation ARDSessionDescriptionMessage 103 | 104 | @synthesize sessionDescription = _sessionDescription; 105 | 106 | - (instancetype)initWithDescription:(RTCSessionDescription *)description { 107 | ARDSignalingMessageType type = kARDSignalingMessageTypeOffer; 108 | NSString *typeString = description.type; 109 | if ([typeString isEqualToString:@"offer"]) { 110 | type = kARDSignalingMessageTypeOffer; 111 | } else if ([typeString isEqualToString:@"answer"]) { 112 | type = kARDSignalingMessageTypeAnswer; 113 | } else { 114 | NSAssert(NO, @"Unexpected type: %@", typeString); 115 | } 116 | if (self = [super initWithType:type]) { 117 | _sessionDescription = description; 118 | } 119 | return self; 120 | } 121 | 122 | - (NSData *)JSONData { 123 | return [_sessionDescription JSONData]; 124 | } 125 | 126 | @end 127 | 128 | @implementation ARDByeMessage 129 | 130 | - (instancetype)init { 131 | return [super initWithType:kARDSignalingMessageTypeBye]; 132 | } 133 | 134 | - (NSData *)JSONData { 135 | NSDictionary *message = @{ 136 | @"type": @"bye" 137 | }; 138 | return [NSJSONSerialization dataWithJSONObject:message 139 | options:NSJSONWritingPrettyPrinted 140 | error:NULL]; 141 | } 142 | 143 | @end 144 | -------------------------------------------------------------------------------- /Lib/ARDUtilities.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | @interface NSDictionary (ARDUtilites) 31 | 32 | // Creates a dictionary with the keys and values in the JSON object. 33 | + (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString; 34 | + (NSDictionary *)dictionaryWithJSONData:(NSData *)jsonData; 35 | 36 | @end 37 | 38 | @interface NSURLConnection (ARDUtilities) 39 | 40 | // Issues an asynchronous request that calls back on main queue. 41 | + (void)sendAsyncRequest:(NSURLRequest *)request 42 | completionHandler:(void (^)(NSURLResponse *response, 43 | NSData *data, 44 | NSError *error))completionHandler; 45 | 46 | // Posts data to the specified URL. 47 | + (void)sendAsyncPostToURL:(NSURL *)url 48 | withData:(NSData *)data 49 | completionHandler:(void (^)(BOOL succeeded, 50 | NSData *data))completionHandler; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Lib/ARDUtilities.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "ARDUtilities.h" 29 | 30 | @implementation NSDictionary (ARDUtilites) 31 | 32 | + (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString { 33 | NSParameterAssert(jsonString.length > 0); 34 | NSData *data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; 35 | NSError *error = nil; 36 | NSDictionary *dict = 37 | [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; 38 | if (error) { 39 | NSLog(@"Error parsing JSON: %@", error.localizedDescription); 40 | } 41 | return dict; 42 | } 43 | 44 | + (NSDictionary *)dictionaryWithJSONData:(NSData *)jsonData { 45 | NSError *error = nil; 46 | NSDictionary *dict = 47 | [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error]; 48 | if (error) { 49 | NSLog(@"Error parsing JSON: %@", error.localizedDescription); 50 | } 51 | return dict; 52 | } 53 | 54 | @end 55 | 56 | @implementation NSURLConnection (ARDUtilities) 57 | 58 | + (void)sendAsyncRequest:(NSURLRequest *)request 59 | completionHandler:(void (^)(NSURLResponse *response, 60 | NSData *data, 61 | NSError *error))completionHandler { 62 | // Kick off an async request which will call back on main thread. 63 | [NSURLConnection sendAsynchronousRequest:request 64 | queue:[NSOperationQueue mainQueue] 65 | completionHandler:^(NSURLResponse *response, 66 | NSData *data, 67 | NSError *error) { 68 | if (completionHandler) { 69 | completionHandler(response, data, error); 70 | } 71 | }]; 72 | } 73 | 74 | // Posts data to the specified URL. 75 | + (void)sendAsyncPostToURL:(NSURL *)url 76 | withData:(NSData *)data 77 | completionHandler:(void (^)(BOOL succeeded, 78 | NSData *data))completionHandler { 79 | NSLog(@"url = %@", url); 80 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; 81 | request.HTTPMethod = @"POST"; 82 | request.HTTPBody = data; 83 | [[self class] sendAsyncRequest:request 84 | completionHandler:^(NSURLResponse *response, 85 | NSData *data, 86 | NSError *error) { 87 | if (error) { 88 | NSLog(@"Error posting data: %@", error.localizedDescription); 89 | if (completionHandler) { 90 | completionHandler(NO, data); 91 | } 92 | return; 93 | } 94 | NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; 95 | if (httpResponse.statusCode != 200) { 96 | NSString *serverResponse = data.length > 0 ? 97 | [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] : 98 | nil; 99 | NSLog(@"Received bad response: %@", serverResponse); 100 | if (completionHandler) { 101 | completionHandler(NO, data); 102 | } 103 | return; 104 | } 105 | if (completionHandler) { 106 | completionHandler(YES, data); 107 | } 108 | }]; 109 | } 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /Lib/ARDWebSocketChannel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | #import "ARDSignalingMessage.h" 31 | 32 | typedef NS_ENUM(NSInteger, ARDWebSocketChannelState) { 33 | // State when disconnected. 34 | kARDWebSocketChannelStateClosed, 35 | // State when connection is established but not ready for use. 36 | kARDWebSocketChannelStateOpen, 37 | // State when connection is established and registered. 38 | kARDWebSocketChannelStateRegistered, 39 | // State when connection encounters a fatal error. 40 | kARDWebSocketChannelStateError 41 | }; 42 | 43 | @class ARDWebSocketChannel; 44 | @protocol ARDWebSocketChannelDelegate 45 | 46 | - (void)channel:(ARDWebSocketChannel *)channel 47 | didChangeState:(ARDWebSocketChannelState)state; 48 | 49 | - (void)channel:(ARDWebSocketChannel *)channel 50 | didReceiveMessage:(ARDSignalingMessage *)message; 51 | 52 | @end 53 | 54 | // Wraps a WebSocket connection to the AppRTC WebSocket server. 55 | @interface ARDWebSocketChannel : NSObject 56 | 57 | @property(nonatomic, readonly) NSString *roomId; 58 | @property(nonatomic, readonly) NSString *clientId; 59 | @property(nonatomic, readonly) ARDWebSocketChannelState state; 60 | @property(nonatomic, weak) id delegate; 61 | 62 | - (instancetype)initWithURL:(NSURL *)url 63 | restURL:(NSURL *)restURL 64 | delegate:(id)delegate; 65 | 66 | // Registers with the WebSocket server for the given room and client id once 67 | // the web socket connection is open. 68 | - (void)registerForRoomId:(NSString *)roomId 69 | clientId:(NSString *)clientId; 70 | 71 | // Sends data over the WebSocket connection if registered, otherwise POSTs to 72 | // the web socket server instead. 73 | - (void)sendData:(NSData *)data; 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Lib/RTCICECandidate+JSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCICECandidate.h" 29 | 30 | @interface RTCICECandidate (JSON) 31 | 32 | + (RTCICECandidate *)candidateFromJSONDictionary:(NSDictionary *)dictionary; 33 | - (NSData *)JSONData; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Lib/RTCICECandidate+JSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCICECandidate+JSON.h" 29 | 30 | static NSString const *kRTCICECandidateTypeKey = @"type"; 31 | static NSString const *kRTCICECandidateTypeValue = @"candidate"; 32 | static NSString const *kRTCICECandidateMidKey = @"id"; 33 | static NSString const *kRTCICECandidateMLineIndexKey = @"label"; 34 | static NSString const *kRTCICECandidateSdpKey = @"candidate"; 35 | 36 | @implementation RTCICECandidate (JSON) 37 | 38 | + (RTCICECandidate *)candidateFromJSONDictionary:(NSDictionary *)dictionary { 39 | NSString *mid = dictionary[kRTCICECandidateMidKey]; 40 | NSString *sdp = dictionary[kRTCICECandidateSdpKey]; 41 | NSNumber *num = dictionary[kRTCICECandidateMLineIndexKey]; 42 | NSInteger mLineIndex = [num integerValue]; 43 | return [[RTCICECandidate alloc] initWithMid:mid index:mLineIndex sdp:sdp]; 44 | } 45 | 46 | - (NSData *)JSONData { 47 | NSDictionary *json = @{ 48 | kRTCICECandidateTypeKey : kRTCICECandidateTypeValue, 49 | kRTCICECandidateMLineIndexKey : @(self.sdpMLineIndex), 50 | kRTCICECandidateMidKey : self.sdpMid, 51 | kRTCICECandidateSdpKey : self.sdp 52 | }; 53 | NSError *error = nil; 54 | NSData *data = 55 | [NSJSONSerialization dataWithJSONObject:json 56 | options:NSJSONWritingPrettyPrinted 57 | error:&error]; 58 | if (error) { 59 | NSLog(@"Error serializing JSON: %@", error); 60 | return nil; 61 | } 62 | return data; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Lib/RTCICEServer+JSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCICEServer.h" 29 | 30 | @interface RTCICEServer (JSON) 31 | 32 | + (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary; 33 | // CEOD provides different JSON, and this parses that. 34 | + (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Lib/RTCICEServer+JSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCICEServer+JSON.h" 29 | 30 | static NSString const *kRTCICEServerUsernameKey = @"username"; 31 | static NSString const *kRTCICEServerPasswordKey = @"password"; 32 | static NSString const *kRTCICEServerUrisKey = @"uris"; 33 | static NSString const *kRTCICEServerUrlKey = @"urls"; 34 | static NSString const *kRTCICEServerCredentialKey = @"credential"; 35 | 36 | @implementation RTCICEServer (JSON) 37 | 38 | + (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary { 39 | NSString *url = dictionary[kRTCICEServerUrlKey]; 40 | NSString *username = dictionary[kRTCICEServerUsernameKey]; 41 | NSString *credential = dictionary[kRTCICEServerCredentialKey]; 42 | username = username ? username : @""; 43 | credential = credential ? credential : @""; 44 | return [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:url] 45 | username:username 46 | password:credential]; 47 | } 48 | 49 | + (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary { 50 | NSString *username = dictionary[kRTCICEServerUsernameKey]; 51 | NSString *password = dictionary[kRTCICEServerPasswordKey]; 52 | NSArray *uris = dictionary[kRTCICEServerUrisKey]; 53 | NSMutableArray *servers = [NSMutableArray arrayWithCapacity:uris.count]; 54 | for (NSString *uri in uris) { 55 | RTCICEServer *server = 56 | [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:uri] 57 | username:username 58 | password:password]; 59 | [servers addObject:server]; 60 | } 61 | return servers; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Lib/RTCMediaConstraints+JSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCMediaConstraints.h" 29 | 30 | @interface RTCMediaConstraints (JSON) 31 | 32 | + (RTCMediaConstraints *)constraintsFromJSONDictionary: 33 | (NSDictionary *)dictionary; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /Lib/RTCMediaConstraints+JSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCMediaConstraints+JSON.h" 29 | 30 | #import "RTCPair.h" 31 | 32 | static NSString const *kRTCMediaConstraintsMandatoryKey = @"mandatory"; 33 | 34 | @implementation RTCMediaConstraints (JSON) 35 | 36 | + (RTCMediaConstraints *)constraintsFromJSONDictionary: 37 | (NSDictionary *)dictionary { 38 | NSDictionary *mandatory = dictionary[kRTCMediaConstraintsMandatoryKey]; 39 | NSMutableArray *mandatoryContraints = 40 | [NSMutableArray arrayWithCapacity:[mandatory count]]; 41 | [mandatory enumerateKeysAndObjectsUsingBlock:^( 42 | id key, id obj, BOOL *stop) { 43 | [mandatoryContraints addObject:[[RTCPair alloc] initWithKey:key 44 | value:obj]]; 45 | }]; 46 | // TODO(tkchin): figure out json formats for optional constraints. 47 | RTCMediaConstraints *constraints = 48 | [[RTCMediaConstraints alloc] 49 | initWithMandatoryConstraints:mandatoryContraints 50 | optionalConstraints:nil]; 51 | return constraints; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Lib/RTCSessionDescription+JSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCSessionDescription.h" 29 | 30 | @interface RTCSessionDescription (JSON) 31 | 32 | + (RTCSessionDescription *)descriptionFromJSONDictionary: 33 | (NSDictionary *)dictionary; 34 | - (NSData *)JSONData; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Lib/RTCSessionDescription+JSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014, Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCSessionDescription+JSON.h" 29 | 30 | static NSString const *kRTCSessionDescriptionTypeKey = @"type"; 31 | static NSString const *kRTCSessionDescriptionSdpKey = @"sdp"; 32 | 33 | @implementation RTCSessionDescription (JSON) 34 | 35 | + (RTCSessionDescription *)descriptionFromJSONDictionary: 36 | (NSDictionary *)dictionary { 37 | NSString *type = dictionary[kRTCSessionDescriptionTypeKey]; 38 | NSString *sdp = dictionary[kRTCSessionDescriptionSdpKey]; 39 | return [[RTCSessionDescription alloc] initWithType:type sdp:sdp]; 40 | } 41 | 42 | - (NSData *)JSONData { 43 | NSDictionary *json = @{ 44 | kRTCSessionDescriptionTypeKey : self.type, 45 | kRTCSessionDescriptionSdpKey : self.description 46 | }; 47 | return [NSJSONSerialization dataWithJSONObject:json options:0 error:nil]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | platform :ios, '7.0' 4 | 5 | pod 'AppRTC', path: '.' 6 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppRTC (1.0.2): 3 | - libjingle_peerconnection 4 | - SocketRocket 5 | - libjingle_peerconnection (10642.2.0) 6 | - SocketRocket (0.4.2) 7 | 8 | DEPENDENCIES: 9 | - AppRTC (from `.`) 10 | 11 | EXTERNAL SOURCES: 12 | AppRTC: 13 | :path: . 14 | 15 | SPEC CHECKSUMS: 16 | AppRTC: 29a5418955fee7fba3df36a0c37285cd835272ad 17 | libjingle_peerconnection: 96592d7e75876776f6a7c21267926a132effc3cc 18 | SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad 19 | 20 | COCOAPODS: 0.39.0 21 | -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/ARDAppClient.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDAppClient.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/ARDMessageResponse.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDMessageResponse.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/ARDRegisterResponse.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDRegisterResponse.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/ARDSignalingMessage.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDSignalingMessage.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/ARDUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/ARDWebSocketChannel.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDWebSocketChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/RTCICECandidate+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCICECandidate+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/RTCICEServer+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCICEServer+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/RTCMediaConstraints+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCMediaConstraints+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AppRTC/RTCSessionDescription+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCSessionDescription+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SocketRocket/SRWebSocket.h: -------------------------------------------------------------------------------- 1 | ../../../SocketRocket/SocketRocket/SRWebSocket.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCAVFoundationVideoSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAVFoundationVideoSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCAudioSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAudioSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCAudioTrack.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAudioTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCDataChannel.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCDataChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCEAGLVideoView.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCEAGLVideoView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCFileLogger.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCFileLogger.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCI420Frame.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCI420Frame.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCICECandidate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCICECandidate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCICEServer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCICEServer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCLogging.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCLogging.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCMediaConstraints.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaConstraints.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCMediaSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCMediaStream.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaStream.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCMediaStreamTrack.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaStreamTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCNSGLVideoView.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCNSGLVideoView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCOpenGLVideoRenderer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCOpenGLVideoRenderer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCPair.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPair.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCPeerConnection.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnection.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCPeerConnectionDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCPeerConnectionFactory.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionFactory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCPeerConnectionInterface.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionInterface.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCSessionDescription.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCSessionDescription.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCSessionDescriptionDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCSessionDescriptionDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCStatsDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCStatsDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCStatsReport.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCStatsReport.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCTypes.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCTypes.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCVideoCapturer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoCapturer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCVideoRenderer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoRenderer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCVideoSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoSource.h -------------------------------------------------------------------------------- /Pods/Headers/Private/libjingle_peerconnection/RTCVideoTrack.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/ARDAppClient.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDAppClient.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/ARDMessageResponse.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDMessageResponse.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/ARDRegisterResponse.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDRegisterResponse.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/ARDSignalingMessage.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDSignalingMessage.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/ARDUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/ARDWebSocketChannel.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/ARDWebSocketChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/RTCICECandidate+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCICECandidate+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/RTCICEServer+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCICEServer+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/RTCMediaConstraints+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCMediaConstraints+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AppRTC/RTCSessionDescription+JSON.h: -------------------------------------------------------------------------------- 1 | ../../../../Lib/RTCSessionDescription+JSON.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SocketRocket/SRWebSocket.h: -------------------------------------------------------------------------------- 1 | ../../../SocketRocket/SocketRocket/SRWebSocket.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCAVFoundationVideoSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAVFoundationVideoSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCAudioSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAudioSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCAudioTrack.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAudioTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCDataChannel.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCDataChannel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCEAGLVideoView.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCEAGLVideoView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCFileLogger.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCFileLogger.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCI420Frame.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCI420Frame.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCICECandidate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCICECandidate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCICEServer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCICEServer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCLogging.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCLogging.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCMediaConstraints.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaConstraints.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCMediaSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCMediaStream.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaStream.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCMediaStreamTrack.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaStreamTrack.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCNSGLVideoView.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCNSGLVideoView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCOpenGLVideoRenderer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCOpenGLVideoRenderer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCPair.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPair.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCPeerConnection.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnection.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCPeerConnectionDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCPeerConnectionFactory.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionFactory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCPeerConnectionInterface.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionInterface.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCSessionDescription.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCSessionDescription.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCSessionDescriptionDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCSessionDescriptionDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCStatsDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCStatsDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCStatsReport.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCStatsReport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCTypes.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCTypes.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCVideoCapturer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoCapturer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCVideoRenderer.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoRenderer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCVideoSource.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoSource.h -------------------------------------------------------------------------------- /Pods/Headers/Public/libjingle_peerconnection/RTCVideoTrack.h: -------------------------------------------------------------------------------- 1 | ../../../libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoTrack.h -------------------------------------------------------------------------------- /Pods/Local Podspecs/AppRTC.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AppRTC", 3 | "version": "1.0.2", 4 | "summary": "iOS video chat based on WebRTC", 5 | "homepage": "https://github.com/ISBX/apprtc-ios", 6 | "authors": "ISBX", 7 | "license": { 8 | "type": "BSD", 9 | "file": "LICENSE" 10 | }, 11 | "platforms": { 12 | "ios": "7.0" 13 | }, 14 | "source": { 15 | "git": "https://github.com/ISBX/apprtc-ios.git", 16 | "tag": "1.0.2" 17 | }, 18 | "source_files": "Lib/*.{h,m,c}", 19 | "requires_arc": true, 20 | "frameworks": [ 21 | "QuartzCore", 22 | "OpenGLES", 23 | "CoreGraphics", 24 | "CoreVideo", 25 | "CoreMedia", 26 | "CoreAudio", 27 | "AVFoundation", 28 | "AudioToolbox", 29 | "GLKit", 30 | "CFNetwork", 31 | "Security" 32 | ], 33 | "libraries": [ 34 | "sqlite3", 35 | "stdc++.6", 36 | "icucore", 37 | "c++" 38 | ], 39 | "dependencies": { 40 | "libjingle_peerconnection": [ 41 | 42 | ], 43 | "SocketRocket": [ 44 | 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppRTC (1.0.2): 3 | - libjingle_peerconnection 4 | - SocketRocket 5 | - libjingle_peerconnection (10642.2.0) 6 | - SocketRocket (0.4.2) 7 | 8 | DEPENDENCIES: 9 | - AppRTC (from `.`) 10 | 11 | EXTERNAL SOURCES: 12 | AppRTC: 13 | :path: . 14 | 15 | SPEC CHECKSUMS: 16 | AppRTC: 29a5418955fee7fba3df36a0c37285cd835272ad 17 | libjingle_peerconnection: 96592d7e75876776f6a7c21267926a132effc3cc 18 | SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad 19 | 20 | COCOAPODS: 0.39.0 21 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcshareddata/xcschemes/AppRTC.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/SocketRocket/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright 2012 Square Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | -------------------------------------------------------------------------------- /Pods/SocketRocket/SocketRocket/SRWebSocket.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2012 Square Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #import 18 | #import 19 | 20 | typedef NS_ENUM(NSInteger, SRReadyState) { 21 | SR_CONNECTING = 0, 22 | SR_OPEN = 1, 23 | SR_CLOSING = 2, 24 | SR_CLOSED = 3, 25 | }; 26 | 27 | typedef enum SRStatusCode : NSInteger { 28 | SRStatusCodeNormal = 1000, 29 | SRStatusCodeGoingAway = 1001, 30 | SRStatusCodeProtocolError = 1002, 31 | SRStatusCodeUnhandledType = 1003, 32 | // 1004 reserved. 33 | SRStatusNoStatusReceived = 1005, 34 | // 1004-1006 reserved. 35 | SRStatusCodeInvalidUTF8 = 1007, 36 | SRStatusCodePolicyViolated = 1008, 37 | SRStatusCodeMessageTooBig = 1009, 38 | } SRStatusCode; 39 | 40 | @class SRWebSocket; 41 | 42 | extern NSString *const SRWebSocketErrorDomain; 43 | extern NSString *const SRHTTPResponseErrorKey; 44 | 45 | #pragma mark - SRWebSocketDelegate 46 | 47 | @protocol SRWebSocketDelegate; 48 | 49 | #pragma mark - SRWebSocket 50 | 51 | @interface SRWebSocket : NSObject 52 | 53 | @property (nonatomic, weak) id delegate; 54 | 55 | @property (nonatomic, readonly) SRReadyState readyState; 56 | @property (nonatomic, readonly, retain) NSURL *url; 57 | 58 | 59 | @property (nonatomic, readonly) CFHTTPMessageRef receivedHTTPHeaders; 60 | 61 | // Optional array of cookies (NSHTTPCookie objects) to apply to the connections 62 | @property (nonatomic, readwrite) NSArray * requestCookies; 63 | 64 | // This returns the negotiated protocol. 65 | // It will be nil until after the handshake completes. 66 | @property (nonatomic, readonly, copy) NSString *protocol; 67 | 68 | // Protocols should be an array of strings that turn into Sec-WebSocket-Protocol. 69 | - (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates; 70 | - (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols; 71 | - (id)initWithURLRequest:(NSURLRequest *)request; 72 | 73 | // Some helper constructors. 74 | - (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates; 75 | - (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols; 76 | - (id)initWithURL:(NSURL *)url; 77 | 78 | // Delegate queue will be dispatch_main_queue by default. 79 | // You cannot set both OperationQueue and dispatch_queue. 80 | - (void)setDelegateOperationQueue:(NSOperationQueue*) queue; 81 | - (void)setDelegateDispatchQueue:(dispatch_queue_t) queue; 82 | 83 | // By default, it will schedule itself on +[NSRunLoop SR_networkRunLoop] using defaultModes. 84 | - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode; 85 | - (void)unscheduleFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode; 86 | 87 | // SRWebSockets are intended for one-time-use only. Open should be called once and only once. 88 | - (void)open; 89 | 90 | - (void)close; 91 | - (void)closeWithCode:(NSInteger)code reason:(NSString *)reason; 92 | 93 | // Send a UTF8 String or Data. 94 | - (void)send:(id)data; 95 | 96 | // Send Data (can be nil) in a ping message. 97 | - (void)sendPing:(NSData *)data; 98 | 99 | @end 100 | 101 | #pragma mark - SRWebSocketDelegate 102 | 103 | @protocol SRWebSocketDelegate 104 | 105 | // message will either be an NSString if the server is using text 106 | // or NSData if the server is using binary. 107 | - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message; 108 | 109 | @optional 110 | 111 | - (void)webSocketDidOpen:(SRWebSocket *)webSocket; 112 | - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error; 113 | - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean; 114 | - (void)webSocket:(SRWebSocket *)webSocket didReceivePong:(NSData *)pongPayload; 115 | 116 | @end 117 | 118 | #pragma mark - NSURLRequest (CertificateAdditions) 119 | 120 | @interface NSURLRequest (CertificateAdditions) 121 | 122 | @property (nonatomic, retain, readonly) NSArray *SR_SSLPinnedCertificates; 123 | 124 | @end 125 | 126 | #pragma mark - NSMutableURLRequest (CertificateAdditions) 127 | 128 | @interface NSMutableURLRequest (CertificateAdditions) 129 | 130 | @property (nonatomic, retain) NSArray *SR_SSLPinnedCertificates; 131 | 132 | @end 133 | 134 | #pragma mark - NSRunLoop (SRWebSocket) 135 | 136 | @interface NSRunLoop (SRWebSocket) 137 | 138 | + (NSRunLoop *)SR_networkRunLoop; 139 | 140 | @end 141 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AppRTC/AppRTC-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AppRTC : NSObject 3 | @end 4 | @implementation PodsDummy_AppRTC 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AppRTC/AppRTC-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AppRTC/AppRTC.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AppRTC" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppRTC" "${PODS_ROOT}/Headers/Public/SocketRocket" "${PODS_ROOT}/Headers/Public/libjingle_peerconnection" 3 | OTHER_LDFLAGS = -l"c++" -l"icucore" -l"sqlite3" -l"stdc++.6" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreAudio" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreVideo" -framework "GLKit" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AppRTC 5 | 6 | Copyright (c) 2011, The WebRTC project authors. All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are 10 | met: 11 | 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions and the following disclaimer in 17 | the documentation and/or other materials provided with the 18 | distribution. 19 | 20 | * Neither the name of Google nor the names of its contributors may 21 | be used to endorse or promote products derived from this software 22 | without specific prior written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | ## SocketRocket 38 | 39 | 40 | Copyright 2012 Square Inc. 41 | 42 | Licensed under the Apache License, Version 2.0 (the "License"); 43 | you may not use this file except in compliance with the License. 44 | You may obtain a copy of the License at 45 | 46 | http://www.apache.org/licenses/LICENSE-2.0 47 | 48 | Unless required by applicable law or agreed to in writing, software 49 | distributed under the License is distributed on an "AS IS" BASIS, 50 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 51 | See the License for the specific language governing permissions and 52 | limitations under the License. 53 | 54 | 55 | 56 | ## libjingle_peerconnection 57 | 58 | Copyright (c) 2011, The WebRTC project authors. All rights reserved. 59 | 60 | Redistribution and use in source and binary forms, with or without 61 | modification, are permitted provided that the following conditions are 62 | met: 63 | 64 | * Redistributions of source code must retain the above copyright 65 | notice, this list of conditions and the following disclaimer. 66 | 67 | * Redistributions in binary form must reproduce the above copyright 68 | notice, this list of conditions and the following disclaimer in 69 | the documentation and/or other materials provided with the 70 | distribution. 71 | 72 | * Neither the name of Google nor the names of its contributors may 73 | be used to endorse or promote products derived from this software 74 | without specific prior written permission. 75 | 76 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 77 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 78 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 79 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 80 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 81 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 82 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 83 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 84 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 85 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 86 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 87 | 88 | Generated by CocoaPods - http://cocoapods.org 89 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011, The WebRTC project authors. All rights reserved. 18 | 19 | Redistribution and use in source and binary forms, with or without 20 | modification, are permitted provided that the following conditions are 21 | met: 22 | 23 | * Redistributions of source code must retain the above copyright 24 | notice, this list of conditions and the following disclaimer. 25 | 26 | * Redistributions in binary form must reproduce the above copyright 27 | notice, this list of conditions and the following disclaimer in 28 | the documentation and/or other materials provided with the 29 | distribution. 30 | 31 | * Neither the name of Google nor the names of its contributors may 32 | be used to endorse or promote products derived from this software 33 | without specific prior written permission. 34 | 35 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 46 | 47 | Title 48 | AppRTC 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | FooterText 54 | 55 | Copyright 2012 Square Inc. 56 | 57 | Licensed under the Apache License, Version 2.0 (the "License"); 58 | you may not use this file except in compliance with the License. 59 | You may obtain a copy of the License at 60 | 61 | http://www.apache.org/licenses/LICENSE-2.0 62 | 63 | Unless required by applicable law or agreed to in writing, software 64 | distributed under the License is distributed on an "AS IS" BASIS, 65 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 66 | See the License for the specific language governing permissions and 67 | limitations under the License. 68 | 69 | 70 | Title 71 | SocketRocket 72 | Type 73 | PSGroupSpecifier 74 | 75 | 76 | FooterText 77 | Copyright (c) 2011, The WebRTC project authors. All rights reserved. 78 | 79 | Redistribution and use in source and binary forms, with or without 80 | modification, are permitted provided that the following conditions are 81 | met: 82 | 83 | * Redistributions of source code must retain the above copyright 84 | notice, this list of conditions and the following disclaimer. 85 | 86 | * Redistributions in binary form must reproduce the above copyright 87 | notice, this list of conditions and the following disclaimer in 88 | the documentation and/or other materials provided with the 89 | distribution. 90 | 91 | * Neither the name of Google nor the names of its contributors may 92 | be used to endorse or promote products derived from this software 93 | without specific prior written permission. 94 | 95 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 96 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 97 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 98 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 99 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 100 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 101 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 102 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 103 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 104 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 105 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 106 | 107 | Title 108 | libjingle_peerconnection 109 | Type 110 | PSGroupSpecifier 111 | 112 | 113 | FooterText 114 | Generated by CocoaPods - http://cocoapods.org 115 | Title 116 | 117 | Type 118 | PSGroupSpecifier 119 | 120 | 121 | StringsTable 122 | Acknowledgements 123 | Title 124 | Acknowledgements 125 | 126 | 127 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/libjingle_peerconnection" $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppRTC" "${PODS_ROOT}/Headers/Public/SocketRocket" "${PODS_ROOT}/Headers/Public/libjingle_peerconnection" 3 | LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/libjingle_peerconnection" $(inherited) "${PODS_ROOT}/libjingle_peerconnection/libjingle_peerconnection" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppRTC" -isystem "${PODS_ROOT}/Headers/Public/SocketRocket" -isystem "${PODS_ROOT}/Headers/Public/libjingle_peerconnection" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AppRTC" -l"SocketRocket" -l"WebRTC" -l"c" -l"c++" -l"icucore" -l"sqlite3" -l"stdc++" -l"stdc++.6" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreAudio" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreVideo" -framework "GLKit" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" -framework "UIKit" -framework "VideoToolbox" 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/libjingle_peerconnection" $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppRTC" "${PODS_ROOT}/Headers/Public/SocketRocket" "${PODS_ROOT}/Headers/Public/libjingle_peerconnection" 3 | LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/libjingle_peerconnection" $(inherited) "${PODS_ROOT}/libjingle_peerconnection/libjingle_peerconnection" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppRTC" -isystem "${PODS_ROOT}/Headers/Public/SocketRocket" -isystem "${PODS_ROOT}/Headers/Public/libjingle_peerconnection" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AppRTC" -l"SocketRocket" -l"WebRTC" -l"c" -l"c++" -l"icucore" -l"sqlite3" -l"stdc++" -l"stdc++.6" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreAudio" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreVideo" -framework "GLKit" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" -framework "UIKit" -framework "VideoToolbox" 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/SocketRocket/SocketRocket-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SocketRocket : NSObject 3 | @end 4 | @implementation PodsDummy_SocketRocket 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SocketRocket/SocketRocket-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SocketRocket/SocketRocket.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SocketRocket" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppRTC" "${PODS_ROOT}/Headers/Public/SocketRocket" "${PODS_ROOT}/Headers/Public/libjingle_peerconnection" 3 | OTHER_LDFLAGS = -l"icucore" -framework "CFNetwork" -framework "Security" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAVFoundationVideoSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2015 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCVideoSource.h" 29 | 30 | @class AVCaptureSession; 31 | @class RTCMediaConstraints; 32 | @class RTCPeerConnectionFactory; 33 | 34 | // RTCAVFoundationVideoSource is a video source that uses 35 | // webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for 36 | // that capturer because cricket::VideoCapturer is not ref counted and we cannot 37 | // guarantee its lifetime. Instead, we expose its properties through the ref 38 | // counted video source interface. 39 | @interface RTCAVFoundationVideoSource : RTCVideoSource 40 | 41 | - (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory 42 | constraints:(RTCMediaConstraints*)constraints; 43 | 44 | // Switches the camera being used (either front or back). 45 | @property(nonatomic, assign) BOOL useBackCamera; 46 | // Returns the active capture session. 47 | @property(nonatomic, readonly) AVCaptureSession* captureSession; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAudioSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCMediaSource.h" 29 | 30 | // RTCAudioSource is an ObjectiveC wrapper for AudioSourceInterface. It is 31 | // used as the source for one or more RTCAudioTrack objects. 32 | @interface RTCAudioSource : RTCMediaSource 33 | 34 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 35 | // Disallow init and don't add to documentation 36 | - (id)init __attribute__( 37 | (unavailable("init is not a supported initializer for this class."))); 38 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCAudioTrack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCMediaStreamTrack.h" 29 | 30 | // RTCAudioTrack is an ObjectiveC wrapper for AudioTrackInterface. 31 | @interface RTCAudioTrack : RTCMediaStreamTrack 32 | 33 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 34 | // Disallow init and don't add to documentation 35 | - (id)init __attribute__( 36 | (unavailable("init is not a supported initializer for this class."))); 37 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCDataChannel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // ObjectiveC wrapper for a DataChannelInit object. 31 | @interface RTCDataChannelInit : NSObject 32 | 33 | // Set to YES if ordered delivery is required 34 | @property(nonatomic) BOOL isOrdered; 35 | // Max period in milliseconds in which retransmissions will be sent. After this 36 | // time, no more retransmissions will be sent. -1 if unset. 37 | @property(nonatomic) NSInteger maxRetransmitTimeMs; 38 | // The max number of retransmissions. -1 if unset. 39 | @property(nonatomic) NSInteger maxRetransmits; 40 | // Set to YES if the channel has been externally negotiated and we do not send 41 | // an in-band signalling in the form of an "open" message 42 | @property(nonatomic) BOOL isNegotiated; 43 | // The stream id, or SID, for SCTP data channels. -1 if unset. 44 | @property(nonatomic) NSInteger streamId; 45 | // Set by the application and opaque to the WebRTC implementation. 46 | @property(nonatomic) NSString* protocol; 47 | 48 | @end 49 | 50 | // ObjectiveC wrapper for a DataBuffer object. 51 | @interface RTCDataBuffer : NSObject 52 | 53 | @property(nonatomic, readonly) NSData* data; 54 | @property(nonatomic, readonly) BOOL isBinary; 55 | 56 | - (instancetype)initWithData:(NSData*)data isBinary:(BOOL)isBinary; 57 | 58 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 59 | // Disallow init and don't add to documentation 60 | - (id)init __attribute__(( 61 | unavailable("init is not a supported initializer for this class."))); 62 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 63 | 64 | @end 65 | 66 | // Keep in sync with webrtc::DataChannelInterface::DataState 67 | typedef enum { 68 | kRTCDataChannelStateConnecting, 69 | kRTCDataChannelStateOpen, 70 | kRTCDataChannelStateClosing, 71 | kRTCDataChannelStateClosed 72 | } RTCDataChannelState; 73 | 74 | @class RTCDataChannel; 75 | // Protocol for receving data channel state and message events. 76 | @protocol RTCDataChannelDelegate 77 | 78 | // Called when the data channel state has changed. 79 | - (void)channelDidChangeState:(RTCDataChannel*)channel; 80 | 81 | // Called when a data buffer was successfully received. 82 | - (void)channel:(RTCDataChannel*)channel 83 | didReceiveMessageWithBuffer:(RTCDataBuffer*)buffer; 84 | 85 | @optional 86 | 87 | // Called when the buffered amount has changed. 88 | - (void)channel:(RTCDataChannel*)channel 89 | didChangeBufferedAmount:(NSUInteger)amount; 90 | 91 | @end 92 | 93 | // ObjectiveC wrapper for a DataChannel object. 94 | // See talk/app/webrtc/datachannelinterface.h 95 | @interface RTCDataChannel : NSObject 96 | 97 | @property(nonatomic, readonly) NSString* label; 98 | @property(nonatomic, readonly) BOOL isReliable; 99 | @property(nonatomic, readonly) BOOL isOrdered; 100 | @property(nonatomic, readonly) NSUInteger maxRetransmitTime; 101 | @property(nonatomic, readonly) NSUInteger maxRetransmits; 102 | @property(nonatomic, readonly) NSString* protocol; 103 | @property(nonatomic, readonly) BOOL isNegotiated; 104 | @property(nonatomic, readonly) NSInteger streamId; 105 | @property(nonatomic, readonly) RTCDataChannelState state; 106 | @property(nonatomic, readonly) NSUInteger bufferedAmount; 107 | @property(nonatomic, weak) id delegate; 108 | 109 | - (void)close; 110 | - (BOOL)sendData:(RTCDataBuffer*)data; 111 | 112 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 113 | // Disallow init and don't add to documentation 114 | - (id)init __attribute__(( 115 | unavailable("init is not a supported initializer for this class."))); 116 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCEAGLVideoView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | #import 30 | 31 | #import "RTCVideoRenderer.h" 32 | 33 | @class RTCEAGLVideoView; 34 | @protocol RTCEAGLVideoViewDelegate 35 | 36 | - (void)videoView:(RTCEAGLVideoView*)videoView didChangeVideoSize:(CGSize)size; 37 | 38 | @end 39 | 40 | // RTCEAGLVideoView is an RTCVideoRenderer which renders i420 frames in its 41 | // bounds using OpenGLES 2.0. 42 | @interface RTCEAGLVideoView : UIView 43 | 44 | @property(nonatomic, weak) id delegate; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCFileLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2015 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // TODO(tkchin): Move this to a common location. 31 | #ifndef NS_DESIGNATED_INITIALIZER 32 | #define NS_DESIGNATED_INITIALIZER 33 | #endif 34 | 35 | typedef NS_ENUM(NSUInteger, RTCFileLoggerSeverity) { 36 | kRTCFileLoggerSeverityVerbose, 37 | kRTCFileLoggerSeverityInfo, 38 | kRTCFileLoggerSeverityWarning, 39 | kRTCFileLoggerSeverityError 40 | }; 41 | 42 | // This class intercepts WebRTC logs and saves them to a file. The file size 43 | // will not exceed the given maximum bytesize. When the maximum bytesize is 44 | // reached logs from the beginning and the end are preserved while the middle 45 | // section is overwritten instead. 46 | // This class is not threadsafe. 47 | @interface RTCFileLogger : NSObject 48 | 49 | // The severity level to capture. The default is kRTCFileLoggerSeverityInfo. 50 | @property(nonatomic, assign) RTCFileLoggerSeverity severity; 51 | 52 | // Default constructor provides default settings for dir path and file size. 53 | - (instancetype)init; 54 | 55 | - (instancetype)initWithDirPath:(NSString *)dirPath 56 | maxFileSize:(NSUInteger)maxFileSize 57 | NS_DESIGNATED_INITIALIZER; 58 | 59 | // Starts writing WebRTC logs to disk if not already started. Overwrites any 60 | // existing file(s). 61 | - (void)start; 62 | 63 | // Stops writing WebRTC logs to disk. This method is also called on dealloc. 64 | - (void)stop; 65 | 66 | // Returns the current contents of the logs, or nil if start has been called 67 | // without a stop. 68 | - (NSData *)logData; 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCI420Frame.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // RTCI420Frame is an ObjectiveC version of cricket::VideoFrame. 31 | @interface RTCI420Frame : NSObject 32 | 33 | @property(nonatomic, readonly) NSUInteger width; 34 | @property(nonatomic, readonly) NSUInteger height; 35 | @property(nonatomic, readonly) NSUInteger chromaWidth; 36 | @property(nonatomic, readonly) NSUInteger chromaHeight; 37 | @property(nonatomic, readonly) NSUInteger chromaSize; 38 | // These can return NULL if the object is not backed by a buffer. 39 | @property(nonatomic, readonly) const uint8_t* yPlane; 40 | @property(nonatomic, readonly) const uint8_t* uPlane; 41 | @property(nonatomic, readonly) const uint8_t* vPlane; 42 | @property(nonatomic, readonly) NSInteger yPitch; 43 | @property(nonatomic, readonly) NSInteger uPitch; 44 | @property(nonatomic, readonly) NSInteger vPitch; 45 | 46 | - (BOOL)makeExclusive; 47 | 48 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 49 | // Disallow init and don't add to documentation 50 | - (id)init __attribute__(( 51 | unavailable("init is not a supported initializer for this class."))); 52 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 53 | 54 | @end 55 | 56 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCICECandidate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // RTCICECandidate contains an instance of ICECandidateInterface. 31 | @interface RTCICECandidate : NSObject 32 | 33 | // If present, this contains the identifier of the "media stream 34 | // identification" as defined in [RFC 3388] for m-line this candidate is 35 | // associated with. 36 | @property(nonatomic, copy, readonly) NSString* sdpMid; 37 | 38 | // This indicates the index (starting at zero) of m-line in the SDP this 39 | // candidate is associated with. 40 | @property(nonatomic, assign, readonly) NSInteger sdpMLineIndex; 41 | 42 | // Creates an SDP-ized form of this candidate. 43 | @property(nonatomic, copy, readonly) NSString* sdp; 44 | 45 | // Creates an ICECandidateInterface based on SDP string. 46 | - (id)initWithMid:(NSString*)sdpMid 47 | index:(NSInteger)sdpMLineIndex 48 | sdp:(NSString*)sdp; 49 | 50 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 51 | // Disallow init and don't add to documentation 52 | - (id)init __attribute__(( 53 | unavailable("init is not a supported initializer for this class."))); 54 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCICEServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // RTCICEServer allows for the creation of ICEServer structs. 31 | @interface RTCICEServer : NSObject 32 | 33 | // The server URI, username, and password. 34 | @property(nonatomic, strong, readonly) NSURL* URI; 35 | @property(nonatomic, copy, readonly) NSString* username; 36 | @property(nonatomic, copy, readonly) NSString* password; 37 | 38 | // Initializer for RTCICEServer taking uri, username, and password. 39 | - (id)initWithURI:(NSURL*)URI 40 | username:(NSString*)username 41 | password:(NSString*)password; 42 | 43 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 44 | // Disallow init and don't add to documentation 45 | - (id)init __attribute__(( 46 | unavailable("init is not a supported initializer for this class."))); 47 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCLogging.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2015 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // Subset of rtc::LoggingSeverity. 31 | typedef NS_ENUM(NSInteger, RTCLoggingSeverity) { 32 | kRTCLoggingSeverityVerbose, 33 | kRTCLoggingSeverityInfo, 34 | kRTCLoggingSeverityWarning, 35 | kRTCLoggingSeverityError, 36 | }; 37 | 38 | #if defined(__cplusplus) 39 | extern "C" void RTCLogEx(RTCLoggingSeverity severity, NSString* logString); 40 | extern "C" void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity); 41 | extern "C" NSString* RTCFileName(const char* filePath); 42 | #else 43 | 44 | // Wrapper for C++ LOG(sev) macros. 45 | // Logs the log string to the webrtc logstream for the given severity. 46 | extern void RTCLogEx(RTCLoggingSeverity severity, NSString* logString); 47 | 48 | // Wrapper for rtc::LogMessage::LogToDebug. 49 | // Sets the minimum severity to be logged to console. 50 | extern void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity); 51 | 52 | // Returns the filename with the path prefix removed. 53 | extern NSString* RTCFileName(const char* filePath); 54 | 55 | #endif 56 | 57 | // Some convenience macros. 58 | 59 | #define RTCLogString(format, ...) \ 60 | [NSString stringWithFormat:@"(%@:%d %s): " format, \ 61 | RTCFileName(__FILE__), \ 62 | __LINE__, \ 63 | __FUNCTION__, \ 64 | ##__VA_ARGS__] 65 | 66 | #define RTCLogFormat(severity, format, ...) \ 67 | do { \ 68 | NSString *logString = RTCLogString(format, ##__VA_ARGS__); \ 69 | RTCLogEx(severity, logString); \ 70 | } while (false) 71 | 72 | #define RTCLogVerbose(format, ...) \ 73 | RTCLogFormat(kRTCLoggingSeverityVerbose, format, ##__VA_ARGS__) \ 74 | 75 | #define RTCLogInfo(format, ...) \ 76 | RTCLogFormat(kRTCLoggingSeverityInfo, format, ##__VA_ARGS__) \ 77 | 78 | #define RTCLogWarning(format, ...) \ 79 | RTCLogFormat(kRTCLoggingSeverityWarning, format, ##__VA_ARGS__) \ 80 | 81 | #define RTCLogError(format, ...) \ 82 | RTCLogFormat(kRTCLoggingSeverityError, format, ##__VA_ARGS__) \ 83 | 84 | #if !defined(NDEBUG) 85 | #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) 86 | #else 87 | #define RTCLogDebug(format, ...) \ 88 | do { \ 89 | } while (false) 90 | #endif 91 | 92 | #define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__) 93 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaConstraints.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // RTCMediaConstraints contains the media constraints to be used in 31 | // RTCPeerConnection and RTCMediaStream. 32 | @interface RTCMediaConstraints : NSObject 33 | 34 | // Initializer for RTCMediaConstraints. The parameters mandatory and optional 35 | // contain RTCPair objects with key/value for each constrant. 36 | - (id)initWithMandatoryConstraints:(NSArray *)mandatory 37 | optionalConstraints:(NSArray *)optional; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | #import "RTCTypes.h" 31 | 32 | // RTCMediaSource is an ObjectiveC wrapper for MediaSourceInterface 33 | @interface RTCMediaSource : NSObject 34 | 35 | // The current state of the RTCMediaSource. 36 | @property(nonatomic, assign, readonly) RTCSourceState state; 37 | 38 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 39 | // Disallow init and don't add to documentation 40 | - (id)init __attribute__(( 41 | unavailable("init is not a supported initializer for this class."))); 42 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaStream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | @class RTCAudioTrack; 31 | @class RTCVideoTrack; 32 | 33 | // RTCMediaStream is an ObjectiveC wrapper for MediaStreamInterface. 34 | @interface RTCMediaStream : NSObject 35 | 36 | @property(nonatomic, strong, readonly) NSArray *audioTracks; 37 | @property(nonatomic, strong, readonly) NSArray *videoTracks; 38 | @property(nonatomic, strong, readonly) NSString *label; 39 | 40 | - (BOOL)addAudioTrack:(RTCAudioTrack *)track; 41 | - (BOOL)addVideoTrack:(RTCVideoTrack *)track; 42 | - (BOOL)removeAudioTrack:(RTCAudioTrack *)track; 43 | - (BOOL)removeVideoTrack:(RTCVideoTrack *)track; 44 | 45 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 46 | // Disallow init and don't add to documentation 47 | - (id)init __attribute__( 48 | (unavailable("init is not a supported initializer for this class."))); 49 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCMediaStreamTrack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | #import "RTCTypes.h" 31 | 32 | @class RTCMediaStreamTrack; 33 | @protocol RTCMediaStreamTrackDelegate 34 | 35 | - (void)mediaStreamTrackDidChange:(RTCMediaStreamTrack*)mediaStreamTrack; 36 | 37 | @end 38 | 39 | // RTCMediaStreamTrack implements the interface common to RTCAudioTrack and 40 | // RTCVideoTrack. Do not create an instance of this class, rather create one 41 | // of the derived classes. 42 | @interface RTCMediaStreamTrack : NSObject 43 | 44 | @property(nonatomic, readonly) NSString* kind; 45 | @property(nonatomic, readonly) NSString* label; 46 | @property(nonatomic, weak) id delegate; 47 | 48 | - (BOOL)isEnabled; 49 | - (BOOL)setEnabled:(BOOL)enabled; 50 | - (RTCTrackState)state; 51 | - (BOOL)setState:(RTCTrackState)state; 52 | 53 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 54 | // Disallow init and don't add to documentation 55 | - (id)init __attribute__( 56 | (unavailable("init is not a supported initializer for this class."))); 57 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCNSGLVideoView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #if TARGET_OS_IPHONE 29 | #error "This file targets OSX." 30 | #endif 31 | 32 | #import 33 | 34 | #import "RTCVideoRenderer.h" 35 | 36 | @class RTCNSGLVideoView; 37 | @protocol RTCNSGLVideoViewDelegate 38 | 39 | - (void)videoView:(RTCNSGLVideoView*)videoView didChangeVideoSize:(CGSize)size; 40 | 41 | @end 42 | 43 | @interface RTCNSGLVideoView : NSOpenGLView 44 | 45 | @property(nonatomic, weak) id delegate; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCOpenGLVideoRenderer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | #if TARGET_OS_IPHONE 30 | #import 31 | #else 32 | #import 33 | #endif 34 | 35 | @class RTCI420Frame; 36 | 37 | // RTCOpenGLVideoRenderer issues appropriate OpenGL commands to draw a frame to 38 | // the currently bound framebuffer. Supports OpenGL 3.2 and OpenGLES 2.0. OpenGL 39 | // framebuffer creation and management should be handled elsewhere using the 40 | // same context used to initialize this class. 41 | @interface RTCOpenGLVideoRenderer : NSObject 42 | 43 | // The last successfully drawn frame. Used to avoid drawing frames unnecessarily 44 | // hence saving battery life by reducing load. 45 | @property(nonatomic, readonly) RTCI420Frame* lastDrawnFrame; 46 | 47 | #if TARGET_OS_IPHONE 48 | - (instancetype)initWithContext:(EAGLContext*)context; 49 | #else 50 | - (instancetype)initWithContext:(NSOpenGLContext*)context; 51 | #endif 52 | 53 | // Draws |frame| onto the currently bound OpenGL framebuffer. |setupGL| must be 54 | // called before this function will succeed. 55 | - (BOOL)drawFrame:(RTCI420Frame*)frame; 56 | 57 | // The following methods are used to manage OpenGL resources. On iOS 58 | // applications should release resources when placed in background for use in 59 | // the foreground application. In fact, attempting to call OpenGLES commands 60 | // while in background will result in application termination. 61 | 62 | // Sets up the OpenGL state needed for rendering. 63 | - (void)setupGL; 64 | // Tears down the OpenGL state created by |setupGL|. 65 | - (void)teardownGL; 66 | 67 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 68 | // Disallow init and don't add to documentation 69 | - (id)init __attribute__(( 70 | unavailable("init is not a supported initializer for this class."))); 71 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPair.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // A class to hold a key and value. 31 | @interface RTCPair : NSObject 32 | 33 | @property(nonatomic, strong, readonly) NSString *key; 34 | @property(nonatomic, strong, readonly) NSString *value; 35 | 36 | // Initialize a RTCPair object with a key and value. 37 | - (id)initWithKey:(NSString *)key value:(NSString *)value; 38 | 39 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 40 | // Disallow init and don't add to documentation 41 | - (id)init __attribute__( 42 | (unavailable("init is not a supported initializer for this class."))); 43 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | #import "RTCTypes.h" 31 | 32 | @class RTCDataChannel; 33 | @class RTCICECandidate; 34 | @class RTCMediaStream; 35 | @class RTCPeerConnection; 36 | 37 | // RTCPeerConnectionDelegate is a protocol for an object that must be 38 | // implemented to get messages from PeerConnection. 39 | @protocol RTCPeerConnectionDelegate 40 | 41 | // Triggered when the SignalingState changed. 42 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 43 | signalingStateChanged:(RTCSignalingState)stateChanged; 44 | 45 | // Triggered when media is received on a new stream from remote peer. 46 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 47 | addedStream:(RTCMediaStream *)stream; 48 | 49 | // Triggered when a remote peer close a stream. 50 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 51 | removedStream:(RTCMediaStream *)stream; 52 | 53 | // Triggered when renegotiation is needed, for example the ICE has restarted. 54 | - (void)peerConnectionOnRenegotiationNeeded:(RTCPeerConnection *)peerConnection; 55 | 56 | // Called any time the ICEConnectionState changes. 57 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 58 | iceConnectionChanged:(RTCICEConnectionState)newState; 59 | 60 | // Called any time the ICEGatheringState changes. 61 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 62 | iceGatheringChanged:(RTCICEGatheringState)newState; 63 | 64 | // New Ice candidate have been found. 65 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 66 | gotICECandidate:(RTCICECandidate *)candidate; 67 | 68 | // New data channel has been opened. 69 | - (void)peerConnection:(RTCPeerConnection*)peerConnection 70 | didOpenDataChannel:(RTCDataChannel*)dataChannel; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | @class RTCAudioTrack; 31 | @class RTCConfiguration; 32 | @class RTCMediaConstraints; 33 | @class RTCMediaStream; 34 | @class RTCPeerConnection; 35 | @class RTCVideoCapturer; 36 | @class RTCVideoSource; 37 | @class RTCVideoTrack; 38 | @protocol RTCPeerConnectionDelegate; 39 | 40 | // RTCPeerConnectionFactory is an ObjectiveC wrapper for PeerConnectionFactory. 41 | // It is the main entry point to the PeerConnection API for clients. 42 | @interface RTCPeerConnectionFactory : NSObject 43 | 44 | // Initialize & de-initialize the SSL subsystem. Failure is fatal. 45 | + (void)initializeSSL; 46 | + (void)deinitializeSSL; 47 | 48 | // Create an RTCPeerConnection object. RTCPeerConnectionFactory will create 49 | // required libjingle threads, socket and network manager factory classes for 50 | // networking. 51 | - (RTCPeerConnection *) 52 | peerConnectionWithICEServers:(NSArray *)servers 53 | constraints:(RTCMediaConstraints *)constraints 54 | delegate:(id)delegate; 55 | 56 | // Creates a peer connection using the default port allocator factory and identity service. 57 | - (RTCPeerConnection *)peerConnectionWithConfiguration:(RTCConfiguration *)configuration 58 | constraints:(RTCMediaConstraints *)constraints 59 | delegate:(id)delegate; 60 | 61 | // Create an RTCMediaStream named |label|. 62 | - (RTCMediaStream *)mediaStreamWithLabel:(NSString *)label; 63 | 64 | // Creates a RTCVideoSource. The new source takes ownership of |capturer|. 65 | // |constraints| decides video resolution and frame rate but can be NULL. 66 | - (RTCVideoSource *)videoSourceWithCapturer:(RTCVideoCapturer *)capturer 67 | constraints:(RTCMediaConstraints *)constraints; 68 | 69 | // Creates a new local VideoTrack. The same |source| can be used in several 70 | // tracks. 71 | - (RTCVideoTrack *)videoTrackWithID:(NSString *)videoId 72 | source:(RTCVideoSource *)source; 73 | 74 | // Creates an new AudioTrack. 75 | - (RTCAudioTrack *)audioTrackWithID:(NSString *)audioId; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCPeerConnectionInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2015 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | // See talk/app/webrtc/peerconnectioninterface.h. 29 | 30 | #import 31 | 32 | typedef NS_ENUM(NSInteger, RTCIceTransportsType) { 33 | kRTCIceTransportsTypeNone, 34 | kRTCIceTransportsTypeRelay, 35 | kRTCIceTransportsTypeNoHost, 36 | kRTCIceTransportsTypeAll, 37 | }; 38 | 39 | // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-08#section-4.1.1 40 | typedef NS_ENUM(NSInteger, RTCBundlePolicy) { 41 | kRTCBundlePolicyBalanced, 42 | kRTCBundlePolicyMaxBundle, 43 | kRTCBundlePolicyMaxCompat, 44 | }; 45 | 46 | // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-09#section-4.1.1 47 | typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) { 48 | kRTCRtcpMuxPolicyNegotiate, 49 | kRTCRtcpMuxPolicyRequire, 50 | }; 51 | 52 | typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) { 53 | kRTCTcpCandidatePolicyEnabled, 54 | kRTCTcpCandidatePolicyDisabled, 55 | }; 56 | 57 | // Configuration object used for creating a peer connection. 58 | @interface RTCConfiguration : NSObject 59 | 60 | @property(nonatomic, assign) RTCIceTransportsType iceTransportsType; 61 | @property(nonatomic, copy) NSArray *iceServers; 62 | @property(nonatomic, assign) RTCBundlePolicy bundlePolicy; 63 | @property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy; 64 | @property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy; 65 | @property(nonatomic, assign) int audioJitterBufferMaxPackets; 66 | @property(nonatomic, assign) int iceConnectionReceivingTimeout; 67 | 68 | - (instancetype)initWithIceTransportsType:(RTCIceTransportsType)iceTransportsType 69 | bundlePolicy:(RTCBundlePolicy)bundlePolicy 70 | rtcpMuxPolicy:(RTCRtcpMuxPolicy)rtcpMuxPolicy 71 | tcpCandidatePolicy:(RTCTcpCandidatePolicy)tcpCandidatePolicy 72 | audioJitterBufferMaxPackets:(int)audioJitterBufferMaxPackets 73 | iceConnectionReceivingTimeout:(int)iceConnectionReceivingTimeout; 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCSessionDescription.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // Description of an RFC 4566 Session. 31 | // RTCSessionDescription is an ObjectiveC wrapper for 32 | // SessionDescriptionInterface. 33 | @interface RTCSessionDescription : NSObject 34 | 35 | // The SDP description. 36 | @property(nonatomic, copy, readonly) NSString *description; 37 | 38 | // The session type. 39 | @property(nonatomic, copy, readonly) NSString *type; 40 | 41 | - (id)initWithType:(NSString *)type sdp:(NSString *)sdp; 42 | 43 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 44 | // Disallow init and don't add to documentation 45 | - (id)init __attribute__( 46 | (unavailable("init is not a supported initializer for this class."))); 47 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 48 | 49 | @end 50 | 51 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCSessionDescriptionDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | @class RTCPeerConnection; 31 | @class RTCSessionDescription; 32 | 33 | extern NSString* const kRTCSessionDescriptionDelegateErrorDomain; 34 | extern int const kRTCSessionDescriptionDelegateErrorCode; 35 | 36 | // RTCSessionDescriptionDelegate is a protocol for listening to callback 37 | // messages when RTCSessionDescriptions are created or set. 38 | @protocol RTCSessionDescriptionDelegate 39 | 40 | // Called when creating a session. 41 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 42 | didCreateSessionDescription:(RTCSessionDescription *)sdp 43 | error:(NSError *)error; 44 | 45 | // Called when setting a local or remote description. 46 | - (void)peerConnection:(RTCPeerConnection *)peerConnection 47 | didSetSessionDescriptionWithError:(NSError *)error; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCStatsDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | @class RTCPeerConnection; 31 | 32 | // RTCSessionDescriptionDelegate is a protocol for receiving statistic 33 | // reports from RTCPeerConnection. 34 | @protocol RTCStatsDelegate 35 | 36 | - (void)peerConnection:(RTCPeerConnection*)peerConnection 37 | didGetStats:(NSArray*)stats; // NSArray of RTCStatsReport*. 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCStatsReport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2014 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // ObjectiveC friendly wrapper around a StatsReport object. 31 | // See talk/app/webrtc/statsypes.h 32 | @interface RTCStatsReport : NSObject 33 | 34 | @property(nonatomic, readonly) NSString* reportId; 35 | @property(nonatomic, readonly) NSString* type; 36 | @property(nonatomic, readonly) CFTimeInterval timestamp; 37 | @property(nonatomic, readonly) NSArray* values; // NSArray of RTCPair*. 38 | 39 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 40 | // Disallow init and don't add to documentation 41 | - (id)init __attribute__(( 42 | unavailable("init is not a supported initializer for this class."))); 43 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | // Enums that are common to the ObjectiveC version of the PeerConnection API. 29 | 30 | // RTCICEConnectionState correspond to the states in webrtc::ICEConnectionState. 31 | typedef enum { 32 | RTCICEConnectionNew, 33 | RTCICEConnectionChecking, 34 | RTCICEConnectionConnected, 35 | RTCICEConnectionCompleted, 36 | RTCICEConnectionFailed, 37 | RTCICEConnectionDisconnected, 38 | RTCICEConnectionClosed, 39 | RTCICEConnectionMax, 40 | } RTCICEConnectionState; 41 | 42 | // RTCICEGatheringState the states in webrtc::ICEGatheringState. 43 | typedef enum { 44 | RTCICEGatheringNew, 45 | RTCICEGatheringGathering, 46 | RTCICEGatheringComplete, 47 | } RTCICEGatheringState; 48 | 49 | // RTCSignalingState correspond to the states in webrtc::SignalingState. 50 | typedef enum { 51 | RTCSignalingStable, 52 | RTCSignalingHaveLocalOffer, 53 | RTCSignalingHaveLocalPrAnswer, 54 | RTCSignalingHaveRemoteOffer, 55 | RTCSignalingHaveRemotePrAnswer, 56 | RTCSignalingClosed, 57 | } RTCSignalingState; 58 | 59 | // RTCStatsOutputLevel correspond to webrtc::StatsOutputLevel 60 | typedef enum { 61 | RTCStatsOutputLevelStandard, 62 | RTCStatsOutputLevelDebug, 63 | } RTCStatsOutputLevel; 64 | 65 | // RTCSourceState corresponds to the states in webrtc::SourceState. 66 | typedef enum { 67 | RTCSourceStateInitializing, 68 | RTCSourceStateLive, 69 | RTCSourceStateEnded, 70 | RTCSourceStateMuted, 71 | } RTCSourceState; 72 | 73 | // RTCTrackState corresponds to the states in webrtc::TrackState. 74 | typedef enum { 75 | RTCTrackStateInitializing, 76 | RTCTrackStateLive, 77 | RTCTrackStateEnded, 78 | RTCTrackStateFailed, 79 | } RTCTrackState; 80 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoCapturer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | 30 | // RTCVideoCapturer is an ObjectiveC wrapper for VideoCapturerInterface. 31 | @interface RTCVideoCapturer : NSObject 32 | 33 | // Create a new video capturer using the specified device. 34 | + (RTCVideoCapturer *)capturerWithDeviceName:(NSString *)deviceName; 35 | 36 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 37 | // Disallow init and don't add to documentation 38 | - (id)init __attribute__( 39 | (unavailable("init is not a supported initializer for this class."))); 40 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoRenderer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | #if TARGET_OS_IPHONE 30 | #import 31 | #endif 32 | 33 | @class RTCI420Frame; 34 | 35 | @protocol RTCVideoRenderer 36 | 37 | // The size of the frame. 38 | - (void)setSize:(CGSize)size; 39 | 40 | // The frame to be displayed. 41 | - (void)renderFrame:(RTCI420Frame*)frame; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCMediaSource.h" 29 | 30 | // RTCVideoSource is an ObjectiveC wrapper for VideoSourceInterface. 31 | @interface RTCVideoSource : RTCMediaSource 32 | 33 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 34 | // Disallow init and don't add to documentation 35 | - (id)init __attribute__( 36 | (unavailable("init is not a supported initializer for this class."))); 37 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/Headers/RTCVideoTrack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libjingle 3 | * Copyright 2013 Google Inc. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "RTCMediaStreamTrack.h" 29 | 30 | @protocol RTCVideoRenderer; 31 | @class RTCPeerConnectionFactory; 32 | @class RTCVideoSource; 33 | 34 | // RTCVideoTrack is an ObjectiveC wrapper for VideoTrackInterface. 35 | @interface RTCVideoTrack : RTCMediaStreamTrack 36 | 37 | @property(nonatomic, readonly) RTCVideoSource* source; 38 | 39 | - (instancetype)initWithFactory:(RTCPeerConnectionFactory*)factory 40 | source:(RTCVideoSource*)source 41 | trackId:(NSString*)trackId; 42 | 43 | // Register a renderer that will render all frames received on this track. 44 | - (void)addRenderer:(id)renderer; 45 | 46 | // Deregister a renderer. 47 | - (void)removeRenderer:(id)renderer; 48 | 49 | #ifndef DOXYGEN_SHOULD_SKIP_THIS 50 | // Disallow init and don't add to documentation 51 | - (id)init __attribute__( 52 | (unavailable("init is not a supported initializer for this class."))); 53 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Pods/libjingle_peerconnection/libjingle_peerconnection/libWebRTC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/Pods/libjingle_peerconnection/libjingle_peerconnection/libWebRTC.a -------------------------------------------------------------------------------- /screenshots/screenshots.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ISBX/apprtc-ios/bdd8f2b173145894144f98010d4bf515c7911147/screenshots/screenshots.jpg --------------------------------------------------------------------------------