Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Apr 2004 12:51:31 +0930
From:      Tim Aslat <tim@spyderweb.com.au>
To:        FreeBSD Multimedia <freebsd-multimedia@freebsd.org>
Subject:   Media Detection
Message-ID:  <20040413125131.04358c77@bofh.spyderweb.com.au>

next in thread | raw e-mail | index | archive | help
Hi All,

Just trying to set up a PVR type device and would like to throw in a
feature to detect what media (if any) is inserted into the DVD burner.

Currently I'm running FreeBSD 5.2.1-RELEASE-p1 with atapicam and the
burner device is a CDRW <LITE-ON DVDRW LDW-451S> as reported by the
kernel boot messages.

The dmesg gives me this info

cd0 at ata1 bus 0 target 0 lun 0
cd0: <LITE-ON DVDRW LDW-451S GSB6> Removable CD-ROM SCSI-0 device 
cd0: 16.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present

How would I go about checking the media if it's a blank, non-blank or RW
disk?

C or C++ code would be great.

Cheers

Tim

-- 
Tim Aslat <tim@spyderweb.com.au>
Spyderweb Consulting
http://www.spyderweb.com.au
P: +61 8 82243020    M: +61 0401088479



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040413125131.04358c77>