How to prevent my camera driver from replacing default camera device

Taylor Yi 20 Reputation points
2024-12-06T06:45:50.31+00:00

I am making a new camera driver based on AVStream simulated hardware sample driver (Avshws) in Windows driver samples.

After installing my custom driver using Device Manager, when accessing any webpage that utilizes the camera feature (such as a WebRTC test page), my driver is always set as the default device.

I would prefer my original laptop camera to be the default device instead.

I have checked my driver's rank value in Device Manager.

my device's rank is FFFFFFFF, and the original camera's rank is 00FF2002.

since my driver has lower rank, i expeced it to be in lower list. but it was not.

How does Windows OS choose it's default camera?

What steps can be taken to set my laptop camera as the default device instead?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,933 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,330 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
138 questions
0 comments No comments
{count} votes

Accepted answer
  1. S.Sengupta 21,156 Reputation points MVP
    2024-12-06T15:29:31.7933333+00:00

    The default camera is determined largely on the application and how it interacts with the camera APIs. Disabling the custom camera when not in use or explicitly setting preferences in applications are the most direct solutions.

    Manage cameras with Camera settings in Windows 11

    Also:

    https://www.howtogeek.com/change-default-microphone-camera-windows-11/


1 additional answer

Sort by: Most helpful
  1. Daisy Zhou 27,356 Reputation points Microsoft Vendor
    2024-12-10T10:41:23.46+00:00

    Hello

    Thank you for posting in Q&A forum.

    You can modify registry to set your defualt camera: Open Registry Editor: Press Win + R, type regedit, and press Enter. Navigate to Key: Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateManager. Edit Permissions: Find the relevant key for the camera and modify its value to prevent it from being set as the default.

     

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.