This patch adds an interface that allows modification of stun messages
sent by TurnPort. A user can inject a TurnCustomizer on the RTCConfig
and the TurnCustomizer will be invoked by TurnPort before sending
message. This allows user to e.g add custom attributes as described
in rtf5389.
BUG=webrtc:8313
Change-Id: I6f4333e9f8ff7fd20f32677be19285f15e1180b6
Reviewed-on: https://webrtc-review.googlesource.com/7618
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20233}
This will handle the scenario where, for example, the initial
offer/answer only negotiates audio, and video is added later (to the
same stream). Previously, there was absolutely no way to get a handle to
the new track without hacking the SDP. Now, the stream will be updated
after setRemoteDescription finishes.
Bug: webrtc:5677
Change-Id: Iea31bb7744da6b82afdaf44c8f74d721298a9474
Reviewed-on: https://webrtc-review.googlesource.com/6261
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20228}
This reverts commit b23ed7f1af.
Reason for revert: Breaks Chromium FYI build
Sample error log:
../../remoting/test/fake_port_allocator.cc:52:7: error: no matching constructor for initialization of 'cricket::BasicPortAllocator'
: BasicPortAllocator(network_manager, socket_factory),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/webrtc/p2p/client/basicportallocator.h:32:12: note: candidate constructor not viable: requires single argument 'network_manager', but 2 arguments were provided
explicit BasicPortAllocator(rtc::NetworkManager* network_manager);
^
../../third_party/webrtc/p2p/client/basicportallocator.h:27:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
class BasicPortAllocator : public PortAllocator {
^
../../third_party/webrtc/p2p/client/basicportallocator.h:29:3: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
BasicPortAllocator(rtc::NetworkManager* network_manager,
^
../../third_party/webrtc/p2p/client/basicportallocator.h:33:3: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
BasicPortAllocator(rtc::NetworkManager* network_manager,
^
../../third_party/webrtc/p2p/client/basicportallocator.h:36:3: note: candidate constructor not viable: requires 5 arguments, but 2 were provided
BasicPortAllocator(rtc::NetworkManager* network_manager,
Original change's description:
> TurnCustomizer - an interface for modifying stun messages sent by TurnPort
>
> This patch adds an interface that allows modification of stun messages
> sent by TurnPort. A user can inject a TurnCustomizer on the RTCConfig
> and the TurnCustomizer will be invoked by TurnPort before sending
> message. This allows user to e.g add custom attributes as described
> in rtf5389.
>
> BUG=webrtc:8313
>
> Change-Id: Ibf5cc10af84c57288f1eb4c578ca064611a769f1
> Reviewed-on: https://webrtc-review.googlesource.com/4781
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20197}
TBR=deadbeef@webrtc.org,sakal@webrtc.org,jonaso@webrtc.org
Change-Id: I624efb22f6e3ceac1b2ff8af1ec47e4cfdde9140
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8313
Reviewed-on: https://webrtc-review.googlesource.com/7680
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20199}
This patch adds an interface that allows modification of stun messages
sent by TurnPort. A user can inject a TurnCustomizer on the RTCConfig
and the TurnCustomizer will be invoked by TurnPort before sending
message. This allows user to e.g add custom attributes as described
in rtf5389.
BUG=webrtc:8313
Change-Id: Ibf5cc10af84c57288f1eb4c578ca064611a769f1
Reviewed-on: https://webrtc-review.googlesource.com/4781
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20197}
When injecting video codec factories in the Obj-C SDK, use the new
peer connection API that uses webrtc::Video{De,En}CoderFactory classes
and does not automatically add internal software codecs. Instead the
injected factory can support internal VP8 and VP9 codecs through the
included Obj-C classes RTCVideo{De,En}coderVP{8,9}.
When not explicitly injecting any video codec factory, the old code
path is still used and injects only H264 as an external codec and
the internal codec factory is used.
Bug: webrtc:7925
Change-Id: I657d30dfde71da9c0be341e213ab9f97a04caa58
Reviewed-on: https://webrtc-review.googlesource.com/3620
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20175}
Copy the chromium pattern of taking Traits as template args to be
able to write a testable implementation of ScopedTypeRef.
Add unit tests for th current implementation.
Bug: webrtc:7825
Change-Id: I26017952c042c8323b9c3841ec309e32d1c04a85
Reviewed-on: https://webrtc-review.googlesource.com/5621
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20165}
This simplifies the code and ensures we don't starve the decoder if
there are multiple output buffers queued.
Bug: webrtc:7760
Change-Id: I42c31f5045fca96847001260b8796d6756900d0f
Reviewed-on: https://webrtc-review.googlesource.com/5522
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20161}
This renames I420BufferImpl to JavaI420Buffer and moves it as part of
the API.
Bug: webrtc:7749
Change-Id: I70726f248ba4601b4922996712bdfdafbfa4a1e1
Reviewed-on: https://webrtc-review.googlesource.com/5381
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20145}
Get the encoder queue in init instead of the constructor. The
constructor is not always called on the same thread as init. The
encoder may also be reinitialized on a different thread.
Bug: webrtc:7760
Change-Id: I32a025a8bdf652ab019ac4c2ffc6be1533008925
Reviewed-on: https://webrtc-review.googlesource.com/5480
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20074}
This should help users of the library to more easily debug issues.
Bug: None
Change-Id: I85d8101d3b26ccbc34c8beded069461252e61293
Reviewed-on: https://webrtc-review.googlesource.com/4663
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20073}
Do not post releasing the texture output buffer.
Bug: webrtc:7760
Change-Id: Ie4d7165a24c791a406be75688c814e2b9d9cde8f
Reviewed-on: https://webrtc-review.googlesource.com/5440
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20072}
I420Buffer implementations (I420BufferImpl and WrappedNativeI420Buffer) rely on
the 'position' of the underlying ByteBuffers to indicate the start of Y, U, and
V channels. Returning slices prevents callers from altering the state of the
I420Buffer by changing the position.
ByteBuffers are especially prone to accidentally moving the position: relative
read operations (such as get()) increment the position by the size of data read.
BUG=webrtc:8303
Change-Id: I52edce8a3bf46a6c41980ff5110a9480f021f22f
Reviewed-on: https://webrtc-review.googlesource.com/4521
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20050}
The new class wraps any CoreFoundation Type ref and
automatically releases it when it goes out of scope.
Conceptually similar to std::unique_ptr.
Bug: webrtc:7825
Change-Id: Ie49572b9215fcb5b92b2c0c3e3d52b0b3cf01752
Reviewed-on: https://webrtc-review.googlesource.com/3380
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20045}
Previously VideoFrame.Buffers would be converted to I420 if
apply_rotation() is true. With this change the operation is skipped if
the rotation is 0.
Bug: webrtc:7749
Change-Id: I24a1a8801e41d8f415b33fe57fec953b74df7459
Reviewed-on: https://webrtc-review.googlesource.com/4665
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20038}
All previous initialize methods are deprecated and a new initialize
that uses a builder pattern is added. This gives us full control over
the order of initialization.
Bug: webrtc:7474
Change-Id: I006190e50f2e75c5015f0be75b86d367676db2cc
Reviewed-on: https://webrtc-review.googlesource.com/4160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20037}
This reverts commit 0cbaf1a6f6.
Reason for revert: Makes a test flaky:
https://build.chromium.org/p/client.webrtc/builders/Android32%20%28M%20Nexus5X%29/builds/4603
Original change's description:
> Use injectable hardware video decoder/encoder in AppRTCMobile.
>
> Also include a small fix for getting the encoder queue.
>
> Bug: webrtc:7760
> Change-Id: I96dc8ffb363b90382276d88148f81d5f89dca5f2
> Reviewed-on: https://webrtc-review.googlesource.com/2683
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20022}
TBR=magjed@webrtc.org,sakal@webrtc.org
Change-Id: I6cb9a10eadb0eff2b85d5028d684746dc69bccfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7760
Reviewed-on: https://webrtc-review.googlesource.com/4480
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20024}
Also include a small fix for getting the encoder queue.
Bug: webrtc:7760
Change-Id: I96dc8ffb363b90382276d88148f81d5f89dca5f2
Reviewed-on: https://webrtc-review.googlesource.com/2683
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20022}
If this is not done, the RTC_DCHECK_CALLED_SEQUENTIALLY might fire
if the encoder is used on a new VideoStreamEncoder. This happens
after VideoSendStream recreations due to changes in the SDP.
BUG=b/66590444
Change-Id: I086370526afbbe2ba629805f97f89e512ba3f472
Reviewed-on: https://webrtc-review.googlesource.com/4360
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20020}
This is useful for various reasons.
Bug: None
Change-Id: I8658f8b19829cc8470789c13ff3af6466f200f00
Reviewed-on: https://webrtc-review.googlesource.com/4383
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20018}
This is a reland of 7a2bfd22e6
Original change's description:
> Improve unit testing for HardwareVideoEncoder and fix bugs.
>
> Improves the unit testing for HardwareVideoEncoder and fixes bugs in it.
> The main added feature is support for dynamically switching between
> texture and byte buffer modes.
>
> Bug: webrtc:7760
> Change-Id: Iaffe6b7700047c7d0f9a7b89a6118f6ff932cd9b
> Reviewed-on: https://webrtc-review.googlesource.com/2682
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19963}
Bug: webrtc:7760
Change-Id: I605647da456525de8e535cc66cab9d0b3f14240b
Reviewed-on: https://webrtc-review.googlesource.com/3641
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20013}
The video codec factories should be owned by the video engine instead
of by the PeerConnectionFactory.
Bug: None
Change-Id: If63d47cef565138d51377af3fc9ea973950c9390
Reviewed-on: https://webrtc-review.googlesource.com/1601
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20002}
This reverts commit ba78b5a905.
Reason for revert: Breaks external projects.
Original change's description:
> Android: Generate JNI code for VideoSink and VideoEncoder
>
> This is the first CL to start generating JNI code. It has updated two of
> the most recent classes to use JNI code generation.
>
> Bug: webrtc:8278
> Change-Id: I1b19ee78c273346ceeaa0401dbdf8696803f16c7
> Reviewed-on: https://webrtc-review.googlesource.com/3820
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19994}
TBR=magjed@webrtc.org,sakal@webrtc.org
Change-Id: I48e079f3ab9661ae4171a3ae5cca571a75d14810
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8278
Reviewed-on: https://webrtc-review.googlesource.com/4100
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19997}
This is the first CL to start generating JNI code. It has updated two of
the most recent classes to use JNI code generation.
Bug: webrtc:8278
Change-Id: I1b19ee78c273346ceeaa0401dbdf8696803f16c7
Reviewed-on: https://webrtc-review.googlesource.com/3820
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19994}
We are doing some unconventional stuff in jni_generator_helper.h in
order to integrate the Chromium script with WebRTC. Long term, we will
improve this and remove the lint suppressions.
Bug: webrtc:8278
Change-Id: I5d6f0017c4deab4586844647f7cd657641fecbab
Reviewed-on: https://webrtc-review.googlesource.com/3780
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19989}
This header will be included from generated JNI code, and acts as a
bridge between JNI types in WebRTC and Chromium.
Bug: webrtc:8278
Change-Id: I88331d26315aa8b258aaaaa26d82324660d648b5
NOPRESUBMIT: True
Reviewed-on: https://webrtc-review.googlesource.com/3441
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19974}
This reverts commit 7a2bfd22e6.
Reason for revert: Breaks external test.
Original change's description:
> Improve unit testing for HardwareVideoEncoder and fix bugs.
>
> Improves the unit testing for HardwareVideoEncoder and fixes bugs in it.
> The main added feature is support for dynamically switching between
> texture and byte buffer modes.
>
> Bug: webrtc:7760
> Change-Id: Iaffe6b7700047c7d0f9a7b89a6118f6ff932cd9b
> Reviewed-on: https://webrtc-review.googlesource.com/2682
> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19963}
TBR=magjed@webrtc.org,sakal@webrtc.org
Change-Id: If1e283a8429c994ad061c7a8320d76633bd0d66b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7760
Reviewed-on: https://webrtc-review.googlesource.com/3640
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19964}
Improves the unit testing for HardwareVideoEncoder and fixes bugs in it.
The main added feature is support for dynamically switching between
texture and byte buffer modes.
Bug: webrtc:7760
Change-Id: Iaffe6b7700047c7d0f9a7b89a6118f6ff932cd9b
Reviewed-on: https://webrtc-review.googlesource.com/2682
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19963}
This annotation will be used to annotate Java classes that are
referenced from native code.
Bug: webrtc:8278
Change-Id: Icf020927d377ba04304ddbf92639e6ef174de22c
Reviewed-on: https://webrtc-review.googlesource.com/3300
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19951}
We currently pass in a lot of audio parameters to PeerConnectionFactory
which we never use. This CL removes them.
All these parameters are reference counted, so they are not needed for
lifetime management (unless we do something crazy). Even if we want to
switch from reference counting to std::unique_ptrs in the future, the
voice engine is a more suitable owner than PeerConnectionFactory. The
PeerConnectionFactory already owns a MediaEngine which in turn owns a
VoiceEngine.
Bug: webrtc:7613
Change-Id: I393cf0d29ffa762a3a13475f6fbe00b8565f4c07
Reviewed-on: https://webrtc-review.googlesource.com/1600
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19931}