Closed
Bug 1230184
Opened 8 years ago
Closed 8 years ago
SetParameters support for PeerConnection
Categories
(Core :: WebRTC: Signaling, defect, P1)
Core
WebRTC: Signaling
Tracking
()
RESOLVED
FIXED
mozilla46
backlog | webrtc/webaudio+ |
People
(Reporter: bwc, Assigned: jib)
References
()
Details
(Keywords: dev-doc-complete)
Attachments
(5 files)
40 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
40 bytes,
text/x-review-board-request
|
bwc
:
review+
mrbkap
:
review+
|
Details |
40 bytes,
text/x-review-board-request
|
bwc
:
review+
|
Details |
40 bytes,
text/x-review-board-request
|
bwc
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
jesup
:
review+
|
Details |
This covers the JS API for SetParameters, and the plumbing to JsepTrack.
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → jib
backlog: --- → webrtc/webaudio+
Rank: 15
Priority: -- → P1
Assignee | ||
Comment 1•8 years ago
|
||
Bug 1230184 - setParameters webidl.
Attachment #8696885 -
Flags: review?(bugs)
Assignee | ||
Comment 2•8 years ago
|
||
Bug 1230184 - plumb setParameters down to JsepTrack.
Attachment #8696886 -
Flags: review?(docfaraday)
Assignee | ||
Comment 3•8 years ago
|
||
rid is a recent addition.
Reporter | ||
Comment 4•8 years ago
|
||
https://reviewboard.mozilla.org/r/27457/#review24753 ::: dom/media/PeerConnection.js:1507 (Diff revision 1) > + setParameters: function(parameters) { > + return this._pc._setParameters(this, parameters); > + }, We probably want at least a TODO here for validation code that covers: 1. No duplicate rids 2. If there is more than one element in the array, all elements need to have a rid (since we cannot mux without rids) On further thought, _changing_ a rid is going to be interpreted as either changing the bitrate on a pre-existing rid, the introduction of a new rid, or the removal of an old one, so that's not something we need to worry about I think. ::: dom/media/tests/mochitest/test_peerConnection_replaceTrack.html:91 (Diff revision 1) > + // Test sender parameters. > + test.chain.append([ > + function PC_LOCAL_SET_PARAMETERS(test) { > + return parameterstest(test.pcLocal); > + } > + ]); I think I'd prefer there to be a separate test-case for this. ::: media/webrtc/signaling/src/jsep/JsepTrack.h:188 (Diff revision 1) > + void GetJsConstraints(std::vector<JsConstraints>& outConstraintsList) This can be const. ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp:2329 (Diff revision 1) > + if (aParameters.mEncodings.WasPassed()) { What does the spec say should happen if no parameters are passed? Does that mean no encodings, or does it mean we revert back to a single encoding with no params on it? ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp:2341 (Diff revision 1) > + nsresult rv = mJsepSession->SetParameters(streamId, trackId, constraints); > + if (NS_FAILED(rv)) { > + return NS_ERROR_FAILURE; > + } I think I would like to see this part in a separate function, so signaling_unittests can call it, although I'm not totally sure I want to test this there. ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp:2359 (Diff revision 1) > + nsresult rv = mJsepSession->GetParameters(streamId, trackId, constraints); > + if (NS_FAILED(rv)) { > + return NS_ERROR_FAILURE; > + } Same thing here.
Comment 5•8 years ago
|
||
Comment on attachment 8696885 [details] MozReview Request: Bug 1230184 - setParameters webidl. https://reviewboard.mozilla.org/r/27459/#review24787 ::: dom/webidl/RTCRtpSender.webidl:40 (Diff revision 1) > + float scaleResolutionDownBy = 1.0; I'm not seeing rid or scaleResolutionDownBy in the spec, but https://rawgit.com/w3c/webrtc-pc/8bbc42e71da1245a4e09f55e2b8e91f52d81c6f0/webrtc.html#idl-def-RTCRtpEncodingParameters has them. I assume the spec will get them too.
Attachment #8696885 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 6•8 years ago
|
||
https://reviewboard.mozilla.org/r/27459/#review24787 > I'm not seeing rid or scaleResolutionDownBy in the spec, but > https://rawgit.com/w3c/webrtc-pc/8bbc42e71da1245a4e09f55e2b8e91f52d81c6f0/webrtc.html#idl-def-RTCRtpEncodingParameters has them. > I assume the spec will get them too. Yes it will.
Assignee | ||
Comment 7•8 years ago
|
||
https://reviewboard.mozilla.org/r/27457/#review24797 ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp:2329 (Diff revision 1) > + if (aParameters.mEncodings.WasPassed()) { I would naively assume it returns to the default?
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8696886 [details] MozReview Request: Bug 1230184 - plumb setParameters down to JsepTrack. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27461/diff/1-2/
Assignee | ||
Comment 9•8 years ago
|
||
Bug 1230184 - add input parameter validation to setParameters.
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8697175 [details] MozReview Request: Bug 1230184 - add input parameter validation to setParameters. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27525/diff/1-2/
Attachment #8697175 -
Flags: review?(docfaraday)
Reporter | ||
Comment 11•8 years ago
|
||
Comment on attachment 8696886 [details] MozReview Request: Bug 1230184 - plumb setParameters down to JsepTrack. https://reviewboard.mozilla.org/r/27461/#review24825
Attachment #8696886 -
Flags: review?(docfaraday) → review+
Reporter | ||
Comment 12•8 years ago
|
||
Comment on attachment 8697175 [details] MozReview Request: Bug 1230184 - add input parameter validation to setParameters. https://reviewboard.mozilla.org/r/27525/#review24827 ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h:457 (Diff revision 1) > - mozilla::dom::RTCRtpParameters& aOutParameters) > + dom::RTCRtpParameters& aOutParameters) I missed this last time; convention around here is for outparams to be pointers. ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h:469 (Diff revision 1) > + std::vector<JsepTrack::JsConstraints>& aOutConstraints); Same here.
Attachment #8697175 -
Flags: review?(docfaraday) → review+
Assignee | ||
Comment 13•8 years ago
|
||
https://reviewboard.mozilla.org/r/27525/#review24849 ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h:457 (Diff revision 1) > - mozilla::dom::RTCRtpParameters& aOutParameters) > + dom::RTCRtpParameters& aOutParameters) This one is dictated by the binding code which does not follow that convention. ::: media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h:469 (Diff revision 1) > + std::vector<JsepTrack::JsConstraints>& aOutConstraints); But this one I can fix.
Assignee | ||
Comment 14•8 years ago
|
||
Comment on attachment 8696885 [details] MozReview Request: Bug 1230184 - setParameters webidl. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27459/diff/1-2/
Assignee | ||
Comment 15•8 years ago
|
||
Comment on attachment 8696886 [details] MozReview Request: Bug 1230184 - plumb setParameters down to JsepTrack. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27461/diff/2-3/
Assignee | ||
Comment 16•8 years ago
|
||
Comment on attachment 8697175 [details] MozReview Request: Bug 1230184 - add input parameter validation to setParameters. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27525/diff/1-2/
Assignee | ||
Comment 17•8 years ago
|
||
Rebased and incorporated feedback.
Assignee | ||
Comment 18•8 years ago
|
||
Bug 1230184 - add media.peerconnection.simulcast pref.
Attachment #8697428 -
Flags: review?(docfaraday)
Reporter | ||
Comment 19•8 years ago
|
||
Comment on attachment 8697428 [details] MozReview Request: Bug 1230184 - add media.peerconnection.simulcast pref. https://reviewboard.mozilla.org/r/27611/#review24871
Attachment #8697428 -
Flags: review?(docfaraday) → review+
Reporter | ||
Comment 20•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=121b2a7158b2
Reporter | ||
Comment 21•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/29321/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/29321/
Reporter | ||
Updated•8 years ago
|
Attachment #8703204 -
Attachment description: MozReview Request: Bug 1230184 - Disable setParameters mochitest on the same platforms that basicVideo is disabled on. → MozReview Request: Bug 1230184 - Disable setParameters mochitest on the same platforms that basicVideo is disabled on. r?jesup
Attachment #8703204 -
Flags: review?(rjesup)
Reporter | ||
Comment 22•8 years ago
|
||
Comment on attachment 8703204 [details] MozReview Request: Bug 1230184 - Disable setParameters mochitest on the same platforms that basicVideo is disabled on. r?jesup Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29321/diff/1-2/
Comment 23•8 years ago
|
||
Comment on attachment 8703204 [details] MozReview Request: Bug 1230184 - Disable setParameters mochitest on the same platforms that basicVideo is disabled on. r?jesup https://reviewboard.mozilla.org/r/29321/#review26087
Attachment #8703204 -
Flags: review?(rjesup) → review+
Updated•8 years ago
|
Attachment #8696886 -
Flags: review?(mrbkap)
Updated•8 years ago
|
Attachment #8696886 -
Flags: review?(mrbkap) → review+
Comment 24•8 years ago
|
||
Comment on attachment 8696886 [details] MozReview Request: Bug 1230184 - plumb setParameters down to JsepTrack. https://reviewboard.mozilla.org/r/27461/#review26091
Reporter | ||
Comment 25•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/59cefb0904c409757f446ef319f7f81834d400f1 Bug 1230184 - setParameters webidl. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/9da04c2984fdaf2c77e0e489759be963573fd915 Bug 1230184 - plumb setParameters down to JsepTrack. r=bwc, r=mrbkap https://hg.mozilla.org/integration/mozilla-inbound/rev/6418df768fe4dd193a5c20bc672f45dbc4b91a52 Bug 1230184 - add input parameter validation to setParameters. r=bwc https://hg.mozilla.org/integration/mozilla-inbound/rev/9d2a98ad114f849b51723c9f17faf5de5be53e47 Bug 1230184 - add media.peerconnection.simulcast pref. r=bwc https://hg.mozilla.org/integration/mozilla-inbound/rev/e23c280f0d3a31cf8b8cb0e335d1b97f39a96603 Bug 1230184 - Disable setParameters mochitest on the same platforms that basicVideo is disabled on. r=jesup
Comment 26•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/59cefb0904c4 https://hg.mozilla.org/mozilla-central/rev/9da04c2984fd https://hg.mozilla.org/mozilla-central/rev/6418df768fe4 https://hg.mozilla.org/mozilla-central/rev/9d2a98ad114f https://hg.mozilla.org/mozilla-central/rev/e23c280f0d3a
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Comment 27•5 years ago
|
||
This was never DDN and got missed back in the day but has now been documented and added to Firefox 46 for developers.
Comment 28•5 years ago
|
||
The following documents have been added to MDN: https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSendParameters https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSendParameters/encodings https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters/maxBitrate https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters/scaleResolutionDownBy Updated: https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/setParameters
Keywords: dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•