webrtc/pc
Marina Ciocea e448a3fb54 Update DataChannel bufferedamount implementation.
Call DataChannelObserver::OnBufferedAmountChange on each successful send.
Previously, the observer would get notified of buffered amount changes only when
queued send data is consumed. Data gets queued only if it cannot be sent right
away. According to the WebRTC standard[1], bufferedamount should be increased
before each sent and decreased after each successful sent. Update implementation
to be standard compliant.

Design doc: http://doc/1lorHBn-GMn5U0T0RQANxrsW0pXhw8XGZM-xZyVUOW90

[1] https://w3c.github.io/webrtc-pc/#dom-datachannel-bufferedamount

Bug: chromium:878682
Change-Id: Ife009d30c4a18dced9a54cf600a445bb1f02561d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123237
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27057}
2019-03-11 13:21:36 +00:00
..
test Migrate RepeatingTask to take raw pointer to TaskQueueBase instead of TaskQueue 2019-03-06 18:44:35 +00:00
audio_rtp_receiver.cc Split rtp_receiver for readability. 2019-02-11 12:47:51 +00:00
audio_rtp_receiver.h Split rtp_receiver for readability. 2019-02-11 12:47:51 +00:00
audio_track.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
audio_track.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
BUILD.gn Add x-mt line to the offer. 2019-03-01 20:32:16 +00:00
channel_interface.h Creating Simulcast offer and answer in Peer Connection. 2019-01-28 18:56:02 +00:00
channel_manager_unittest.cc Remove deprecated CreateMediaTransport method 2019-02-26 18:32:22 +00:00
channel_manager.cc "Remove" loophole in rtc::Thread::ScopedDisallowBlockingCalls 2019-02-21 13:20:53 +00:00
channel_manager.h Creating Simulcast offer and answer in Peer Connection. 2019-01-28 18:56:02 +00:00
channel_unittest.cc [clang-tidy] Apply performance-move-const-arg fixes. 2019-02-01 15:02:36 +00:00
channel.cc Allow more than one registered network change callback in MediaTransport 2019-02-06 16:14:45 +00:00
channel.h Creating Simulcast offer and answer in Peer Connection. 2019-01-28 18:56:02 +00:00
data_channel_unittest.cc Update DataChannel bufferedamount implementation. 2019-03-11 13:21:36 +00:00
data_channel.cc Update DataChannel bufferedamount implementation. 2019-03-11 13:21:36 +00:00
data_channel.h Update DataChannel bufferedamount implementation. 2019-03-11 13:21:36 +00:00
DEPS Remove +api from internal DEPS files. 2019-01-28 11:17:00 +00:00
dtls_srtp_transport_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dtls_srtp_transport.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dtls_srtp_transport.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dtls_transport_unittest.cc Added underscore to dtls_transport_unittest.cc. 2019-02-27 18:55:15 +00:00
dtls_transport.cc DtlsTransport::ice_transport is const and can be called off thread 2019-02-21 16:38:37 +00:00
dtls_transport.h DtlsTransport::ice_transport is const and can be called off thread 2019-02-21 16:38:37 +00:00
dtmf_sender_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dtmf_sender.cc Remove comments about using std::shared_ptr. 2019-01-15 13:15:58 +00:00
dtmf_sender.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
external_hmac.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
external_hmac.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_server_parsing_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_server_parsing.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_server_parsing.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_transport_unittest.cc Add IceTransportInterface object 2019-01-30 16:16:51 +00:00
ice_transport.cc Add IceTransportInterface object 2019-01-30 16:16:51 +00:00
ice_transport.h Add IceTransportInterface object 2019-01-30 16:16:51 +00:00
jsep_ice_candidate.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
jsep_session_description_unittest.cc Use c=IN IP4 <hostname> to support the presence of hostname candidates. 2019-02-08 22:51:37 +00:00
jsep_session_description.cc Use c=IN IP4 <hostname> to support the presence of hostname candidates. 2019-02-08 22:51:37 +00:00
jsep_transport_controller_unittest.cc Add x-mt line to the offer. 2019-03-01 20:32:16 +00:00
jsep_transport_controller.cc Delete always-true member is_media_transport_factory_enabled_ 2019-03-11 08:04:09 +00:00
jsep_transport_controller.h Delete always-true member is_media_transport_factory_enabled_ 2019-03-11 08:04:09 +00:00
jsep_transport_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
jsep_transport.cc [clang-tidy] Apply performance-move-const-arg fixes. 2019-02-01 15:02:36 +00:00
jsep_transport.h Add DTLSTransport info into sender/receiver state. 2019-01-17 10:21:32 +00:00
local_audio_source_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
local_audio_source.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
local_audio_source.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
media_session_unittest.cc Update URI of TransportSequenceNumberV2 2019-03-11 10:15:52 +00:00
media_session.cc Update URI of TransportSequenceNumberV2 2019-03-11 10:15:52 +00:00
media_session.h Add x-mt line to the offer. 2019-03-01 20:32:16 +00:00
media_stream_observer.cc Use Abseil container algorithms in pc/ 2019-01-29 02:33:50 +00:00
media_stream_observer.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
media_stream_track.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_stream_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_stream.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_stream.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
OWNERS Adding shampson (me) as an owner to pc/ & api/. 2018-07-03 20:39:17 +00:00
peer_connection_bundle_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
peer_connection_crypto_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
peer_connection_data_channel_unittest.cc Add x-mt line to the offer. 2019-03-01 20:32:16 +00:00
peer_connection_end_to_end_unittest.cc Delete obsolete usage of FakeConstraints 2019-02-12 12:27:04 +00:00
peer_connection_factory_unittest.cc Refactor PeerConnectionFactoryTest to not use FakeVideoCapturer. 2019-01-18 12:57:11 +00:00
peer_connection_factory.cc Use final so that the compiler will be able to inline calls 2019-02-22 01:08:12 +00:00
peer_connection_factory.h Use final so that the compiler will be able to inline calls 2019-02-22 01:08:12 +00:00
peer_connection_histogram_unittest.cc Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
peer_connection_ice_unittest.cc Use metrics::Samples in a couple pc/ tests 2019-03-05 22:49:48 +00:00
peer_connection_integrationtest.cc Reinstate old iceConnectionState "completed" behavior 2019-03-04 13:56:53 +00:00
peer_connection_interface_unittest.cc Replace replace_substrs with Abseil 2019-02-15 01:22:54 +00:00
peer_connection_internal.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
peer_connection_jsep_unittest.cc Also check the pending remote description when generating MIDs for legacy remote offers 2019-02-07 20:22:38 +00:00
peer_connection_media_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
peer_connection_rampup_tests.cc Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
peer_connection_rtp_unittest.cc Add metrics::Samples to facilitate easier testing 2019-03-05 17:51:14 +00:00
peer_connection_signaling_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
peer_connection_simulcast_unittest.cc Adding metrics to measure usage of simulcast API. 2019-03-05 22:01:34 +00:00
peer_connection_wrapper.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
peer_connection_wrapper.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
peer_connection.cc Adding metrics to measure usage of simulcast API. 2019-03-05 22:01:34 +00:00
peer_connection.h Add SCTP transport to the public API. 2019-02-28 10:15:05 +00:00
playout_latency_interface.h Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
playout_latency_proxy.h Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
playout_latency_unittest.cc Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
playout_latency.cc Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
playout_latency.h Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
proxy_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
remote_audio_source.cc Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
remote_audio_source.h Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
rtc_stats_collector_unittest.cc Expose relative packet arrival delay metric in stats API. 2019-03-06 16:35:16 +00:00
rtc_stats_collector.cc Expose relative packet arrival delay metric in stats API. 2019-03-06 16:35:16 +00:00
rtc_stats_collector.h Reland "Fix getStats() freeze bug affecting Chromium but not WebRTC standalone." 2019-02-28 12:38:30 +00:00
rtc_stats_integrationtest.cc Expose relative packet arrival delay metric in stats API. 2019-03-06 16:35:16 +00:00
rtc_stats_traversal_unittest.cc [clang-tidy] Apply performance-inefficient-vector-operation fixes. 2019-01-29 09:45:21 +00:00
rtc_stats_traversal.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtc_stats_traversal.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
rtcp_mux_filter_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtcp_mux_filter.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtcp_mux_filter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_media_utils_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
rtp_media_utils.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_media_utils.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_parameters_conversion_unittest.cc Use Abseil container algorithms in pc/ 2019-01-29 02:33:50 +00:00
rtp_parameters_conversion.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_parameters_conversion.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_receiver.cc Split rtp_receiver for readability. 2019-02-11 12:47:51 +00:00
rtp_receiver.h Split rtp_receiver for readability. 2019-02-11 12:47:51 +00:00
rtp_sender_receiver_unittest.cc Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
rtp_sender.cc RtpSender's RtpParameters were invalidated in a call to SLD/SRD. 2019-02-27 01:46:50 +00:00
rtp_sender.h RtpSender's RtpParameters were invalidated in a call to SLD/SRD. 2019-02-27 01:46:50 +00:00
rtp_transceiver_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_transceiver.cc Use Abseil container algorithms in pc/ 2019-01-29 02:33:50 +00:00
rtp_transceiver.h webrtc: Remove semicolons. 2019-02-20 16:02:59 +00:00
rtp_transport_internal.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_transport_unittest.cc [clang-tidy] Apply performance-move-const-arg fixes. 2019-02-01 15:02:36 +00:00
rtp_transport.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_transport.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sctp_transport_unittest.cc Add SCTP transport to the public API. 2019-02-28 10:15:05 +00:00
sctp_transport.cc Add SCTP transport to the public API. 2019-02-28 10:15:05 +00:00
sctp_transport.h Add SCTP transport to the public API. 2019-02-28 10:15:05 +00:00
sctp_utils_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sctp_utils.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sctp_utils.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sdp_serializer_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
sdp_serializer.cc Use Abseil container algorithms in pc/ 2019-01-29 02:33:50 +00:00
sdp_serializer.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sdp_utils.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sdp_utils.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
session_description_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
session_description.cc Use Abseil container algorithms in pc/ 2019-01-29 02:33:50 +00:00
session_description.h Add a parser for the x-mt line. 2019-02-27 21:00:58 +00:00
simulcast_description.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
simulcast_description.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
srtp_filter_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
srtp_filter.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
srtp_filter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
srtp_session_unittest.cc Use metrics::Samples in a couple pc/ tests 2019-03-05 22:49:48 +00:00
srtp_session.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
srtp_session.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
srtp_transport_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
srtp_transport.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
srtp_transport.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
stats_collector_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
stats_collector.cc [clang-tidy] Apply performance-for-range-copy fixes. 2019-01-28 09:53:50 +00:00
stats_collector.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
stream_collection.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
track_media_info_map_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
track_media_info_map.cc [clang-tidy] Apply performance-for-range-copy fixes. 2019-01-28 09:53:50 +00:00
track_media_info_map.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
transport_stats.cc [clang-tidy] Apply performance-move-const-arg fixes (misc). 2019-02-05 15:12:20 +00:00
transport_stats.h [clang-tidy] Apply performance-move-const-arg fixes (misc). 2019-02-05 15:12:20 +00:00
video_rtp_receiver.cc Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
video_rtp_receiver.h Propagate base minimum delay from video jitter buffer to webrtc/api. 2019-02-27 15:08:34 +00:00
video_track_source.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
video_track_source.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
video_track_unittest.cc Refactor VideoTrackTest to not depend on cricket::VideoCapturer 2019-01-21 07:33:35 +00:00
video_track.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
video_track.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
webrtc_sdp_unittest.cc Add x-mt line to the offer. 2019-03-01 20:32:16 +00:00
webrtc_sdp.cc Add x-mt line to the offer. 2019-03-01 20:32:16 +00:00
webrtc_sdp.h Make webrtc::ParseCandidate() public. 2019-01-25 13:58:57 +00:00
webrtc_session_description_factory.cc Use Abseil container algorithms in pc/ 2019-01-29 02:33:50 +00:00
webrtc_session_description_factory.h Creating Simulcast offer and answer in Peer Connection. 2019-01-28 18:56:02 +00:00