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

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

Issue 2614813003: Revert of Separating SCTP code from BaseChannel/MediaChannel. (Closed)
Patch Set: Also reverting https://codereview.webrtc.org/2612963002 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 4c6b024947b087c6a697e0143aa01c3df5f79383..d66424014b7cef41c41ba030f7c39c883c8b4c83 100644
--- a/webrtc/media/base/mediachannel.h
+++ b/webrtc/media/base/mediachannel.h
@@ -1077,11 +1077,8 @@ enum DataMessageType {
// signal fires, on up the chain.
struct ReceiveDataParams {
// The in-packet stream indentifier.
- // RTP data channels use SSRCs, SCTP data channels use SIDs.
- union {
- uint32_t ssrc;
- int sid;
- };
+ // For SCTP, this is really SID, not SSRC.
+ uint32_t ssrc;
// The type of message (binary, text, or control).
DataMessageType type;
// A per-stream value incremented per packet in the stream.
@@ -1089,16 +1086,18 @@ struct ReceiveDataParams {
// A per-stream value monotonically increasing with time.
int timestamp;
- ReceiveDataParams() : sid(0), type(DMT_TEXT), seq_num(0), timestamp(0) {}
+ ReceiveDataParams() :
+ ssrc(0),
+ type(DMT_TEXT),
+ seq_num(0),
+ timestamp(0) {
+ }
};
struct SendDataParams {
// The in-packet stream indentifier.
- // RTP data channels use SSRCs, SCTP data channels use SIDs.
- union {
- uint32_t ssrc;
- int sid;
- };
+ // For SCTP, this is really SID, not SSRC.
+ uint32_t ssrc;
// The type of message (binary, text, or control).
DataMessageType type;
@@ -1117,14 +1116,15 @@ struct SendDataParams {
// is supported, not both at the same time.
int max_rtx_ms;
- 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) {}
+ 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) {
+ }
};
enum SendDataResult { SDR_SUCCESS, SDR_ERROR, SDR_BLOCK };
@@ -1183,6 +1183,8 @@ 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