There are several online database that can recognise audio CDs - like freeDB, MusicBrainz or Gracenote. But there is no equivalent for DVDs, although some databases exist. But none of them supports detecting a DVD in the drive and recognising it.
Excellent work by Georges Dumond, alas frontend GUI and DVD analysing code are entwined in a deadly embrace, it is quite impossible to use it without creating a user interface:
Mostly all DVD structures explained on Sourceforge (almost all information used to build this library is taken from there):
More details can also be found here:
And then I bought the "Unofficial DVD Specifications Guide 2.2" which was also quite helpful.