Closed
Bug 1169125
Opened 9 years ago
Closed 9 years ago
Occasional green frames in remote video when streaming a CanvasCaptureMediaStream over WebRTC
Categories
(Core :: WebRTC: Audio/Video, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
backlog | webrtc/webaudio+ |
People
(Reporter: pehrsons, Assigned: pehrsons)
References
Details
(Whiteboard: [canvas])
Attachments
(2 files)
STR: 1. Go to https://mozilla.github.io/webrtc-landing/canvas_swap.html 2. Click start Expected: smooth video on the remote side Actual: mostly smooth video, but with occasional green frames inserted on the remote side
Updated•9 years ago
|
backlog: --- → webRTC+
Rank: 25
Priority: -- → P2
Whiteboard: [canvas]
Assignee | ||
Comment 1•9 years ago
|
||
This is because of DataSourceSurface::GetData() returns null when we try to read the video frame in MediaPipeline. Not sure why we can't read the surface, but I'll patch it up to use the new API Map/Unmap instead of the deprecated GetData/GetStride, and guard for errors. It ended up green (I've seen it pink too) because the conversion from ARGB to I420 would exit early and we'd then send just-initialized 0's over the wire.
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1169125 - Check for Map() failure before sending out video frame in MediaPipeline. r=bwc
Attachment #8615806 -
Flags: review?(docfaraday)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → pehrsons
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8615806 -
Flags: review?(docfaraday)
Comment 3•9 years ago
|
||
Comment on attachment 8615806 [details] MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc https://reviewboard.mozilla.org/r/10367/#review9115 ::: media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:1211 (Diff revision 1) > - libyuv::ARGBToI420(static_cast<uint8*>(surf->GetData()), surf->Stride(), > + libyuv::ARGBToI420(static_cast<uint8*>(map.mData), map.mStride, Maybe what we really want to be doing is bailing on any error here. That will catch cases where surf->GetData() is null (this particular bug, if I understand correctly), and other error conditions (although the other error conditions don't seem to be possible). ::: media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:1218 (Diff revision 1) > - libyuv::RGB565ToI420(static_cast<uint8*>(surf->GetData()), surf->Stride(), > + libyuv::RGB565ToI420(static_cast<uint8*>(map.mData), map.mStride, We should also be checking here. ::: media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:1226 (Diff revision 1) > MOZ_ASSERT(PR_FALSE); We should definitely be bailing here in release, otherwise we send a video frame of uninitialized memory.
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8615806 [details] MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc Bug 1169125 - Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc
Attachment #8615806 -
Attachment description: MozReview Request: Bug 1169125 - Check for Map() failure before sending out video frame in MediaPipeline. r=bwc → MozReview Request: Bug 1169125 - Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc
Assignee | ||
Updated•9 years ago
|
Attachment #8615806 -
Flags: review?(docfaraday)
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8615806 [details] MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc Bug 1169125 - Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc
Assignee | ||
Comment 6•9 years ago
|
||
I addressed your comments Byron. I also, as a general cleanup thing, removed the restriction on surfaces being YCBCR or CAIRO. YCBCR (still special case since it doesn't need converting) and any surfaces where we can read out the bits should be good. This also happens to fix issue 1 of bug 1171907.
Updated•9 years ago
|
Attachment #8615806 -
Flags: review?(docfaraday)
Comment 7•9 years ago
|
||
Comment on attachment 8615806 [details] MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc https://reviewboard.mozilla.org/r/10367/#review9211 ::: media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:1234 (Diff revision 2) > + return; > + } > + if (rv != 0) { > + MOZ_MTLOG(ML_ERROR, "RGB to I420 conversion failed"); > + return; > } > + data->Unmap(); We want to Unmap before bailing, right?
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Byron Campen [:bwc] from comment #7) > Comment on attachment 8615806 [details] > MozReview Request: Bug 1169125 - Allow sending any DataSourceSurface-backed > image over WebRTC and fix failure cases. r=bwc > > https://reviewboard.mozilla.org/r/10367/#review9211 > > ::: media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:1234 > (Diff revision 2) > > + return; > > + } > > + if (rv != 0) { > > + MOZ_MTLOG(ML_ERROR, "RGB to I420 conversion failed"); > > + return; > > } > > + data->Unmap(); > > We want to Unmap before bailing, right? Oh, we do indeed. Good catch! I just got r+ on bug 1162357. Let me land that first and we can use the scope for unmapping.
Depends on: 1162357
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8615806 [details] MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc
Attachment #8615806 -
Attachment description: MozReview Request: Bug 1169125 - Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc → MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc
Attachment #8615806 -
Flags: review?(docfaraday)
Assignee | ||
Comment 10•9 years ago
|
||
Bug 1169125 - Part 2. Use UniquePtr for scoped delete of yuv data in MediaPipeline. r=bwc
Attachment #8617111 -
Flags: review?(docfaraday)
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Andreas Pehrson [:pehrsons] (Telenor) from comment #10) > Created attachment 8617111 [details] > MozReview Request: Bug 1169125 - Part 2. Use UniquePtr for scoped delete of > yuv data in MediaPipeline. r=bwc > > Bug 1169125 - Part 2. Use UniquePtr for scoped delete of yuv data in > MediaPipeline. r=bwc We also need to make sure |yuv| doesn't leak, which this patch fixes.
Comment 12•9 years ago
|
||
Comment on attachment 8615806 [details] MozReview Request: Bug 1169125 - Part 1. Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc https://reviewboard.mozilla.org/r/10367/#review9321 Ship It!
Attachment #8615806 -
Flags: review?(docfaraday) → review+
Updated•9 years ago
|
Attachment #8617111 -
Flags: review?(docfaraday) → review+
Comment 13•9 years ago
|
||
Comment on attachment 8617111 [details] MozReview Request: Bug 1169125 - Part 2. Use UniquePtr for scoped delete of yuv data in MediaPipeline. r=bwc https://reviewboard.mozilla.org/r/10545/#review9323 Ship It!
Assignee | ||
Comment 14•9 years ago
|
||
try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7c41769697be
Comment 16•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/92b2503d2ee7 https://hg.mozilla.org/integration/mozilla-inbound/rev/c3af3b1cf582
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/92b2503d2ee7 https://hg.mozilla.org/mozilla-central/rev/c3af3b1cf582
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•