Web camera stream is flipped upsidedown

Eugene Dzhurinsky jdevelop at gmail.com
Mon Sep 12 18:44:27 UTC 2011


On Sat, Sep 10, 2011 at 08:18:26PM +0200, Hans Petter Selasky wrote:
> Hi,
> 
> I tried the patching over here:
> 
> cd /usr/local/
> cat videodev2.h.patch | patch -p1
> 
> cd /usr/port/multimedia/libv4l
> make patch extract
> cd work/v4l-utils-0.8.4
> cat libv4l.patch | patch -p1
> cd ..
> cd ..
> 
> make all deinstall install clean

Well, I'm not sure how it can work. According to the patches:

===============================================================================
#ifdef __FreeBSD__
static void v4lcontrol_get_dmi_string(const char *string, char *buf, int size)
{
	/* TODO */
	memset(buf, 0, size);
}
#else
===============================================================================

then

===============================================================================

	/* Get DMI board and system strings */
	v4lcontrol_get_dmi_string("sys_vendor", dmi_system_vendor,
			sizeof(dmi_system_vendor));
	v4lcontrol_get_dmi_string("product_name", dmi_system_name,
			sizeof(dmi_system_name));
	v4lcontrol_get_dmi_string("product_version", dmi_system_version,
			sizeof(dmi_system_version));

	v4lcontrol_get_dmi_string("board_vendor", dmi_board_vendor,
			sizeof(dmi_board_vendor));
	v4lcontrol_get_dmi_string("board_name", dmi_board_name,
			sizeof(dmi_board_name));
	v4lcontrol_get_dmi_string("board_version", dmi_board_version,
			sizeof(dmi_board_version));

===============================================================================

and then in this scary block of checking passed configurations against the
database of video flags:

===============================================================================
		if (v4lcontrol_flags[i].vendor_id == vendor_id &&
				v4lcontrol_flags[i].product_id ==
				(product_id & ~v4lcontrol_flags[i].product_mask) &&

				(v4lcontrol_flags[i].dmi_system_vendor == NULL ||
				 !strcmp(v4lcontrol_flags[i].dmi_system_vendor, dmi_system_vendor)) &&
				(v4lcontrol_flags[i].dmi_system_name == NULL ||
				 !strcmp(v4lcontrol_flags[i].dmi_system_name, dmi_system_name)) &&
				(v4lcontrol_flags[i].dmi_system_version == NULL ||
				 !strcmp(v4lcontrol_flags[i].dmi_system_version, dmi_system_version)) &&

				(v4lcontrol_flags[i].dmi_board_vendor == NULL ||
				 !strcmp(v4lcontrol_flags[i].dmi_board_vendor, dmi_board_vendor)) &&
				(v4lcontrol_flags[i].dmi_board_name == NULL ||
				 !strcmp(v4lcontrol_flags[i].dmi_board_name, dmi_board_name)) &&
				(v4lcontrol_flags[i].dmi_board_version == NULL ||
				 !strcmp(v4lcontrol_flags[i].dmi_board_version, dmi_board_version))) {
===============================================================================

it looks like because any DMI information string is always set to NULL, then
the check for vendor names/versions/etc will always fail, so no specific flags
would be applied.

Am I understanding something in wrong way? Please advice.

-- 
Eugene N Dzhurinsky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20110912/534ecfde/attachment.pgp


More information about the freebsd-multimedia mailing list