Author Topic: Webcam Support for OS/2 and eCS!!  (Read 145137 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #135 on: August 08, 2014, 10:30:32 pm »
I have concluded :) the development and testing of my Webcam Support for OS/2 (and eComStation).  I have put it as WebSee10.zip and its source code as WebSee10s.zip both on my website and on hobbes. I have also put the latest version of my USB Resource Manager as usbres01.zip there.

I like to thank everyone involved.

Good job Wim!!!

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #136 on: August 09, 2014, 10:05:33 am »
I have concluded :) the development and testing of my Webcam Support for OS/2 (and eComStation).  I have put it as WebSee10.zip and its source code as WebSee10s.zip both on my website and on hobbes. I have also put the latest version of my USB Resource Manager as usbres01.zip there.

I like to thank everyone involved.

And I would like to add my Thank you to the previous ones.
I can now take images with my Sony Vaio.  8)

After a few seconds, it does however show a message (regardless if I take a screenshot or not):
=============
UvcView 0!0
_______________
[00000280] Obtain Thread error!
_______________
[  Cancel  ]
=============

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #137 on: August 09, 2014, 04:44:40 pm »
Quote
[00000280] Obtain Thread error!

There is still a problem with this. On my Lenovo L530, it seems to happen when Doodle's Screen Saver puts up the saver (the Cairo clock, in my case). I was watching the picture on a second machine, and it stopped every time the screen saver came on. Then, I used http://hobbes.nmsu.edu/download/pub/os2/apps/scrnsave/dss_rmt_v13.zip to supposedly disable the screen saver, when Weblook.exe is running. The screen saver (clock) still comes on, but I no longer see the error (It ran for about 1 hour, before I shut down). I need to do more experimenting with that, because the clock should not come on when Weblook.exe is running.

FTR, I am using the QSINIT loader, with the OS4 kernel, on the L530.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #138 on: August 09, 2014, 07:57:02 pm »
Quote
I need to do more experimenting with that, because the clock should not come on when Weblook.exe is running.

Strange.

DSS_RMT is supposed to stop the screen saver (not sure how that is done), when the program is in the list. It does not.

Weblook seems to freeze, when DSS brings up the screen saver. It does not do that when DSS_RMT has Weblook.exe in the list of programs.  I have run it for about 2 hours.

I also found that taking a snapshot, using Webview.exe, causes Weblook.exe to freeze, but only when it is the one that is running on the machine where Weblook.exe is running. The freeze seems to occur about 1 second after the snapshot, but it doesn't always happen. Taking a snapshot on another machine doesn't cause a freeze.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #139 on: August 09, 2014, 09:06:26 pm »
Doodles Screen Saver has an API to disable it so programs like VLC and MPlayer don't get interrupted. KOMH implemented it in libkva, seems to load the screensaver DLL and call a function to disable and enable.
There is also an API to query if the screensaver is running, Mozilla uses this to do housekeeping when the screensaver is running on the basis that if the screensaver is running then the user isn't doing anything.
Perhaps Wim can add an option to turn off the screensaver and/or detect it running and disable the webcam or similar.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #140 on: August 09, 2014, 10:04:58 pm »
I'd like to add support for webcam into my rexx library... :)

The source code example has been written in turbo assembler though.

//Jan-Erik

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #141 on: August 10, 2014, 03:33:18 am »
Quote
Perhaps Wim can add an option to turn off the screensaver and/or detect it running and disable the webcam or similar.

I don't think that is the answer. The screen saver keeps running, as usual, even though DSS_RMT has told it to stop. When that happens, WebLook doesn't have a problem, even though the screen saver starts and stops as it normally does. It just stops screen saving with other programs, until the program stops running. There is some sort of interference between Weblook, and Doodle's Screen Saver.

It doesn't make sense to always disable the webcam, just because screen saving has started, although that may be a good option. A user who wants to monitor a sleeping baby doesn't really need (or want) to have the screen active, but the camera needs to keep working.

This afternoon, I disabled DSS all together, and Weblook has not, yet, misbehaved (about 5 hours).

Quote
Mozilla uses this to do housekeeping when the screensaver is running on the basis that if the screensaver is running then the user isn't doing anything.

This is probably a bad assumption, but I can't think of a better way to do it. At least the user is less likely to notice that Mozilla is using machine cycles.   :)

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 387
  • Karma: +5/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #142 on: August 10, 2014, 09:54:08 am »
Quote
[00000280] Obtain Thread error!

Trying now on my W500.  I consistently get this error popup after about 3 seconds, using either uvcview or weblook. The camera light turns on but I get no picture (except the very first time I tried it, when I got a single frozen frame).

Info from USBDock, in case it's useful:
Code: [Select]
USB Dock: Lenovo Integrated Camera (Chicony)
Identifier: 17ef:4807

<<< Device Description >>>
Type :01
USB Rev :200
Class : Miscellaneous Device (0xEF)
Subclass : Common Class (0x02)
Protocol : Interface Association (0x01)
Max. packetsize :64
Vendor  ID :0x17EF
Product ID :0x4807
Device Release# :3134
Number of Configurations:1

Configuration: 0
Length : 851
ConfigurationValue : 1
Attributes : 0x80
MaxPower : 0x32
NumInterfaces : 2
USB_DT_UNKNOWN_FOR_ME

Interface: 0
AlternateSetting : 0
Class : Video (0x0E)
SubClass : Video Control (0x01)
Protocol : Unknown (0x00)
Endpoints : 1
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME

Endpoint: 0
Address : 0x81
Attributes : 0x03 (Irq)
MaxPacketSize : 64
Interval : 16
USB_DT_UNKNOWN_FOR_ME

Interface: 1
AlternateSetting : 0
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 0
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME

Interface: 1
AlternateSetting : 1
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5076
Interval : 1

Interface: 1
AlternateSetting : 2
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 3016
Interval : 1

Interface: 1
AlternateSetting : 3
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 4
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 5
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5100
Interval : 1

Interface: 1
AlternateSetting : 6
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 7
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5100
Interval : 1

Interface: 1
AlternateSetting : 8
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5052
Interval : 1

Interface: 1
AlternateSetting : 9
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 840
Interval : 1

Interface: 1
AlternateSetting : 10
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 11
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 12
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 13
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 14
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1


Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #143 on: August 10, 2014, 04:51:48 pm »
Hi Alex

From my eventually successful attempts to get an Acer webcam working with eCS a while back I suspect that Wim may be more interested in the contents of the .bin file that USBDock can create for your webcam.

Run USBDock with the /bin parameter (or use USBcfg 0.8.2 to run USBDock) and you will find files 17ef:4807.bin and 17ef:4807.log created in the USBDock directory - on eCS systems that is usually [BootDrive]:\ecs\system\USBDock

Hope you and Wim get this working  :-)


Pete

David McKenna

  • Hero Member
  • *****
  • Posts: 743
  • Karma: +24/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #144 on: August 10, 2014, 05:34:44 pm »
  Still get '[00000280] Obtain thread error!' within about a minute of starting with my C250.

  I tried both the 640x480 and 320x240 versions and I get the same result. Also get the same window size with both (640x480). Looking at the files, they all appear to be the same size in both folders in the WebSee10.zip archive. Is that correct?

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #145 on: August 11, 2014, 07:35:20 am »
I have concluded :) the development and testing of my Webcam Support for OS/2 (and eComStation).  I have put it as WebSee10.zip and its source code as WebSee10s.zip both on my website and on hobbes. I have also put the latest version of my USB Resource Manager as usbres01.zip there.

I like to thank everyone involved.

Thank you Wim !

Logitech Webcam C270 works great here, I think it's a standard item at Walmart too ! On a new eCS 2.1 install using the different switches for a couple hours on each with no problems.

Started up the standard programs (most of them & used flash drive) installed with eCS 2.1 and Doodle's screen saver with no problems. Using VNC from my main box.

Oh, I tested the 640x480 only, SNAP with Radeon 850.
 
« Last Edit: August 11, 2014, 11:02:44 am by Greggory Shaw »

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: Webcam Support for OS/2 and eCS!!
« Reply #146 on: August 11, 2014, 11:29:54 am »
Quote
[00000280] Obtain Thread error!

Trying now on my W500.  I consistently get this error popup after about 3 seconds, using either uvcview or weblook. The camera light turns on but I get no picture (except the very first time I tried it, when I got a single frozen frame).

Info from USBDock, in case it's useful:
Code: [Select]
USB Dock: Lenovo Integrated Camera (Chicony)
Identifier: 17ef:4807

<<< Device Description >>>
Type :01
USB Rev :200
Class : Miscellaneous Device (0xEF)
Subclass : Common Class (0x02)
Protocol : Interface Association (0x01)
Max. packetsize :64
Vendor  ID :0x17EF
Product ID :0x4807
Device Release# :3134
Number of Configurations:1

Configuration: 0
Length : 851
ConfigurationValue : 1
Attributes : 0x80
MaxPower : 0x32
NumInterfaces : 2
USB_DT_UNKNOWN_FOR_ME

Interface: 0
AlternateSetting : 0
Class : Video (0x0E)
SubClass : Video Control (0x01)
Protocol : Unknown (0x00)
Endpoints : 1
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME

Endpoint: 0
Address : 0x81
Attributes : 0x03 (Irq)
MaxPacketSize : 64
Interval : 16
USB_DT_UNKNOWN_FOR_ME

Interface: 1
AlternateSetting : 0
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 0
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME
USB_DT_UNKNOWN_FOR_ME

Interface: 1
AlternateSetting : 1
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5076
Interval : 1

Interface: 1
AlternateSetting : 2
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 3016
Interval : 1

Interface: 1
AlternateSetting : 3
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 4
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 5
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5100
Interval : 1

Interface: 1
AlternateSetting : 6
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 7
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5100
Interval : 1

Interface: 1
AlternateSetting : 8
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5052
Interval : 1

Interface: 1
AlternateSetting : 9
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 840
Interval : 1

Interface: 1
AlternateSetting : 10
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 11
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 12
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 13
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1

Interface: 1
AlternateSetting : 14
Class : Video (0x0E)
SubClass : Video Streaming (0x02)
Protocol : Unknown (0x00)
Endpoints : 1

Endpoint: 0
Address : 0x82
Attributes : 0x05 (Iso)
MaxPacketSize : 5120
Interval : 1


This webcam has a strange ??? range of alternate interface settings. Most webcams start with the lowest bandwidth for the lowest setting and end with the highest bandwidth for the highest setting. It seems that this camera has one specific alternate interface setting for each of the reported video stream format frames.

With the 640x480 programs you could try e.g. "uvcview /i8" or "uvcview /i1 /u"
With the 320x240 programs you could try e.g. "uvcview /i9" or "uvcview /i2 /u"

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: Webcam Support for OS/2 and eCS!!
« Reply #147 on: August 11, 2014, 11:41:34 am »
I'd like to add support for webcam into my rexx library... :)

The source code example has been written in turbo assembler though.

//Jan-Erik

It is possible to run weblook.exe and to replace webview.exe with a rexx procedure that obtains the individual mjpeg frames and to convert these into ordinary jpeg files by adding huffman code tables to them. If you want to go that route then I can append an example that I use myself for testing purposes. 

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: Webcam Support for OS/2 and eCS!!
« Reply #148 on: August 11, 2014, 12:00:44 pm »
  Still get '[00000280] Obtain thread error!' within about a minute of starting with my C250.

  I tried both the 640x480 and 320x240 versions and I get the same result. Also get the same window size with both (640x480). Looking at the files, they all appear to be the same size in both folders in the WebSee10.zip archive. Is that correct?

The default window size with both versions is actually 320x240. When you click the maximize button it toggles between 320x40 and 640x480. The stream format however is different. You will notice that when you take a snapshot.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Webcam Support for OS/2 and eCS!!
« Reply #149 on: August 11, 2014, 12:26:31 pm »
It is possible to run weblook.exe and to replace webview.exe with a rexx procedure that obtains the individual mjpeg frames and to convert these into ordinary jpeg files by adding huffman code tables to them. If you want to go that route then I can append an example that I use myself for testing purposes.

Yes, that is an option to.
 
C/C++ examples how to use webcam support?
Would be nice to add an option to the rxImgSize 1.04.dll for rexx to take individual snapshots.

result = rxImgCapture( window_name[, left_coordinate[, bottom_coordinate[, right_coordinate[, top_coordinate[, save_as_path_and_filename ] ] ] ] ] )

Where "window_name" would be extended with e.g. "WEBCAM" (or ... suggestion?)