mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-27 12:52:20 +08:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8fb8d65764 | ||
![]() |
ae63fa65bf | ||
![]() |
23d77e2bb2 |
@@ -1,5 +1,5 @@
|
||||
github.com/blackjack/webcam v0.5.0 h1:NImYpsAbWxglejopcQGQ3FClxhJZaBBgr5fV7nsGdvk=
|
||||
github.com/blackjack/webcam v0.5.0/go.mod h1:zs+RkUZzqpFPHPiwBZ6U5B34ZXXe9i+SiHLKnnukJuI=
|
||||
github.com/blackjack/webcam v0.6.0 h1:ovvUNsIQZVfJZl6V2FcvFLFH62/Xx5zLwybKwEy3ZLw=
|
||||
github.com/blackjack/webcam v0.6.0/go.mod h1:zs+RkUZzqpFPHPiwBZ6U5B34ZXXe9i+SiHLKnnukJuI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module github.com/pion/mediadevices
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/blackjack/webcam v0.5.0
|
||||
github.com/blackjack/webcam v0.6.0
|
||||
github.com/gen2brain/malgo v0.11.21
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/kbinani/screenshot v0.0.0-20230812210009-b87d31814237
|
||||
|
4
go.sum
4
go.sum
@@ -1,5 +1,5 @@
|
||||
github.com/blackjack/webcam v0.5.0 h1:NImYpsAbWxglejopcQGQ3FClxhJZaBBgr5fV7nsGdvk=
|
||||
github.com/blackjack/webcam v0.5.0/go.mod h1:zs+RkUZzqpFPHPiwBZ6U5B34ZXXe9i+SiHLKnnukJuI=
|
||||
github.com/blackjack/webcam v0.6.0 h1:ovvUNsIQZVfJZl6V2FcvFLFH62/Xx5zLwybKwEy3ZLw=
|
||||
github.com/blackjack/webcam v0.6.0/go.mod h1:zs+RkUZzqpFPHPiwBZ6U5B34ZXXe9i+SiHLKnnukJuI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@@ -125,6 +125,7 @@ func discover(discovered map[string]struct{}, pattern string) {
|
||||
|
||||
var name, busInfo string
|
||||
if webcamCam, err := webcam.Open(cam.path); err == nil {
|
||||
defer webcamCam.Close()
|
||||
name, _ = webcamCam.GetName()
|
||||
busInfo, _ = webcamCam.GetBusInfo()
|
||||
}
|
||||
|
@@ -8,6 +8,18 @@
|
||||
#include "camera_windows.hpp"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
|
||||
imageProp* getProp(camera* cam, int i)
|
||||
{
|
||||
return &cam->props[i];
|
||||
}
|
||||
|
||||
char* getName(cameraList* list, int i)
|
||||
{
|
||||
return list->name[i];
|
||||
}
|
||||
|
||||
|
||||
// printErr shows string representation of HRESULT.
|
||||
// This is for debugging.
|
||||
void printErr(HRESULT hr)
|
||||
|
@@ -40,15 +40,9 @@ int listResolution(camera* cam, const char** errstr);
|
||||
int listCamera(cameraList* list, const char** errstr);
|
||||
int freeCameraList(cameraList* list, const char** errstr);
|
||||
|
||||
inline imageProp* getProp(camera* cam, int i)
|
||||
{
|
||||
return &cam->props[i];
|
||||
}
|
||||
imageProp* getProp(camera* cam, int i);
|
||||
|
||||
inline char* getName(cameraList* list, int i)
|
||||
{
|
||||
return list->name[i];
|
||||
}
|
||||
char* getName(cameraList* list, int i);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user