Ejecting a DVD should be a fully-hardware thing. It needs power, but it doesn't need a working OS. How else to mount a DVD to install an OS?
So if it doesn't work, it needs a tech to repair it (which might mean: take out and replace by a new one). You might feel qualified to do it yourself, or you find a repair shop.
I have a couple year old iMAC running OSX. I inserted a home-burned DVD and it is stuck inside. The computer doesn't recognize it is there. It isn't in the finder or iTunes or Disk Utility. Eject, command eject... don't work. I've tried restarting holding the space bar, the mouse button... nope. I repaired the disk permissions for the HD in disk utilities. Still nothing.
Any suggestions? At this point, I just want to get the thing ejected.