--- den_RDC <[EMAIL PROTECTED]> escreveu: 
> As Gustavo already mentioned, i am changing course on dvdbackup and
> am going 
> (or at least trying) to make a EncodingServer. This will get rid of
> the cwd 
> problems, and will allow people to encode things on a different
> computer then 
> the one freevo is running on (very handy if the freevo box is a
> "slow" box 
> like an epia, so u can keep loud powerfull pcs away from your living
> room). 
> Initially it will only encode DVD's (from drive or HD), but i'll
> design it so 
> that encoding video files and audio files will be easy to add (doing
> it all 
> at once would mean it would take too long for me to code). 
> 
> Anyway, i already made a small list of methods that the server will
> export and 
> how they will be handled, so u have an idea what i am going to and
> maybe have 
> some constructive comments (and design first , then code is a good
> principle 
> anyway :) The code will be a bit like recordserver, and each call
> will fx 
> also return a true/false return code for success/failure.
> 
> initEncodeJob(source, friendlyname)
> this initializes the process of qeueing an encoding
> source can be a DVD (wich is a device or a directory) or a file, this
> is 
> autodetected. Friendly name is a nice name for the encoding job to be
> 
> created. This method returns a unique id identifying the encoding
> job, so 
> multiple clients can use the encodingserver at once without a
> problem, and 
> qeueed jobs (that aren't executed yet) can be edited or removed
> 
> setOutputCodec(id, codec, tgtsize)
> Sets the video output codec, initially, only xvid (and probly
> lavcodec will be 
> supported). Tgtsize is the targetsize of the encoding in mbytes

I would go more specific here:

setOutputVideoCodec(...)

and 

setOutputAudioCodec(...)

So when mplayer supports vorbis in Avis/Ogm, you don't have to change
API.

 
> setProcessing(id, deint=0, aspect=0)
> Sets wheter u want deinterlacing. 0 being none, 1 being the default
> interlacer 
> or a string specifying a certain deinterlacer. Ascpect sets
> aspectratio (or 
> rather initializes scaling/cropping). Default 0 is autodetect, with a
> string 
> specifying an exact ratie (probably 4:3 16:9 and 2.35:1). More 
> filters/operations can be added later)

I would split it in various parts:
setProcessingCrop(...) --> If not specified, don't crop. You can have
also autodetect and:

getProcessingCrop(...) --> Get recomended crop 

Maybe, in future, you can use mplayer's -vf rectangle to show user
where it would crop.

setProcessingAspect(...)
getProcessingAspect(...)

setDeinterlacer(...)
getDeinterlacersList()



 
> qeueIt(id, now)
> Adds the job with id to the encoding qeue. If now is specified it
> starts 
> directly, otherwise it will start in a timeframe specified in the 
> recordserver config (fx at night). I also think that for direct rips
> from 
> dvd, encoding should always be started now.

Maybe a setPriority() would be good. Maybe setNiceness() too!
with setPriority() you can have EXCLUSIVE priority. That priority may
set nice() (setNiceness()) to values lower than 0 and run alone.
   You could also have non-exclusive (SHARED?) priority, that priority
would only allow process to be set to >= 0, and run together. Maybe one
can specify how many process to run at once with some configuration
value. So:

setPriority( id, EXCLUSIVE | SHARED | ... )
getPriority( id )

setNiceness( id, nice = 0 )
getNiceness( id )


> 
> getProgress(id)
> Returns 0 if the job has not been started yet, or a tuple (pass,
> progress, 
> trem) if the job is being executed. pass being a name describing the
> current 
> pass (fx Audio, Video pass 1 etc). Progress is a number between 0-100
> 
> describing the progress, and trem is a string with the estimated time
> left for completing the current pass.

what about "total progress"?

> 
> removeJob(id)
> Removes a job from the encoding qeue

You need some cleaning policy here.
Or even better:

removeJob(id) --> removes and clean up

stopJob(id) --> just stop. Later process will resume from the lastest
place it could. IE: IF you pause in the middle of encoding, but already
rip, you're back to the begining of the encoding process again, when
resume. With this you can reboot your machine, for example.

restartJob(id) --> resume from stopJob()

pauseJob(id) --> Just SIGSTOP process

resumeJob(id) --> resume from pauseJob() (SIGCONT)



> listJobs()
> Returns a list of tuples, each tuple containg id and friendly name
> (id, 
> friendlyname)
> 
> What do u guys think?

Really good!


Gustavo

Yahoo! Mail - o melhor webmail do Brasil
http://mail.yahoo.com.br


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to