Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: talk/examples/objc/AppRTCDemo/ARDAppClient.m

Issue 1187573004: iOS HW H264 support. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Move unittest file. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/examples/objc/AppRTCDemo/ARDAppClient.m
diff --git a/talk/examples/objc/AppRTCDemo/ARDAppClient.m b/talk/examples/objc/AppRTCDemo/ARDAppClient.m
index 0f3c423c42cf9100681b2a9eb6faa34187b8258a..ac99ca29971d1b8f3c028786bc5c872fbc6549c2 100644
--- a/talk/examples/objc/AppRTCDemo/ARDAppClient.m
+++ b/talk/examples/objc/AppRTCDemo/ARDAppClient.m
@@ -42,6 +42,7 @@
#import "ARDCEODTURNClient.h"
#import "ARDJoinResponse.h"
#import "ARDMessageResponse.h"
+#import "ARDSDPUtils.h"
#import "ARDSignalingMessage.h"
#import "ARDUtilities.h"
#import "ARDWebSocketChannel.h"
@@ -344,10 +345,15 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
[_delegate appClient:self didError:sdpError];
return;
}
+ // Prefer H264 if available.
+ RTCSessionDescription *sdpPreferringH264 =
+ [ARDSDPUtils descriptionForDescription:sdp
+ preferredVideoCodec:@"H264"];
[_peerConnection setLocalDescriptionWithDelegate:self
- sessionDescription:sdp];
+ sessionDescription:sdpPreferringH264];
ARDSessionDescriptionMessage *message =
- [[ARDSessionDescriptionMessage alloc] initWithDescription:sdp];
+ [[ARDSessionDescriptionMessage alloc]
+ initWithDescription:sdpPreferringH264];
[self sendSignalingMessage:message];
});
}
@@ -441,8 +447,12 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
ARDSessionDescriptionMessage *sdpMessage =
(ARDSessionDescriptionMessage *)message;
RTCSessionDescription *description = sdpMessage.sessionDescription;
+ // Prefer H264 if available.
+ RTCSessionDescription *sdpPreferringH264 =
+ [ARDSDPUtils descriptionForDescription:description
+ preferredVideoCodec:@"H264"];
[_peerConnection setRemoteDescriptionWithDelegate:self
- sessionDescription:description];
+ sessionDescription:sdpPreferringH264];
break;
}
case kARDSignalingMessageTypeCandidate: {

Powered by Google App Engine
This is Rietveld 408576698