Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Camera] Add method to switch to a specific video device #42

Merged
merged 1 commit into from
Mar 12, 2022

Conversation

YuAo
Copy link
Member

@YuAo YuAo commented Mar 10, 2022

See the discussion in #37 (comment)

@YuAo YuAo requested a review from dsmurfin March 11, 2022 01:33
Copy link
Collaborator

@dsmurfin dsmurfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you. I will look at adding the equivalent for audio input switching.

@YuAo YuAo merged commit 1623b3d into master Mar 12, 2022
@YuAo YuAo deleted the switch_video_device branch March 12, 2022 01:17
@YuAo
Copy link
Member Author

YuAo commented Mar 15, 2022

@dsmurfin For the audio part:

It behaves differently when disabling video/audio output with the current implementation. When disabling a video output, video input is kept, however disabling an audio output removes the audio input.

Since no audio device selection is allowed previously, this is not a big problem - we always use the one default audio device. But now, I think it's better to unify this behavior.

I suggest that we keep the audio and video inputs when disabling the outputs, and provide methods to remove the inputs (as you suggest in #36):

  • This avoids the need for reconfiguring the device after disabling the output.
  • It makes the enable...output/disable...output methods work more like their name suggests (except that the enable...output methods also config the input device when necessary, which I think is a nice helper).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants