Skip to content

libcamera: a couple build fixes

Javier Martinez Canillas requested to merge (removed):libcamera-fixes into master

The libcamera project still doesn't have a stable API/ABI, which means that some changes may break the libcamera SPA plugin.

Currently, it was failing to compile due a header file that got renamed. This merge-request fixes the issue and also gets rid of a compile warning.

The fixes were tested using the ./builddir/spa/examples/local-libcamera example:

[75:14:06.891459493] [1015780]  INFO Camera camera_manager.cpp:294 libcamera v0.0.0+2810-e0704e97
[75:14:07.137879571] [1015780]  INFO Camera camera.cpp:906 configuring streams: (0) 640x480-YUYV
Object: size 88, type Spa:Pod:Object:Param:Props (262146), id Spa:Enum:ParamId:Props (2)
  Prop: key Spa:Pod:Object:Param:Props:device (257), flags 00000000
    String "/dev/media0"
  Prop: key Spa:Pod:Object:Param:Props:deviceName (258), flags 00000000
    String ""
  Prop: key Spa:Pod:Object:Param:Props:deviceFd (259), flags 00000000
    Int 0
[I][libcamera_wrapper.cpp:536 stop()] Stopping camera ...
[I][libcamera-utils.c:476 spa_libcamera_set_format()] libcamera: set YUYV 640x480 25/1

[75:14:07.149524815] [1015780]  INFO Camera camera.cpp:906 configuring streams: (0) 640x480-YUYV
[I][libcamera_wrapper.cpp:708 listProperties()] listing properties
[I][libcamera_wrapper.cpp:713 listProperties()] Property: PixelArrayActiveAreas = [ (0x0)/1280x720 ]
[I][libcamera_wrapper.cpp:713 listProperties()] Property: PixelArraySize = 1280x720
[I][libcamera_wrapper.cpp:713 listProperties()] Property: Model = Integrated Camera: Integrated C
[I][libcamera_wrapper.cpp:713 listProperties()] Property: Location = 2
[I][libcamera_wrapper.cpp:504 start()] Starting camera ...
[I][libcamera-utils.c:501 spa_libcamera_set_format()]  got format. width = 640 height = 480 and fmt = YUYV. bytesperline = 1280 sizeimage = 614400

[I][libcamera-utils.c:758 mmap_init()] libcamera: In mmap_init()
[I][libcamera-utils.c:821 mmap_init()] libcamera: mmap ptr:0x7fe7142a6000
[I][libcamera-utils.c:821 mmap_init()] libcamera: mmap ptr:0x7fe714210000
[I][libcamera-utils.c:821 mmap_init()] libcamera: mmap ptr:0x7fe71417a000
[I][libcamera-utils.c:821 mmap_init()] libcamera: mmap ptr:0x7fe7140e4000
starting...

[I][libcamera-utils.c:866 spa_libcamera_stream_on()] connecting camera
enter thread
leave thread
pausing...

[I][libcamera-utils.c:911 spa_libcamera_stream_off()] stopping camera
[I][libcamera_wrapper.cpp:536 stop()] Stopping camera ...

Merge request reports