Closed Bug 931903 Opened 11 years ago Closed 10 years ago

Add mochitest to verify that forwarding a MediaStream from one PeerConnection to another succeeds

Categories

(Core :: WebRTC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: jesup, Assigned: pehrsons)

References

Details

Attachments

(2 files, 3 obsolete files)

Because the hints are missing, when forwarding a MediaStream from one PeerConnection to another createOffer never returns success or failure. Reported and discussed on IRC: http://logbot.glob.com.au/?c=mozilla%23media&s=22+Oct+2013&e=22+Oct+2013 15:53 ehugg abr: Sure. Earlier on we used the NotifyQueuedTrackChanges callback to figure out which tracks where there since we could not enumerate them. 15:54 ehugg The problem was that it was not guaranteed to fire in time before we needed the info. 15:55 ehugg There was no way to enumerate the tracks of a a stream and no way even if we had a track to determine its type. 15:56 jesup ehugg: right; the stream didn't appear until some semi-random time later 15:57 jesup or rather the track(s) 15:59 ehugg Yes, we need either to change how the media stream works or to do a 'wait-for-preroll' hack to get these notifications.
Attached file testcase (obsolete) —
Modified version of pc_test with a second set of PC's that include a forwarded stream.
See also bug 932845 (same thing with mozCaptureStreamUntilEnded())
Is this still the case? I get a bunch of errors in the console when using the test page so can't tell.
Flags: needinfo?(mreavy)
This is still an issue. We solved it for mozCaptureStream by adding hints after metadataloaded, but that doesn't help us here. The test has bit-rotted, but if you take pc_test.html and add a forward of one of the received streams from a (new) pc3 to a pc4, that should show the problem (effectively, that's what the bitrotted test was, but ICE/etc changes have been made since then).
Flags: needinfo?(mreavy)
Seems to work just fine for me on mac with 37 :)
Attachment #823440 - Attachment is obsolete: true
Flags: needinfo?(mreavy)
Oh, very cool! It looks like jib's changes in bug 1070127 in combination with your changes in bug 1103848 fixed this. So I'd like to change this then into "add a mochitest for forwarding" so that this functionality doesn't get accidentally broken. Andreas -- Can you take this bug (given its new purpose)?
Flags: needinfo?(mreavy) → needinfo?(pehrsons)
Summary: Forwarding a MediaStream from one PeerConnection to another fails (due to missing hints) → Add mochitest to verify that forwarding a MediaStream from one PeerConnection to another succeeds
Sure!
Assignee: nobody → pehrsons
Status: NEW → ASSIGNED
Flags: needinfo?(pehrsons)
Target Milestone: mozilla28 → ---
I hope I understood the testing framework correctly. My first time diving into it ;-) https://treeherder.mozilla.org/#/jobs?repo=try&revision=9fd7de48ac9e
Attachment #8564038 - Flags: review?(rjesup)
Ok, this should fix the shutdown procedure. I'll be gone for a week from now so if this gets r+, feel free to push to try and land it.
Attachment #8564038 - Attachment is obsolete: true
Attachment #8564038 - Flags: review?(rjesup)
Attachment #8564224 - Flags: review?(rjesup)
Attachment #8564224 - Flags: review?(rjesup)
Attachment #8564224 - Flags: review?(drno)
Attachment #8564224 - Flags: review+
Comment on attachment 8564224 [details] [diff] [review] Add mochitest for forwarding a stream from one PC to another Review of attachment 8564224 [details] [diff] [review]: ----------------------------------------------------------------- In general this looks good as seem to work (to my surprise). But since Byron just landed multistream this new test is failing, because the new MSID verification fails. So this needs to be fixed before landing.
Attachment #8564224 - Flags: review?(drno) → review-
Solved using PeerConnectionWrapper.attachMedia instead of manually adding tracks to the PeerConnection.
Attachment #8564224 - Attachment is obsolete: true
Attachment #8567792 - Flags: review?(drno)
Comment on attachment 8567792 [details] [diff] [review] Add mochitest for forwarding a stream from one PC to another (carries r=jesup) Review of attachment 8567792 [details] [diff] [review]: ----------------------------------------------------------------- LGTM and works now :-)
Attachment #8567792 - Flags: review?(drno) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: