Expose device list update func (#463)

This commit is contained in:
Clyde Bazile
2023-01-13 19:02:46 -05:00
committed by GitHub
parent 6ac1424488
commit 85597da5bb
6 changed files with 30 additions and 0 deletions

View File

@@ -73,6 +73,11 @@ type camera struct {
}
func init() {
Initialize()
}
// Initialize finds and registers camera devices. This is part of an experimental API.
func Initialize() {
discovered := make(map[string]struct{})
discover(discovered, "/dev/v4l/by-path/*")
discover(discovered, "/dev/video*")