It can be ported from nautilus-cd-burner CVS: nautilus_burn_drive_get_media_size_from_path() in nautilus-burn-drive.c and get_disc_size_cd(), get_disc_size_dvd() and get_2k_capacity() in dvd_plus_rw_utils.cpp
I think we put this in HEAD some time ago. Otherwise please reopen.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.