These parameters are nullable in the JS API.
This allows cleaner handling of "unset" vs "set" in Chrome.
Backwards compatibility note: Behavior should not change, even for users
who set the values explicitly to -1 in the DataChannelInit struct.
Those who try to read back the value will get a compile-time error.
Bug: chromium:854385
Change-Id: Ib488ca5f70bc24ba8b4a3f71b506434c4d2c60b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131381
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27507}
This adds bindings for RIDs in RtpEncodingParameters.
Bug: webrtc:10464
Change-Id: I3cc25db25a4d777b9d9573ba69c82127d1c9a597
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128826
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27322}
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.
After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.
Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
Previously, the use of pass-by-value caused an issue in
ObjCVideoDecoder::Decode, where the EncodedImage was being copied upon
calling initWithNativeEncodedImage, which then created an NSData using
the copy's pointer; then the copy was destroyed, invalidating that
pointer.
Bug: webrtc:9378
Change-Id: Iac28b890c9902108ffc5ec54a607a99034159153
Reviewed-on: https://webrtc-review.googlesource.com/c/121922
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26598}
This CL applies clang-tidy's performance-for-range-copy [1] on the
WebRTC codebase.
All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.
[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
Bug: webrtc:10215
Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e
Reviewed-on: https://webrtc-review.googlesource.com/c/120043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26420}
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}
Use size() accessor function. Also replace most nearby uses of _buffer
with data().
Bug: webrtc:9378
Change-Id: I1ac3459612f7c6151bd057d05448da1c4e1c6e3d
Reviewed-on: https://webrtc-review.googlesource.com/c/116783
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26273}
Removes the deprecated video codec factories and the related flag and
helper classes.
Bug: webrtc:7925
Change-Id: I0a6d1666ece9ad074fefc79b626ba241765e1b98
Reviewed-on: https://webrtc-review.googlesource.com/c/113940
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26245}
- Remove visibility of encoder target.
- Remove unnecessary dependency on task_queue.
- Remove CreateRtcEventLogFactory() declaration from the rtc_event_log_api target
since the function is not defined in that target.
Bug: None
Change-Id: Id9edee86f358d08ea063d62bd96e9653c5b06d55
Reviewed-on: https://webrtc-review.googlesource.com/c/116060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26215}
When landed, the FileRotatingStream class can be made write-only.
Bug: webrtc:7811
Change-Id: I6dcd2a869301b9b8273b48d47df51a1065767ffd
Reviewed-on: https://webrtc-review.googlesource.com/c/115302
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26126}
This change removes the ability to set CryptoOptions through the PeerConnection
Factory in both Java and IOS. Native will be removed after the Chromium change
lands. The semantics have been changed such that these options should only be
set on individual PeerConnections and not directly on the Factory itself. This
allows for more flexibility in setting CryptoOptions for PeerConnections which
are created as part of a factory.
Bug: webrtc:10020
Change-Id: I9ef3d431e728927b9ced5de6188cedeb2671254b
Reviewed-on: https://webrtc-review.googlesource.com/c/111560
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25736}
This change makes it possible for ios apps to use the new standards-compliant PeerConnectionState.
Originally reviewed as https://webrtc-review.googlesource.com/c/110502, with an added check to prevent calling unimplemented optional method.
Bug: webrtc:9977
Change-Id: Iebac8ce58d435e38450add51b8915575d0ffd934
Reviewed-on: https://webrtc-review.googlesource.com/c/111084
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25727}
This reverts commit 586725dc9a.
Reason for revert: misses a check to see if the optional callback is implemented.
Original change's description:
> Add ios bindings for PeerConnectionState.
>
> This change makes it possible for ios apps to use the new standards-compliant PeerConnectionState.
>
> Bug: webrtc:9977
> Change-Id: Icf69bb1faa0383ae239cb7508f2a740a2d489697
> Reviewed-on: https://webrtc-review.googlesource.com/c/110502
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25651}
TBR=kthelgason@webrtc.org,jonasolsson@webrtc.org
Change-Id: Iff919e9876e6b8dddc6d8ab7df302081d0cfa917
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9977
Reviewed-on: https://webrtc-review.googlesource.com/c/111062
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25659}
This change makes it possible for ios apps to use the new standards-compliant PeerConnectionState.
Bug: webrtc:9977
Change-Id: Icf69bb1faa0383ae239cb7508f2a740a2d489697
Reviewed-on: https://webrtc-review.googlesource.com/c/110502
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25651}
Adds a field |use_media_transport_for_data_channels| to RTCConfiguration.
PeerConnection requires a media transport factory to be set if this bit
is set. As with |use_media_transport|, the value may not be modified
after setting the local or remote description.
If either |use_media_transport| or |use_media_transport_for_data_channel| is
set, PeerConnection uses its media transport factory when creating a JSEP
transport controller.
PeerConnection stops unconditionally using media transport in
CreateVoiceChannel, as it may be present only for use in data channels. It uses
the media transport if it is present and |use_media_transport| is set.
Bug: webrtc:9719
Change-Id: I59d4ce8f7531fd19d9c17eefe033f063f663ebcc
Reviewed-on: https://webrtc-review.googlesource.com/c/109041
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25507}
With the expanding use cases for webrtc::CryptoOptions it makes more sense for
it to be be available per peer connection instead of only as a factory option.
To support backwards compatability for now this code will support the factory
method of setting crypto options by default. However it will completely
overwrite these settings if an RTCConfiguration.crypto_options is provided.
Got LGTM offline from Sami, adding him to TBR if he has any further comments.
TBR=sakal@webrtc.org
Bug: webrtc:9891
Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986
Reviewed-on: https://webrtc-review.googlesource.com/c/107029
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25375}
This change adds a new subcategory to the public native webrtc::CryptoOptions
structure: webrtc::CryptoOptions::Frame.
This new structure has a single off by default property:
crypto_options.frame.require_frame_encryption.
This new flag if set prevents RtpSenders from sending outgoing payloads unless
a frame_encryptor_ is attached and prevents RtpReceivers from receiving
incoming payloads unless a frame_decryptor_ is attached.
This option is important to enforce no unencrypted data can ever leave the
device or be received.
I have also attached bindings for Java and Objective-C.
I have implemented this functionality for E2EE audio but not E2EE video
since the changes are still in review.
Bug: webrtc:9681
Change-Id: Ie184711190e0cdf5ac781f69e9489ceec904736f
Reviewed-on: https://webrtc-review.googlesource.com/c/105540
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25238}
Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
that only handles SRTP configuration to a more generic structure that can be
used and extended for all per peer connection CryptoOptions that can be on a
given PeerConnection.
Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
accessed as crypto_options.srtp.whatever_option_name. This is more inline with
other structures we have in WebRTC such as VideoConfig. As additional features
are added over time this will allow the structure to remain compartmentalized
and concerned components can only request a subset of the overall configuration
structure e.g:
void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
In addition to this it made little sense for sslstreamadapter.h to hold all
Srtp related configuration options. The header has become loo large and takes on
too many responsibilities and spilting this up will lead to more maintainable
code going forward.
This will be used in a future CL to enable configuration options for the newly
supported Frame Crypto.
Reland Fix:
- cryptooptions.h - now has enable_aes128_sha1_32_crypto_cipher as an optional
root level configuration.
- peerconnectionfactory - If this optional is set will now overwrite the
underyling value.
This along with the other field will be deprecated once dependent projects
are updated.
TBR=sakal@webrtc.org,kthelgason@webrtc.org,emadomara@webrtc.org,qingsi@webrtc.org
Bug: webrtc:9681
Change-Id: Iaa6b741baafb85d352e42f54226119f19d97151d
Reviewed-on: https://webrtc-review.googlesource.com/c/105560
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25135}
This reverts commit ac2f3d14e4.
Reason for revert: Breaks downstream project
Original change's description:
> Move CryptoOptions to api/crypto from rtc_base/sslstreamadapter.h
>
> Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
> that only handles SRTP configuration to a more generic structure that can be
> used and extended for all per peer connection CryptoOptions that can be on a
> given PeerConnection.
>
> Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
> accessed as crypto_options.srtp.whatever_option_name. This is more inline with
> other structures we have in WebRTC such as VideoConfig. As additional features
> are added over time this will allow the structure to remain compartmentalized
> and concerned components can only request a subset of the overall configuration
> structure e.g:
>
> void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
>
> In addition to this it made little sense for sslstreamadapter.h to hold all
> Srtp related configuration options. The header has become loo large and takes on
> too many responsibilities and spilting this up will lead to more maintainable
> code going forward.
>
> This will be used in a future CL to enable configuration options for the newly
> supported Frame Crypto.
>
> Change-Id: I99d1be36740c59548c8e62db52d68d738649707f
> Bug: webrtc:9681
> Reviewed-on: https://webrtc-review.googlesource.com/c/105180
> Reviewed-by: Emad Omara <emadomara@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25130}
TBR=steveanton@webrtc.org,sakal@webrtc.org,kthelgason@webrtc.org,emadomara@webrtc.org,qingsi@webrtc.org,benwright@webrtc.org
Bug: webrtc:9681
Change-Id: Ib0075c477c951b540d4deecb3b0cf8cf86ba0fff
Reviewed-on: https://webrtc-review.googlesource.com/c/105541
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25133}
Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
that only handles SRTP configuration to a more generic structure that can be
used and extended for all per peer connection CryptoOptions that can be on a
given PeerConnection.
Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
accessed as crypto_options.srtp.whatever_option_name. This is more inline with
other structures we have in WebRTC such as VideoConfig. As additional features
are added over time this will allow the structure to remain compartmentalized
and concerned components can only request a subset of the overall configuration
structure e.g:
void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
In addition to this it made little sense for sslstreamadapter.h to hold all
Srtp related configuration options. The header has become loo large and takes on
too many responsibilities and spilting this up will lead to more maintainable
code going forward.
This will be used in a future CL to enable configuration options for the newly
supported Frame Crypto.
Change-Id: I99d1be36740c59548c8e62db52d68d738649707f
Bug: webrtc:9681
Reviewed-on: https://webrtc-review.googlesource.com/c/105180
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25130}
And use RTCConfiguration to enable/disable it on a per connection basis.
With the advent of MediaTransportInterface, we need to be able to enable
it on the per PeerConnection basis.
At this point PeerConnection will not take any action when the
MediaTransportInterface is set; this code will land a bit later, and
will be accompanied by the tests that verify correct setup (hence no tests right now).
At this point this is just a method stub to enable further development.
Bug: webrtc:9719
Change-Id: I1f77d650cb03bf1191aa0b35669cd32f1b68446f
Reviewed-on: https://webrtc-review.googlesource.com/c/103860
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25053}
I missed adding these headers in my inital check-in. This change simply adds
these headers.
Bug: webrtc:9681
Change-Id: Ic2265105cd401d59fac124c2dc1963f0163c5af6
Reviewed-on: https://webrtc-review.googlesource.com/c/103304
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24956}