Closed Bug 1452993 Opened 6 years ago Closed 6 years ago

Replace unnecessary MediaStreamGraph::GetInstance call in MediaManager

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: achronop, Assigned: achronop)

References

Details

Attachments

(1 file)

dom/media/MediaManager.cpp::4154
MediaStreamGraph::GetInstance(MediaStreamGraph::AUDIO_THREAD_DRIVER, window);
found in mozilla::SourceListener::StopSharing

This is called at stop of AudioCapture. Since we stop an operating stream the MSG is up and running. We could get the instance of MSG from the stream and stop calling the `MediaStreamGraph::GetInstance()` method.

After Bug 1387454 we must specify the sample rate of the graph in `MediaStreamGraph::GetInstance()` method. The instance of the graph is already stored MediaStream. Better to get it from there rather than calling the GetInstance() method and risk using wrong sample rate argument.
Assignee: nobody → achronop
Rank: 25
Priority: -- → P3
See Also: → 1387454
Comment on attachment 8966617 [details]
Bug 1452993 - Get MSG instance from MediaStream to avoid the risk of creating new instance.

https://reviewboard.mozilla.org/r/235330/#review242266
Attachment #8966617 - Flags: review?(padenot) → review+
Pushed by achronop@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5bb64d5081d6
Get MSG instance from MediaStream to avoid the risk of creating new instance. r=padenot
https://hg.mozilla.org/mozilla-central/rev/5bb64d5081d6
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: