Closed Bug 1617915 Opened 5 years ago Closed 5 years ago

Allow setting output device id in MediaTrackGraph.

Categories

(Core :: Audio/Video: MediaStreamGraph, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: achronop, Assigned: achronop)

References

Details

Attachments

(3 files)

Currently, MediaTrackGraph plays audio in the default output device. However, it would be able to play to any output device attached to the system, if the output device id was configurable.

With this bug, the output device id option will be exposed to MediaTrackGraph constructor. Any component that makes use of MTG will be able to define the output device id. If the device id is NULL the default device will be chosen.

This is required for setSinkId.

In order to be able to change the audio output device, the device id is exposed to the constructor of MediaStreamGraph. Any component that gets/creates an MTG will be able to provide the device id in order to determine the desired output device. If the provided device id is null the default device will be used.

MockCubeb simulates the behavior of libcubeb and allows us to exercise media Gecko code from gtests. Some enhancements have been made to make it usable for exercising the MTG.

  • Define the get_max_channel_count method.
  • Define a mock cubeb_stream class that allow to handle many streams with the same (mock) cubeb context.

Depends on D64133

Create gtests to verify that the device id provided to the constructor of MTG will be the one used by cubeb as output device id. In addition to that, verify that using a different device id will result in creating/getting a different MTG instance.

Depends on D64134

Blocks: 1621243
Pushed by achronopoulos@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e3fcadf709f0 Expose output device id when MediaTrackGraph is created. r=padenot https://hg.mozilla.org/integration/autoland/rev/bfb1aaa33317 Enhance MockCubeb to support using it in MediaTrackGraph unit tests. r=padenot https://hg.mozilla.org/integration/autoland/rev/e144f3d78dfa Create unit tests to verify that MTG sets the expected device id. r=padenot
Regressions: 1622897
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: