blackjack / webcam

Golang webcam library for Linux
MIT License
416 stars 92 forks source link

Error if `/dev/video0` file not present #27

Open rsjethani opened 5 years ago

rsjethani commented 5 years ago

If /dev/vide0 device is not present the we get error: no such file or directory. On some systems the webcam may be present as /dev/video1 etc.

blackjack commented 4 years ago

Hi! Are you talking about the example program? Yeah, path to webcam is currently hardcoded, so if your webcam device path differs you need to adjust your source code.

rsjethani commented 4 years ago

@blackjack sure the webcam consumer can find out how the webcam is represented on his system and then call Open() accordingly but this will make the consumer's package less portable.

In Pr #28 I am proposing a way where the consumer can safely assume that the package will try to locate webcam automatically hence no hard coding will be required.