Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Unified Diff: webrtc/media/base/mediachannel.h

Issue 2564333002: Reland of: Separating SCTP code from BaseChannel/MediaChannel. (Closed)
Patch Set: Merge with master. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/base/hybriddataengine.h ('k') | webrtc/media/base/mediaconstants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/mediachannel.h
diff --git a/webrtc/media/base/mediachannel.h b/webrtc/media/base/mediachannel.h
index d66424014b7cef41c41ba030f7c39c883c8b4c83..4c6b024947b087c6a697e0143aa01c3df5f79383 100644
--- a/webrtc/media/base/mediachannel.h
+++ b/webrtc/media/base/mediachannel.h
@@ -1077,8 +1077,11 @@ enum DataMessageType {
// signal fires, on up the chain.
struct ReceiveDataParams {
// The in-packet stream indentifier.
- // For SCTP, this is really SID, not SSRC.
- uint32_t ssrc;
+ // RTP data channels use SSRCs, SCTP data channels use SIDs.
+ union {
+ uint32_t ssrc;
+ int sid;
+ };
// The type of message (binary, text, or control).
DataMessageType type;
// A per-stream value incremented per packet in the stream.
@@ -1086,18 +1089,16 @@ struct ReceiveDataParams {
// A per-stream value monotonically increasing with time.
int timestamp;
- ReceiveDataParams() :
- ssrc(0),
- type(DMT_TEXT),
- seq_num(0),
- timestamp(0) {
- }
+ ReceiveDataParams() : sid(0), type(DMT_TEXT), seq_num(0), timestamp(0) {}
};
struct SendDataParams {
// The in-packet stream indentifier.
- // For SCTP, this is really SID, not SSRC.
- uint32_t ssrc;
+ // RTP data channels use SSRCs, SCTP data channels use SIDs.
+ union {
+ uint32_t ssrc;
+ int sid;
+ };
// The type of message (binary, text, or control).
DataMessageType type;
@@ -1116,15 +1117,14 @@ struct SendDataParams {
// is supported, not both at the same time.
int max_rtx_ms;
- SendDataParams() :
- ssrc(0),
- type(DMT_TEXT),
- // TODO(pthatcher): Make these true by default?
- ordered(false),
- reliable(false),
- max_rtx_count(0),
- max_rtx_ms(0) {
- }
+ SendDataParams()
+ : sid(0),
+ type(DMT_TEXT),
+ // TODO(pthatcher): Make these true by default?
+ ordered(false),
+ reliable(false),
+ max_rtx_count(0),
+ max_rtx_ms(0) {}
};
enum SendDataResult { SDR_SUCCESS, SDR_ERROR, SDR_BLOCK };
@@ -1183,8 +1183,6 @@ class DataMediaChannel : public MediaChannel {
// Signal when the media channel is ready to send the stream. Arguments are:
// writable(bool)
sigslot::signal1<bool> SignalReadyToSend;
- // Signal for notifying that the remote side has closed the DataChannel.
- sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
};
} // namespace cricket
« no previous file with comments | « webrtc/media/base/hybriddataengine.h ('k') | webrtc/media/base/mediaconstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698