Commit graph

33 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
Niels Möller
105711e9ad Move rtc::make_ref_counted to api/
Bug: webrtc:12701
Change-Id: If49095b101c1a1763c2a44a0284c0d670cce953f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265390
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37219}
2022-06-15 09:47:38 +00:00
Niels Möller
c397fc62d8 Use string_view to pass track ids to constructors
Bug: webrtc:13579
Change-Id: Icbd08d5fba9d150295675d730b7261d23992488c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264441
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37035}
2022-05-30 10:28:57 +00:00
Niels Möller
769de49937 Update VideoTrack::Create to use rtc::scoped_refptr.
Bug: webrtc:13464
Change-Id: I6508fbede2f447f8c0c9b37556d37e7fc2ccb744
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252441
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36277}
2022-03-21 10:38:52 +00:00
Tomas Gunnarsson
0d5ce62d01 Make RtpTransceiver not inherit from RefCountedObject.
Also update API proxy Create() factory functions to accept the inner
reference counted object via scoped_refptr instead of a raw pointer.
This is to avoid accidentally creating and deleting an object when
passing an inner object to a proxy class.

Consider something like:
  auto proxy = MyProxy::Create(
      signaling_thread(), make_ref_counted<Foo>());

Bug: webrtc:13464, webrtc:12701
Change-Id: I55ccfff43bbc164a5e909b2c9020e306ebb09075
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256010
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36261}
2022-03-18 16:17:24 +00:00
Harald Alvestrand
c24a2189d7 Update IWYU tool with a mapping file
Also apply IWYU to all .cc files in pc/, and correct BUILD file to match.
Note: Some files came out wrong when iwyu was applied. These are not included.

Bug: none
Change-Id: Ib5ea46b8fcc505414d0447cca7218ad3afc2e321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36064}
2022-02-24 11:05:06 +00:00
Tommi
34cd1d36fa Reland "Use internal() in VideoTrack when invoking the source."
This is a reland of 962bf18961

Original change's description:
> Use internal() in VideoTrack when invoking the source.
>
> This skips going through the proxy and potentially hide a thread hop
> should a regression occur.
>
> This CL contains a part of a previously reviewed, landed, reverted,
> relanded and re-reverted CL:
> https://webrtc-review.googlesource.com/c/src/+/250180
>
> Bug: webrtc:13540
> Change-Id: If098f5c04a263547fb53f44e9f9738b8e941a294
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251861
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36026}

Bug: webrtc:13540
Change-Id: I00e998be6614b1a478ddf02110b3a2d67bd42274
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252043
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36053}
2022-02-22 23:02:12 +00:00
Tommi
09f5713a6b Reland "Move VideoTrackSourceProxy creation into VideoTrack."
This is a reland of 4bc7223cf0

Original change's description:
> Move VideoTrackSourceProxy creation into VideoTrack.
>
> This CL contains a part of a previously reviewed, landed, reverted,
> relanded and re-reverted CL:
> https://webrtc-review.googlesource.com/c/src/+/250180
>
> Bug: webrtc:13540
> Change-Id: Id6df8da5ff61e3ec90d0b3f3d828e8f670d4931b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251860
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36025}

Bug: webrtc:13540
Change-Id: I81df66daa40c59ab0b8677d7065f1703f071a10a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252041
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36047}
2022-02-22 11:14:15 +00:00
Sergey Silkin
1f6e4308ab Revert "Move VideoTrackSourceProxy creation into VideoTrack."
This reverts commit 4bc7223cf0.

Reason for revert: Regressions in PC tests https://crbug.com/webrtc/13697

Original change's description:
> Move VideoTrackSourceProxy creation into VideoTrack.
>
> This CL contains a part of a previously reviewed, landed, reverted,
> relanded and re-reverted CL:
> https://webrtc-review.googlesource.com/c/src/+/250180
>
> Bug: webrtc:13540
> Change-Id: Id6df8da5ff61e3ec90d0b3f3d828e8f670d4931b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251860
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36025}

Bug: webrtc:13540
Change-Id: Ibae8c1d39fa4d71aafd9666b66e6abc8eb8fddb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251980
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36039}
2022-02-21 18:22:24 +00:00
Sergey Silkin
153c9e5107 Revert "Use internal() in VideoTrack when invoking the source."
This reverts commit 962bf18961.

Reason for revert: Regressions in PC tests https://crbug.com/webrtc/13697

Original change's description:
> Use internal() in VideoTrack when invoking the source.
>
> This skips going through the proxy and potentially hide a thread hop
> should a regression occur.
>
> This CL contains a part of a previously reviewed, landed, reverted,
> relanded and re-reverted CL:
> https://webrtc-review.googlesource.com/c/src/+/250180
>
> Bug: webrtc:13540
> Change-Id: If098f5c04a263547fb53f44e9f9738b8e941a294
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251861
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36026}

Bug: webrtc:13540
Change-Id: Iea76094aedda91271154f89c356b140c95717976
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251981
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36035}
2022-02-21 13:31:24 +00:00
Tommi
962bf18961 Use internal() in VideoTrack when invoking the source.
This skips going through the proxy and potentially hide a thread hop
should a regression occur.

This CL contains a part of a previously reviewed, landed, reverted,
relanded and re-reverted CL:
https://webrtc-review.googlesource.com/c/src/+/250180

Bug: webrtc:13540
Change-Id: If098f5c04a263547fb53f44e9f9738b8e941a294
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251861
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36026}
2022-02-17 14:25:50 +00:00
Tommi
4bc7223cf0 Move VideoTrackSourceProxy creation into VideoTrack.
This CL contains a part of a previously reviewed, landed, reverted,
relanded and re-reverted CL:
https://webrtc-review.googlesource.com/c/src/+/250180

Bug: webrtc:13540
Change-Id: Id6df8da5ff61e3ec90d0b3f3d828e8f670d4931b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36025}
2022-02-17 13:44:51 +00:00
Tomas Gunnarsson
dfd69c2210 Move VideoTrack's content_hint property to the signaling thread.
Bug: webrtc:13673, webrtc:13681
Change-Id: I06810338bf5e44665e4d005d35636e9a98b1bd0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251684
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36010}
2022-02-15 21:55:59 +00:00
Tomas Gunnarsson
250c31df00 Move enabled() methods for VideoTrack over to signaling
Bug: webrtc:13680
Change-Id: I0faf0d03541fce2b93c03857e01e85588389ccd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251720
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36009}
2022-02-15 21:51:15 +00:00
Tomas Gunnarsson
e7b4c137cc Revert "Reland "Use non-proxied source object in VideoTrack.""
This reverts commit 1158bff15f.

Reason for revert: Downstream issues unresolved (2nd of two reverts)

Original change's description:
> Reland "Use non-proxied source object in VideoTrack."
>
> This is a reland of 3eb29c1235
>
> This reland doesn't contain the AudioTrack changes (see original
> description) that got triggered in some cases and needs to be
> addressed separately.
>
> Another change in this re-land is that instead of the `state` property
> of the VideoTrack be marshalled to the signaling thread, it's readable
> from the calling thread. Previously this was marshalled to the worker
> and the original changed that to the signaling thread (same as for
> AudioTrack) - but in case that's causing downstream problems this reland
> uses BYPASS_PROXY_CONSTMETHOD0 for the `state()` accessor of the
> VideoTrack proxy.
>
> Original change's description:
> > Use non-proxied source object in VideoTrack.
> >
> > Use the internal representation of the video source object from the
> > track. Before there were implicit thread hops due to use of the proxy.
> >
> > Also, override AudioTrack's enabled methods to enforce thread
> > expectations.
> >
> > Bug: webrtc:13540
> > Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35911}
>
> Bug: webrtc:13540
> Change-Id: Icb3e165f07240ae10730a316d3a8a3b2b9167d82
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251387
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35979}

# Not skipping CQ checks because original CL landed > 1 day ago.

Using "No-Try" to not have to wait for the win chromium bot to unblock
(currently takes hours).

No-Try: true
Bug: webrtc:13540
Change-Id: I8f34536bf472a6d069344e84d889864f195c93f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251686
Reviewed-by: Christoffer Jansson <jansson@google.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35993}
2022-02-14 13:54:20 +00:00
Tomas Gunnarsson
97f8a5f7dd Revert partial revert, in order to do a full revert.
This reverts commit f342d6054a.
  or "Reland "Use non-proxied source object in VideoTrack.""

Reason for revert: Didn't resolve the downstream issues.

Original change's description:
> Revert "Reland "Use non-proxied source object in VideoTrack.""
>
> This reverts commit 1158bff15f.
>
> Reason for revert: This is a partial revert as we're tracking down
> the source of the downstream issues. This CL reverts the use of
> `internal()` for methods that relate to the source sink.
>
> Original change's description:
> > Reland "Use non-proxied source object in VideoTrack."
> >
> > This is a reland of 3eb29c1235
> >
> > This reland doesn't contain the AudioTrack changes (see original
> > description) that got triggered in some cases and needs to be
> > addressed separately.
> >
> > Another change in this re-land is that instead of the `state` property
> > of the VideoTrack be marshalled to the signaling thread, it's readable
> > from the calling thread. Previously this was marshalled to the worker
> > and the original changed that to the signaling thread (same as for
> > AudioTrack) - but in case that's causing downstream problems this reland
> > uses BYPASS_PROXY_CONSTMETHOD0 for the `state()` accessor of the
> > VideoTrack proxy.
> >
> > Original change's description:
> > > Use non-proxied source object in VideoTrack.
> > >
> > > Use the internal representation of the video source object from the
> > > track. Before there were implicit thread hops due to use of the proxy.
> > >
> > > Also, override AudioTrack's enabled methods to enforce thread
> > > expectations.
> > >
> > > Bug: webrtc:13540
> > > Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> > > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#35911}
> >
> > Bug: webrtc:13540
> > Change-Id: Icb3e165f07240ae10730a316d3a8a3b2b9167d82
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251387
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35979}
>
> TBR=tommi@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I4d8e3aced019215b97a6263cafa2a7488cd118be
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13540
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251661
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35983}

# Not skipping CQ checks because original CL landed > 1 day ago.

Using "no-try" since a follow-up revert is also needed to get the bots
to turn green.

No-try: true
Bug: webrtc:13540
Change-Id: I361fca6949c01200d9d706749e7e825eb5b4fc1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251685
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35991}
2022-02-14 12:35:10 +00:00
Tomas Gunnarsson
f342d6054a Revert "Reland "Use non-proxied source object in VideoTrack.""
This reverts commit 1158bff15f.

Reason for revert: This is a partial revert as we're tracking down
the source of the downstream issues. This CL reverts the use of
`internal()` for methods that relate to the source sink.

Original change's description:
> Reland "Use non-proxied source object in VideoTrack."
>
> This is a reland of 3eb29c1235
>
> This reland doesn't contain the AudioTrack changes (see original
> description) that got triggered in some cases and needs to be
> addressed separately.
>
> Another change in this re-land is that instead of the `state` property
> of the VideoTrack be marshalled to the signaling thread, it's readable
> from the calling thread. Previously this was marshalled to the worker
> and the original changed that to the signaling thread (same as for
> AudioTrack) - but in case that's causing downstream problems this reland
> uses BYPASS_PROXY_CONSTMETHOD0 for the `state()` accessor of the
> VideoTrack proxy.
>
> Original change's description:
> > Use non-proxied source object in VideoTrack.
> >
> > Use the internal representation of the video source object from the
> > track. Before there were implicit thread hops due to use of the proxy.
> >
> > Also, override AudioTrack's enabled methods to enforce thread
> > expectations.
> >
> > Bug: webrtc:13540
> > Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35911}
>
> Bug: webrtc:13540
> Change-Id: Icb3e165f07240ae10730a316d3a8a3b2b9167d82
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251387
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35979}

TBR=tommi@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I4d8e3aced019215b97a6263cafa2a7488cd118be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13540
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251661
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35983}
2022-02-12 16:28:55 +00:00
Tommi
1158bff15f Reland "Use non-proxied source object in VideoTrack."
This is a reland of 3eb29c1235

This reland doesn't contain the AudioTrack changes (see original
description) that got triggered in some cases and needs to be
addressed separately.

Another change in this re-land is that instead of the `state` property
of the VideoTrack be marshalled to the signaling thread, it's readable
from the calling thread. Previously this was marshalled to the worker
and the original changed that to the signaling thread (same as for
AudioTrack) - but in case that's causing downstream problems this reland
uses BYPASS_PROXY_CONSTMETHOD0 for the `state()` accessor of the
VideoTrack proxy.

Original change's description:
> Use non-proxied source object in VideoTrack.
>
> Use the internal representation of the video source object from the
> track. Before there were implicit thread hops due to use of the proxy.
>
> Also, override AudioTrack's enabled methods to enforce thread
> expectations.
>
> Bug: webrtc:13540
> Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35911}

Bug: webrtc:13540
Change-Id: Icb3e165f07240ae10730a316d3a8a3b2b9167d82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251387
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35979}
2022-02-11 16:03:14 +00:00
Tomas Gunnarsson
10bd1716fb Revert "Reland "Use non-proxied source object in VideoTrack.""
This reverts commit 2c47235b0e.

Reason for revert: Downstream issue still doesn't seem to be resolved.

Original change's description:
> Reland "Use non-proxied source object in VideoTrack."
>
> This is a reland of 3eb29c1235
>
> This reland doesn't contain the AudioTrack changes (see original
> description) that got triggered in some cases and needs to be
> addressed separately.
>
> Original change's description:
> > Use non-proxied source object in VideoTrack.
> >
> > Use the internal representation of the video source object from the
> > track. Before there were implicit thread hops due to use of the proxy.
> >
> > Also, override AudioTrack's enabled methods to enforce thread
> > expectations.
> >
> > Bug: webrtc:13540
> > Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35911}
>
> Bug: webrtc:13540
> Change-Id: I59997be174cc9278e3e5910d493efd5352e6de68
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250940
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35924}

TBR=tommi@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ib9a76db660c5d18203c13b4feaf5b47f56d7e930
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13540
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251082
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35930}
2022-02-07 12:21:44 +00:00
Tommi
2c47235b0e Reland "Use non-proxied source object in VideoTrack."
This is a reland of 3eb29c1235

This reland doesn't contain the AudioTrack changes (see original
description) that got triggered in some cases and needs to be
addressed separately.

Original change's description:
> Use non-proxied source object in VideoTrack.
>
> Use the internal representation of the video source object from the
> track. Before there were implicit thread hops due to use of the proxy.
>
> Also, override AudioTrack's enabled methods to enforce thread
> expectations.
>
> Bug: webrtc:13540
> Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35911}

Bug: webrtc:13540
Change-Id: I59997be174cc9278e3e5910d493efd5352e6de68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250940
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35924}
2022-02-07 08:15:43 +00:00
Artem Titarenko
5b5fa3b9c0 Revert "Use non-proxied source object in VideoTrack."
This reverts commit 3eb29c1235.

Reason for revert: Breaks downstream projects.

Original change's description:
> Use non-proxied source object in VideoTrack.
>
> Use the internal representation of the video source object from the
> track. Before there were implicit thread hops due to use of the proxy.
>
> Also, override AudioTrack's enabled methods to enforce thread
> expectations.
>
> Bug: webrtc:13540
> Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35911}

TBR=tommi@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I77395b21c0ef7f17992ae16d296b90bd51eac305
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13540
TBR: tommi@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250668
Auto-Submit: Artem Titarenko <artit@webrtc.org>
Owners-Override: Artem Titarenko <artit@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35917}
2022-02-04 21:26:31 +00:00
Tommi
3eb29c1235 Use non-proxied source object in VideoTrack.
Use the internal representation of the video source object from the
track. Before there were implicit thread hops due to use of the proxy.

Also, override AudioTrack's enabled methods to enforce thread
expectations.

Bug: webrtc:13540
Change-Id: I4bc7aca96d6fc24f31ade45e47f52599f1cc2f97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250180
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35911}
2022-02-04 16:41:22 +00:00
Markus Handell
dbef2bd276 ZeroHertzAdapterMode: RequestRefreshFrame through VideoTrack & proxy.
This CL continues on https://webrtc-review.googlesource.com/c/src/+/242361
to enable progression of RequestRefreshFrame calls in into
the stored VideoTrackSourceInterface.

go/rtc-0hz-present

Bug: chromium:1255737
Change-Id: I558e7a616b3369192c52f7211bbe41a4376b48c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242365
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35567}
2021-12-22 11:59:26 +00:00
Tommi
816134a8aa Reland "Fix race between enabled() and set_enabled() in VideoTrack."
This reverts commit 096ad02c02.

Reason for revert: Including a fix for the test issue.

Original change's description:
> Revert "Fix race between enabled() and set_enabled() in VideoTrack."
>
> This reverts commit 5ffefe9d2d.
>
> Reason for revert: Breaks Chromium Android browser tests on fyi bots.
>
> Original change's description:
> > Fix race between enabled() and set_enabled() in VideoTrack.
> >
> > Along the way I introduced VideoSourceBaseGuarded, which is equivalent
> > to VideoSourceBase except that it applies thread checks. I found that
> > it's easy to use VideoSourceBase incorrectly and in fact there appear
> > to be tests that do this.
> >
> > I made the source object const in VideoTrack, as it already was in
> > AudioTrack, and that allowed for making the GetSource() accessors
> > bypass the proxy thread hop and give the caller direct access.
> >
> > Bug: webrtc:12773, b/188139639, webrtc:12780
> > Change-Id: I022175c4239a1306ef54059c131d81411d5124fe
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219160
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34096}
>
> TBR=mbonadei@webrtc.org,tommi@webrtc.org,landrey@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I16323d459c76eb6a87cc602a0048f6ee01c81626
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:12773
> Bug: b/188139639
> Bug: webrtc:12780
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219637
> Reviewed-by: Evan Shrubsole <eshr@google.com>
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#34101}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:12773
Bug: b/188139639
Bug: webrtc:12780
Change-Id: Ib35fe15a6c43de8f286d60aff02b19df1ab76925
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219639
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34104}
2021-05-24 16:17:35 +00:00
Evan Shrubsole
096ad02c02 Revert "Fix race between enabled() and set_enabled() in VideoTrack."
This reverts commit 5ffefe9d2d.

Reason for revert: Breaks Chromium Android browser tests on fyi bots.

Original change's description:
> Fix race between enabled() and set_enabled() in VideoTrack.
>
> Along the way I introduced VideoSourceBaseGuarded, which is equivalent
> to VideoSourceBase except that it applies thread checks. I found that
> it's easy to use VideoSourceBase incorrectly and in fact there appear
> to be tests that do this.
>
> I made the source object const in VideoTrack, as it already was in
> AudioTrack, and that allowed for making the GetSource() accessors
> bypass the proxy thread hop and give the caller direct access.
>
> Bug: webrtc:12773, b/188139639, webrtc:12780
> Change-Id: I022175c4239a1306ef54059c131d81411d5124fe
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219160
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34096}

TBR=mbonadei@webrtc.org,tommi@webrtc.org,landrey@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I16323d459c76eb6a87cc602a0048f6ee01c81626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12773
Bug: b/188139639
Bug: webrtc:12780
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219637
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#34101}
2021-05-24 14:06:19 +00:00
Tommi
5ffefe9d2d Fix race between enabled() and set_enabled() in VideoTrack.
Along the way I introduced VideoSourceBaseGuarded, which is equivalent
to VideoSourceBase except that it applies thread checks. I found that
it's easy to use VideoSourceBase incorrectly and in fact there appear
to be tests that do this.

I made the source object const in VideoTrack, as it already was in
AudioTrack, and that allowed for making the GetSource() accessors
bypass the proxy thread hop and give the caller direct access.

Bug: webrtc:12773, b/188139639, webrtc:12780
Change-Id: I022175c4239a1306ef54059c131d81411d5124fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34096}
2021-05-24 09:13:56 +00:00
Tommi
87f7090fd9 Replace more instances of rtc::RefCountedObject with make_ref_counted.
This is essentially replacing `new rtc::RefCountedObject` with
`rtc::make_ref_counted` in many files. In a couple of places I
made minor tweaks to make things compile such as adding parenthesis
when they were missing.

Bug: webrtc:12701
Change-Id: I3828dbf3ee0eb0232f3a47067474484ac2f4aed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215973
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33852}
2021-04-27 17:01:59 +00:00
Artem Titov
d15a575ec3 Use SequenceChecker from public API
Bug: webrtc:12419
Change-Id: I00cca16a0ec70246156ba00b97aa7ae5ccbf5364
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205323
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33220}
2021-02-10 15:04:55 +00:00
Harald Alvestrand
5761e7b3ff Running apply-iwyu on ~all files in pc/
Bug: none
Change-Id: Ieebdfb743e691f7ae35e1aa354f68ce9e771064d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204381
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33105}
2021-01-29 16:14:10 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Sebastian Jansson
c01367db40 Deprecating ThreadChecker specific interface.
All changes outside thread_checker.h are by:
s/CalledOnValidThread/IsCurrent/
s/DetachFromThread/Detach/

Bug: webrtc:9883
Change-Id: Idbb1086bff0817db58e770116acf4c9d60fae8b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131023
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27494}
2019-04-08 16:58:07 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from pc/videotrack.cc (Browse further)