Pass datachannel priority in DC open messages
This adds priority to the API configuration of datachannels, and passes the value in the OPEN message. It does not yet influence SCTP prioritization of messages. Bug: chromium:1083227 Change-Id: I46ddd1eefa0e3d07c959383788b9e80fcbfa38d6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175107 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Taylor <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31287}
This commit is contained in:
committed by
Commit Bot
parent
49a5e3ec3c
commit
fd5ae7f959
@ -20,6 +20,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/priority.h"
|
||||
#include "api/rtc_error.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/copy_on_write_buffer.h"
|
||||
@ -61,6 +62,9 @@ struct DataChannelInit {
|
||||
|
||||
// The stream id, or SID, for SCTP data channels. -1 if unset (see above).
|
||||
int id = -1;
|
||||
|
||||
// https://w3c.github.io/webrtc-priority/#new-rtcdatachannelinit-member
|
||||
absl::optional<Priority> priority;
|
||||
};
|
||||
|
||||
// At the JavaScript level, data can be passed in as a string or a blob, so
|
||||
@ -154,6 +158,7 @@ class RTC_EXPORT DataChannelInterface : public rtc::RefCountInterface {
|
||||
// If negotiated in-band, this ID will be populated once the DTLS role is
|
||||
// determined, and until then this will return -1.
|
||||
virtual int id() const = 0;
|
||||
virtual Priority priority() const { return Priority::kLow; }
|
||||
virtual DataState state() const = 0;
|
||||
// When state is kClosed, and the DataChannel was not closed using
|
||||
// the closing procedure, returns the error information about the closing.
|
||||
|
||||
Reference in New Issue
Block a user