示例#1
0
// [static]
func (p *VideoInput) ListDevices() (names []string) {
	names = make([]string, int(C.vi_listDevices()))
	for i, _ := range names {
		names[i] = C.GoString(C.vi_getDeviceName(C.int(i)))
	}
	return
}
示例#2
0
func newVideoInput() *videoInput {
	p := &videoInput{
		vi: C.vi_device_new(),
		m:  make([]IplImage, int(C.vi_listDevices())),
	}
	runtime.SetFinalizer(p, (*videoInput).Release)
	return p
}