Reply
Thread Tools
Posts: 38 | Thanked: 2 times | Joined on Apr 2010 @ Novosibirsk, Russia
#11
2Joorin: links not helped...
Someone can explain how to synchronize libs on MADDE sysroots and on device filesystem? Or maybe the problem is not it?
 
Posts: 38 | Thanked: 2 times | Joined on Apr 2010 @ Novosibirsk, Russia
#12
So, I added in .pro file such line:
Code:
PKGCONFIG += gstreamer-plugins-bad-0.1
But got a warning:
Code:
Package gstreamer-plugins-bad-0.10 was not found in the pkg-config search path. 
Perhaps you should add the directory containing `gstreamer-plugins-bad-0.10.pc' 
to the PKG_CONFIG_PATH environment variable 
No package 'gstreamer-plugins-bad-0.10' found
But in /usr/lib/pkgconfig of .madde/sysroots/fremantle-arm-sysroots... there is all needed .pc files.

EDIT: But maybe I don`t need to use PKGCONFIG? I point this libs is section LIBS += and compilation is success, but got in debug mode message as written above.

Last edited by Grinchman; 2010-05-07 at 09:56.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#13
The first link describes how I found the second link. The second link points at a patch to GDB, which is the program that outputs the warning you wrote about.

Running a program in a debug environment is almost always a cause for warnings if you've made some creative linking while building the application.

As far as I can see, this warning is not important for debugging. Did it not work to debug?
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 38 | Thanked: 2 times | Joined on Apr 2010 @ Novosibirsk, Russia
#14
Ok, if this warnings can`t causes a focusing error, then they`s no matter.

Please, explain me, when a pipeline in state RUNNING, and I call
Code:
gst_photography_set_autofocus(GST_PHOTOGRAPHY(camera_src), true);
then I should see a focusing process? Or what? The same question and about flash, what I need to do additional to
Code:
gst_photography_set_flash_mode(GST_PHOTOGRAPHY (camera_src), GST_PHOTOGRAPHY_FLASH_MODE_ON);
to couse a flash?


EDIT: Thank God, autofocus is now working! I looked again at mbarcode sources and found, that they after camera_src create do this:
Code:
g_object_set(G_OBJECT(camera_src), "driver-name", "omap3cam", NULL);
Why nowhere never focuses on this action?

Question about how to emit the flash is still actual.

Last edited by Grinchman; 2010-05-10 at 04:07. Reason: One problem solved!
 
Posts: 44 | Thanked: 186 times | Joined on Apr 2010 @ Worthing, West Sussex, England
#15
I'm not sure how you get the flash to fire with GstPhotography although I'm just about to give it a go myself.

In the meantime, you can use the code below to manually cause the flash to fire at maximum intensity for maximum duration. Just call this function before you capture your image.
Code:
void flash() {
	int	fd;
	int	flash_intensity_max;
	int	flash_time_max;
	struct v4l2_queryctrl 	qctrl;
	struct v4l2_control	ctrl;

	fd = open("/dev/video0", O_RDWR | O_NONBLOCK, 0);
	if (fd == -1) {
		return;
	}
	// Get maximum flash intensity
	qctrl.id = V4L2_CID_FLASH_INTENSITY;
	if (ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == -1) {
		goto error;
	}
	flash_intensity_max = qctrl.maximum;
	// Get the maximum flash duration
	qctrl.id = V4L2_CID_FLASH_TIMEOUT;
	if (ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == -1) {
		goto error;
	}
	flash_time_max = qctrl.maximum;

	// Set the intensity to the maximum
	ctrl.id = V4L2_CID_FLASH_INTENSITY;
	ctrl.value = flash_intensity_max;
	if (ioctl(fd, VIDIOC_S_CTRL, &ctrl) == -1) {
		goto error;
	}
	// Set the timeout
	ctrl.id = V4L2_CID_FLASH_TIMEOUT;
	ctrl.value = flash_time_max;
	if (ioctl(fd, VIDIOC_S_CTRL, &ctrl) == -1) {
		goto error;
	}
	// Finally fire the flash
	ctrl.id = V4L2_CID_FLASH_STROBE;
	if (ioctl(fd, VIDIOC_S_CTRL, &ctrl) == -1) {
		goto error;
	}

error:
	close(fd);
}
Watch out for the close() at the end - you may find that closing the handle on the device causes the flash to turn off early. In this case you will need to manage the device handle separately.
 
Posts: 84 | Thanked: 11 times | Joined on Mar 2010 @ Tricase, Lecce (ITA)
#16
please redesign the GUI of your app!

i can design one if you take in consider almost
 
Posts: 78 | Thanked: 12 times | Joined on Aug 2010 @ the holy land
#17
what's going on???
we will get better cam app using gdigicam lib or not?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:40.