Skip to content

Commit

Permalink
core: Various fixups pre-release
Browse files Browse the repository at this point in the history
- actions: Switch to the Raspberry Pi libcamera repo
- core: Add MISSING enum value where /dev/video0 does not exist to keep
  existing behaviour.
- core: Set default verbosity during init to 1, to match the default
  option value

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
  • Loading branch information
naushir committed Oct 5, 2023
1 parent f31dba7 commit 721b2b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/libcamera-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: rm -rf ${{env.LIBCAMERA_SRC_DIR}}

- name: Pull libcamera
run: git clone --depth=1 git://linuxtv.org/libcamera.git ${{env.LIBCAMERA_SRC_DIR}}
run: git clone --depth=1 https://github.com/raspberrypi/libcamera.git ${{env.LIBCAMERA_SRC_DIR}}

- name: libcamera version
run: cd ${{env.LIBCAMERA_SRC_DIR}} && git log -1
Expand Down
5 changes: 3 additions & 2 deletions core/libcamera_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@

#include <libcamera/base/shared_fd.h>

unsigned int LibcameraApp::verbosity = 2;
unsigned int LibcameraApp::verbosity = 1;

enum class Platform
{
MISSING,
UNKNOWN,
LEGACY,
VC4,
Expand All @@ -37,7 +38,7 @@ Platform get_platform()
{
int fd = open("/dev/video0", O_RDWR, 0);
if (fd < 0)
return Platform::UNKNOWN;
return Platform::MISSING;

v4l2_capability caps;
unsigned long request = VIDIOC_QUERYCAP;
Expand Down

0 comments on commit 721b2b7

Please sign in to comment.