[AG-TECH] FW: can't transmit at 640x480
Ivan R. Judson
judson at mcs.anl.gov
Thu Sep 12 14:29:17 CDT 2002
This should fix the remaining problems discussed earlier, I think.
--Ivan
..........
Ivan R. Judson .~. http://www.mcs.anl.gov/~judson
Futures Laboratory .~. 630 252 0920
Argonne National Laboratory .~. 630 252 6424 Fax
> -----Original Message-----
> From: owner-openmash-developers at bmrc.berkeley.edu
> [mailto:owner-openmash-developers at bmrc.berkeley.edu] On
> Behalf Of Kun Wei
> Sent: Thursday, September 12, 2002 1:45 PM
> To: Allan Gu; Open Mash Developers; VRVS Team
> Subject: Re: can't transmit at 640x480
>
>
> Allan;
> I tried with OM vic, they are working great! You may ask them
> to change it in cvs.
>
> Any question for OM developer:
> I try to use OM VAT in Linux(Cirrus Logic CS4297 A rev B). Is
> this card supported? I got lots of debug message, and nothing
> works for receive and send audio even the remote active
> participants are highlighted.
>
> Thanks
> Kun
>
> Allan Gu wrote:
> >
> > These are the fixes I tried out at home. I am running a windows XP
> > machine with a logitech usb camera. Before when another program is
> > using the device, OM vic just crashes. However, now it pops
> a window
> > saying that another program is using the device. Also when
> you select
> > 640 x 480, the OM vic pop up a dialog saying it doesnt support the
> > geometry. And then you have click transmit again. I have
> tried it at
> > home, but I was wondering if you can test it also on your
> machine. I
> > am not really sure how OM vic connects to the video device
> on windows
> > and so this is just what I think that may fix the problem. :-)
> >
> > Allan
> >
> > On Wed, 2002-09-11 at 17:00, Kun Wei wrote:
> > > Have you tried them in OM vic?
> > >
> > > I have tried the changes on UCL vic, the file structures
> are pretty
> > > much the same as OM vic.
> > >
> > > There is no effects on "video device is already used by another
> > > program". If it is used by other program, vic just pop up
> a dialog
> > > to choose device, and then crash. For 640x480, it
> silently allow you
> > > to select 640x480, but nothing happens then.
> > >
> > > Kun
> > >
> > > agu wrote:
> > > >
> > > > Hi Kun,
> > > >
> > > > Try this fix. This fixes two things. The 640x480 issue
> and the one
> > > > when the video device is already used by another program. The
> > > > previous fix was not good because I created a call to
> tcl for new
> > > > ErrorWindow. I should have just say there was an error
> and let vic
> > > > handle it. If you take a look at the om code. The check for
> > > > whether the geometry is supported is in video-device.cc
> under the
> > > > set_size_cif function. If you think there maybe a better way to
> > > > inform the user about the problem and not crash vic,
> please let me
> > > > know. I haven't looked at the source code for UCL vic and so I
> > > > really do not know how it functions.
> > > >
> > > > Thanks
> > > > Allan
> > > >
> > > > RCS file:
> > > > /usr/mash/src/repository/mash/mash-1/video/video-device.cc,v
> > > > retrieving revision 1.24
> > > > diff -c -r1.24 video-device.cc
> > > > *** video-device.cc 2002/05/21 21:19:23 1.24
> > > > --- video-device.cc 2002/09/11 03:25:02
> > > > ***************
> > > > *** 498,506 ****
> > > >
> > > > default:
> > > > /* FIXME this shouldn't happen */
> > > > ! fprintf(stderr, "vic: CIF video
> capture: bad geometry %dx%d\n",
> > > > ! w, h);
> > > > ! abort();
> > > > }
> > > > int s = outw_ * outh_;
> > > > framesize_ = s;
> > > > --- 498,506 ----
> > > >
> > > > default:
> > > > /* FIXME this shouldn't happen */
> > > > ! fprintf(stderr, "vic: CIF video
> capture: bad geometry %dx%d\n",w, h);
> > > > ! status_ = -4;
> > > > ! return;
> > > > }
> > > > int s = outw_ * outh_;
> > > > framesize_ = s;
> > > > Index: video-win32.cc
> > > >
> ==================================================================
> > > > =
> > > > RCS file:
> /usr/mash/src/repository/mash/mash-1/video/video-win32.cc,v
> > > > retrieving revision 1.15
> > > > diff -c -r1.15 video-win32.cc
> > > > *** video-win32.cc 2002/06/28 22:56:49 1.15
> > > > --- video-win32.cc 2002/09/11 03:25:04
> > > > ***************
> > > > *** 615,621 ****
> > > > }
> > > > if (!capDriverConnect(capwin_, dev_)) {
> > > > fprintf(stderr, "capDriverConnect:
> dev=%d failed - %lu\n", dev_,
> > > > GetLastError());
> > > > ! /*abort();*/
> > > > }
> > > > capSetUserData(capwin_, this);
> > > > dprintf("SetUserData=%x\n", this);
> > > > --- 615,624 ----
> > > > }
> > > > if (!capDriverConnect(capwin_, dev_)) {
> > > > fprintf(stderr, "capDriverConnect:
> dev=%d failed - %lu\n", dev_,
> > > > GetLastError());
> > > > ! /*abort();*/
> > > > ! /* status_ is assigned -3 if we cannot
> connect to video driver.*/
> > > > ! status_ = -3;
> > > > ! return;
> > > > }
> > > > capSetUserData(capwin_, this);
> > > > dprintf("SetUserData=%x\n", this);
> > > > ***************
> > > > *** 780,786 ****
> > > > decimate_ = basewidth_ / fmt_->biWidth;
> > > > setsize();
> > > > }
> > > > !
> > > > if (!capCaptureGetSetup(capwin_, &parms_,
> sizeof(parms_))) {
> > > > fprintf(stderr, "capCaptureGetSetup:
> failed - %lu\n", GetLastError());
> > > > /*abort();*/
> > > > --- 783,793 ----
> > > > decimate_ = basewidth_ / fmt_->biWidth;
> > > > setsize();
> > > > }
> > > > ! /* if the capture geometry is not supported set
> statu_ = -4 */
> > > > ! /* stop video capture */
> > > > ! if (status_ == -4) {
> > > > ! return;
> > > > ! }
> > > > if (!capCaptureGetSetup(capwin_, &parms_,
> sizeof(parms_))) {
> > > > fprintf(stderr, "capCaptureGetSetup:
> failed - %lu\n", GetLastError());
> > > > /*abort();*/
> > > > ***************
> > > > *** 842,847 ****
> > > > --- 849,858 ----
> > > > void VideoCaptureVFW422::start()
> > > > {
> > > > VideoCaptureVFW::start();
> > > > + /* If we cannot connect to video device. Do not make
> > > > + converter. Not sure
> > > > why, but
> > > > + crashes when not connected to video device */
> > > > + if (status_ < 0)
> > > > + return;
> > > > switch (fmt_->biCompression) {
> > > > case BI_RGB:
> > > > converter(new
> RGB_Converter_422(fmt_->biBitCount,
> > > > (u_int8_t *)(fmt_ + 1), fmt_->biClrUsed));
> > > > ***************
> > > > *** 858,863 ****
> > > > --- 869,876 ----
> > > > void VideoCaptureVFWCIF::start()
> > > > {
> > > > VideoCaptureVFW::start();
> > > > + if (status_ < 0)
> > > > + return;
> > > > switch (fmt_->biCompression) {
> > > > case BI_RGB:
> > > > converter(new
> RGB_Converter_420(fmt_->biBitCount,
> > > > (u_int8_t *)(fmt_ + 1), fmt_->biClrUsed));
> > > >
> > > > RCS file:
> > > > /usr/mash/src/repository/mash/mash-1/tcl/video/pipeline.tcl,v
> > > > retrieving revision 1.50
> > > > diff -c -r1.50 pipeline.tcl
> > > > *** pipeline.tcl 2002/07/31 22:05:03 1.50
> > > > --- pipeline.tcl 2002/09/11 03:34:08
> > > > ***************
> > > > *** 257,263 ****
> > > > # or VideoTap::release are called.
> > > > #------------------------------------------------------------
> > > > VideoTap public start {} {
> > > > ! $self instvar running_ grabber_ capwin_
> > > > if !$running_ {
> > > > if ![info exists grabber_] {
> > > > # puts strerr "Crash here?"
> > > > --- 257,263 ----
> > > > # or VideoTap::release are called.
> > > > #------------------------------------------------------------
> > > > VideoTap public start {} {
> > > > ! $self instvar running_ grabber_ capwin_ device_
> > > > if !$running_ {
> > > > if ![info exists grabber_] {
> > > > # puts strerr "Crash here?"
> > > > ***************
> > > > *** 268,273 ****
> > > > --- 268,285 ----
> > > > update idletasks
> > > > }
> > > > $grabber_ send 1
> > > > + set err [$grabber_ status]
> > > > + if { $err < 0 } {
> > > > + if { $err == -3 } {
> > > > + return "can't open
> [$device_ nickname] capture device.\n \
> > > > + Make sure device is not
> open by another program"
> > > > + }
> > > > + if { $err == -4 } {
> > > > + return "bad geometry:
> vic does not support this.\n\
> > > > + please try again."
> > > > + }
> > > > + return "error: dont know what"
> > > > + }
> > > > set running_ 1
> > > > }
> > > > return ""
> > > > ***************
> > > > *** 306,312 ****
> > > > # puts "device assigned"
> > > > set device_ $device
> > > > set grabber_ [new $device_ $videoType]
> > > > -
> > > > #
> > > > # special cases
> > > > #
> > > > --- 318,323 ----
> > > > ***************
> > > > *** 839,845 ****
> > > > set ff [$grabtarget frame-format]
> > > > set err [$tap_ open $device $ff]
> > > > if { $err != "" } {
> > > > ! #FIXME memory leak?
> > > > return $err
> > > > }
> > > >
> > > > --- 850,856 ----
> > > > set ff [$grabtarget frame-format]
> > > > set err [$tap_ open $device $ff]
> > > > if { $err != "" } {
> > > > ! #FIXME memory leak
> > > > return $err
> > > > }
> > > >
> > > > ***************
> > > > *** 1055,1058 ****
> > > > --- 1066,1071 ----
> > > > $self instvar grabber_
> > > > $grabber_ send_full_intra_frame
> > > > }
> > > > +
> > > > +
> > >
> > > --
> > > -----------------------------
> > > Kun Wei
> > > Email: weikun at caltech.edu
> > > Address: MC 256-48, Caltech
> > > Pasadena, CA 91125
> > > Phone: 1-626-395-8767
> > > -----------------------------
>
> --
> -----------------------------
> Kun Wei
> Email: weikun at caltech.edu
> Address: MC 256-48, Caltech
> Pasadena, CA 91125
> Phone: 1-626-395-8767
> -----------------------------
>
More information about the ag-tech
mailing list