зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1339906 - pt 5 - add writable field to webidl for RTCIceCandidatePairStats and implement readable and writeable fields. r=drno,qdot
MozReview-Commit-ID: 6IODhX5mtnP --HG-- extra : rebase_source : 30245be09b3b4bf057672cceb2d90d3393da035c
This commit is contained in:
Родитель
1b76f106fd
Коммит
da7254ecbf
|
@ -207,6 +207,7 @@ struct ParamTraits<mozilla::dom::RTCIceCandidatePairStats>
|
|||
WriteParam(aMsg, aParam.mLocalCandidateId);
|
||||
WriteParam(aMsg, aParam.mPriority);
|
||||
WriteParam(aMsg, aParam.mNominated);
|
||||
WriteParam(aMsg, aParam.mWritable);
|
||||
WriteParam(aMsg, aParam.mReadable);
|
||||
WriteParam(aMsg, aParam.mRemoteCandidateId);
|
||||
WriteParam(aMsg, aParam.mSelected);
|
||||
|
@ -224,6 +225,7 @@ struct ParamTraits<mozilla::dom::RTCIceCandidatePairStats>
|
|||
!ReadParam(aMsg, aIter, &(aResult->mLocalCandidateId)) ||
|
||||
!ReadParam(aMsg, aIter, &(aResult->mPriority)) ||
|
||||
!ReadParam(aMsg, aIter, &(aResult->mNominated)) ||
|
||||
!ReadParam(aMsg, aIter, &(aResult->mWritable)) ||
|
||||
!ReadParam(aMsg, aIter, &(aResult->mReadable)) ||
|
||||
!ReadParam(aMsg, aIter, &(aResult->mRemoteCandidateId)) ||
|
||||
!ReadParam(aMsg, aIter, &(aResult->mSelected)) ||
|
||||
|
|
|
@ -129,8 +129,9 @@ dictionary RTCIceCandidatePairStats : RTCStats {
|
|||
DOMString remoteCandidateId;
|
||||
RTCStatsIceCandidatePairState state;
|
||||
unsigned long long priority;
|
||||
boolean readable;
|
||||
boolean nominated;
|
||||
boolean writable;
|
||||
boolean readable;
|
||||
unsigned long long bytesSent;
|
||||
unsigned long long bytesReceived;
|
||||
DOMHighResTimeStamp lastPacketSentTimestamp;
|
||||
|
|
|
@ -402,6 +402,13 @@ nsresult NrIceMediaStream::GetCandidatePairs(std::vector<NrIceCandidatePair>*
|
|||
|
||||
pair.priority = p1->priority;
|
||||
pair.nominated = p1->peer_nominated || p1->nominated;
|
||||
// As discussed with drno: a component's can_send field (set to true
|
||||
// by ICE consent) is a very close approximation for writable and
|
||||
// readable. Note: the component for the local candidate never has
|
||||
// the can_send member set to true, remote for both readable and
|
||||
// writable. (mjf)
|
||||
pair.writable = p1->remote->component->can_send;
|
||||
pair.readable = p1->remote->component->can_send;
|
||||
pair.selected = p1->remote->component &&
|
||||
p1->remote->component->active == p1;
|
||||
pair.codeword = p1->codeword;
|
||||
|
|
|
@ -115,6 +115,8 @@ struct NrIceCandidatePair {
|
|||
// when we are the controlling agent, this will always be set if the pair is
|
||||
// in STATE_SUCCEEDED.
|
||||
bool nominated;
|
||||
bool writable;
|
||||
bool readable;
|
||||
// Set if this candidate pair has been selected. Note: Since we are using
|
||||
// aggressive nomination, this could change frequently as ICE runs.
|
||||
bool selected;
|
||||
|
|
|
@ -3593,6 +3593,8 @@ static void RecordIceStats_s(
|
|||
s.mLocalCandidateId.Construct(localCodeword);
|
||||
s.mRemoteCandidateId.Construct(remoteCodeword);
|
||||
s.mNominated.Construct(candPair.nominated);
|
||||
s.mWritable.Construct(candPair.writable);
|
||||
s.mReadable.Construct(candPair.readable);
|
||||
s.mPriority.Construct(candPair.priority);
|
||||
s.mSelected.Construct(candPair.selected);
|
||||
s.mBytesSent.Construct(candPair.bytes_sent);
|
||||
|
|
Загрузка…
Ссылка в новой задаче