Commit graph

8 commits

Author SHA1 Message Date
Danil Chapovalov
9e09a1f327 Replace Thread::Invoke with Thread::BlockingCall
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed

Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
2022-09-09 10:44:17 +00:00
Byoungchan Lee
2b46a5870b Add proxy access to some methods in Obj-C SDK
Most calls to C++ PeerConnection and related classes are proxied
to internal threads in WebRTC. However, there is no such thing
in the Obj-C SDK.
It would be nice to proxy methods in the Obj-C SDK as well.

RTCMediaStream and RTCVideoTrack have NSMutableArray members,
and it can throw NSRangeException when it has race conditions,
so that it would be a good starting point.

Also, remove some NSAsserts as its condition isn't a fatal error,
and it doesn't affect the production already.

Bug: None
Change-Id: I10b44a9c773d62a5c04c254986733a6b67d51617
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262840
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37283}
2022-06-21 07:02:08 +00:00
Artem Titov
63ee39d0be Revert "Add a prefix for objc category."
This reverts commit 181ea6e414.

Reason for revert: Breaks downstream project. Kári will help to land it next week.

Original change's description:
> Add a prefix for objc category.
>
> According to the Google Objective-C style [1], category names should
> start with an appropriate prefix. WebRTC has some category definitions
> for system interfaces, but it doesn't use prefixes.
>
> $ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
> 0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
> 0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
> 0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
> 0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView
>
> To avoid conflicts, prefix the names and methods of those categories.
> Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
> it is not used by any other files.
>
> [1] https://google.github.io/styleguide/objcguide.html#category-naming
>
> Bug: webrtc:13884
> Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36880}

Bug: webrtc:13884
Change-Id: I85257088e4a3a62e01ff925ab5e77af83b078ef3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262420
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36885}
2022-05-13 14:47:54 +00:00
Byoungchan Lee
181ea6e414 Add a prefix for objc category.
According to the Google Objective-C style [1], category names should
start with an appropriate prefix. WebRTC has some category definitions
for system interfaces, but it doesn't use prefixes.

$ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView

To avoid conflicts, prefix the names and methods of those categories.
Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
it is not used by any other files.

[1] https://google.github.io/styleguide/objcguide.html#category-naming

Bug: webrtc:13884
Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36880}
2022-05-13 13:20:34 +00:00
Niels Möller
03486fc197 Update sdk/ to not use implicit conversion from scoped_refptr<T> to T*.
Bug: webrtc:13464
Change-Id: I6944106ddc99c043825fad077bfcedc051c67d8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259772
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36682}
2022-04-28 08:10:15 +00:00
Niels Möller
ac0d18341d Prepare for deleting implicit conversion from raw pointer to scoped_refptr.
Updates all webrtc code, to have a small followup cl to just add the
"explicit" keyword. Patchset #24 passed all webrtc tests, with explicit.

Bug: webrtc:13464
Change-Id: I39863d3752f73209b531120f66916dc9177bf63a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242363
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35718}
2022-01-18 08:22:15 +00:00
Mirko Bonadei
a81e9c82fc Wrap WebRTC OBJC API types with RTC_OBJC_TYPE.
This CL introduced 2 new macros that affect the WebRTC OBJC API symbols:

- RTC_OBJC_TYPE_PREFIX:
  Macro used to prepend a prefix to the API types that are exported with
  RTC_OBJC_EXPORT.

  Clients can patch the definition of this macro locally and build
  WebRTC.framework with their own prefix in case symbol clashing is a
  problem.

  This macro must only be defined by changing the value in
  sdk/objc/base/RTCMacros.h  and not on via compiler flag to ensure
  it has a unique value.

- RCT_OBJC_TYPE:
  Macro used internally to reference API types. Declaring an API type
  without using this macro will not include the declared type in the
  set of types that will be affected by the configurable
  RTC_OBJC_TYPE_PREFIX.

Manual changes:
https://webrtc-review.googlesource.com/c/src/+/173781/5..10

The auto-generated changes in PS#5 have been done with:
https://webrtc-review.googlesource.com/c/src/+/174061.

Bug: None
Change-Id: I0d54ca94db764fb3b6cb4365873f79e14cd879b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31153}
2020-05-04 15:01:26 +00:00
Anders Carlsson
7bca8ca4e2 Obj-C SDK Cleanup
This CL separates the files under sdk/objc into logical directories, replacing
the previous file layout under Framework/.

A long term goal is to have some system set up to generate the files under
sdk/objc/api (the PeerConnection API wrappers) from the C++ code. In the shorter
term the goal is to abstract out shared concepts from these classes in order to
make them as uniform as possible.

The separation into base/, components/, and helpers/ are to differentiate between
the base layer's common protocols, various utilities and the actual platform
specific components.

The old directory layout that resembled a framework's internal layout is not
necessary, since it is generated by the framework target when building it.

Bug: webrtc:9627
Change-Id: Ib084fd83f050ae980649ca99e841f4fb0580bd8f
Reviewed-on: https://webrtc-review.googlesource.com/94142
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24493}
2018-08-30 10:42:41 +00:00
Renamed from sdk/objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm (Browse further)