Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 22 Nov 2014, 06:40
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to gather info about currently inserted cd/dvd? (Solved)
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Sat 11 Jun 2011, 10:23    Post_subject:  How to gather info about currently inserted cd/dvd? (Solved)  

Does anyone know how to write a program to detect the following about currently inserted media in a given optical drive?
  • Type of media i.e. CDROM/CD-RW/DVD-ROM etc.
  • Type of data stored in media i.e. audio, video, data, blank etc
  • Label

Either in bash or C, both will do.

Thanks in advance.

Edited_time_total
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11153
Location: Arizona USA

PostPosted: Sat 11 Jun 2011, 10:51    Post_subject:  

Menu -> Multimedia -> Pburn has Disc info under the Tools tab. It might not be exactly what you're looking for, but maybe it points in the right direction?
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3393
Location: Oregon

PostPosted: Sat 11 Jun 2011, 11:03    Post_subject:  

Well, how about bad information?
I have some memorex DVD+R optical disks of 4.7 gig capacity.
I insert one in the DVD drive.
The icon for it appears on the desktop.
So far, so good.
But a mouse over shows the capacity as 2.2 gig.
Then I open Pburn.
Lo and behold, the capacity in Pburn is listed correctly at 4.7 gig.

Does this mean there is an error in how the desktop drive icon software package determines capacity of a device?

Do you get the same results as I do?
Back to top
View user's profile Send_private_message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Sun 12 Jun 2011, 07:50    Post_subject:  

Flash wrote:
Menu -> Multimedia -> Pburn has Disc info under the Tools tab. It might not be exactly what you're looking for, but maybe it points in the right direction?

I searched all the sources of PBurn and it seemed as if each mechanism was widely distributed over several files. I failed to track how that info was gathered.

The info that PBurn gives was almost what I was searching for, only thing that was missing was if there is some free space then if the media recordable or rewritable.

Anyways I found a part myself.
The following command can find what type of DVD is present:
Code:

# dvd+rw-mediainfo <device>

cddetect can find what kind of data is present in a CD.
Now all that is missing is how to detect type of CD (i.e. CD-ROM, CD-RW etc).
Does anyone know?

8-bit wrote:

Well, how about bad information?
I have some memorex DVD+R optical disks of 4.7 gig capacity.
I insert one in the DVD drive.
The icon for it appears on the desktop.
So far, so good.
But a mouse over shows the capacity as 2.2 gig.
Then I open Pburn.
Lo and behold, the capacity in Pburn is listed correctly at 4.7 gig.

Does this mean there is an error in how the desktop drive icon software package determines capacity of a device?

Do you get the same results as I do?

Usually drive icon shows amount of data stored in the disk.
Back to top
View user's profile Send_private_message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Tue 14 Jun 2011, 01:41    Post_subject:  

I found a program called cdrdao that can provide info about a CD.
Code:

cdrdao disk-info --device <device>
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6455
Location: Auckland, New Zealand

PostPosted: Sun 11 Dec 2011, 20:56    Post_subject:  

Oh, a pity I didn't see this at the time.
For future reference, you should be able to find the information you need using cd-info and dvd+rw-mediainfo, which are included in Puppy.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0540s ][ Queries: 11 (0.0049s) ][ GZIP on ]