Derek Liu(deleted)
|
Error configure cameras and sensors on custom QNX 7.1 VMware
|
Derek Liu(deleted)
11/10/2022 2:22 AM
post121991
|
Error configure cameras and sensors on custom QNX 7.1 VMware
On my custom create QNX 7.1 VMware image.
Run the sensor command to create device on /dev/sensor
command line:
sensor -U 1000,1000 -r /data/usr/sensor -c /system/etc/system/config/sensor.conf
and then the /dev/sensor was not found anything
the sensor.conf detial
# cat /system/etc/system/config/sensor.conf
begin SENSOR_UNIT_1
type = usb_camera
name = front
position = 0, 0, 0
direction = 0, 0, 0
address = /dev/usb/io-usb-otg, -1, -1, -1, -1
end SENSOR_UNIT_1
begin SENSOR_UNIT_2
type = file_camera
name = rear
position = 0, 0, 0
direction = 0, 0, 1
address = /data/usr/swap/frontviewvideo1.mp4
end SENSOR_UNIT_2
show the slog2info: AoLoadConfig: could not open libcamapi_video.conf or default.conf (2)
insertVideoDecoder(526): Failed to find video decoder filter: err = 4047
# slog2info
Nov 10 06:51:13.952 sensor_service.819231 info* 0 int main(int, char**)(327): Initializing
our platform
Nov 10 06:51:13.952 sensor_service.819231 info 0 static Platform* Platform::
constructPlatform(char*)(35): Generic platform chosen
Nov 10 06:51:13.954 sensor_service.819231 debug* 0 sensor 1:int Platform::
createIspOrSensor(sensor_unit_t, sensor_type_t, SensorAddress_t*, Isp*&, Isp*&, Sensor*&)(236): usb address: flag=0, bus
=0, dev=0, devId=0, vendorId=0
Nov 10 06:51:13.954 sensor_service.819231 debug 0 sensor 2:int Platform::
createIspOrSensor(sensor_unit_t, sensor_type_t, SensorAddress_t*, Isp*&, Isp*&, Sensor*&)(379): file camera address: /
data/usr/swap/frontviewvideo1.mp4 isCameraFormat 1
Nov 10 06:51:13.961 sensor_service.819231 info 1 [EISPL]void*
openExternalCamera(uint32_t)(79): Open camera successfully: input 0
Nov 10 06:51:13.965 sensor.819231 slog* 0 failed to create debug path
Nov 10 06:51:13.976 video_mmf.819231 main* 0 AoLoadConfig: could not open
libcamapi_video.conf or default.conf (2)
Nov 10 06:51:14.092 video_mmf.819231 main 0 insertVideoDecoder(526): Failed to find
video decoder filter: err = 4047
Nov 10 06:51:14.092 sensor_service.819231 errors_warnings* 0 sensor 2:virtual int IspFile::
initIsp()(116): Failed to create video decode session - err = 5
Nov 10 06:51:14.092 sensor_service.819231 errors_warnings 0 sensor 2:virtual int Platform::
initPlatform()(787): Failed to initialize Isp
Nov 10 06:51:14.092 sensor_service.819231 debug 0 virtual int Platform::
initPlatform()(812): Platform control of cache memory is enabled
Nov 10 06:51:14.092 sensor_service.819231 info 0 int main(int, char**)(334): Initializing
of platform completed
Nov 10 06:51:14.092 sensor_service.819231 debug 0 virtual int Platform::
acquireRootAbilities()(1298): secpol_transition_type rc = -1 errno = 48
attachment file:
# ll /system/etc/system/config/aoi/
total 19
-r-xr-xr-x 1 root root 19565 2022-11-10 06:47 default.conf
-r-xr-xr-x 1 root root 396 2022-11-10 06:47 libcamapi_video.conf
|
|
|
Wojtek Lerch
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
|
Wojtek Lerch
11/10/2022 2:52 PM
post121992
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
Hi Derek,
There seem to be two problems with your AOI configuration.
The first one is that your two files are in /system/etc/system/config/aoi, and by default AoLoadConfig() looks in /etc/
system/config/aoi. Instead of renaming your directory, you can use an environment variable named AOI_CONFIG pointing to
the directory your files are in.
http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.utilities/topic/a/aoiconftool.html#
aoiconftool__configfilenames
But even if you do that and AoLoadConfig() finds your libcamapi_video.conf, you will still get the same error about not
being able to find a video decoder. That's because your libcamapi_video.conf does not mention any video decoder. You
will need to add yami_video_decoder.so to your config file (and to your target, if it’s not already there), but I don’
t know if it will work on vmware.
|
|
|
Derek Liu(deleted)
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
|
Derek Liu(deleted)
11/11/2022 5:10 AM
post121993
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
Thank you for your prompt reply!
The "AoLoadConfig" error message was gone after I add conf on defualt path .
But that was another error.
missing instructions:My USB Camera device is "Logitech HD Pro Webcam C920"
the new error message on Attachment file
|
|
|
Wojtek Lerch
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
|
Wojtek Lerch
11/11/2022 9:08 AM
post121994
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
Hi Derek,
So AoLoadConfig() now finds your libcamapi_video.conf but you still don't have a video decoder in there.
The bad news is that video playback is not supported on vmware. There's a table in the documentation that lists feature
availability by hardware platform:
http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.adas.getting_started.overview/topic/
getting_started_features_overview.html
There also is a table that lists supported cameras -- I'm afraid yours is not mentioned:
http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.adas.getting_started.overview/topic/getting_started_sensor_overview.
html
|
|
|
Derek Liu(deleted)
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
|
Derek Liu(deleted)
11/20/2022 9:58 PM
post122002
|
Re: Error configure cameras and sensors on custom QNX 7.1 VMware
Thank you for your prompt reply!
I can create camera on "/dev/serson/", after I added yami_video_decoder.so on libcamapi_video.conf.
like this:
/etc/system/config/aoi/libcamapi_video.conf={
#libaoi configuration file
dll = "/lib/dll/mmedia/fildes_streamer.so"
holds = 1
dll = "/lib/dll/mmedia/mp4_reader.so"
holds = 1
dll = "/lib/dll/mmedia/mp4_writer.so"
holds = 1
dll = "/lib/dll/mmedia/queue_filter.so"
holds = 1
dll = "/lib/dll/mmedia/ucv_reader.so"
holds = 1
dll = "/lib/dll/mmedia/ucv_writer.so"
holds = 1
dll = "/lib/dll/mmedia/yami_video_encoder.so"
holds = 1
dll = "/lib/dll/mmedia/yami_video_decoder.so"
holds = 1
}
And then execute the camera_example program. Chose the 3)Camera stream, like this:
=========================================================================
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
Select which example you want to run:
1) Camera viewfinder
2) Record video to a file
3) Camera stream
4) Multiple camera video
5) EGL viewfinder
6) Event example
x) Exit the example
3
Select which of the following 1 cameras you want to use:
1) CAMERA_UNIT_1
Enter Choice:
1
Select which of the following VF modes you want to use:
2) CAMERA_VFMODE_VIDEO
Enter Choice:
2
Do you want to modify the viewfinder configuration (y/n)?
n
Do you want to modify image attributes (y/n)?
n
Example prints the frame rate received from the camera; select x) to exit the example
Current frame rate: 30.3
=========================================================================
Can I use the sample video capture program to capture the camera stream?
https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.video_capture/topic/manual/vc_sample.html
But that was not work.
My test code:
int main(void) {
int n_pointers = 2;
screen_buffer_t *pointers = calloc(n_pointers, sizeof(screen_buffer_t));
// connect to screen
screen_context_t screen_ctx;
screen_window_t screen_win;
printf("%s:%d\n",__FUNCTION__,__LINE__);
screen_create_context(&screen_ctx, SCREEN_APPLICATION_CONTEXT);
screen_create_window(&screen_win, screen_ctx);
int usage = SCREEN_USAGE_NATIVE;
screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage);
int nbuffers = 2;
screen_create_window_buffers(screen_win, nbuffers);
int flags=0;//CAPTURE_BUFFER_USAGE_RDONLY;//CAPTURE_FLAG_EXTERNAL_SOURCE
capture_context_t context = capture_create_context( flags );
if( !context ) {
printf("%s:%d,Handle errors:capture context is null\n",__FUNCTION__,__LINE__);
}else{
printf("%s:%d,capture context is not null\n",__FUNCTION__,__LINE__);
}
// setup capture parameters
int getRet;
capture_set_property_i( context, CAPTURE_PROPERTY_DEVICE, 0 );
const char *info = NULL;
capture_get_property_p( context, CAPTURE_PROPERTY_DEVICE_INFO, &info );
printf("%s:%d,device-info = '%s'\n",__FUNCTION__,__LINE__,info);
int ret=0;
// Validate device's properties
if( !capture_is_property( context, CAPTURE_PROPERTY_BRIGHTNESS )){
printf("%s:%d,Unable to use buffer. Driver doesn't support CAPTURE_PROPERTY_BRIGHTNESS\n",__FUNCTION__,__LINE__);
}
if( !capture_is_property( context, CAPTURE_PROPERTY_CONTRAST )){
printf("%s:%d,Unable to use buffer. Driver doesn't support CAPTURE_PROPERTY_CONTRAST\n",__FUNCTION__,__LINE__);
}
if( !capture_is_property( context, CAPTURE_PROPERTY_SATURATION )){
printf("%s:%d,Unable to use buffer. Driver doesn't support CAPTURE_PROPERTY_SATURATION\n",__FUNCTION__,__LINE__);
}
// setup capture parameters
capture_get_property_i( context, CAPTURE_PROPERTY_NSOURCES, &getRet );
printf("%s:%d,Number of available source inputs; available after the...
View Full Message
|
|
|
|