Giter Club home page Giter Club logo

icamerasrc's Introduction

icamerasrc

icamerasrc's People

Contributors

ghu3 avatar rdower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icamerasrc's Issues

Kernel 6.6.0 - icamerasrc stopped working - CamHAL[ERR] Failed to find DevName for cameraId: 4, get video node: ov01a10 , devname: /dev/v4l-subdev1

Had a setup working on my Dell XPS 9320 with a ov01a10 for a year, but then I installed the 6.6.0 kernel, and icamerasrc stopped working.

$ sudo -E gst-launch-1.0 icamerasrc buffer-count=7 device-name=ov01a10-uf ! video/x-raw,format=YUY2,width=1280,height=720 ! v4l2sink device=/dev/video1
[11-02 00:16:24.919] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.920] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.920] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.921] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.921] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.921] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.921] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.921] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.921] CamHAL[ERR] Parse AE gain range failed
[11-02 00:16:24.921] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.922] CamHAL[ERR] Parse AE eExposure time range failed
[11-02 00:16:24.922] CamHAL[ERR] Malformed ET range in exposure time range configuration
[11-02 00:16:24.922] CamHAL[ERR] Parse AE gain range failed
Setting pipeline to PAUSED ...
[11-02 00:16:25.340] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-02 00:16:25.340] CamHAL[ERR] there is no aiqb file:ov13b10
[11-02 00:16:25.340] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-02 00:16:25.340] CamHAL[ERR] there is no aiqb file:ov13b10
[11-02 00:16:25.340] CamHAL[INF] aiqb file name ov8856.aiqb
[11-02 00:16:25.341] CamHAL[ERR] there is no aiqb file:ov8856
[11-02 00:16:25.341] CamHAL[INF] aiqb file name ov8856.aiqb
[11-02 00:16:25.341] CamHAL[ERR] there is no aiqb file:ov8856
[11-02 00:16:25.341] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-02 00:16:25.341] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-02 00:16:25.341] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-02 00:16:25.341] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-02 00:16:25.341] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-02 00:16:25.341] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-02 00:16:25.341] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-02 00:16:25.342] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-02 00:16:25.343] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-02 00:16:25.344] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-02 00:16:25.344] CamHAL[ERR] Failed to find DevName for cameraId: 4, get video node: ov01a10 , devname: /dev/v4l-subdev1
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Additional debug info:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Running with these rpms installed:

gstreamer1-plugins-icamerasrc-0.0-7.20220926git3b7cdb9.fc39.x86_64.rpm
ipu6-camera-bins-0.0-8.20230208git276859f.fc39.x86_64.rpm
ipu6-camera-bins-firmware-0.0-8.20230208git276859f.fc39.x86_64.rpm
ipu6-camera-hal-0.0-16.20230208git884b81a.fc40.x86_64.rpm
ivsc-firmware-0.0-5.20221102git29c5eff.fc39.x86_64.rpm

and built ipu6-drivers with this patch enabled: intel/ipu6-drivers#175

No issues from dmesg as I can see:

[  712.385034] ljca 3-8:1.0: LJCA USB device init success
[  712.385109] usbcore: registered new interface driver ljca
[  712.506485] gpio gpiochip1: (INTC1096:00): not an immutable chip, please consider fixing it!
[  712.567892] ljca-i2c ljca-i2c.16.auto: hid INTC1097 uid 0 new uid1
[  712.756502] Loading firmware: vsc/soc_a1_prod/ivsc_fw_a1_prod.bin
[  712.759147] Loading firmware: vsc/soc_a1_prod/ivsc_pkg_ovti01a0_0_a1_prod.bin
[  712.761193] Loading firmware: vsc/soc_a1_prod/ivsc_skucfg_ovti01a0_0_1_a1_prod.bin
[  712.854677] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[  712.854695] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[  712.854696] intel-ipu6 0000:00:05.0: mapped as: 0x000000008976f7ba
[  712.854931] intel-ipu6 0000:00:05.0: Unable to set secure mode
[  712.854931] intel-ipu6 0000:00:05.0: IPU in non-secure mode
[  712.854932] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[  712.854933] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[  712.854939] intel-ipu6 0000:00:05.0: Skip ipc reset for non-secure mode
[  712.854940] intel-ipu6 0000:00:05.0: IPC reset done
[  712.854941] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[  712.854943] Loading firmware: intel/ipu6ep_fw.bin
[  712.856455] intel-ipu6 0000:00:05.0: FW version: 20220510
[  712.857690] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[  713.002168] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[  713.002517] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[  724.965138] vsc_ace spi-INTC1094:00-5db76cf6-0a68-4ed6-9b78-0361635e2447: recv firmware id

Failed to start with gst launch

Intel i7 12th gen (X1 Carbon lenovo)
Latest ipu6-drives / camera-hal / camera-bins (ipu6ep)
Fedora 37 as base (kernel 6.0.8-300.fc37.x86_64)
Installed ipu6-drivers with dkms, seems to have initialized on boot

[   31.031676] videodev: Linux video capture interface: v2.00
[   31.076341] ov2740: loading out-of-tree module taints kernel.
[   31.076378] ov2740: module verification failed: signature and/or required key missing - tainting kernel

but gst launch fails

gst-launch-1.0 icamerasrc  buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! waylandsink
Setting pipeline to PAUSED ...
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-15 23:15:26.192] CamHAL[ERR] there is no aiqb file:ov13b10
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-15 23:15:26.192] CamHAL[ERR] there is no aiqb file:ov13b10
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov8856.aiqb
[11-15 23:15:26.192] CamHAL[ERR] there is no aiqb file:ov8856
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov8856.aiqb
[11-15 23:15:26.192] CamHAL[ERR] there is no aiqb file:ov8856
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-15 23:15:26.192] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-15 23:15:26.193] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-15 23:15:26.194] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-15 23:15:26.194] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
[11-15 23:15:26.196] CamHAL[ERR] MediaControl init failed
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
[beeple@carbon icamerasrc]$ 

Let me know if more info is needed (I know this is all experimental but I just wanted to know what the state of thing was)

Release of resources when state is set to GST_STATE_NULL

Reported by User:
It seems icamerasrc still holds some resources even after its state is set to GST_STATE_NULL, which, by spec, should release all the resources. While we're trying to release hardware cameras and invented a client usage event based on V4L2 Event API, it will be useless if the camera hal library just won't release resources under any condition. Anything I missed?

icamerasrc support over Intel Atom E39xx using Yocto Zeus

Is there a way to support icamerasrc plugin with gstreamer and try it on Intel Atom E39xx platform?
What are the steps to try it?
I am running a newer kernel version 4.14 and seems like this plugin will run on kernel 4.4?
Thanks!

README renamed to README.md breaks automake

$ export CHROME_SLIM_CAMHAL=ON
$ ./autogen.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:67: installing './compile'
configure.ac:67: installing './config.guess'
configure.ac:67: installing './config.sub'
configure.ac:57: installing './install-sh'
configure.ac:57: installing './missing'
Makefile.am: installing './INSTALL'
Makefile.am: error: required file './README' not found
Makefile.am: installing './COPYING' using GNU General Public License v3 file
Makefile.am:     Consider adding the COPYING file to the version control system
Makefile.am:     for your code, to avoid questions about which license your project uses
src/Makefile.am: installing './depcomp'
autoreconf: automake failed with exit status: 1
autogen.sh failed

This can be easily fixed by a symlink to README.md.

failed to open libcamhal device

I am just trying to get the test pattern out of icamerasrc but it fails with:

$ gst-launch-1.0 -v icamerasrc device-name=tpg_ipu6 ! video/x-raw,format=YUY2,width=1280,height=720 ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
[10-29 11:47:46.853] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.853] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.853] CamHAL[INF] aiqb file name ov01a1s.aiqb
[10-29 11:47:46.854] CamHAL[INF] aiqb file name ov01a1s.aiqb
[10-29 11:47:46.854] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.854] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.856] CamHAL[ERR] MediaControl init failed
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

The gstreamer command line is from the README.

OS: Ubuntu 22.10

branch: icamerasrc_slim_api

Failed to find DevName for cameraId: 0 || setup Link ov13b10 [-1:0] ==> Intel IPU6 CSI-2 [-1x0] enable 1 failed

This is the output I get when trying to use the icamerasrc plugin the way suggested for Alder Lake devices in the README:

$ sudo gst-launch-1.0 --gst-debug-level=3 -m icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov13b10
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov13b10
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov8856.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov8856
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov8856.aiqb
[11-30 19:11:31.359] CamHAL[ERR] there is no aiqb file:ov8856
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-30 19:11:31.359] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-30 19:11:31.360] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-30 19:11:31.361] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-30 19:11:31.362] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-30 19:11:31.362] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-30 19:11:31.362] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-30 19:11:31.362] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
Pipeline is live and does not need PREROLL ...
Got message #12 from element "ximagesink0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #13 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
0:00:00.609886890 37743 0x55b1de5bf120 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<camerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Got message #14 from element "capsfilter0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #15 from element "camerasrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)void-pending;
Got message #16 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)null, new-state=(GstState)ready, pending-state=(GstState)paused;
Got message #18 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #19 from element "capsfilter0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #22 from pad "camerasrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)create, owner=(GstElement)"\(Gstcamerasrc\)\ camerasrc0", object=(GstTask)"\(GstTask\)\ camerasrc0:src";
Got message #23 from element "camerasrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Got message #24 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)ready, new-state=(GstState)paused, pending-state=(GstState)void-pending;
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Got message #25 from pad "camerasrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)enter, owner=(GstElement)"\(Gstcamerasrc\)\ camerasrc0", object=(GstTask)"\(GstTask\)\ camerasrc0:src";
Got message #26 from element "pipeline0" (stream-start): GstMessageStreamStart, group-id=(uint)1;
Got message #29 from element "pipeline0" (new-clock): GstMessageNewClock, clock=(GstClock)"\(GstSystemClock\)\ GstSystemClock";
New clock: GstSystemClock
Got message #31 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #32 from element "capsfilter0" (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
Got message #33 from element "camerasrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)paused, new-state=(GstState)playing, pending-state=(GstState)void-pending;
[11-30 19:11:31.374] CamHAL[ERR] Get entity fail for calling getEntityById
[11-30 19:11:31.374] CamHAL[ERR] Get entity fail for calling getEntityById
[11-30 19:11:31.374] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[11-30 19:11:31.374] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[11-30 19:11:31.374] CamHAL[ERR] set up mediaCtl failed
[11-30 19:11:31.374] CamHAL[ERR] @configure Device Configure failed
[11-30 19:11:31.374] CamHAL[ERR] failed to config streams.
0:00:00.617267443 37743 0x55b1de5bf120 ERROR             icamerasrc gstcamerasrc.cpp:2763:gst_camerasrc_set_caps: CameraId=0, StreamId=0 failed to config stream for format NV12 1280x720.
0:00:00.617286386 37743 0x55b1de5bf120 WARN              CamBaseSrc gstcambasesrc.cpp:3143:gst_cam_base_src_loop:<camerasrc0> error: src pad: Internal data flow error.
0:00:00.617292300 37743 0x55b1de5bf120 WARN              CamBaseSrc gstcambasesrc.cpp:3143:gst_cam_base_src_loop:<camerasrc0> error: streaming task paused, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Additional debug info:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-negotiated (-4)
Got message #35 from element "camerasrc0" (error): 0:00:00.617481166 37743 0x55b1de5d04f0 WARN               structure gststructure.c:2091:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
GstMessageError, gerror=(GError)NULL, debug=(string)"gstcambasesrc.cpp\(3143\):\ gst_cam_base_src_loop\ \(\):\ /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:\012streaming\ task\ paused\,\ reason\ not-negotiated\ \(-4\)";
Execution ended after 0:00:00.007495419
Setting pipeline to NULL ...
Freeing pipeline ...

I have no idea what the problem is or even where to start looking/debugging. I tried checking ldd /usr/lib64/gstreamer-1.0/libgsticamerasrc.so and there are no missing libraries. I also tried running gst-launch-1.0 with strace, but I didn't see any obvious error there. 😞

icamerasrc_slim_api: gstreamer src plugin not working

Hello there.

I am trying to make the rear cam of my X12 Detachable Gen 1 functional, which uses a hm11b1 sensor via IPU 6.
After following the instructions on ipu6-drivers ipu6-camera-hal and ipu6-camera-bins, I tried to run the Pipeline examples below:

root@ubuntu-ThinkPad-X12-Detachable-Gen-1:~# gst-launch-1.0 icamerasrc device-name=tpg_ipu6 ! video/x-raw,format=YUY2,width=1280,height=720 ! videoconvert ! xvimagesink
04-16 19:27:46.331: [WAR]: CamHAL_CameraParser:The style of libcamhal_profile is too old, please switch it as soon as possible !!!

(gst-launch-1.0:2906): GLib-GObject-CRITICAL **: 19:27:46.331: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed

(gst-launch-1.0:2906): GLib-GObject-CRITICAL **: 19:27:46.331: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed
WARNING: erroneous pipeline: no property "device-name" in element "camerasrc0"
root@ubuntu-ThinkPad-X12-Detachable-Gen-1:~# gst-launch-1.0 icamerasrc device-name=hm11b1-uf ! video/x-raw,format=YUY2,width=1280,height=720 ! videoconvert ! xvimagesink
04-16 19:28:01.700: [WAR]: CamHAL_CameraParser:The style of libcamhal_profile is too old, please switch it as soon as possible !!!

(gst-launch-1.0:2908): GLib-GObject-CRITICAL **: 19:28:01.701: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed

(gst-launch-1.0:2908): GLib-GObject-CRITICAL **: 19:28:01.701: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed
WARNING: erroneous pipeline: no property "device-name" in element "camerasrc0"

The testpattern generator and hm11b1 return erroneous pipeline: no property "device-name" in element "camerasrc0".

Is there a way to fix this issue?
Thanks!

CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1

I have an IPU6 camera and I installed drivers for it with these commands:

sudo dnf update \
  --enablerepo=updates-testing \
  --enablerepo=rpmfusion-free-updates-testing \
  --enablerepo=rpmfusion-nonfree-updates-testing \
  'kernel*' '*v4l2loopback' -y

sudo dnf install \
  --enablerepo=updates-testing \
  --enablerepo=rpmfusion-free-updates-testing \
  --enablerepo=rpmfusion-nonfree-updates-testing \
  akmod-intel-ipu6 -y

On firefox, the camera is just a black rectangle. When running sudo -E gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink, I get this error:

CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1

Full output:

 rajas  ~  sudo -E gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink
[sudo] password for rajas: 
Setting pipeline to PAUSED ...
[09-07 16:06:21.509] CamHAL[INF] aiqb file name ov13b10.aiqb
[09-07 16:06:21.510] CamHAL[ERR] there is no aiqb file:ov13b10
[09-07 16:06:21.510] CamHAL[INF] aiqb file name ov13b10.aiqb
[09-07 16:06:21.510] CamHAL[ERR] there is no aiqb file:ov13b10
[09-07 16:06:21.510] CamHAL[INF] aiqb file name ov8856.aiqb
[09-07 16:06:21.510] CamHAL[ERR] there is no aiqb file:ov8856
[09-07 16:06:21.510] CamHAL[INF] aiqb file name ov8856.aiqb
[09-07 16:06:21.510] CamHAL[ERR] there is no aiqb file:ov8856
[09-07 16:06:21.510] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-07 16:06:21.511] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-07 16:06:21.511] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-07 16:06:21.511] CamHAL[INF] aiqb file name ov01a10.aiqb
[09-07 16:06:21.511] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-07 16:06:21.512] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-07 16:06:21.512] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-07 16:06:21.512] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-07 16:06:21.512] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-07 16:06:21.513] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-07 16:06:21.513] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-07 16:06:21.513] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[09-07 16:06:21.513] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-07 16:06:21.513] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[09-07 16:06:21.513] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-07 16:06:21.514] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[09-07 16:06:21.514] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[09-07 16:06:21.514] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[09-07 16:06:21.514] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[09-07 16:06:21.515] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[09-07 16:06:21.515] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[09-07 16:06:21.516] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[09-07 16:06:21.516] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[09-07 16:06:21.517] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[09-07 16:06:21.517] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[09-07 16:06:21.517] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[09-07 16:06:21.517] CamHAL[INF] aiqb file name ov01a1s.aiqb
[09-07 16:06:21.518] CamHAL[INF] aiqb file name ov01a1s.aiqb
[09-07 16:06:21.518] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[09-07 16:06:21.531] CamHAL[ERR] Get entity fail for calling getEntityById
[09-07 16:06:21.531] CamHAL[ERR] Get entity fail for calling getEntityById
[09-07 16:06:21.531] CamHAL[ERR] setup Link ov13b10  [-1:0] ==> Intel IPU6 CSI-2  [-1x0] enable 1 failed.
[09-07 16:06:21.531] CamHAL[ERR] set MediaCtlConf McLink failed: ret = -1
[09-07 16:06:21.531] CamHAL[ERR] set up mediaCtl failed
[09-07 16:06:21.531] CamHAL[ERR] @configure Device Configure failed
[09-07 16:06:21.531] CamHAL[ERR] failed to config streams.
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Additional debug info:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.007661717
Setting pipeline to NULL ...
Freeing pipeline ...

Am I missing something? What should I do to get the camera to work? Is there something Intel needs to fix for it to work?

Have trouble getting ov01a10 to work with icamerasrc

Went through all the steps to get my Dell XPS 9320 webcam, and I have managed to get the kernel modules working and the HAL and the firmware and whatnot. But when I run the example code for ov01a10, I end up with this:

# GST_PLUGIN_SYSTEM_PATH="/usr/lib64/gstreamer-1.0:/usr/local/lib/gstreamer-1.0" gst-launch-1.0 icamerasrc buffer-count=7 device-name=ov01a10-uf ! video/x-raw,format=YUY2,width=1280,height=720 ! videoconvert ! ximagesink
[07-17 23:40:55.449] CamHAL[ERR] Malformed ET range in exposure time range configuration
[07-17 23:40:55.449] CamHAL[ERR] Parse AE eExposure time range failed
[07-17 23:40:55.449] CamHAL[ERR] Malformed ET range in exposure time range configuration
[07-17 23:40:55.449] CamHAL[ERR] Parse AE gain range failed
[07-17 23:40:55.450] CamHAL[ERR] Malformed ET range in exposure time range configuration
[07-17 23:40:55.450] CamHAL[ERR] Parse AE eExposure time range failed
[07-17 23:40:55.450] CamHAL[ERR] Malformed ET range in exposure time range configuration
[07-17 23:40:55.450] CamHAL[ERR] Parse AE gain range failed
[07-17 23:40:55.450] CamHAL[ERR] Malformed ET range in exposure time range configuration
[07-17 23:40:55.450] CamHAL[ERR] Parse AE eExposure time range failed
[07-17 23:40:55.450] CamHAL[ERR] Malformed ET range in exposure time range configuration
[07-17 23:40:55.450] CamHAL[ERR] Parse AE gain range failed
Setting pipeline to PAUSED ...
[07-17 23:40:55.533] CamHAL[INF] aiqb file name ov01a10.aiqb
[07-17 23:40:55.534] CamHAL[INF] aiqb file name ov01a10.aiqb
[07-17 23:40:55.534] CamHAL[INF] aiqb file name ov01a10.aiqb
[07-17 23:40:55.534] CamHAL[INF] aiqb file name ov01a10.aiqb
[07-17 23:40:55.534] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[07-17 23:40:55.535] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[07-17 23:40:55.535] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov01a10 , devname: /dev/v4l-subdev1
[07-17 23:40:55.537] CamHAL[ERR] MediaControl init failed
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

Unable to use plugin after build and install

I built and installed the plugin following the directions, however trying any of the commands results in the error

No such element or plugin 'icamerasrc'

I've tried rebuilding it and reinstalling it to no avail. gst-inspect-1.0 doesn't show the plugin as installed.

I am installing this on a tigerlake system with IPU6, the drivers, hal, and bins are all installed, as well as ll prerequisites for this repo.

Consider integrating with libcamera

libcamera is a userspace framework for cameras on Linux. Integrating this module into the libcamera project would allow for IPU6-compatible cameras to be used on Linux system before upstreaming, seeing as outstanding V4L2 issues like intel/ipu6-drivers#30 prevent the DKMS drivers from being used as-is on a desktop Linux system.

Build fails at make

Hi,
Can anybody help me to fix this?

$ make -j8
make all-recursive
make[1]: Entering directory '/home/muhoss/icamerasrc'
Making all in src
make[2]: Entering directory '/home/muhoss/icamerasrc/src'
Making all in interfaces
make[3]: Entering directory '/home/muhoss/icamerasrc/src/interfaces'
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcamera3ainterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcamera3ainterface.Tpo -c -o libgsticamerainterface_1.0_la-gstcamera3ainterface.lo test -f 'gstcamera3ainterface.cpp' || echo './'gstcamera3ainterface.cpp
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcameraispinterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcameraispinterface.Tpo -c -o libgsticamerainterface_1.0_la-gstcameraispinterface.lo test -f 'gstcameraispinterface.cpp' || echo './'gstcameraispinterface.cpp
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcameradewarpinginterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcameradewarpinginterface.Tpo -c -o libgsticamerainterface_1.0_la-gstcameradewarpinginterface.lo test -f 'gstcameradewarpinginterface.cpp' || echo './'gstcameradewarpinginterface.cpp
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcamerawfovinterface.Tpo -c -o libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo test -f 'gstcamerawfovinterface.cpp' || echo './'gstcamerawfovinterface.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcameraispinterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcameraispinterface.Tpo -c gstcameraispinterface.cpp -fPIC -DPIC -o .libs/libgsticamerainterface_1.0_la-gstcameraispinterface.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcamera3ainterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcamera3ainterface.Tpo -c gstcamera3ainterface.cpp -fPIC -DPIC -o .libs/libgsticamerainterface_1.0_la-gstcamera3ainterface.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcameradewarpinginterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcameradewarpinginterface.Tpo -c gstcameradewarpinginterface.cpp -fPIC -DPIC -o .libs/libgsticamerainterface_1.0_la-gstcameradewarpinginterface.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -std=c++11 -Wall -Werror -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -Wall -I/usr/include/libcamhal -I/usr/include/libcamhal/api -I/usr/include/libcamhal/utils -DCHROME_SLIM_CAMHAL -fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcamerawfovinterface.Tpo -c gstcamerawfovinterface.cpp -fPIC -DPIC -o .libs/libgsticamerainterface_1.0_la-gstcamerawfovinterface.o
mv -f .deps/libgsticamerainterface_1.0_la-gstcamerawfovinterface.Tpo .deps/libgsticamerainterface_1.0_la-gstcamerawfovinterface.Plo
mv -f .deps/libgsticamerainterface_1.0_la-gstcameraispinterface.Tpo .deps/libgsticamerainterface_1.0_la-gstcameraispinterface.Plo
mv -f .deps/libgsticamerainterface_1.0_la-gstcameradewarpinginterface.Tpo .deps/libgsticamerainterface_1.0_la-gstcameradewarpinginterface.Plo
mv -f .deps/libgsticamerainterface_1.0_la-gstcamera3ainterface.Tpo .deps/libgsticamerainterface_1.0_la-gstcamera3ainterface.Plo
/bin/sh ../../libtool --tag=CXX --mode=link g++ -g -O2 -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wl,-z,relro -Wl,-z,now -version-info 1:0:0 -o libgsticamerainterface-1.0.la -rpath /usr/lib libgsticamerainterface_1.0_la-gstcamera3ainterface.lo libgsticamerainterface_1.0_la-gstcameraispinterface.lo libgsticamerainterface_1.0_la-gstcameradewarpinginterface.lo libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo -lgstbase-1.0 -lgstcontroller-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lcamhal
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/crtbeginS.o .libs/libgsticamerainterface_1.0_la-gstcamera3ainterface.o .libs/libgsticamerainterface_1.0_la-gstcameraispinterface.o .libs/libgsticamerainterface_1.0_la-gstcameradewarpinginterface.o .libs/libgsticamerainterface_1.0_la-gstcamerawfovinterface.o -lgstbase-1.0 -lgstcontroller-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lcamhal -L/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/crtn.o -g -O2 -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-soname -Wl,libgsticamerainterface-1.0.so.1 -o .libs/libgsticamerainterface-1.0.so.1.0.0
/usr/bin/ld: cannot find -lcamhal: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:499: libgsticamerainterface-1.0.la] Error 1
make[3]: Leaving directory '/home/muhoss/icamerasrc/src/interfaces'
make[2]: *** [Makefile:686: all-recursive] Error 1
make[2]: Leaving directory '/home/muhoss/icamerasrc/src'
make[1]: *** [Makefile:520: all-recursive] Error 1
make[1]: Leaving directory '/home/muhoss/icamerasrc'
make: *** [Makefile:429: all] Error 2

CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: hm11b1 , devname: /dev/v4l-subdev1

Somehow, incredibly, despite the huge PITA all of this IPU6 stuff is (not your fault, I know), seems like people are only testing on Dell XPS.

I have a Panasonic Toughbook FZ-40.

fred@デブ狸~/Workspace/icamerasrc% sudo -E gst-launch-1.0 icamerasrc buffer-count=7 ! video/x-raw,format=YUY2,width=1280,height=720 ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
[03-10 07:36:16.120] CamHAL[INF] aiqb file name hm11b1.aiqb
[03-10 07:36:16.120] CamHAL[INF] aiqb file name hm11b1.aiqb
[03-10 07:36:16.120] CamHAL[INF] aiqb file name ov01a1s.aiqb
[03-10 07:36:16.120] CamHAL[INF] aiqb file name ov01a1s.aiqb
[03-10 07:36:16.120] CamHAL[INF] aiqb file name hm11b1.aiqb
[03-10 07:36:16.121] CamHAL[INF] aiqb file name hm11b1.aiqb
[03-10 07:36:16.121] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: hm11b1 , devname: /dev/v4l-subdev1
[03-10 07:36:16.123] CamHAL[ERR] MediaControl init failed
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

Doesn't even start. You did not provide the binary files.

[   16.480532] intel-ipu6 0000:00:05.0: Device 0x9a19 (rev: 0x1)
[   16.481869] intel-ipu6 0000:00:05.0: physical base address 0x603e000000
[   16.482986] intel-ipu6 0000:00:05.0: mapped as: 0x00000000eb117b08
[   16.484352] intel-ipu6 0000:00:05.0: IPU in secure mode
[   16.485492] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[   16.486339] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[   16.503637] intel-ipu6 0000:00:05.0: IPC reset done
[   16.504769] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6_fw.bin
[   16.506048] intel-ipu6 0000:00:05.0: FW version: 20210414

This laptop has:

root@デブ狸~# lsmod|grep ov           
ov7251                 36864  0
ov5675                 24576  0
v4l2_fwnode            36864  3 ov7251,ov5675,intel_ipu6_isys
v4l2_async             32768  4 v4l2_fwnode,ov7251,ov5675,intel_ipu6_isys
videodev              368640  5 v4l2_async,ov7251,ov5675,videobuf2_v4l2,intel_ipu6_isys
mc                     94208  7 v4l2_async,videodev,ov7251,ov5675,videobuf2_v4l2,intel_ipu6_isys,videobuf2_common

Where is ov7251 and ov5675?

Build failed with glibc 2.35

Build failed:
In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from /usr/include/gstreamer-1.0/gst/allocators/gstdmabuf.h:24,
from gstcamerasrcbufferpool.cpp:56:
gstcamerasrcbufferpool.cpp: In function ‘GType gst_camerasrc_meta_api_get_type()’:
/usr/include/glib-2.0/glib/gatomic.h:113:19: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
113 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
260 | (!g_atomic_pointer_get (location) &&
| ^~~~~~~~~~~~~~~~~~~~
gstcamerasrcbufferpool.cpp:85:7: note: in expansion of macro ‘g_once_init_enter’
85 | if (g_once_init_enter (&type)) {
| ^~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:642: libgsticamerasrc_la-gstcamerasrcbufferpool.lo] Error 1

In file included from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from gstcambasesrc.h:47,
from gstcambasesrc.cpp:48:
gstcambasesrc.cpp: In function ‘GType gst_cam_base_src_get_type()’:
/usr/include/glib-2.0/glib/gatomic.h:113:19: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
113 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
260 | (!g_atomic_pointer_get (location) &&
| ^~~~~~~~~~~~~~~~~~~~
gstcambasesrc.cpp:251:7: note: in expansion of macro ‘g_once_init_enter’
251 | if (g_once_init_enter(&cam_base_src_type)) {
| ^~~~~~~~~~~~~~~~~

I apply the patch to workaround it.
--- a/src/gstcamerasrcbufferpool.cpp
+++ b/src/gstcamerasrcbufferpool.cpp
@@ -79,7 +79,7 @@
gst_camerasrc_meta_api_get_type (void)
{
PERF_CAMERA_ATRACE();

  • static volatile GType type;
  • static GType type;
    static const gchar *tags[] = { "memory", NULL };

    if (g_once_init_enter (&type)) {
    --- a/src/gstcambasesrc.cpp
    +++ b/src/gstcambasesrc.cpp
    @@ -246,7 +246,7 @@
    GType
    gst_cam_base_src_get_type (void)
    {

  • static volatile gsize cam_base_src_type = 0;
  • static gsize cam_base_src_type = 0;

    if (g_once_init_enter(&cam_base_src_type)) {
    GType _type;

Prerequisites?

Where on earth do you find the prerequisites, particularly libcamhal?

Trying to build for joule ubuntu.

Build failed with: error: 'camera_view_projection_t' has not been declared

I've built camhal and subsequently tried to build icamerasrc.

The configure run found the requisites:

...
checking for
  gstreamer-1.0 >= 1.0.0
  gstreamer-base-1.0 >= 1.0.0
  gstreamer-controller-1.0 >= 1.0.0
... yes
checking for libcamhal... yes
checking for libdrm libdrm_intel... yes
checking to see if compiler understands -Wall... yes
checking check if CHROME_SLIM_CAMHAL is ON... no
checking check if STRIP_VIRTUAL_CHANNEL_CAMHAL is ON... no
checking that generated files are newer than configure... done
configure: creating ./config.status
...

But when compiling:

/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/interfaces -I../..  -std=c++11 -Wall -Werror -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall  -I/usr/local/include/libcamhal -I/usr/local/include/libcamhal/api -I/usr/local/include/libcamhal/utils  -fstack-protector-all -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security   -g -O2 -MT libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcamerawfovinterface.Tpo -c -o libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo `test -f 'gstcamerawfovinterface.cpp' || echo '../../../src/interfaces/'`gstcamerawfovinterface.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/interfaces -I../.. -std=c++11 -Wall -Werror -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall -I/usr/local/include/libcamhal -I/usr/local/include/libcamhal/api -I/usr/local/include/libcamhal/utils -fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -g -O2 -MT libgsticamerainterface_1.0_la-gstcamerawfovinterface.lo -MD -MP -MF .deps/libgsticamerainterface_1.0_la-gstcamerawfovinterface.Tpo -c ../../../src/interfaces/gstcamerawfovinterface.cpp  -fPIC -DPIC -o .libs/libgsticamerainterface_1.0_la-gstcamerawfovinterface.o
In file included from ../../../src/interfaces/gstcamerawfovinterface.cpp:49:
../../../src/interfaces/gstcamerawfovinterface.h:103:70: error: 'camera_view_projection_t' has not been declared
  103 |   gboolean      (*set_view_projection)   (GstCamerasrcWFOV *camWFOV, camera_view_projection_t projection);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~

OS: Ubuntu 22.10

branch: icamerasrc_slim_api

Cannot build: camera_device_open() - too many arguments

Hello,
I'm trying to build icamerasrc to make the webcam of my Lenovo X1 Carbon (gen 10) work in Ubuntu 22.04.
I've installed all the other dependencies listed in the instructions with no errors (using ipu6ep), however then when i run
make -j8 the build fails with this error:

gstcamerasrc.cpp: In function ‘gboolean gst_camerasrc_start(GstCamBaseSrc*)’:
gstcamerasrc.cpp:2839:27: error: too many arguments to function ‘int icamera::camera_device_open(int)’
 2839 |   ret = camera_device_open(camerasrc->device_id, camerasrc->num_vc);
      |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gstcamerasrc.cpp:62:
/usr/include/libcamhal/api/ICamera.h:210:5: note: declared here
  210 | int camera_device_open(int camera_id);
      |     ^~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:623: libgsticamerasrc_la-gstcamerasrc.lo] Error 1
make[3]: Leaving directory '<redacted>/icamerasrc/src'
make[2]: *** [Makefile:684: all-recursive] Error 1
make[2]: Leaving directory '<redacted>/icamerasrc/src'
make[1]: *** [Makefile:519: all-recursive] Error 1
make[1]: Leaving directory '<redacted>/icamerasrc'
make: *** [Makefile:428: all] Error 2

Am I doing something wrong or is it just a bug?

Thanks,
E.

Could not open display

Running on Jaspelake on Manjaro with Phosh (wayland)

sudo -E gst-launch-1.0 icamerasrc device-name=ov13858-uf af-mode=2 ! video/x-raw,format=NV12,width=1280,height=720 ! videoconvert ! ximagesink

Setting pipeline to PAUSED ...
ERROR: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Could not initialise X output
Additional debug info:
../gstreamer/subprojects/gst-plugins-base/sys/ximage/ximagesink.c(885): gst_x_image_sink_xcontext_get (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:
Could not open display
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
lsmod | grep ipu 
intel_ipu6_isys       139264  0
videobuf2_dma_contig    28672  1 intel_ipu6_isys
videobuf2_v4l2         40960  2 intel_ipu6_isys,uvcvideo
videobuf2_common       86016  6 videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_v4l2,intel_ipu6_isys,uvcvideo,videobuf2_memops
intel_ipu6_psys       110592  0
intel_ipu6            131072  2 intel_ipu6_isys,intel_ipu6_psys
v4l2_fwnode            32768  4 ov01a10,intel_ipu6_isys,ov13858,gc5035
v4l2_async             32768  5 v4l2_fwnode,ov01a10,intel_ipu6_isys,ov13858,gc5035
videodev              307200  8 v4l2_async,videobuf2_v4l2,ov01a10,intel_ipu6_isys,ov13858,uvcvideo,gc5035,videobuf2_common
mc                     69632  9 v4l2_async,videodev,videobuf2_v4l2,ov01a10,intel_ipu6_isys,ov13858,uvcvideo,gc5035,videobuf2_common
sudo dmesg | grep ipu
[    2.798120] intel-ipu6 intel-ipu: enabling device (0000 -> 0002)
[    2.798334] intel-ipu6 intel-ipu: Device 0x4e19 (rev: 0x0)
[    2.798362] intel-ipu6 intel-ipu: physical base address 0x6000000000
[    2.798364] intel-ipu6 intel-ipu: mapped as: 0x000000002e3667c2
[    2.798477] intel-ipu6 intel-ipu: IPU in secure mode
[    2.799811] intel-ipu6 intel-ipu: IPC reset done
[    2.799813] intel-ipu6 intel-ipu: cpd file name: intel/ipu6se_fw.bin
[    2.803731] intel-ipu6 intel-ipu: FW version: 20210414
[    2.804878] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[    2.818748] intel-ipu6 intel-ipu: Sending AUTHENTICATE_RUN to CSE
[    2.888900] intel-ipu6 intel-ipu: CSE authenticate_run done
[    2.888934] intel-ipu6 intel-ipu: IPU driver version 1.0
[    4.016841] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:4
[    4.017022] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[    4.247188] intel-ipu6-isys intel-ipu6-isys0: no subdev found in graph
[ 2560.946567] intel-ipu6 intel-ipu: IPU in secure mode
[ 3461.949082] intel-ipu6 intel-ipu: IPU in secure mode
[ 3464.285910] intel-ipu6 intel-ipu: IPU in secure mode
[ 3464.288270] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[ 3469.340353] intel-ipu6 intel-ipu: Expect magic number timeout 0x0
[ 3469.340388] intel-ipu6 intel-ipu: FW authentication failed(-110)
[ 3469.345276] intel-ipu6-psys intel-ipu6-psys0: fw com close failed.
[ 3469.345288] intel-ipu6-psys intel-ipu6-psys0: Device close failure: -16
[ 4526.207606] intel-ipu6 intel-ipu: IPU in secure mode
[ 4526.219584] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[ 4526.311571] intel-ipu6 intel-ipu: expected resp: 0x1, IPC response: 0x220 
[ 4526.311586] intel-ipu6 intel-ipu: CSE boot_load failed
[ 4526.311591] intel-ipu6 intel-ipu: FW authentication failed(-5)
[ 4528.757271] intel-ipu6 intel-ipu: IPU in secure mode
[ 4528.763445] intel-ipu6 intel-ipu: Sending BOOT_LOAD to CSE
[ 4528.811217] intel-ipu6 intel-ipu: Sending AUTHENTICATE_RUN to CSE
[ 4528.955045] intel-ipu6 intel-ipu: CSE authenticate_run done

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.