View previous topic :: View next topic |
Author |
Message |
pkd n00b
Joined: 17 Mar 2004 Posts: 53
|
Posted: Wed Jun 23, 2004 11:04 pm Post subject: Detecting audio CD insertion? |
|
|
I'm trying to write a script/daemon that will run when an audio CD is inserted. It would rip the audio with cdparanoia, tag and name the files according to CDDB data, then encode and store them. That's all pretty straightforward. The hard part is getting it to trigger when the CD is inserted. Stuff like submount or supermount doesn't work because audio CDs can't be mounted.
I've searched around a bit, but I haven't a clue where to start. Any ideas? Has this already been done? Or am I going to have to do my own kernel hacking? |
|
Back to top |
|
|
playfool l33t
Joined: 01 Jun 2004 Posts: 688 Location: Ã
rhus, Denmark
|
Posted: Wed Jun 23, 2004 11:54 pm Post subject: |
|
|
Nobody told you about HAL? |
|
Back to top |
|
|
Roguelazer Veteran
Joined: 10 Feb 2003 Posts: 1233 Location: San Francisco, CA
|
Posted: Thu Jun 24, 2004 1:11 am Post subject: |
|
|
Yeah man, hal is what you're looking for. You should check out gnome-volume-manager, it's a cool little screen. The ebuilds can be gotten from breakmygentoo.net. To get both them and the hal/d-bus ebuilds, use the overlay rsync instructions here. _________________ Registered Linux User #263260 |
|
Back to top |
|
|
pkd n00b
Joined: 17 Mar 2004 Posts: 53
|
Posted: Thu Jun 24, 2004 2:56 am Post subject: |
|
|
Thanks, Roguelazer. It's hard to keep up with all the details of people working on Linux and its thousands of related projects when my job forces me to be very familiar with the Windows API and kernel. It's a lot to take in and remember So I usually only play with the stable stuff that's in the official Gentoo portage, unless I have a reason not to.
I should have mentioned that this is a box without a display (or direct input for that matter), so no X, GTK, or Gnome. That's why detecting insertion is so critical. |
|
Back to top |
|
|
Roguelazer Veteran
Joined: 10 Feb 2003 Posts: 1233 Location: San Francisco, CA
|
Posted: Thu Jun 24, 2004 2:57 am Post subject: |
|
|
hal and dbus don't require gnome or any of that. But gnome-volume-manager is a convienient interface to them, that's all. _________________ Registered Linux User #263260 |
|
Back to top |
|
|
wdreinhart Guru
Joined: 11 Jun 2003 Posts: 569 Location: 4QFJ12345678
|
Posted: Thu Jun 24, 2004 3:02 am Post subject: |
|
|
You should look into ivman. It does the same things as gnome-volume-manager, but doesn't depend on gnome, gtk, X11, or any of that stuff. |
|
Back to top |
|
|
eikketk Apprentice
Joined: 03 Jun 2003 Posts: 270 Location: Belgium
|
Posted: Thu Jun 24, 2004 6:30 am Post subject: |
|
|
You don't even need a script for this
Get ivman and set "abcde whatever" as "cdplay_cmd".
In ivman_ng it'll be possible to do this loads niftier (like, not starting to rip but playback when the cd has already been ripped and stuff like that). But that's very work-in-progress. More info in the wiki and on the mailing list. _________________ Working day and night to enhance the Linux Desktop Experience
Homepage |
|
Back to top |
|
|
pkd n00b
Joined: 17 Mar 2004 Posts: 53
|
Posted: Fri Jun 25, 2004 1:13 am Post subject: |
|
|
eikketk wrote: | You don't even need a script for this
Get ivman and set "abcde whatever" as "cdplay_cmd".
In ivman_ng it'll be possible to do this loads niftier (like, not starting to rip but playback when the cd has already been ripped and stuff like that). But that's very work-in-progress. More info in the wiki and on the mailing list. |
*sigh* Finally. After hours of trying to figure out what's going wrong with libhal, I run across a thread that mentions you need to be using udev for any of this to work at all... |
|
Back to top |
|
|
|