aMSN Forums
June 19, 2013, 03:39:20 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Solaris Webcam Support Ported  (Read 9852 times)
eenright
Newbie

Offline Offline

Posts: 7


View Profile
« on: October 07, 2007, 01:13:47 am »

I have ported webcam support in amsn-0.97RC1 to Solaris Nevada.  Specifically to snv_73, but this should work on any release with the usbvc driver (snv_56 if I recall correctly.)

For those unfamiliar with usbvc, it provides a V4L2 interface to usb devices conforming to the generic usb video capture specification.

The current port is fairly raw, however I will clean it up to a state which can be pushed back upstream.  Currently there appears to be a bug in libng, the root cause of which is currently unknown to me but I have found a workaround for it.  Take a look at these two screenshots:

aMSN-0.97RC1 on Solaris Nevada SXCR build 73.

Windows Live Messenger on Windows XP.

I will see what I can do about posting a proper patch as soon as possible, but in the meantime I can give anyone interested a pre-built x86 source tree.  Feel free to contact me directly at eric dot enright at gmail dot com.

Please note that my tree also includes system tray docking support.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: October 07, 2007, 06:09:21 am »

Hey there, that's cool, I don't know exactly what you did, because I thought it worked fine on bsd already, but it's cool, if you can provide us with a patch against the latest SVN version, that would be awesome.

p.s.: create the patch with the 'svn diff' command please.
Thanks
Logged

KaKaRoTo
eenright
Newbie

Offline Offline

Posts: 7


View Profile
« Reply #2 on: October 07, 2007, 06:01:20 pm »

Solaris is in many ways much more similar to Linux than to BSD.  In particular here, that Solaris uses V4L2 as opposed to BSD's bktr.

The biggest stumbling block I had was actually higher up in libng, somewhere along the line the number of bytes per line in a frame was being set incorrectly, leading to nice segfaults and weird images.  I haven't entirely located the root of this problem, which I need to do prior to a patch.
Logged
eenright
Newbie

Offline Offline

Posts: 7


View Profile
« Reply #3 on: October 16, 2007, 05:27:04 am »

Update:

The issue turned out to be a bug in usbvc - CR 6615538 has been filed to track it.  It doesn't seem to be on B.O.O yet.

I'm impatient, so here are some preliminary patches.  Note that THIS WILL NOT BUILD ON SOLARIS 10.  You must have Solaris Nevada build 56 or later.  I would love to hear of anyone's experience with this, especially people using other operating systems.  I have been fairly careful to keep it portable, but don't have any other systems to test it on.  Linux in particular needs to be tested.

You can find required patches here:

http://eric.5amsoftware.com/~eric/amsn-solaris/

1. Apply amsn-solaris.2007-10-15.diff.  This patch is against the SVN of the specified date.  This lumps in autoconf stuff, so there is no need to bother with rerunning it or autoheader afterwards.
2. Apply usbvc.diff to a current source tree, rebuild, and install usvbc.  Alternatively, use the precompiled drivers in usbvc.tar.gz.  These are 32 and 64 bit debug drivers built on snv_73, however I have not actually tested the 32 bit driver ... I would hope^Wpresume it works, though Smiley
3. See CR 6608595.  Long story short, edit /usr/include/sys/videodev2.h to #include <sys/ioccom.h>.

A fix for CR 6608595 has already been submitted, and integration is underway.  No news on CR 6615538 however, and I'm waiting on that.

EDIT: 6608595 is commited to 77, and a fix for 6615538 will be integrated soon.  No word on which build yet, though.

Thank you aMSN, you are the first known (to me) non-SUNW application to make use of Solaris' V4L2 interface, and already found two bugs Smiley
Logged
eenright
Newbie

Offline Offline

Posts: 7


View Profile
« Reply #4 on: November 23, 2007, 02:13:33 am »

Update:

Port is complete! Cheesy

After a bit of a work-induced hiatus, I have polished up my patch into something which should merge cleanly without breaking existing platforms.  It has been tested on Solaris with SVN revision 9098 (current as of this writing.)  Main changes include:

- New Solaris build target (FOUND_OS) if a usable Solaris V4L2 is found.
- Default to Linux otherwise.  This implicitly give us other goodies such as traydock support.
- Builds the capture module with v4l2_drv0, giving us webcam support.
- amsncore's OnLinux now returns true if on Solaris.  Cheap, I know, but I found this to be far easier than messing with every call to OnLinux.

The patch can be found here: http://68.179.44.116/amsn-solaris.diff

I would like to submit this patch for integration into the main trunk.

Unfortunately I do not have the resources to test against any other platforms, and so do not know for certain if it breaks anything on them.  Thus, we'll need a round of testing before integration can happen and I would greatly appreciate anyone willing to spend some time on this.

There is also a caveat for those wishing to use this new webcam support: you MUST be using Solaris Nevada build 77 or later.  The bugs discussed earlier in this thread were putback into that release.  If you have an earlier version and try to build the V4L2 drivers (builds 56-76) it WILL NOT compile.  I would like to express my thanks to Colin Zou at Sun for usbvc and his help with these bugs.

Looking forward to your feedback. Smiley

- Eric
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #5 on: November 25, 2007, 10:51:06 am »

Hi,
I just want to let you know that your post has been read and is kept in my TODO. Thank you for all the work you've done in helping aMSN be ported for Solaris.
One suggestion though. It might be better to just change the [OnLinux] calls to [OnUnix] calls where you think it's relevant, because there are many things linux dependant, and maybe they should be tested individually.
Logged

KaKaRoTo
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #6 on: December 24, 2007, 08:37:41 pm »

Hi Eric,
Just wanted to let you know that your patch has been committed in the SVN version since revision r9164. Your name was also added to the CREDITS file for this useful contribution.
Thanks again.
Logged

KaKaRoTo
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!