Managed to find someone with a no-longer-needed Apple iSight FW camera for sale, so I picked up the iSight for testing under IRIX.
For the record the test platform is
a Tezro
running IRIX 6.5.30. The 'DM10' is actually a generic PCI firewire board with a Texas Instruments TSB43AB23 chip, the hinv shows "PCI Adapter ID (vendor 0x104c, device 0x8024)". The DM10 software is
the later 1.1 revision
. While I got away with hot-plugging (and hot-unplugging) the iSight without any adverse effects, there have other mentions of system crashes while attaching or removing firewire devices with IRIX running. The safe bet is to do either with your system shut down.
Connected the iSight to one of the ports on the pseudo-DM10 in my Tezro. Without any additional action on my part the following appeared in the syslog (the Oxford IDE device listed is a pre-existing 2GB CompactFlash card in an MicroTech FW CameraMate CF card reader):
Code:
Select all
May 1 12:41:41 6A:tezro unix: Scanning FireWire bus /hw/module/001c01/IXbrick/xtalk/15/pci-x/1/2/ohci/0 (2 nodes)
May 1 12:41:41 6A:tezro unix: FireWire Node [0]: <6>OXFORD SEMICONDUCTOR LTD., OXFORD IDE Device
May 1 12:41:41 6A:tezro unix: Scanning FireWire bus /hw/module/001c01/IXbrick/xtalk/15/pci-x/1/2/ohci/0 (0 nodes)
May 1 12:41:41 6A:tezro unix: Scanning FireWire bus /hw/module/001c01/IXbrick/xtalk/15/pci-x/1/2/ohci/0 (1 node)
May 1 12:41:41 6A:tezro unix: FireWire Node [0]: <6>OXFORD SEMICONDUCTOR LTD., OXFORD IDE Device
May 1 12:41:42 6A:tezro unix: Scanning FireWire bus /hw/module/001c01/IXbrick/xtalk/15/pci-x/1/2/ohci/0 (2 nodes)
May 1 12:41:42 6A:tezro unix: FireWire Node [0]: <6>OXFORD SEMICONDUCTOR LTD., OXFORD IDE Device
May 1 12:41:44 6A:tezro unix: Scanning FireWire bus /hw/module/001c01/IXbrick/xtalk/15/pci-x/1/2/ohci/0 (2 nodes)
May 1 12:41:44 6A:tezro unix: FireWire Node [0]: <6>OXFORD SEMICONDUCTOR LTD., OXFORD IDE Device
May 1 12:41:44 6A:tezro unix: FireWire Node [1]: <6>APPLE COMPUTER INC., iSight
I ran an hinv -vm and it appeared there...
Code:
Select all
DMediaPro DM10 FW option: unit 0, revision 1.1.0
IIDC Video Camera: unit 0, revision 1.30, connected to DM10, unit 0
as well as in the output of fwprobe:
Code:
Select all
fwprobe
Probing DM10 cards...
Number of cards: 1
Card Info
=========
Card #: 0
Name : DM10
ID : 0x0
Ports : 3
Speed : 400 / 400
3 devices attached
Device 0: 0x0
Vendor: Silicon Graphics, Inc.
Model: DMediaPro DM10
Proto: HBA
Device 1: 0x30E00100001419
Vendor: OXFORD SEMICONDUCTOR LTD.
Model: OXFORD IDE Device
Proto: SBP2
Device 2: 0xA27000402568E
Vendor: APPLE COMPUTER INC.
Model: iSight
Proto: IIDC
Firewire/DM10 video devices don't use any of the classic IRIX video tools (e.g. Media Recorder, videod, et al), instead they use DM10 specific ML video libraries.
The iSight didn't initially appear in an "mlquery", so after a little rtfm quality time I followed the advice found in the DM10 Release Notes and stopped and restarted the mldaemon:
Code:
Select all
IIDC devices using 6.5.21+ and ml 1.1 do not have automatic hotpluggable functionality.
If a device is removed or added when the system is up, you must restart the mldaemon by running "/etc/init.d/mldaemon stop"
followed by "/etc/init.d mldaemon start" in order to find or remove the device from the system.
Then ran "mlquery" to get the iSight's ML device name:
Code:
Select all
mlquery -d all
DEVICE: iidc-camera
parent: tezro
index: 0
version: 1
location: /hw/firewire/0/iidc/iidc0
jacks: SDSerialDigitalInputJack
paths: SDSerialDigitalInput
So far so good, so I tried the iidc_vidtogfx sample program (
additional background and installation instructions are in this post
) and got:
Code:
Select all
/usr/share/src/dmedia/video/iidc/iidc_vidtogfx -d iidc-camera
Input Timing Present = ML_TIMING_525
[iidc-camera] Image Sampling not supported with this device
Couldn't set controls on video jack (ignoring)
ML_IMAGE_SAMPLING_INT32 = ML_SAMPLING_444 (length -1)
ML_VIDEO_TIMING_INT32 = ML_TIMING_525
mlPvToString: ML_STATUS_INVALID_PARAMETER
[iidc-camera] Image Sampling not supported with this device
Couldn't set controls on path
ML_IMAGE_COMPRESSION_INT32 = ML_COMPRESSION_UNCOMPRESSED
ML_IMAGE_COLORSPACE_INT32 = ML_COLORSPACE_RGB_601_FULL
ML_IMAGE_SAMPLING_INT32 = ML_SAMPLING_444 (length -1)
ML_IMAGE_PACKING_INT32 = ML_PACKING_8
mlPvToString: ML_STATUS_INVALID_VALUE
mlPvToString: ML_STATUS_INVALID_PARAMETER
Not too promising, but since 'sampling' seemed to be the rub, I took a look inside iidc_vidtogfx.c for clues and found:
Using
411 sampling
I was able to successfully display a live video feed from the iSight:
Code:
Select all
/usr/share/src/dmedia/video/iidc/iidc_vidtogfx -d iidc-camera -s 411 -D
Input Timing Present = ML_TIMING_525
Timing 2
ML_IMAGE_WIDTH_INT32 = 640
ML_IMAGE_HEIGHT_1_INT32 = 480
ML_IMAGE_HEIGHT_2_INT32 = 0
............................................................Shutdown
Unless you specify otherwise, the iidc_vidtogfx display window auto-closes after approximately 30 seconds.
If you want the iidc window to remain open
, there's a note inside iidc_vidtogfx.c that defines the command line switches. Adding "
-c 0
" (that's a zero) to your command line string will cause the vidtogfx window to remain open indefinitely.
The sample program code for the DM10 also includes iidc_vidtomem. That works in a similar fashion. Using the same 441 sample value (and specifying an output path) I was able to successfully write raw output from the iSight to a file:
Code:
Select all
/usr/share/src/dmedia/video/iidc/iidc_vidtomem -d iidc-camera -f /path/of/your/choice/iSight_capture.raw -s 411 -D
Input timing present = ML_TIMING_525
Timing 2
ML_IMAGE_COMPRESSION_INT32 = ML_COMPRESSION_UNCOMPRESSED
ML_IMAGE_COLORSPACE_INT32 = ML_COLORSPACE_RGB_601_FULL
ML_IMAGE_SAMPLING_INT32 = ML_SAMPLING_411
ML_IMAGE_PACKING_INT32 = ML_PACKING_8
buffer 0 @ 0x10040000
buffer 1 @ 0x100c0000
buffer 2 @ 0x10140000
buffer 3 @ 0x101c0000
buffer 4 @ 0x10240000
buffer 5 @ 0x102c0000
buffer 6 @ 0x10340000
buffer 7 @ 0x103c0000
buffer 8 @ 0x10440000
buffer 9 @ 0x104c0000
send buffer 0x10040000/460800
send buffer 0x100c0000/460800
send buffer 0x10140000/460800
send buffer 0x101c0000/460800
send buffer 0x10240000/460800
send buffer 0x102c0000/460800
send buffer 0x10340000/460800
send buffer 0x103c0000/460800
send buffer 0x10440000/460800
send buffer 0x104c0000/460800
.10 buffers transferred
Shutdown
image 640 x 480
write 460800 bytes to /usr/people/tezro/iSight_capture.raw
If you save the output with a .ppm extension IRIX will open a single frame for viewing. There are a number of input and output options discussed inside iidc_vidtomem.c that might prove useful with a little more investigation.