Remove Windows camera cpp inline function (#569)

Co-authored-by: Qiulin Li <liqiulin@outlook.com>
This commit is contained in:
qiulin
2024-04-29 21:54:45 +08:00
committed by GitHub
parent 23d77e2bb2
commit ae63fa65bf
3 changed files with 16 additions and 10 deletions

View File

@@ -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=

View File

@@ -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)

View File

@@ -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
}