From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 08:52:40 2010 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C32091065674; Sun, 12 Dec 2010 08:52:40 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from groupware.itac.at (groupware.itac.at [91.205.172.99]) by mx1.freebsd.org (Postfix) with ESMTP id 5A84B8FC21; Sun, 12 Dec 2010 08:52:40 +0000 (UTC) Received: from [188.45.50.206] (188.45.50.206) by groupware.itac.at (Axigen) with (CAMELLIA256-SHA encrypted) ESMTPSA id 27B536; Sun, 12 Dec 2010 09:37:49 +0100 From: Bernhard =?ISO-8859-1?Q?Fr=F6hlich?= To: Andriy Gapon , Bernhard Froehlich X-Mailer: Modest 3.2 References: <20101208192132.51c9937f@FreeBSD.org> <4D03D5B5.8050709@freebsd.org> In-Reply-To: <4D03D5B5.8050709@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-ID: <1292143026.3455.1.camel@Nokia-N900-42-11> Date: Sun, 12 Dec 2010 09:37:06 +0100 Message-Id: <1292143026.3455.2.camel@Nokia-N900-42-11> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-AxigenSpam-Level: 1 X-CTCH-RefID: str=0001.0A0B0209.4D0489CC.01F1,ss=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Cc: multimedia@freebsd.org Subject: Re: Call for Testers: XBMC 10.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bernhard =?ISO-8859-1?Q?Fr=F6hlich?= List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 08:52:40 -0000 ----- Ursprüngliche Mitteilung ----- > on 08/12/2010 20:21 Bernhard Froehlich said the following: > > Hi multimedia@ guys! > > > > Thanks to the fantastic work of Mickael Maillot we have a small > > Christmas present for you! A new XBMC port is ready for wider testing. > > Please give it a try and report success and eventual errors! > > > > We have cooperated to fix remaining build errors and bring the port > > into a good shape for the ports tree. The only serious issue that i > > currently know of is that the port does not build on FreeBSD 7.x but > > that will be fixed before I commit the port which is planned for late > > December. > > > > > > XBMC Media Center (formerly named "XBox Media Center") > > is a free and open source cross-platform media-player > > and entertainment hub. > > > > WWW:      http://xbmc.org/ > > > > > > Screenshots: > > http://home.bluelife.at/images/xbmc-10.0/ > > > > XBMC Port: > > http://home.bluelife.at/ports/xbmc-cft-20101208.tar.gz > > Thanks a lot for this great job! > Couple of questions: > 1. Is this port i386-only? Specifically, there seem to be problems > compiling it on amd64 - some .Asm files get compiled into i386 code. No absolutely not. It was runtime tested for some weeks on amd64 and build tested in a tinderbox on 7, 8, current on amd64 and i386. Currently only failing on 7. > 2. There also seem to be problems compiling with gcc44+ from ports.  Not > too drastic ones though - I'll send in couple of patches for this later. Thanks! From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 10:21:46 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27781106566B; Sun, 12 Dec 2010 10:21:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id 7D52E8FC14; Sun, 12 Dec 2010 10:21:44 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=4dE6tNKVm/0afO7MQGRPv7y2YwMo4emTIiDjbh74onY= c=1 sm=1 a=z9NWlv7W76UA:10 a=Q9fys5e9bTEA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=CmE9zqwx-rIHTs_GR3MA:9 a=IoYoHpXQX2YpcQYO9bZZ3Yf1Dj0A:4 a=PUjeQqilurYA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 60993799; Sun, 12 Dec 2010 11:21:43 +0100 From: Hans Petter Selasky To: kwm@freebsd.org Date: Sun, 12 Dec 2010 11:22:03 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201012102321.38864.hselasky@c2i.net> In-Reply-To: <201012102321.38864.hselasky@c2i.net> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201012121122.03654.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, Dru Lavigne Subject: Re: Webcamd v0.1.17 ready for testing X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 10:21:46 -0000 On Friday 10 December 2010 23:21:38 Hans Petter Selasky wrote: > Hi, > > Please find attached a patch which upgrades the webcamd port to version > 0.1.17. > > List of changes: > > - Added man-pages for all drivers including webcamd itself. Big thanks to > Dru Lavigne! > > - Fixed deadlock/hang issue with hald during plug of USB device after boot. > > - Added patch from Luigi Rizzo to use "checkyesno" in webcamd rc startup > file to detect presence of hald. > > - Upgraded drivers to latest version from the respective V4L repositories > > - Added new debug option to the port config system. > > - Added License keyword. > I've found some regressions issues with DVB-T adapters, so there will soon be a version .18. --HPS From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 10:29:19 2010 Return-Path: Delivered-To: multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 582881065672; Sun, 12 Dec 2010 10:29:19 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.23]) by mx1.freebsd.org (Postfix) with ESMTP id 13C0A8FC0C; Sun, 12 Dec 2010 10:29:18 +0000 (UTC) Received: from 125-71-132-95.pool.ukrtel.net ([95.132.71.125] helo=localhost) by fsm1.ukr.net with esmtps ID 1PRjB6-000GnW-RK ; Sun, 12 Dec 2010 12:29:16 +0200 Date: Sun, 12 Dec 2010 12:29:10 +0200 From: Ivan Klymenko To: Bernhard Froehlich Message-ID: <20101212122910.3108cf0a@ukr.net> In-Reply-To: <72d8e7bdfb2e0fae0df7b123421a551e@bluelife.at> References: <20101208192132.51c9937f@FreeBSD.org> <20101209003507.131afaae@ukr.net> <20101209005713.0928c30b@ukr.net> <72d8e7bdfb2e0fae0df7b123421a551e@bluelife.at> X-Mailer: Claws Mail 3.7.7 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: multimedia@FreeBSD.org Subject: Re: Call for Testers: XBMC 10.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 10:29:19 -0000 =D0=92 Thu, 09 Dec 2010 19:34:11 +0000 Bernhard Froehlich =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On Thu, 9 Dec 2010 00:57:13 +0200, Ivan Klymenko > wrote: > > =D0=92 Thu, 9 Dec 2010 00:35:07 +0200 > > Ivan Klymenko =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >=20 > >> Thank you for your work! > >> > >> xbmc crashes when creating frames from video files ... :( > >=20 > > I beg your pardon - the problem by attaching the log file > > xbmc_crashlog-20101209_005433.log: > >=20 > > 00:30:58 T:34609920256 M:467890176 WARNING: FillBuffer: curl failed > > with code 28 00:30:58 T:34609920256 M:467857408 ERROR: > > CFileCurl::CReadState::Open, didn't get any data from stream. > > 00:31:03 T:34609901824 M:452022272 NOTICE: > > CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2 >=20 > curl code 28 is CURLE_OPERATION_TIMEDOUT so the error is because your > source did not send any data. From which device did you try to play > the file? Does playback from local filesystem work? >=20 Yes. I go to a directory on my local drive... From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 10:57:52 2010 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FEEA1065672; Sun, 12 Dec 2010 10:57:52 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3845F8FC18; Sun, 12 Dec 2010 10:57:50 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA02406; Sun, 12 Dec 2010 12:57:48 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRjci-000BYn-3n; Sun, 12 Dec 2010 12:57:48 +0200 Message-ID: <4D04AAAA.3050603@freebsd.org> Date: Sun, 12 Dec 2010 12:57:46 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?UTF-8?B?QmVybmhhcmQgRnLDtmhsaWNo?= References: <20101208192132.51c9937f@FreeBSD.org> <4D03D5B5.8050709@freebsd.org> <1292143026.3455.2.camel@Nokia-N900-42-11> In-Reply-To: <1292143026.3455.2.camel@Nokia-N900-42-11> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: multimedia@freebsd.org Subject: Re: Call for Testers: XBMC 10.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 10:57:52 -0000 on 12/12/2010 10:37 Bernhard Fröhlich said the following: > ----- Ursprüngliche Mitteilung ----- >> 1. Is this port i386-only? Specifically, there seem to be problems >> compiling it on amd64 - some .Asm files get compiled into i386 code. > > No absolutely not. It was runtime tested for some weeks on amd64 and build tested in a tinderbox on 7, 8, current on amd64 and i386. Currently only failing on 7. The problem that I see is compilation failing in xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU directory. I looked into the top-level Makefile and I see that that directory is not supposed to included into the build on x86_64 linux: ifeq ($(or $(findstring powerpc,$(ARCH)),$(findstring x86_64-linux,$(ARCH)),$(findstring arm, $(ARCH))),) $(MAKE) -C xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU endif amd64 FreeBSD should be excluded here too, most likely. I fixed this by changing "x86_64-linux" => "x86_64". But maybe I just screwed my build environment in the first place... Because I had to restart configure and compilation steps a few times. >> 2. There also seem to be problems compiling with gcc44+ from ports. Not >> too drastic ones though - I'll send in couple of patches for this later. 1. Patch for configure.in to correctly detect and link libfaac.so: @@ -721,8 +764,8 @@ AC_MSG_RESULT($faac_disabled) else if test "$use_faac" = "yes"; then - AC_CHECK_LIB([faac], [main],, - use_faac=no;AC_MSG_RESULT($faac_not_found)) + AC_CHECK_LIB([faac], [main], LIBS="-lfaac -lstdc++ $LIBS", + use_faac=no;AC_MSG_RESULT($faac_not_found), [-lstdc++]) else AC_MSG_RESULT($faac_disabled) fi The issue here seems to be that in my environment libfaac.so is linked with libmp4v2.so and the latter is a "C++ library". That is, it depends on libstdc++.so. But for some reason gcc44, unlike base gcc, doesn't pick up that dependency automatically. 2. Patch for guilib/StdString.h. @@ -2,6 +2,7 @@ #include #include #include +#include #if defined(_WIN32) && !defined(va_copy) #define va_copy(dst, src) ((dst) = (src)) This is needed because of the existing patch that introduces memset. gcc44 unlike base gcc doesn't see memset definition through other headers, but needs an explicit include. -- Andriy Gapon From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 11:19:05 2010 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95DA81065672; Sun, 12 Dec 2010 11:19:05 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A1D2B8FC19; Sun, 12 Dec 2010 11:19:04 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA02544; Sun, 12 Dec 2010 13:19:02 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRjxG-000Ba2-Co; Sun, 12 Dec 2010 13:19:02 +0200 Message-ID: <4D04AFA5.5010504@freebsd.org> Date: Sun, 12 Dec 2010 13:19:01 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?UTF-8?B?QmVybmhhcmQgRnLDtmhsaWNo?= References: <20101208192132.51c9937f@FreeBSD.org> <4D03D5B5.8050709@freebsd.org> <1292143026.3455.2.camel@Nokia-N900-42-11> <4D04AAAA.3050603@freebsd.org> In-Reply-To: <4D04AAAA.3050603@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: multimedia@freebsd.org Subject: Re: Call for Testers: XBMC 10.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 11:19:05 -0000 on 12/12/2010 12:57 Andriy Gapon said the following: > 2. Patch for guilib/StdString.h. > @@ -2,6 +2,7 @@ > #include > #include > #include > +#include > > #if defined(_WIN32) && !defined(va_copy) > #define va_copy(dst, src) ((dst) = (src)) > > This is needed because of the existing patch that introduces memset. > gcc44 unlike base gcc doesn't see memset definition through other headers, but > needs an explicit include. Oh, and another one for xbmc/utils/IoSupport.cpp: @@ -53,6 +53,9 @@ #include #include #endif +#ifdef __FreeBSD__ +#include +#endif #include "../FileSystem/cdioSupport.h" #include "../FileSystem/iso9660.h" #include "../MediaManager.h" It's need for PATH_MAX definition with gcc44. -- Andriy Gapon From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 20:20:13 2010 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D2221065673; Sun, 12 Dec 2010 20:20:13 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8A48FC17; Sun, 12 Dec 2010 20:20:12 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA06767; Sun, 12 Dec 2010 22:20:10 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRsOv-000C8E-U5; Sun, 12 Dec 2010 22:20:09 +0200 Message-ID: <4D052E79.9070503@freebsd.org> Date: Sun, 12 Dec 2010 22:20:09 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?UTF-8?B?QmVybmhhcmQgRnLDtmhsaWNo?= References: <20101208192132.51c9937f@FreeBSD.org> <4D03D5B5.8050709@freebsd.org> <1292143026.3455.2.camel@Nokia-N900-42-11> <4D04AAAA.3050603@freebsd.org> <4D04AFA5.5010504@freebsd.org> In-Reply-To: <4D04AFA5.5010504@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: multimedia@freebsd.org Subject: Re: Call for Testers: XBMC 10.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 20:20:13 -0000 It seems that the port also requires alsa-plugins to be installed? Otherwise, no sound and: ALSA lib pcm.c:2173:(snd_pcm_open_conf) Cannot open shared library /usr/local/lib/alsa-lib/libasound_module_pcm_oss.so Perhaps this is because I never installed anything-alsa explicitly on this system and carefully unselected anything-alsa in optional dependencies of other installed ports (in their config dialogs). -- Andriy Gapon From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 20:40:16 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A127C106566B; Sun, 12 Dec 2010 20:40:16 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9DAE68FC19; Sun, 12 Dec 2010 20:40:15 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA06933; Sun, 12 Dec 2010 22:40:14 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRsiL-000C9g-IR; Sun, 12 Dec 2010 22:40:13 +0200 Message-ID: <4D05332C.7010208@freebsd.org> Date: Sun, 12 Dec 2010 22:40:12 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?x-viet-vps?Q?Martin_Matus=28ka?= , freebsd-multimedia@freebsd.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: ffmpeg and mmap X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 20:40:16 -0000 I've been getting some crash dumps in libswscale.so code. The stack trace is always like this: #0 0x000000083a6abf10 in ?? () #1 0x000000080a717dc6 in hyscale_fast_MMX2 #2 0x000000080a71bd64 in swScale_MMX2 #3 0x000000080a71ebf9 in sws_scale ... >From disassembling I've identified that the crash happens as soon as inline assembly in hyscale_fast_MMX2 calls code pointed to by lumMmx2FilterCode pointer. The following code in libswscale/utils.c, function sws_getContext() is of interest: #if ARCH_X86 && (HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT) // can't downscale !!! if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) { c->lumMmx2FilterCodeSize = initMMX2HScaler( dstW, c->lumXInc, NULL, NULL, NULL, 8); c->chrMmx2FilterCodeSize = initMMX2HScaler(c->chrDstW, c->chrXInc, NULL, NULL, NULL, 4); #ifdef MAP_ANONYMOUS c->lumMmx2FilterCode = mmap(NULL, c->lumMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); c->chrMmx2FilterCode = mmap(NULL, c->chrMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); #elif HAVE_VIRTUALALLOC c->lumMmx2FilterCode = VirtualAlloc(NULL, c->lumMmx2FilterCodeSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE); c->chrMmx2FilterCode = VirtualAlloc(NULL, c->chrMmx2FilterCodeSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE); #else c->lumMmx2FilterCode = av_malloc(c->lumMmx2FilterCodeSize); c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize); #endif if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode) goto fail; FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), fail); FF_ALLOCZ_OR_GOTO(c, c->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail); FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail); FF_ALLOCZ_OR_GOTO(c, c->hChrFilterPos, (c->chrDstW/2/4+8)*sizeof(int32_t), fail); initMMX2HScaler( dstW, c->lumXInc, c->lumMmx2FilterCode, c->hLumFilter, c->hLumFilterPos, 8); initMMX2HScaler(c->chrDstW, c->chrXInc, c->chrMmx2FilterCode, c->hChrFilter, c->hChrFilterPos, 4); #ifdef MAP_ANONYMOUS mprotect(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize, PROT_EXEC | PROT_READ); mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC | PROT_READ); #endif } else #endif /* ARCH_X86 && (HAVE_MMX2 || CONFIG_RUNTIME_CPUDETECT) */ I've noticed that in our port lumMmx2FilterCode and chrMmx2FilterCode buffers are allocated using av_malloc() (which is a wrapper around libc malloc) and that's the source of the problem - on amd64 heap memory is not executable. So the attempt to execute code in the heap buffer results in a page fault and in the crash (SIGBUS). The buffer should be actually allocated via mmap() and then get proper permissions via mprotect(). That doesn't happen because MAP_ANONYMOUS is not defined in that context. MAP_ANONYMOUS/MAP_ANON is not defined, because it is not specified in POSIX and it is under _BSD_VISIBLE in sys/mman.h, but the code at hand is compiled with _POSIX_SOURCE defined. On FreeBSD _POSIX_SOURCE implies !_BSD_VISIBLE. To get around that issue _on Linux_, ffmpeg folks have put explicit _SVID_SOURCE definition right into the libswscale/utils.c file: #define _SVID_SOURCE //needed for MAP_ANONYMOUS For much the same reason we need to add the following for FreeBSD (as hackish as it is): #define __BSD_VISIBLE 1 With that addition the code buffer is allocated properly and the code in it can be executed. P.S. this page talks about a similar issue: http://ubuntuforums.org/showthread.php?t=1547726 -- Andriy Gapon From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 20:52:15 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90F551065673; Sun, 12 Dec 2010 20:52:15 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A8BCA8FC14; Sun, 12 Dec 2010 20:52:14 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA07026; Sun, 12 Dec 2010 22:52:12 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRstw-000CAl-8E; Sun, 12 Dec 2010 22:52:12 +0200 Message-ID: <4D0535FB.1090102@freebsd.org> Date: Sun, 12 Dec 2010 22:52:11 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Kostik Belousov References: <4D05332C.7010208@freebsd.org> <20101212204541.GA33073@deviant.kiev.zoral.com.ua> In-Reply-To: <20101212204541.GA33073@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@freebsd.org, Martin Matuska Subject: Re: ffmpeg and mmap X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 20:52:15 -0000 on 12/12/2010 22:45 Kostik Belousov said the following: > On Sun, Dec 12, 2010 at 10:40:12PM +0200, Andriy Gapon wrote: >> To get around that issue _on Linux_, ffmpeg folks have put explicit >> _SVID_SOURCE definition right into the libswscale/utils.c file: >> #define _SVID_SOURCE //needed for MAP_ANONYMOUS >> >> For much the same reason we need to add the following for FreeBSD (as >> hackish as it is): #define __BSD_VISIBLE 1 >> >> With that addition the code buffer is allocated properly and the code >> in it can be executed. > Applications should never define the symbols from reserved namespace, > in this case __BSD_VISIBLE. Right solution is to not define _POSIX_SOURCE. i agree with you, but I don't know why the ffmpeg folks decided to use _POSIX_C_SOURCE=200112 in the first place and what could break without it. -- Andriy Gapon From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 21:08:59 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99A79106564A; Sun, 12 Dec 2010 21:08:59 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A6D0D8FC08; Sun, 12 Dec 2010 21:08:58 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA07141; Sun, 12 Dec 2010 23:08:56 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PRtA8-000CBs-2b; Sun, 12 Dec 2010 23:08:56 +0200 Message-ID: <4D0539E7.6080805@freebsd.org> Date: Sun, 12 Dec 2010 23:08:55 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Kostik Belousov References: <4D05332C.7010208@freebsd.org> <20101212204541.GA33073@deviant.kiev.zoral.com.ua> <4D0535FB.1090102@freebsd.org> In-Reply-To: <4D0535FB.1090102@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@freebsd.org, Martin Matuska Subject: Re: ffmpeg and mmap X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 21:08:59 -0000 on 12/12/2010 22:52 Andriy Gapon said the following: > on 12/12/2010 22:45 Kostik Belousov said the following: >> On Sun, Dec 12, 2010 at 10:40:12PM +0200, Andriy Gapon wrote: >>> To get around that issue _on Linux_, ffmpeg folks have put explicit >>> _SVID_SOURCE definition right into the libswscale/utils.c file: >>> #define _SVID_SOURCE //needed for MAP_ANONYMOUS >>> >>> For much the same reason we need to add the following for FreeBSD (as >>> hackish as it is): #define __BSD_VISIBLE 1 >>> >>> With that addition the code buffer is allocated properly and the code >>> in it can be executed. >> Applications should never define the symbols from reserved namespace, >> in this case __BSD_VISIBLE. Right solution is to not define _POSIX_SOURCE. > > i agree with you, but I don't know why the ffmpeg folks decided to use > _POSIX_C_SOURCE=200112 in the first place and what could break without it. > Actually the port seems to compile and work without any problems if I remove _POSIX_C_SOURCE definition in two places in configure. -- Andriy Gapon From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 21:24:21 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C67831065694 for ; Sun, 12 Dec 2010 21:24:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3EE498FC1E for ; Sun, 12 Dec 2010 21:24:20 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oBCKjgIg060840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Dec 2010 22:45:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oBCKjfEZ066221; Sun, 12 Dec 2010 22:45:41 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oBCKjf2U066220; Sun, 12 Dec 2010 22:45:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 12 Dec 2010 22:45:41 +0200 From: Kostik Belousov To: Andriy Gapon Message-ID: <20101212204541.GA33073@deviant.kiev.zoral.com.ua> References: <4D05332C.7010208@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gd+outVunBU67ahz" Content-Disposition: inline In-Reply-To: <4D05332C.7010208@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-multimedia@freebsd.org, "Martin Matus\(ka" Subject: Re: ffmpeg and mmap X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 21:24:21 -0000 --gd+outVunBU67ahz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Dec 12, 2010 at 10:40:12PM +0200, Andriy Gapon wrote: > To get around that issue _on Linux_, ffmpeg folks have put explicit > _SVID_SOURCE definition right into the libswscale/utils.c file: > #define _SVID_SOURCE //needed for MAP_ANONYMOUS > > For much the same reason we need to add the following for FreeBSD (as > hackish as it is): #define __BSD_VISIBLE 1 > > With that addition the code buffer is allocated properly and the code > in it can be executed. Applications should never define the symbols from reserved namespace, in this case __BSD_VISIBLE. Right solution is to not define _POSIX_SOURCE. --gd+outVunBU67ahz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk0FNHUACgkQC3+MBN1Mb4iDVwCfRZi2kBGKrWXvEBt/uTzEaoKb jhMAn0q/dohVX7GXZmawJ0RFVJlM2rlR =6/jm -----END PGP SIGNATURE----- --gd+outVunBU67ahz-- From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 21:29:01 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DAF8106564A; Sun, 12 Dec 2010 21:29:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:100:1043::3]) by mx1.freebsd.org (Postfix) with ESMTP id 22EC18FC14; Sun, 12 Dec 2010 21:29:01 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 3425812FFD0; Sun, 12 Dec 2010 22:29:00 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LMJjajPTlkGO; Sun, 12 Dec 2010 22:28:58 +0100 (CET) Received: from [10.9.8.3] (188-167-78-139.dynamic.chello.sk [188.167.78.139]) by mail.vx.sk (Postfix) with ESMTPSA id EFCBD12FFC5; Sun, 12 Dec 2010 22:28:57 +0100 (CET) Message-ID: <4D053E99.7090401@FreeBSD.org> Date: Sun, 12 Dec 2010 22:28:57 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Andriy Gapon References: <4D05332C.7010208@freebsd.org> <20101212204541.GA33073@deviant.kiev.zoral.com.ua> <4D0535FB.1090102@freebsd.org> <4D0539E7.6080805@freebsd.org> In-Reply-To: <4D0539E7.6080805@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-multimedia@freebsd.org Subject: Re: ffmpeg and mmap X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 21:29:01 -0000 Lets see what we can read about this from ffmpeg history: I tracked it down to this git commit of ffmpeg: http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=00dd86329f892c6fdf641c4cc8b0497ff232d2e9 The commit ressults from a discussion in this thread: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-August/051220.html I personally think we can remove it from CFLAGS in our case. Dňa 12.12.2010 22:08, Andriy Gapon wrote / napísal(a): > on 12/12/2010 22:52 Andriy Gapon said the following: >> on 12/12/2010 22:45 Kostik Belousov said the following: >>> On Sun, Dec 12, 2010 at 10:40:12PM +0200, Andriy Gapon wrote: >>>> To get around that issue _on Linux_, ffmpeg folks have put explicit >>>> _SVID_SOURCE definition right into the libswscale/utils.c file: >>>> #define _SVID_SOURCE //needed for MAP_ANONYMOUS >>>> >>>> For much the same reason we need to add the following for FreeBSD (as >>>> hackish as it is): #define __BSD_VISIBLE 1 >>>> >>>> With that addition the code buffer is allocated properly and the code >>>> in it can be executed. >>> Applications should never define the symbols from reserved namespace, >>> in this case __BSD_VISIBLE. Right solution is to not define _POSIX_SOURCE. >> i agree with you, but I don't know why the ffmpeg folks decided to use >> _POSIX_C_SOURCE=200112 in the first place and what could break without it. >> > Actually the port seems to compile and work without any problems if I remove > _POSIX_C_SOURCE definition in two places in configure. > From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 21:45:17 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C81B1065673; Sun, 12 Dec 2010 21:45:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id C44078FC08; Sun, 12 Dec 2010 21:45:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=pSMQvMxz67uBPld/2YzXd4n8EUsHq22vR+JpH4ELdfA= c=1 sm=1 a=BEMvcUfHrRUA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=SVepdAZcA8V7X3YS48EA:9 a=ef-4C6aqB-232HUZANN0q6wfE4QA:4 a=CjuIK1q_8ugA:10 a=ndaoGXS1AAAA:8 a=6I5d2MoRAAAA:8 a=7cDuYcutWchY465z62wA:9 a=6-OuhogAhkhOd2NNXCQA:7 a=7AOLu5e_bkQlSsWyqIwU5qzZnwcA:4 a=SV7veod9ZcQA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 60808825; Sun, 12 Dec 2010 22:45:14 +0100 To: kwm@freebsd.org From: Hans Petter Selasky X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-15?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-15?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-15?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' Date: Sun, 12 Dec 2010 22:45:34 +0100 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_+JUBNhF8kdGdPfP" Message-Id: <201012122245.34561.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org, Dru Lavigne Subject: Webcamd v0.1.18 ready for testing [was: v0.1.17] X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 21:45:17 -0000 --Boundary-00=_+JUBNhF8kdGdPfP Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Please find attached a patch which upgrades the webcamd port to version 0.1.17. List of changes: - Added man-pages for all drivers including webcamd itself. Big thanks to Dru Lavigne! - Fixed deadlock/hang issue with hald during plug of USB device after boot. - Added patch from Luigi Rizzo to use "checkyesno" in webcamd rc startup file to detect presence of hald. - Upgraded drivers to latest version from the respective V4L repositories - Added new debug option to the port config system. - Added License keyword. - Fixed problem with -B option. - Improved startup script. Please test and report any issues! Tested: i386 + amd64 + USB video + USB DVB. --HPS --Boundary-00=_+JUBNhF8kdGdPfP Content-Type: text/x-patch; charset="us-ascii"; name="webcamd-0.1.18.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="webcamd-0.1.18.patch" diff -u -r webcamd.orig/Makefile webcamd/Makefile --- webcamd.orig/Makefile 2010-12-10 22:20:02.000000000 +0100 +++ webcamd/Makefile 2010-12-12 22:22:42.000000000 +0100 @@ -6,17 +6,19 @@ # PORTNAME= webcamd -PORTVERSION= 0.1.16 +PORTVERSION= 0.1.18 CATEGORIES= multimedia MASTER_SITES= http://www.selasky.org/hans_petter/video4bsd/releases/ MAINTAINER= hselasky@FreeBSD.org COMMENT= A port of Linux USB webcam and DVB drivers into userspace -BUILD_DEPENDS= v4l_compat>=1.0.20100321:${PORTSDIR}/multimedia/v4l_compat \ - cuse4bsd-kmod>=0.1.8:${PORTSDIR}/multimedia/cuse4bsd-kmod +BUILD_DEPENDS= v4l_compat>=1.0.20100321:${PORTSDIR}/multimedia/v4l_compat -LIB_DEPENDS= v4l1.0:${PORTSDIR}/multimedia/libv4l +LIB_DEPENDS= v4l1.0:${PORTSDIR}/multimedia/libv4l \ + cuse4bsd.1:${PORTSDIR}/multimedia/cuse4bsd-kmod + +LICENSE= GPLv2 USE_RC_SUBR= webcamd USE_BZIP2= yes @@ -26,13 +28,15 @@ LIBDIR= ${PREFIX}/lib OPTIONS= HAL "Build with HAL and DBUS support" On +OPTIONS+= DBG "Build with debugging support" Off +OPTIONS+= MAN "Install manual pages" On .include LIBCUSE=${LIBDIR}/libcuse4bsd.so .if defined(WITH_HAL) -MAKE_ARGS+="HAVE_HAL=YES" +MAKE_ARGS+=" HAVE_HAL=YES" LIBHAL=${LIBDIR}/libhal.so:${LIBDIR}/libdbus-1.so: LIB_DEPENDS+=hal.1:${PORTSDIR}/sysutils/hal LIB_DEPENDS+=dbus-1:${PORTSDIR}/devel/dbus @@ -40,6 +44,17 @@ LIBHAL= .endif +.if defined(WITH_DBG) +MAKE_ARGS+=" HAVE_DEBUG=YES" +.endif + +.if defined(WITH_MAN) +MAKE_ARGS+=" HAVE_MAN=YES" +PLIST_SUB+= MANPAGES="" +.else +PLIST_SUB+= MANPAGES="@comment " +.endif + .if ${OSVERSION} < 800000 IGNORE= requires FreeBSD 8.0-RELEASE or later .endif diff -u -r webcamd.orig/distinfo webcamd/distinfo --- webcamd.orig/distinfo 2010-12-10 22:20:02.000000000 +0100 +++ webcamd/distinfo 2010-12-12 22:04:57.000000000 +0100 @@ -1,3 +1,2 @@ -MD5 (webcamd-0.1.16.tar.bz2) = 2e48673e4f729ac4ebfcbddf9985c18e -SHA256 (webcamd-0.1.16.tar.bz2) = ab5e5b7253414c822ce434317e5a0b0c82827765433bf4d115812d6e5ad8b192 -SIZE (webcamd-0.1.16.tar.bz2) = 3543806 +SHA256 (webcamd-0.1.18.tar.bz2) = 5ebb5b5347ddf6f3552141fa43036e330ece54133a66e7f2832de9770eb96aeb +SIZE (webcamd-0.1.18.tar.bz2) = 3545356 diff -u -r webcamd.orig/files/webcamd.in webcamd/files/webcamd.in --- webcamd.orig/files/webcamd.in 2010-12-10 22:20:02.000000000 +0100 +++ webcamd/files/webcamd.in 2010-12-12 22:03:07.000000000 +0100 @@ -19,7 +19,7 @@ command=%%PREFIX%%/sbin/webcamd command_args="-B" -if [ -n "$hald_enable" ]; then +if checkyesno hald_enable ; then command_args="$command_args -H" fi @@ -29,5 +29,11 @@ if [ $# -gt 1 ]; then pidfile="webcamd.dummy" command_args="$command_args -d $2 -i 0" + # + # Only run the rc command if + # the appropriate arguments + # are specified: + # + run_rc_command $1 fi -run_rc_command $1 + diff -u -r webcamd.orig/pkg-descr webcamd/pkg-descr --- webcamd.orig/pkg-descr 2010-12-10 22:20:02.000000000 +0100 +++ webcamd/pkg-descr 2010-12-10 22:34:45.000000000 +0100 @@ -5,4 +5,6 @@ currently depends on libc, pthreads, libusb and the CUSE4BSD kernel module. +LICENSE: GPLv2 + WWW: http://www.selasky.org/hans_petter/video4bsd/ diff -u -r webcamd.orig/pkg-plist webcamd/pkg-plist --- webcamd.orig/pkg-plist 2010-12-10 22:20:02.000000000 +0100 +++ webcamd/pkg-plist 2010-12-12 22:23:16.000000000 +0100 @@ -1,2 +1,48 @@ etc/devd/webcamd.conf sbin/webcamd +%%MANPAGES%%man/man4/au0828.4.gz +%%MANPAGES%%man/man4/benq.4.gz +%%MANPAGES%%man/man4/bttv.4.gz +%%MANPAGES%%man/man4/conex.4.gz +%%MANPAGES%%man/man4/cpiax.4.gz +%%MANPAGES%%man/man4/cx23885.4.gz +%%MANPAGES%%man/man4/cx88.4.gz +%%MANPAGES%%man/man4/em28xx.4.gz +%%MANPAGES%%man/man4/et61x251.4.gz +%%MANPAGES%%man/man4/finepix.4.gz +%%MANPAGES%%man/man4/gl860.4.gz +%%MANPAGES%%man/man4/ibmcam.4.gz +%%MANPAGES%%man/man4/ivtv.4.gz +%%MANPAGES%%man/man4/jeilinj.4.gz +%%MANPAGES%%man/man4/m5602.4.gz +%%MANPAGES%%man/man4/mars.4.gz +%%MANPAGES%%man/man4/meye.4.gz +%%MANPAGES%%man/man4/mr97310a.4.gz +%%MANPAGES%%man/man4/ov519.4.gz +%%MANPAGES%%man/man4/ov534.4.gz +%%MANPAGES%%man/man4/pacxxx.4.gz +%%MANPAGES%%man/man4/pvrusb2.4.gz +%%MANPAGES%%man/man4/pwc.4.gz +%%MANPAGES%%man/man4/saa7134.4.gz +%%MANPAGES%%man/man4/saa7164.4.gz +%%MANPAGES%%man/man4/se401.4.gz +%%MANPAGES%%man/man4/si470x.4.gz +%%MANPAGES%%man/man4/sn9c102.4.gz +%%MANPAGES%%man/man4/sn9c20x.4.gz +%%MANPAGES%%man/man4/sonixj.4.gz +%%MANPAGES%%man/man4/spca5xx.4.gz +%%MANPAGES%%man/man4/sq905c.4.gz +%%MANPAGES%%man/man4/stk014.4.gz +%%MANPAGES%%man/man4/stv06xx.4.gz +%%MANPAGES%%man/man4/sunplus.4.gz +%%MANPAGES%%man/man4/t613.4.gz +%%MANPAGES%%man/man4/tv8532.4.gz +%%MANPAGES%%man/man4/usbvision.4.gz +%%MANPAGES%%man/man4/vc032x.4.gz +%%MANPAGES%%man/man4/w9966.4.gz +%%MANPAGES%%man/man4/w996x.4.gz +%%MANPAGES%%man/man4/zc0301.4.gz +%%MANPAGES%%man/man4/zc3xx.4.gz +%%MANPAGES%%man/man4/zoran.4.gz +%%MANPAGES%%man/man4/zr364xx.4.gz +%%MANPAGES%%man/man8/webcamd.8.gz --Boundary-00=_+JUBNhF8kdGdPfP-- From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 22:40:05 2010 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F6E1106564A for ; Sun, 12 Dec 2010 22:40:05 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from thalia-smout.broadpark.no (thalia-smout.broadpark.no [80.202.8.21]) by mx1.freebsd.org (Postfix) with ESMTP id D5D848FC0C for ; Sun, 12 Dec 2010 22:40:04 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ignis-smin.broadpark.no ([80.202.8.11]) by thalia-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0LDC00E736YE4E60@thalia-smout.broadpark.no> for freebsd-multimedia@FreeBSD.org; Sun, 12 Dec 2010 23:39:50 +0100 (CET) Received: from kg-v2.kg4.no ([84.48.120.77]) by ignis-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with SMTP id <0LDC00MKO6YE2GS1@ignis-smin.broadpark.no> for freebsd-multimedia@FreeBSD.org; Sun, 12 Dec 2010 23:39:50 +0100 (CET) Date: Sun, 12 Dec 2010 23:39:49 +0100 From: Torfinn Ingolfsen To: freebsd-multimedia@FreeBSD.org Message-id: <20101212233949.1f7f7ec2.torfinn.ingolfsen@broadpark.no> In-reply-to: <201012122245.34561.hselasky@c2i.net> References: <201012122245.34561.hselasky@c2i.net> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: Subject: Re: Webcamd v0.1.18 ready for testing [was: v0.1.17] X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 22:40:05 -0000 webcamd 0.1.18 compiles and installs fine here: tingo@kg-v2$ uname -a FreeBSD kg-v2.kg4.no 8.1-STABLE FreeBSD 8.1-STABLE #3: Thu Sep 16 22:18:48 CEST 2010 root@kg-v2.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 On Sun, 12 Dec 2010 22:45:34 +0100 Hans Petter Selasky wrote: > > - Improved startup script. Well, it seems the startup script could be improved even more: - it doesn't give you any options: root@kg-v2# grep webcamd /etc/rc.conf # webcamd webcamd_enable="YES" root@kg-v2# /usr/local/etc/rc.d/webcamd root@kg-v2# - it doesn't support rcvar (or any other standard options?): root@kg-v2# /usr/local/etc/rc.d/webcamd rcvar root@kg-v2# root@kg-v2# /usr/local/etc/rc.d/webcamd start root@kg-v2# Unless I'm doing it wrong? -- Torfinn From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 22:45:47 2010 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C20C106566C for ; Sun, 12 Dec 2010 22:45:47 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from thalia-smout.broadpark.no (thalia-smout.broadpark.no [80.202.8.21]) by mx1.freebsd.org (Postfix) with ESMTP id 525808FC14 for ; Sun, 12 Dec 2010 22:45:47 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ignis-smin.broadpark.no ([80.202.8.11]) by thalia-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0LDC00EMW77T4E60@thalia-smout.broadpark.no> for freebsd-multimedia@FreeBSD.org; Sun, 12 Dec 2010 23:45:29 +0100 (CET) Received: from kg-v2.kg4.no ([84.48.120.77]) by ignis-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with SMTP id <0LDC002N877S70D1@ignis-smin.broadpark.no> for freebsd-multimedia@FreeBSD.org; Sun, 12 Dec 2010 23:45:29 +0100 (CET) Date: Sun, 12 Dec 2010 23:45:28 +0100 From: Torfinn Ingolfsen To: freebsd-multimedia@FreeBSD.org Message-id: <20101212234528.7adb135c.torfinn.ingolfsen@broadpark.no> In-reply-to: <20101212233949.1f7f7ec2.torfinn.ingolfsen@broadpark.no> References: <201012122245.34561.hselasky@c2i.net> <20101212233949.1f7f7ec2.torfinn.ingolfsen@broadpark.no> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: Subject: Re: Webcamd v0.1.18 ready for testing [was: v0.1.17] X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 22:45:47 -0000 Also, devd refuses to start: root@kg-v2# /etc/rc.d/devd start Starting devd. devd: devd already running, pid: 574 /etc/rc.d/devd: WARNING: failed to start devd root@kg-v2# ps ax | grep 574 8912 17 S+ 0:00.00 grep 574 root@kg-v2# root@kg-v2# /etc/rc.d/devd status devd is not running. root@kg-v2# -- Torfinn From owner-freebsd-multimedia@FreeBSD.ORG Sun Dec 12 22:58:07 2010 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CF541065670 for ; Sun, 12 Dec 2010 22:58:07 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from thalia-smout.broadpark.no (thalia-smout.broadpark.no [80.202.8.21]) by mx1.freebsd.org (Postfix) with ESMTP id 54AA48FC0A; Sun, 12 Dec 2010 22:58:07 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ignis-smin.broadpark.no ([80.202.8.11]) by thalia-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0LDC00EOV7SI4E70@thalia-smout.broadpark.no>; Sun, 12 Dec 2010 23:57:55 +0100 (CET) Received: from kg-v2.kg4.no ([84.48.120.77]) by ignis-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with SMTP id <0LDC0024X7SI70F1@ignis-smin.broadpark.no>; Sun, 12 Dec 2010 23:57:54 +0100 (CET) Date: Sun, 12 Dec 2010 23:57:54 +0100 From: Torfinn Ingolfsen To: freebsd-multimedia@FreeBSD.org Message-id: <20101212235754.0a03b8ee.torfinn.ingolfsen@broadpark.no> In-reply-to: <201012122245.34561.hselasky@c2i.net> References: <201012122245.34561.hselasky@c2i.net> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: freebsd-multimedia@freebsd.org, kwm@freebsd.org, Dru Lavigne Subject: Re: Webcamd v0.1.18 ready for testing [was: v0.1.17] X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 22:58:07 -0000 On Sun, 12 Dec 2010 22:45:34 +0100 Hans Petter Selasky wrote: > Hi, > > Please find attached a patch which upgrades the webcamd port to version > 0.1.17. > > List of changes: > > - Added man-pages for all drivers including webcamd itself. Big thanks to Dru > Lavigne! The examples section in the webcamd(8) man page seems a bit short: With the USB device connected, determine the [ugen]. values using usbconfig(8): usbconfig ugen7.2: at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON Perhaps an example of the actual webcamd command would improve things? And, the output from 'webcamd -h' doesn't correspond 100% to the man page: root@kg-v2# webcamd -h usage: webcamd -d [ugen]. -i 0 -v -1 -B -d -i -v