From: Joseph W. <jo...@bi...> - 2001-07-29 13:02:11
|
Hi Just an interesting thread starting on KDE-Core-Devel. Why not talks to Michael Bedy and others and join forces? Kind regards Joseph Wenninger ---------- Forwarded Message ---------- Subject: Re: Standard CD creation library. Date: Sun, 29 Jul 2001 15:51:57 +0300 From: Hetz Ben Hamo <het...@co...> To: kde...@ma..., Michael Bedy <mj...@me...> Hi Michael, Funny that you mention that issue, we were talking on #kde on IRC about this at friday night ;) Anyway, if you don't mind, here are some comments that I think it might help you a bit... For burning CD's for all purposess you'll need 3 parts: 1. A Kcontrol module. In this place, a person can setup his CD-R drive, speed, erase CD-RW, select whether to use cdrecord (Linux), burncd (*BSD), and other platforms (Sun, SGI, HP/UX - I'm sure that people who use those OS's can tell you what programs they use and what parameters they need, so this could be added when configure detect the OS and compiled accordingly - of course, this is out of your scope, but it's just as an idea) One thing that is important is the setup of the Linux/Unix to use CD-R. As you know, most of the distributions are not coming ready to just put a cd-r media and burn, but you'll need to either modify the LILO or compile several items as modules. A simple routine to see if those modules are loaded/can be loaded is needed, and if it cannot be loaded - show a friendly message about this issue and pointing the person to the CD-R howto... 2. Many programs today are using a temporary file to store an image before it's actually burn to the media, so you'll need an implementation of some sort of a fixed size "virtual CD-R" (which can be sized in kcontrol) to store this media. Alternatively with the high speed CD-R/CD-RW drives today (X8 speed and above) you don't really need this, but you'll need a smart algorithm to calculate the size of the contents and when burning - doing the job directly to the CD-R drive. Something like: mkisofs <all parameters> | cdrecord -speed=X <all parameters> 3. You need a small minimal application that shows the CD-R recording, elapsed time, and any errors. This program can be used if a person has a .ISO file (such a new image of new Linux distribution), so the person can right click on it, select "open" -> your CD-R mini application, so all the person needs is to put a media, click "ok" and burn... 4. MP3/OGG -> CD-R - this is kind of a tricky thing, but here is a suggestion: make a new IO-Slave (lets call it: cdr://) - where the person can drag/drop all the MP3/OGG files into it. Your IO-Slave needs to be smart enough to block the user when he/she fiils the CD. Then it needs to convert those files to WAV format (with a small program like mpg123), and then go the routine in section 3. 4. File system backup - this is the most complicated one, so I would suggest you to use programs like cd-backup and add a front end GUI to them... I think this should cover all the issues of CD-R recording. These are of course just suggestions how it can be done IMHO ;) Thanks, -- Hetz Ben Hamo he...@kd... > 1) Your standard EasyCD, Nero looking application. > > 2) An integrated into Konqurer ioslaveish thing that allows users to > construct a CD via dragging and dropping. (a la Win XP, although I had > been thinking of this before I saw XP :-) > > 3) A KDE Media Player (or whatever) that slices and dices and, > of course, burns audio CDs created from mp3/ogg/whatever painlessly. > > 4) A backup program that can archive to multiple CDs if necessary. > > 5) I'm sure there are other good ideas. > > Anyway, the hard(est) part of all this is that actual interaction with the > hardware. On Linux one is pretty much forced to implement the horrible > hack of parsing cdrecord's output. It can be done, but it's a real pain to > get right. > > So, my proposal is to implement the horrible hack once, give it a clean > interface, and let the UI portions of CD burning programs be implemented > separately. This also would allow, as a special bonus, the implementation > of other "drivers" to the same interface. For example, IDE burners on > FreeBSD cannot use cdrecord, and must use burncd instead. Or someone might > someday create an actual library for controling CD burners without going > through a seperate program. > > I currently have a very preliminary implementation that allows for the > burning of audio CDs. It barely works, and will fall over dead if anything > bad happens. However, it works well enough to convince me that it can be > done. I have the vauge outlines of the design for the rest of it in my > head and will continue to work on it if you think it is useful. It should > take a relatively short amount of time to finish the basic skeleton, but > it will take a while to flesh it out, including error handling, etc. > > The goal of this library is to make burning a CD from a KDE application as > simple as possible. Without the ugly work of talking to the required > programs, creating such an application should be much easier. > > Of course to implement and test the library will require a program that > uses it. So it's likely that at least program #1 will come out of the > implementation of the library. > > Thanks, > - Mike ------------------------------------------------------- |