mirror of https://github.com/libsdl-org/SDL.git
camera: move PipeWire camera first in list
If it fails, we fall back to the next one, which is v4l2.
This commit is contained in:
parent
5d779153b2
commit
55d4b44441
|
|
@ -31,12 +31,12 @@
|
||||||
|
|
||||||
// Available camera drivers
|
// Available camera drivers
|
||||||
static const CameraBootStrap *const bootstrap[] = {
|
static const CameraBootStrap *const bootstrap[] = {
|
||||||
#ifdef SDL_CAMERA_DRIVER_V4L2
|
|
||||||
&V4L2_bootstrap,
|
|
||||||
#endif
|
|
||||||
#ifdef SDL_CAMERA_DRIVER_PIPEWIRE
|
#ifdef SDL_CAMERA_DRIVER_PIPEWIRE
|
||||||
&PIPEWIRECAMERA_bootstrap,
|
&PIPEWIRECAMERA_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SDL_CAMERA_DRIVER_V4L2
|
||||||
|
&V4L2_bootstrap,
|
||||||
|
#endif
|
||||||
#ifdef SDL_CAMERA_DRIVER_COREMEDIA
|
#ifdef SDL_CAMERA_DRIVER_COREMEDIA
|
||||||
&COREMEDIA_bootstrap,
|
&COREMEDIA_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -204,8 +204,8 @@ typedef struct CameraBootStrap
|
||||||
|
|
||||||
// Not all of these are available in a given build. Use #ifdefs, etc.
|
// Not all of these are available in a given build. Use #ifdefs, etc.
|
||||||
extern CameraBootStrap DUMMYCAMERA_bootstrap;
|
extern CameraBootStrap DUMMYCAMERA_bootstrap;
|
||||||
extern CameraBootStrap V4L2_bootstrap;
|
|
||||||
extern CameraBootStrap PIPEWIRECAMERA_bootstrap;
|
extern CameraBootStrap PIPEWIRECAMERA_bootstrap;
|
||||||
|
extern CameraBootStrap V4L2_bootstrap;
|
||||||
extern CameraBootStrap COREMEDIA_bootstrap;
|
extern CameraBootStrap COREMEDIA_bootstrap;
|
||||||
extern CameraBootStrap ANDROIDCAMERA_bootstrap;
|
extern CameraBootStrap ANDROIDCAMERA_bootstrap;
|
||||||
extern CameraBootStrap EMSCRIPTENCAMERA_bootstrap;
|
extern CameraBootStrap EMSCRIPTENCAMERA_bootstrap;
|
||||||
|
|
|
||||||
|
|
@ -1129,7 +1129,7 @@ static SDL_bool PIPEWIRECAMERA_Init(SDL_CameraDriverImpl *impl)
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraBootStrap PIPEWIRECAMERA_bootstrap = {
|
CameraBootStrap PIPEWIRECAMERA_bootstrap = {
|
||||||
"pipewire", "SDL PipeWire camera driver", PIPEWIRECAMERA_Init, SDL_TRUE
|
"pipewire", "SDL PipeWire camera driver", PIPEWIRECAMERA_Init, SDL_FALSE
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SDL_CAMERA_DRIVER_PIPEWIRE
|
#endif // SDL_CAMERA_DRIVER_PIPEWIRE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue