Commit graph

23 commits

Author SHA1 Message Date
Harald Alvestrand
b0e7057e1b Introduce the TransformerHost interface
This is the first step in implementing custom codecs in SDP.

Bug: none
Change-Id: I7789478208a769eaefd58b410ae6f488c604594d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348662
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#42171}
2024-04-25 07:54:28 +00:00
Harald Alvestrand
e8a2b3c834 Move all api/ files to use webrtc::RefCountInterface
instead of rtc::RefCountInterface

Bug: webrtc:15622
Change-Id: I085660a097a019c7aa58a7e3f0aceeedd9fcc8c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325460
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41050}
2023-10-31 15:45:12 +00:00
Artem Titov
0e61fdd27c Use backticks not vertical bars to denote variables in comments for /api
Bug: webrtc:12338
Change-Id: Ib97b2c3d64dbd895f261ffa76a2e885bd934a87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34554}
2021-07-26 18:27:34 +00:00
Markus Handell
e93fe6c532 Enable Chromium to stop including api/proxy.h indirectly.
This change prepares for a later change in Chromium that makes it
stop depending on headers exposed by WebRTC that require inclusion of
api/proxy.h.

No-Try because of lack of infra lack of capacity on macs.

No-Try: True
Bug: webrtc:12787
Change-Id: I628424fe49e873027595b80336be2b821c22245e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219688
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34072}
2021-05-21 09:35:35 +00:00
Tommi
4ccdf932e1 VideoRtpReceiver & AudioRtpReceiver threading fixes.
For implementations where the signaling and worker threads are not
the same thread, this significantly cuts down on Thread::Invoke()s that
would block the signaling thread while waiting for the worker thread.

For Audio and Video Rtp receivers, the following methods now do not
block the signaling thread:
* GetParameters
* SetJitterBufferMinimumDelay
* GetSources
* SetFrameDecryptor / GetFrameDecryptor
* SetDepacketizerToDecoderFrameTransformer

Importantly this change also makes the track() accessor accessible
directly from the application thread (bypassing the proxy) since
for receiver objects, the track object is const.

Other changes:

* Remove RefCountedObject inheritance, use make_ref_counted instead.
* Every member variable in the rtp receiver classes is now RTC_GUARDED
* Stop() now fully clears up worker thread state, and Stop() is
  consistently called before destruction. This means that there's one
  thread hop instead of at least 4 before (sometimes more), per receiver.
* OnChanged triggered volume for audio tracks is done asynchronously.
* Deleted most of the JitterBufferDelay implementation. Turns out that
  it was largely unnecessary overhead and complexity.

It seems that these two classes are copy/pasted to a large extent
so further refactoring would be good in the future, as to not have to
fix each issue twice.

Bug: chromium:1184611
Change-Id: I1ba5c3abbd1b0571f7d12850d64004fd2d83e5e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218605
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34022}
2021-05-17 14:37:55 +00:00
Mirko Bonadei
9d9b8defae Reland "Rename SIGNALING and WORKER to PRIMARY and SECONDARY"
This is a reland of a37f2bd942

Original change's description:
> Rename SIGNALING and WORKER to PRIMARY and SECONDARY
>
> This makes the proxy macros less confusing when the secondary thread
> is sometimes the worker thread, sometimes the networking thread.
>
> Bug: none
> Change-Id: I1a8cebb82d09be44fe40e80c861bcfb47b9928e8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208763
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33346}

Bug: none
Change-Id: If46a6679ac0fc947797dd7be87626ef7702faca2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208845
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33349}
2021-02-26 10:35:22 +00:00
Mirko Bonadei
07a01d09e4 Revert "Rename SIGNALING and WORKER to PRIMARY and SECONDARY"
This reverts commit a37f2bd942.

Reason for revert: Breaks compile step (e.g. https://ci.chromium.org/ui/p/webrtc/builders/ci/Android64%20Builder%20x64%20(dbg)/19773/overview).

Original change's description:
> Rename SIGNALING and WORKER to PRIMARY and SECONDARY
>
> This makes the proxy macros less confusing when the secondary thread
> is sometimes the worker thread, sometimes the networking thread.
>
> Bug: none
> Change-Id: I1a8cebb82d09be44fe40e80c861bcfb47b9928e8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208763
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33346}

TBR=hta@webrtc.org

Bug: none
Change-Id: I2014faab3392f445f56edd9e833d00000ebc5ca3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208840
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33347}
2021-02-26 07:20:49 +00:00
Harald Alvestrand
a37f2bd942 Rename SIGNALING and WORKER to PRIMARY and SECONDARY
This makes the proxy macros less confusing when the secondary thread
is sometimes the worker thread, sometimes the networking thread.

Bug: none
Change-Id: I1a8cebb82d09be44fe40e80c861bcfb47b9928e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208763
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33346}
2021-02-25 22:16:00 +00:00
Danil Chapovalov
e904161cec Replace RTC_DEPRECATED with ABSL_DEPRECATED
This remove webrtc-specific macro that has no reason to be webrtc specific
ABSL_DEPRECATED takes a message parameter encouraging to write text how class or function is deprecated.

Bug: webrtc:12484
Change-Id: I89f1398f91dacadc37f7db469dcd985e3724e444
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208282
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33314}
2021-02-22 12:53:23 +00:00
Tomas Gunnarsson
fc83cdc819 Avoid proxy thread hops for reading const properties.
This bypasses the proxy for the following properties:
* MediaStream::id()
* AudioTrack::kind() and AudioTrack::id()
* VideoTrack::kind() and VideoTrack::id()
* RtpReceiver::media_type() and RtpReceiver::id()
* RtpSender::media_type() and RtpSender::id()
* VideoTrackSource::remote() and VideoTrackSource::is_screencast()
* RtpTransceiver::media_type()

Bug: webrtc:11923
Change-Id: If7edea1781f778af3775515fc4af9a9e151c8103
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183767
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32071}
2020-09-10 13:11:44 +00:00
Marina Ciocea
412a31bbf8 Insert frame transformer between Depacketizer and Decoder.
Add a new API in RTReceiverInterface, to be called from the browser side
to insert a frame transformer between the Depacketizer and the Decoder.

The frame transformer is passed from RTReceiverInterface through the
library to be eventually set in RtpVideoStreamReceiver, where the frame
transformation will occur in the follow-up CL
https://webrtc-review.googlesource.com/c/src/+/169130.

This change is part of the implementation of the Insertable Streams Web
API: https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md

Design doc for WebRTC library changes:
http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk

Bug: webrtc:11380
Change-Id: I6b73cd16e3907e8b7709b852d6a2540ee11b4fed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169129
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30654}
2020-03-02 08:33:44 +00:00
Saurav Das
934afc6ba1 Deprecate RtpReceiver's SetParameters method
This removes the SetParameters method from AudioRtpReceiver and Video
RtpReceiver, which is currently not used and is not part of the
specifications.


Bug: webrtc:11111
Change-Id: I6f67773bfef2d4b51e9ab670bde17b5fbf5f94c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159307
Reviewed-by: Patrik Höglund <phoglund@google.com>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Saurav Das <dinosaurav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29995}
2019-12-03 19:50:42 +00:00
Mirko Bonadei
35214fcfe2 Add missing RTC_EXPORT for the component build.
Bug: webrtc:9419
Change-Id: I3225259fb4cc55e9820f590928795f4587f1e3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29479}
2019-10-15 09:07:44 +00:00
Niels Möller
a837030f8f Split out RtpSource from libjingle_peerconnection_api
And moved declaration into a new api directory, as
api/transport/rtp/rtp_source.h.

Bug: webrtc:8733
Change-Id: Ia73b7b0630e6065de4707a37633adddfa00a2b8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150880
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29039}
2019-09-02 14:04:47 +00:00
Johannes Kron
015c3cbf51 Remove deprecated constructors of RtpSource
Bug: webrtc:10650
Change-Id: I1dee27252068ad33e62978ee3a3b3f60b266a2c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149220
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28883}
2019-08-16 20:56:56 +00:00
Johannes Kron
b5d918324c Add RTP timestamp to contributing sources
RTP timestamp was recently added to contributing sources in the WebRTC
specification. This CL implements that change in WebRTC.

Bug: webrtc:10650
Change-Id: Ic0ccfbea7049a5b66063fa6cf60d01d5bd713132
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137515
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28020}
2019-05-22 08:53:08 +00:00
Ruslan Burakov
428dcb2517 Remove SetLatency/GetLatency from MediaSourceInterface API level
Bug: webrtc:10287
Change-Id: I74fad31db98b75791085688438064f9510b0b6fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133165
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27692}
2019-04-18 19:11:31 +00:00
Ruslan Burakov
4bac79ece2 Add SetJitterBufferMinimumDelay method to RtpReceiverInterface.
This change is required to allow modification of Jitter Buffer delay
in javascript via Origin Trial Experiment.
Link to experiment description:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Tgm4qiNepJc

Bug: webrtc:10287
Change-Id: I4f21380aad5982a4a60c55683b5173ce72ce0392
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131144
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27444}
2019-04-04 09:00:16 +00:00
Nico Weber
22f9925b3e webrtc: Remove semicolons.
Bug: chromium:926235
Change-Id: I66c10ab3df38adf87152d1f18cc8162afedca7e4
Reviewed-on: https://webrtc-review.googlesource.com/c/123560
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26780}
2019-02-20 16:02:59 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Harald Alvestrand
4a7b3acfcf Add DTLSTransport info into sender/receiver state.
This is in preparation for letting Chrome extract DTLSTransport
information after SLD/SRD instead of doing it on-demand.

Bug: chromium:907849
Change-Id: Iac6b174c98d3d14136e1fd25bce4a9292f6c8b41
Reviewed-on: https://webrtc-review.googlesource.com/c/116984
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26289}
2019-01-17 10:21:32 +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 api/rtpreceiverinterface.h (Browse further)