Commit graph

30 commits

Author SHA1 Message Date
Kári Tristan Helgason
682f7945d5 Deprecate bad signature for CreateSessionDescription.
Bug: webrtc:360909068
Change-Id: I8640dcf3cb89b1e07ea6745887d152fdeb7479c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360020
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42932}
2024-09-03 12:14:54 +00:00
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Harald Alvestrand
b1ffa9bd4e Export SdpTypeFromString
Needed to get rid of a form of CreateSessionDescription that is due
for deprecation.

Bug: None
Change-Id: I9717b7ded1e28cf803de4bebc852c2f255851918
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359941
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42808}
2024-08-19 13:34:49 +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
cfea2182f8 Use backticks not vertical bars to denote variables in comments
Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
2021-08-10 10:40:03 +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
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
Harald Alvestrand
c908f1c19a Declare the Clone operator of SessionDescriptionInterface as const.
Bug: webrtc:12215
Change-Id: I8e44e2b9365893ecf481e69060771c2c208bbcdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198125
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32858}
2020-12-17 21:01:37 +00:00
Harald Alvestrand
0e7b3a9dad Add a Clone() method to SessionDescriptionInterface
This should allow us to remove some SDP parsing in Chromium.

Bug: webrtc:12215
Change-Id: Ib85593d1c9226b29f2ec18617f945c76eca3b2d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197806
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32840}
2020-12-16 08:05:10 +00:00
Harald Alvestrand
11146cdfea Reland "Remove old-style OnFailure callbacks"
This is a reland of 1a290e4495
after fixing the downstream projects.

Original change's description:
> Remove old-style OnFailure callbacks
>
> Also delete default implementation of new-style OnFailure,
> since it can't call the deprecated function.
>
> Deprecating the old-style OnFailure callback turned out to be impossible,
> since one can't have the new-style callback call the old-style one.
>
> Bug: chromium:589455
> Change-Id: Icf529ddb02d99ad9e205095d5a1fbeb0da91dd0e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146219
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30570}

Bug: chromium:589455
Change-Id: I7227e3c6886c504043b019b621e45658cbd6fd53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168941
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30583}
2020-02-21 14:07:57 +00:00
Mirko Bonadei
4805a480fe Revert "Remove old-style OnFailure callbacks"
This reverts commit 1a290e4495.

Reason for revert: Breaks downstream project.

Original change's description:
> Remove old-style OnFailure callbacks
> 
> Also delete default implementation of new-style OnFailure,
> since it can't call the deprecated function.
> 
> Deprecating the old-style OnFailure callback turned out to be impossible,
> since one can't have the new-style callback call the old-style one.
> 
> Bug: chromium:589455
> Change-Id: Icf529ddb02d99ad9e205095d5a1fbeb0da91dd0e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146219
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30570}

TBR=steveanton@webrtc.org,kwiberg@webrtc.org,hta@webrtc.org

Change-Id: Ibc46b7a7294fb906f848e4528a85c09cbb62b913
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:589455
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168920
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30573}
2020-02-20 14:39:36 +00:00
Harald Alvestrand
1a290e4495 Remove old-style OnFailure callbacks
Also delete default implementation of new-style OnFailure,
since it can't call the deprecated function.

Deprecating the old-style OnFailure callback turned out to be impossible,
since one can't have the new-style callback call the old-style one.

Bug: chromium:589455
Change-Id: Icf529ddb02d99ad9e205095d5a1fbeb0da91dd0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146219
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30570}
2020-02-20 13:21:54 +00:00
Mirko Bonadei
3ac6375bb3 Add 3 missing RTC_EXPORT.
These two annotations are now needed to correctly compile Chromium
with is_component_build=true and the WebRTC component.

TBR: kwiberg@webrtc.org
Bug: webrtc:9419
Change-Id: Id5603cf747357c0c2a4b41684eb4fd607cccfdea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158881
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29686}
2019-11-05 09:40:03 +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
Eldar Rello
5ab79e62f6 Reland "Implement rollback for setRemoteDescription"
This is a reland of 16d4c4d4fb after
downstream project was updated to be prepared for the new SdpType.

Original change's description:
> Implement rollback for setRemoteDescription
>
> Bug: chromium:980875
> Change-Id: I4575e9ad1902a20937f9812f49edee2a2441f76d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153525
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29422}

TBR=steveanton@webrtc.org

Bug: chromium:980875
Change-Id: Iba8d25bf2dc481b25a03eeae9818bd5f4c3eaa2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156569
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29460}
2019-10-14 12:40:53 +00:00
Alex Loiko
907f1548af Revert "Implement rollback for setRemoteDescription"
This reverts commit 16d4c4d4fb.

Reason for revert: breaks downstream dependency. (The new enum value kRollback is not handled correctly downstream).

Original change's description:
> Implement rollback for setRemoteDescription
> 
> Bug: chromium:980875
> Change-Id: I4575e9ad1902a20937f9812f49edee2a2441f76d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153525
> Commit-Queue: Eldar Rello <elrello@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29422}

TBR=steveanton@webrtc.org,mbonadei@webrtc.org,aleloi@webrtc.org,hbos@webrtc.org,aleloi@google.com,hta@webrtc.org,shampson@webrtc.org,elrello@microsoft.com

Change-Id: If76f6b672fdc59b7f00dfc7c150abda16614cd04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:980875
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156304
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29427}
2019-10-10 09:09:14 +00:00
Eldar Rello
16d4c4d4fb Implement rollback for setRemoteDescription
Bug: chromium:980875
Change-Id: I4575e9ad1902a20937f9812f49edee2a2441f76d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153525
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29422}
2019-10-09 17:13:04 +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
Mirko Bonadei
ac19414512 Export symbols needed by the Chromium component build (part 6).
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).

[1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md

Bug: webrtc:9419
Change-Id: I67a4d016a11deca5ac5459826741dd2d3f7931d5
Reviewed-on: https://webrtc-review.googlesource.com/c/107400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25298}
2018-10-23 06:48:51 +00:00
Mirko Bonadei
3b56ee73a3 Export symbols needed by the Chromium component build (part 2).
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).

Bug: webrtc:9419
Change-Id: I6f27003001548ea9d54412fdf62d5dd7a39cfd46
Reviewed-on: https://webrtc-review.googlesource.com/c/106022
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25187}
2018-10-15 19:52:31 +00:00
Steve Anton
d9e4a06374 Add CreateSessionDescription overload which takes a cricket::SessionDescription
This gives clients a way to create a SessionDescriptionInterface
from a parsed cricket::SessionDescription other than depending on
JsepSessionDescription.

Bug: webrtc:9544
Change-Id: I3eec87b24aa005e6cbc4a018ad452c0d6823435d
Reviewed-on: https://webrtc-review.googlesource.com/90382
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24105}
2018-07-25 18:03:05 +00:00
Steve Anton
27ab0e5ee5 Add CreateIceCandidate overload which takes a cricket::Candidate
This gives clients a clear way to create an IceCandidateInterface
instance for use with PeerConnection from a parsed
cricket::Candidate structure.

Previously, the only way was with the JsepIceCandidate constructor,
but this CL will allow us to move that class out of the API.

Bug: webrtc:9544
Change-Id: Idfc1f1e0f5ee4c68d94599aae3fb824b23189a7c
Reviewed-on: https://webrtc-review.googlesource.com/90121
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24074}
2018-07-23 23:49:44 +00:00
Mirko Bonadei
79eb4dd928 Enabling clang::find_bad_constructs for libjingle_peerconnection_api.
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.

Bug: webrtc:9251, webrtc:163
Change-Id: I5475e574353c772910181495fdb3400b5f0e7399
Reviewed-on: https://webrtc-review.googlesource.com/87240
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24040}
2018-07-19 09:17:10 +00:00
Danil Chapovalov
0bc58cf876 Replace rtc::Optional with absl::optional in api
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'api'
Then undo changes to optional target itself and optional_unittests

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I44093da213369d6a502e33792c694f620f53b779
Reviewed-on: https://webrtc-review.googlesource.com/84621
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23707}
2018-06-21 12:50:03 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Harald Alvestrand
5081c0cc6d Change error handlers for Set*Description to use RTCError
Needed in order to return error codes to Chromium.

Bug: chromium:819629, chromium:589455
Change-Id: Iab22250db62a348eee21c6d8bfc44020a7380586
Reviewed-on: https://webrtc-review.googlesource.com/60522
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22367}
2018-03-09 15:37:34 +00:00
Steve Anton
845bb73196 Fix clang style errors in api/jsep.h
In this case, clang style forbids inline definitions for virtual
functions.

Bug: webrtc:163
Change-Id: Id924cadb0a1d32e12cdb691c57fbda5f5b022638
Reviewed-on: https://webrtc-review.googlesource.com/29441
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21126}
2017-12-06 18:12:06 +00:00
Steve Anton
88f2cb9479 Introduce webrtc::SdpType, the chosen enum for offer/pranswer/answer
This change introduces a new method |GetType()| in
SessionDescriptionInterface which returns an enum for the SDP type
rather than a string. Additionally, new overloads were added for
CreateSessionDescription to take SdpType instead of a type string.

Bug: webrtc:8613
Change-Id: I52b342f12155daf8d623646b0c21b7562f69d101
Reviewed-on: https://webrtc-review.googlesource.com/29380
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21100}
2017-12-06 02:27:32 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/api/jsep.h (Browse further)