Closed Bug 1426486 Opened 2 years ago Closed 2 years ago

Make GetInputStream()->AsSourceStream() invariant

Categories

(Core :: WebRTC: Audio/Video, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(2 files)

I can never return null
Comment on attachment 8938130 [details]
Bug 1426486 - P1. Make GetInputStream()->AsSourceStream() invariant.

https://reviewboard.mozilla.org/r/208844/#review214786

::: media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:2406
(Diff revision 1)
>      if (delta > 0) {
>        VideoSegment segment;
>        IntSize size = image ? image->GetSize() : IntSize(mWidth, mHeight);
>        segment.AppendFrame(image.forget(), delta, size, mPrincipalHandle);
>        // Handle track not actually added yet or removed/finished
> -      if (!mTrack->GetInputStream()->AsSourceStream()->AppendToTrack(
> +      if (!mSource->AppendToTrack(mTrack->GetInputTrackId(), &segment)) {

Looks weird to do mTrack->GetInputTrackId() here when we have mTrackId.

Could you do the same to mTrackId as you just did to mSource? Thanks.
Attachment #8938130 - Flags: review?(apehrson) → review+
Comment on attachment 8938130 [details]
Bug 1426486 - P1. Make GetInputStream()->AsSourceStream() invariant.

https://reviewboard.mozilla.org/r/208844/#review214786

> Looks weird to do mTrack->GetInputTrackId() here when we have mTrackId.
> 
> Could you do the same to mTrackId as you just did to mSource? Thanks.

this appears out of scope, also most of the use of mTrackId appears unused for the video MediaPipeline so I'll remove it in a P2
Comment on attachment 8938408 [details]
Bug 1426486 - P2. Make mTrackId a base member.

https://reviewboard.mozilla.org/r/209108/#review214876
Attachment #8938408 - Flags: review?(docfaraday) → review+
thanks for the reviews....
Assignee: nobody → jyavenard
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5475206095b7
P1. Make GetInputStream()->AsSourceStream() invariant. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/85b81d55503a
P2. Make mTrackId a base member. r=bwc
https://hg.mozilla.org/mozilla-central/rev/5475206095b7
https://hg.mozilla.org/mozilla-central/rev/85b81d55503a
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.