blackjack / webcam

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

Add find and open func #28

Open rsjethani opened 5 years ago

rsjethani commented 5 years ago

Add FindAndOpen() func

This function will lookup suitable webcam device and open it. IMO this is better than hardcoding /dev/video0.

Addresses: Issue #27

blackjack commented 4 years ago

Sorry for delayed response. I was a bit in disbelief on how to actually find if device is v4l2 device or not. Apparently there way is indeed to iterate over all "/dev/video*" devices. I'll gladly do a review of this PR then. Thanks for the effort!

rsjethani commented 4 years ago

@blackjack so you are saying that I should iterate only over video* devices?