Changes name of RtpTransceiverInit's stream_labels to stream_ids.

The naming convention according to the spec is stream id, not stream
labels.Changing things now to be spec compliant, before it is widely
used. This also includes changes to objective C wrapper code to be in
sync with the change.

Bug: webrtc:7932
Change-Id: I5705e6d8a647aaeed860316466a7320132f24b00
Reviewed-on: https://webrtc-review.googlesource.com/59301
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22316}
This commit is contained in:
Seth Hampson
2018-03-06 09:35:56 -08:00
committed by Commit Bot
parent 8e20f17d1d
commit 513449eab9
12 changed files with 26 additions and 29 deletions

View File

@ -43,7 +43,7 @@
}
- (NSString *)streamId {
return [NSString stringForStdString:_nativeMediaStream->label()];
return [NSString stringForStdString:_nativeMediaStream->id()];
}
- (void)addAudioTrack:(RTCAudioTrack *)audioTrack {

View File

@ -367,14 +367,13 @@ void PeerConnectionDelegateAdapter::OnAddTrack(
[_localStreams removeObject:stream];
}
- (RTCRtpSender *)addTrack:(RTCMediaStreamTrack *)track
streamLabels:(NSArray<NSString *> *)streamLabels {
std::vector<std::string> nativeStreamLabels;
for (NSString *label in streamLabels) {
nativeStreamLabels.push_back([label UTF8String]);
- (RTCRtpSender *)addTrack:(RTCMediaStreamTrack *)track streamIds:(NSArray<NSString *> *)streamIds {
std::vector<std::string> nativeStreamIds;
for (NSString *streamId in streamIds) {
nativeStreamIds.push_back([streamId UTF8String]);
}
webrtc::RTCErrorOr<rtc::scoped_refptr<webrtc::RtpSenderInterface>> nativeSenderOrError =
_peerConnection->AddTrack(track.nativeTrack, nativeStreamLabels);
_peerConnection->AddTrack(track.nativeTrack, nativeStreamIds);
if (!nativeSenderOrError.ok()) {
RTCLogError(@"Failed to add track %@: %s", track, nativeSenderOrError.error().message());
return nil;

View File

@ -20,7 +20,7 @@
@implementation RTCRtpTransceiverInit
@synthesize direction = _direction;
@synthesize streamLabels = _streamLabels;
@synthesize streamIds = _streamIds;
@synthesize sendEncodings = _sendEncodings;
- (instancetype)init {
@ -33,8 +33,8 @@
- (webrtc::RtpTransceiverInit)nativeInit {
webrtc::RtpTransceiverInit init;
init.direction = [RTCRtpTransceiver nativeRtpTransceiverDirectionFromDirection:_direction];
for (NSString *streamLabel in _streamLabels) {
init.stream_labels.push_back([streamLabel UTF8String]);
for (NSString *streamId in _streamIds) {
init.stream_ids.push_back([streamId UTF8String]);
}
for (RTCRtpEncodingParameters *sendEncoding in _sendEncodings) {
init.send_encodings.push_back(sendEncoding.nativeParameters);