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.

39 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 "RTCRtcpParameters+Private.h"
  11. #import "helpers/NSString+StdString.h"
  12. @implementation RTCRtcpParameters
  13. @synthesize cname = _cname;
  14. @synthesize isReducedSize = _isReducedSize;
  15. - (instancetype)init {
  16. return [super init];
  17. }
  18. - (instancetype)initWithNativeParameters:(const webrtc::RtcpParameters &)nativeParameters {
  19. if (self = [self init]) {
  20. _cname = [NSString stringForStdString:nativeParameters.cname];
  21. _isReducedSize = nativeParameters.reduced_size;
  22. }
  23. return self;
  24. }
  25. - (webrtc::RtcpParameters)nativeParameters {
  26. webrtc::RtcpParameters parameters;
  27. parameters.cname = [NSString stdStringForString:_cname];
  28. parameters.reduced_size = _isReducedSize;
  29. return parameters;
  30. }
  31. @end