dcsctp: Add public API for setting priorities
This is a reland of commit 17a02a31d7d2897b75ad69fdac5d10e7475a5865. This is the first part of supporting stream priorities, and adds the API and very basic support for setting and retrieving the stream priority. This commit doesn't in any way change the actual packet sending - the specified priority values are stored, but not acted on. This is all that is client visible, so clients can start using the API as written, and they would never notice that things are missing. Bug: webrtc:5696 Change-Id: I04d64a63cbaec67568496ad99667e14eba85f2e0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264424 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37081}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
8c0f54b92c
commit
7e897aeb92
@ -189,6 +189,7 @@ DcSctpSocket::DcSctpSocket(absl::string_view log_prefix,
|
||||
send_queue_(
|
||||
log_prefix_,
|
||||
options_.max_send_buffer_size,
|
||||
options_.default_stream_priority,
|
||||
[this](StreamID stream_id) {
|
||||
callbacks_.OnBufferedAmountLow(stream_id);
|
||||
},
|
||||
@ -420,6 +421,16 @@ void DcSctpSocket::InternalClose(ErrorKind error, absl::string_view message) {
|
||||
RTC_DCHECK(IsConsistent());
|
||||
}
|
||||
|
||||
void DcSctpSocket::SetStreamPriority(StreamID stream_id,
|
||||
StreamPriority priority) {
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
send_queue_.SetStreamPriority(stream_id, priority);
|
||||
}
|
||||
StreamPriority DcSctpSocket::GetStreamPriority(StreamID stream_id) const {
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
return send_queue_.GetStreamPriority(stream_id);
|
||||
}
|
||||
|
||||
SendStatus DcSctpSocket::Send(DcSctpMessage message,
|
||||
const SendOptions& send_options) {
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
|
||||
Reference in New Issue
Block a user