forked from Green-Sky/tomato
disabled tests and print cam driver
This commit is contained in:
parent
fbaf8133ab
commit
2f44b45e8a
@ -9,6 +9,7 @@
|
|||||||
SDLVideoCameraContent::SDLVideoCameraContent(void) {
|
SDLVideoCameraContent::SDLVideoCameraContent(void) {
|
||||||
int devcount {0};
|
int devcount {0};
|
||||||
SDL_CameraDeviceID *devices = SDL_GetCameraDevices(&devcount);
|
SDL_CameraDeviceID *devices = SDL_GetCameraDevices(&devcount);
|
||||||
|
std::cout << "SDL Camera Driver: " << SDL_GetCurrentCameraDriver() << "\n";
|
||||||
|
|
||||||
if (devices == nullptr || devcount < 1) {
|
if (devices == nullptr || devcount < 1) {
|
||||||
throw int(1); // TODO: proper exception?
|
throw int(1); // TODO: proper exception?
|
||||||
|
@ -63,7 +63,7 @@ int main(int argc, char** argv) {
|
|||||||
// optionally init audio and camera
|
// optionally init audio and camera
|
||||||
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
|
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
|
||||||
std::cerr << "SDL_Init AUDIO failed (" << SDL_GetError() << ")\n";
|
std::cerr << "SDL_Init AUDIO failed (" << SDL_GetError() << ")\n";
|
||||||
} else {
|
} else if (false) {
|
||||||
SDLAudioInputDeviceDefault aidd;
|
SDLAudioInputDeviceDefault aidd;
|
||||||
auto* reader = aidd.aquireSubStream();
|
auto* reader = aidd.aquireSubStream();
|
||||||
|
|
||||||
@ -85,7 +85,8 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
if (SDL_Init(SDL_INIT_CAMERA) < 0) {
|
if (SDL_Init(SDL_INIT_CAMERA) < 0) {
|
||||||
std::cerr << "SDL_Init CAMERA failed (" << SDL_GetError() << ")\n";
|
std::cerr << "SDL_Init CAMERA failed (" << SDL_GetError() << ")\n";
|
||||||
} else { // HACK
|
} else if (false) { // HACK
|
||||||
|
std::cerr << "CAMERA initialized\n";
|
||||||
SDLVideoCameraContent vcc;
|
SDLVideoCameraContent vcc;
|
||||||
auto* reader = vcc.aquireSubStream();
|
auto* reader = vcc.aquireSubStream();
|
||||||
for (size_t i = 0; i < 20; i++) {
|
for (size_t i = 0; i < 20; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user