The Unix cdrecord will tell you the brand of the CD it's about to write to. I don't know about DVDs or about already-burned media, but it might be worth a shot.
_________________________
Bitt Faulk