You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright 2018 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #import "RTCRtpHeaderExtension+Private.h"
  11. #import "helpers/NSString+StdString.h"
  12. @implementation RTCRtpHeaderExtension
  13. @synthesize uri = _uri;
  14. @synthesize id = _id;
  15. @synthesize encrypted = _encrypted;
  16. - (instancetype)init {
  17. return [super init];
  18. }
  19. - (instancetype)initWithNativeParameters:(const webrtc::RtpExtension &)nativeParameters {
  20. if (self = [self init]) {
  21. _uri = [NSString stringForStdString:nativeParameters.uri];
  22. _id = nativeParameters.id;
  23. _encrypted = nativeParameters.encrypt;
  24. }
  25. return self;
  26. }
  27. - (webrtc::RtpExtension)nativeParameters {
  28. webrtc::RtpExtension extension;
  29. extension.uri = [NSString stdStringForString:_uri];
  30. extension.id = _id;
  31. extension.encrypt = _encrypted;
  32. return extension;
  33. }
  34. @end