Commit graph

6 commits

Author SHA1 Message Date
Tommi
a50a81a150 [DataChannelInterface] Introduce DataChannelInterface::SendAsync()
One problem with the existing Send() method is that it has a return
value that is problematic for a fully async implementation.

A second problem with Send() is that the return value is bool and not
RTCError (webrtc:13289), which is why OnSendComplete() uses RTCError.

Also, start deprecating `bool Send()` in favor of `void SendAsync()` and
adding `network_safety_` flag for posting async operations to the
network thread. This flag also takes over from the
`connected_to_transport_` which can now be removed.

Bug: webrtc:11547, webrtc:13289
Change-Id: I87bbc7e9b964a52684bdfe0e6ebc5230be254e8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299760
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39817}
2023-04-11 19:46:36 +00:00
Jack Smith
adf35a359e Extend mocks for public types
Extends the mocks for rtpreceiver rtpsender and videotrack. This change
allows the external HangoutsKit client to remove its own mocks of rtc
types.

Bug: none
Change-Id: I8ba1752fe7633f9e0bba264a1279f74cc1368a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jack Smith <jackdsmith@google.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38782}
2022-11-30 19:01:40 +00:00
Florent Castelli
123a0ed604 Revert "Add checks for api/test mocks to make sure they're complete"
This reverts commit e87ec28b80.

Reason for revert: Breaks upstream.

Original change's description:
> Add checks for api/test mocks to make sure they're complete
>
> Also unifies the mock inheritance if they inherited from a ref counted
> interface:
>  - it should only inherit from the interface
>  - it should use make_ref_counted
>
> Bug: webrtc:14594
> Change-Id: I7b0514b632ccd0798028b50f19812ac0a196e13c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262423
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38602}

Bug: webrtc:14594
Change-Id: I9f2d9c3656b43e3006ec03ae7d792d0a53f47ebd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282940
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38604}
2022-11-10 13:33:59 +00:00
Florent Castelli
e87ec28b80 Add checks for api/test mocks to make sure they're complete
Also unifies the mock inheritance if they inherited from a ref counted
interface:
 - it should only inherit from the interface
 - it should use make_ref_counted

Bug: webrtc:14594
Change-Id: I7b0514b632ccd0798028b50f19812ac0a196e13c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262423
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38602}
2022-11-10 12:47:31 +00:00
Niels Möller
961f382458 Update api/ to not use implicit T* --> scoped_refptr<T> conversion
Bug: webrtc:13464
Change-Id: I5dc292fefd27bfd43574f3e0c63c0e1da6dddcae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244091
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35667}
2022-01-12 11:26:05 +00:00
Steve Anton
c49c7d2644 Add publicly visible mock for DataChannelInterface
Bug: webrtc:11642
Change-Id: I20fc57122fc29602028f2cc2fb27a0122117f855
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191840
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32562}
2020-11-05 22:28:48 +00:00