Re: [Freevo-devel] FreeBSD-specific freevo patch (for DVD playback).
Lewis Thompson wrote: This patch just adds some FreeBSD-specific stuff that does some brute-force checking instead of using s = ioctl(fd, CDIO... (which doesn't work). I've tested this on my machine and it works fine. It would be nice if somebody could fix the ioctl stuff but unfortunately that is way beyond me. The FreeBSD code that's in there used to work on -current in the summer of last year, but maybe things have changed on FreeBSD again. Since I'm low on time right now, I'm happy to see you submit more FreeBSD fixes! Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Making Python 2.3 a requirement?
Dirk Meyer wrote: So should Freevo require Python = 2.3, too? Our unicode stuff may not be working correct with older versions and 2.3 is out lonf enough. Comments? Fine for FreBSD. (I still have hopes that the port will be committed at some point. It's been ready for a long time now...) Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Re: mplayer stopping
Dirk Meyer wrote: Lars Eggert wrote: Anyone have a clue why the animation stuff would break things like that? Yes, since yesterday. Try current cvs or 1.5.0-rc1 with the attached patch. Can confirm that the current CVS fixes this - thanks! Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] mplayer stopping
Lars Eggert wrote: Lars Eggert wrote: for the last couple of days, whenever I play an MP3 through freevo, sound stops after a few dozend seconds. Issuing the exact same mplayer command - arguments and all - from the shell plays the file fine. FYI, that still happens. When I have some time, I'll try rolling the tree back to previous CVS dates to find the date when it broke. OK, I tracked this back to the animation changes that were committed around 2004-04-26. A CVS tree from April 25 works perfectly, one from April 26 has the bug with mplayer stopping after a few seconds, and the playtime timer not updating. Anyone have a clue why the animation stuff would break things like that? Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] mplayer stopping
Lars Eggert wrote: for the last couple of days, whenever I play an MP3 through freevo, sound stops after a few dozend seconds. Issuing the exact same mplayer command - arguments and all - from the shell plays the file fine. FYI, that still happens. When I have some time, I'll try rolling the tree back to previous CVS dates to find the date when it broke. Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] mplayer stopping
Hi, for the last couple of days, whenever I play an MP3 through freevo, sound stops after a few dozend seconds. Issuing the exact same mplayer command - arguments and all - from the shell plays the file fine. I'm kind of at a loss here, is freevo maybe sending some funky signals to mplayer that make it choke? Something that may be related is that the timer showing elapsed playtime is not progressing either anymore. This is with MPlayer 0.92.1-3.3.3. I also have to mention that is on FreeBSD of course, so some weirdness may be due to that. What is weird though is that mplayer from the shell works fine. Video works fine from freevo and from the shell, too. Any clues? Thanks, Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Re: Rendezvous
Aubin Paul wrote: It was more of a proof of concept in broadcasting the webserver to a Safari/HOWL enabled PC. It could concievably work with the recordserver as well, but no one else wanted to persue it ;) Oh - then it doesn't do what I thought it would do. I was actually hoping to have my music and photos shop up in iTunes and iPhoto automatically, i.e., share it via Rendezvous. I may have to look at howl directly to see how to do this. Anyway, the current CVS tree runs great under BSD. I may have a few patches soon to make it run under the directfb equivalent on FreeBSD. (Currently freevo hangs at startup without X due to some threading issue that doesn't occur under X for some reason.) Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Re: Rendezvous
Dirk Meyer wrote: This needs to be version only. freevo.version only is possible when Freevo is installed into the system python path. Try to remove the freevo. stuff That helped some. Now it dies here: failed to load plugin freevorendezvous start 'freevo plugins -l' to get a list of plugins Traceback (most recent call last): File /media/freevo/src/plugin.py, line 601, in __load_plugin__ exec('import %s' % module) File string, line 1, in ? File /media/freevo/src/plugins/freevorendezvous.py, line 8, in ? class PluginInterface(plugin.DaemonPlugin): File /media/freevo/src/plugins/freevorendezvous.py, line 22, in PluginInterface r = RendezVous.Rendezvous() NameError: name 'RendezVous' is not defined When I change r = RendezVous.Rendezvous() to r = Rendezvous.Rendezvous() it dies here: failed to load plugin freevorendezvous start 'freevo plugins -l' to get a list of plugins Traceback (most recent call last): File /media/freevo/src/plugin.py, line 603, in __load_plugin__ p = eval(object)() File /media/freevo/src/plugins/freevorendezvous.py, line 30, in __init__ r.registerService(info) NameError: global name 'r' is not defined Am I the first to run this, ever? :-) Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Rendezvous
Aubin Paul wrote: Looks like the problem is the filename; can you try it with the file renamed and the plugin.activate changed to that? It seems to not like the '-' Tried already, getting this then: failed to load plugin freevorendezvous start 'freevo plugins -l' to get a list of plugins Traceback (most recent call last): File /media/freevo/src/plugin.py, line 601, in __load_plugin__ exec('import %s' % module) File string, line 1, in ? File /media/freevo/src/plugins/freevorendezvous.py, line 5, in ? from freevo.version import __version__ ImportError: No module named freevo.version Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Version 1.5 Roadmap...
Aubin Paul wrote: I think we need to agree on what we want in the next version, which I think we should call 1.5; most importantly because: * Config file changed (Big reason) * New skins + many new skinning features, + incompatible with old skins * Extended Metadata/SQLite * More support for players (more XINE, XMMS, etc.) * New plugin system supporting external plugins like the excellent Weather plugin Whatever you call it, I can test the CVS versions on FreeeBSD again after Feb 3 and submit patches, if needed. (I'd like to make sure it works there, to easy maintenance of the port skeleton.) I'm looking forward to seeing all these new features! Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] [Lewis Thompson] [Freevo-Bug]
Lewis Thompson wrote: On Thu, Jan 08, 2004 at 05:27:46PM +0100, Lars Eggert wrote: He may be trying my FreeBSD port. FreeBSD's ports tree prefixes the installed python modules with the python version. Are you, Lewis? No, I've made my own port, actually. Can you give me the URL to your port and I'll see if I can merge the two. Mine is only basic and has no v4l support. Otherwise it works pretty well. http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/59047 Always check the PR database before starting a new port :-) I've been bitten by this before, too. If you can track down the issue the committer has raised, feel free to send a follow-up! As I said, I can't debug things right now due to lack of hardware. I'm suspecting an issue due to me using -current, while the committer might be using -stable. By the way, what do you mean by v4l support above - the Linux video API won't work under FreeBSD, but TV watching and recording work with my port. Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] [Lewis Thompson] [Freevo-Bug]
Lewis Thompson wrote: By the way, what do you mean by v4l support above - the Linux video API won't work under FreeBSD, but TV watching and recording work with my port. Ahh, okay. I've not got a TV tuner so I don't really know much about this. I assume you have just used some FreeBSD-specific video programme instead of the standard one suggested by Freevo? Even easier - mplayer supports TV viewing/recording on FreeBSD natively. Lars -- Lars Eggert NEC Network Laboratories smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] mmpython change...
Aubin Paul wrote: name = md5(i) + '.jpg' md5 is slow. maybe we can recriate the previous file place inside mmpython cachedir? I mean: Well, it's not /that/ slow, and it does pretty much guarantee uniqueness... we use it elsewhere I'm pretty sure. It doesn't matter if it's md5, just a unique hash. tempfile.mktemp? Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] small FreeBSD patch
Hi, attached patch allows /usr/local/etc/freevo as an alternative location for the local config file. (This is the FreeBSD standard location for ports.) I'm getting ready to submit a port for 1.4rc3 to FreeBSD. Probably later today. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute --- local_conf.py.example.x Fri Nov 7 15:37:45 2003 +++ local_conf.py.example Fri Nov 7 15:39:27 2003 @@ -32,6 +32,14 @@ # merged those changes into this file, set this number to the new one. CONFIG_VERSION = 3.91 +# == +# General FreeBSD freevo settings: +# == + +# use OSS mixer by default +plugin.remove('mixer') +plugin.activate('ossmixer') + # == # General freevo settings: smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] Re: small FreeBSD patch
Lars Eggert wrote: attached patch allows /usr/local/etc/freevo as an alternative location for the local config file. Gah, attached the wrong patch. Try this one. -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute --- src/config.py.x Fri Nov 7 15:10:39 2003 +++ src/config.py Fri Nov 7 15:11:28 2003 @@ -311,7 +311,7 @@ # # Config file handling # -cfgfilepath = [ '.', os.path.expanduser('~/.freevo'), '/etc/freevo' ] +cfgfilepath = [ '.', os.path.expanduser('~/.freevo'), '/etc/freevo', '/usr/local/etc/freevo' ] # @@ -342,7 +342,7 @@ # # Check that freevo_config.py is not found in the config file dirs # -for dirname in [os.path.expanduser('~/.freevo'), '/etc/freevo']: +for dirname in cfgfilepath: freevoconf = dirname + '/freevo_config.py' if os.path.isfile(freevoconf): print (('\nERROR: freevo_config.py found in %s, please remove it ' + smime.p7s Description: S/MIME Cryptographic Signature
FreeBSD port submitted (was Re: [Freevo-devel] small FreeBSD patch)
Lars Eggert wrote: I'm getting ready to submit a port for 1.4rc3 to FreeBSD. Probably later today. Done! http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/59047 (Can't wait for the bug reports...) Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] dvdbackup : Desperate, need some help
den_RDC wrote: 3 - Find a way to do a cwd in a child without changing the parent cwd. You may want to use a _real_ child instead of a thread here, i.e., fork(). This will give a full process where you can change the cwd without affecting the parent. Aside 1: I always gest confused by terminology here. I've not seen parent and child used whan talking about threads. Those are terms associated with forking, and talk about full-blown processes and process groups. Aside 2: Looking at the mailing list lately, it seem like many issues are simply caused by using threads with shared state, instead of forking and using real processes. As freevo is not a finely-grained parallel application, where the reduction in context switch times is critical to achive good performance, it may be worth revisiting that design decision in the future. I mean, it is implemented using a script language! Yes, processes are heavy weight, but they are also more robust, and the reductionin headaches may be worth the minimal performance difference. My two cents :-) Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] no cycles for a few weeks
Hi, I will be extremely busy for the next few weeks, and won't have any cycles to spare on the FreeBSD port. I'll resume working on this sometime in December. An older 1.4 rc ran great on FreeBSD already, so I imagine there won't be many changes required then to arrive at a complete FreeBSD port. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Nasty problem with change in 'kills'
Aubin Paul wrote: Ok, this is confusing. The change Dischi made today (change the kill -KILL to plain kill) seems to have a weird side effect. It does kill the display, but the children (Freevo's typically runs as five seperate copies due to threading or something) don't die and now I've got 7 children. Do you wait()/waitpid() after the kill to reap the zombie? Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Re: Process signalling issues in 1.4
Dirk Meyer wrote: I just tried two hours to force python to accept other signals -- no way. If you start mplayer, you can't kill it from a shell with -15, only -9 works. If you move the runapp from the runtime into the runtime directory, it works. I also moved the signal part of runapp into a python so file, but it doesn't work that way. Conclusion: I don't like it, but it looks like we need the runapp. From what I've seen googling around, python blocks signals for threads, and if these fork, the children end up with blocked signals as well. This is supposed to protcet against broken threading implementations. One thing I've seen mentioned is that forking from the main thread will not results in children with blocked signals. If this is true (and I haven't tested it), then we can work around the issue by using the main thread as a fork proxy: Have all threads talk to the main thread when they need to fork something, and have the main thread do the fork and return child information. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] more bashisms
Hi, some new bashisms fixed. Pointy hat to dischi. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute Index: freevo === RCS file: /cvsroot/freevo/freevo/freevo,v retrieving revision 1.88 diff -u -r1.88 freevo --- freevo 12 Oct 2003 09:54:27 - 1.88 +++ freevo 16 Oct 2003 03:47:59 - @@ -393,14 +393,14 @@ if [ $1 != ]; then valid_parameter=0 for known_parameter in --force-fs --trace --doc; do - if [ $1 == $known_parameter ]; then + if [ $1 = $known_parameter ]; then valid_parameter=1 break fi done fi -if [ $valid_parameter == 0 ]; then +if [ $valid_parameter = 0 ]; then echo unknown parameter: $1 echo echo usage: smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Freevo 1.4 roadmap
Aubin Paul wrote: On Mon, Oct 13, 2003 at 11:34:36PM -0300, Rob Shortt wrote: o find the strange childapp problem -- Aubin, since you are the only one having this problem Speaking of childapp problems I think we should find a way for python to unblock signals to child processes. It is a very bad hack that we have to run kill -9 on things! I can't imagine I'm the only one seeing it; it's become more common now, it used to be when I ripped a CD and then tried playing something afterwards, but it's cropping up a lot nowadays. Do you have a simple test for this? If, it could run it on BSD and tell you if it has the same problem - this could be a Linux-only issue. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] company for tux
Tony Murray wrote: That is nice, but I would prefer not to have it on my system, I know I can just replace that image but perhaps we could just detect the host operating system on startup and display the appropriate image. It would save space, and be easier to add more logos (windows?) if we split off both Tux and Beastie, and drew them seperately from the rest of the logos. If you implemented it, I wouldn't object :-) Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Freevo 1.4 roadmap
Dirk Meyer wrote: we got only a few bugreports for 1.4rc1. This sounds good. So here is the roadmap for 1.4 Sometime before 1.4, someone please take a look at the FreeBSD patches I sent (original message attached.) Two of them are essential, the others would be nice to have. Also - if we want beastie on the splash screen - could you sent me the sources for the JPG? (I assume you used gimp, photoshop or illustrator?) Alternatively, I can send you beastie as an SVG, and you put him somewhere. Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute ---BeginMessage--- Lars Eggert wrote: two more patches attached. The first (freevo.patch) eliminates disown which FreeBSD's sh doesn't have. The second removes the audio options from VCR_CMD for FreeBSD. The bsdbt848 driver does not seem to support them. It also adds a new TV_OPTS variable that can be used to pass additional options to mplayer in TV mode. (I use it to turn on deinterlacing.) Here's an updated patch set. It has all the above changes, plus these: 1. Make src/setup_freevo.py find mencoder, and use that instead of the absolute path in VCR_CMD. 2. Make VCR_CMD use TV_REC_SIZE and TV_REC_OUTFMT instead of hardcoded values. 3. Make the recordserver switch the recording input to line on FreeBSD before calling mencoder. Mplayer on FreeBSD does not support adevice, and if the mixer is not set up correctly, no audio will be recorded. Please review. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute Index: freevo === RCS file: /cvsroot/freevo/freevo/freevo,v retrieving revision 1.85 diff -u -r1.85 freevo --- freevo 23 Sep 2003 13:31:23 - 1.85 +++ freevo 5 Oct 2003 17:14:01 - @@ -188,7 +188,9 @@ if [ $1 = start ]; then $RUNAPP python $script echo $! $PID_FILE - disown + if [ `uname -s` != FreeBSD ]; then + disown + fi elif [ $1 = stop ]; then if [ -e $PIDFILE ]; then kill -KILL `cat $PID_FILE` /dev/null 21 @@ -356,7 +358,9 @@ $RUNAPP python $OPTIMZE $FREEVO_PYTHON/main.py $@ /dev/null 21 echo $! $PID_FILE -disown +if [ `uname -s` != FreeBSD ]; then +disown +fi exit 0 fi Index: freevo_config.py === RCS file: /cvsroot/freevo/freevo/freevo_config.py,v retrieving revision 1.267 diff -u -r1.267 freevo_config.py --- freevo_config.py4 Oct 2003 14:38:10 - 1.267 +++ freevo_config.py5 Oct 2003 17:14:02 - @@ -875,6 +875,10 @@ TV_DEVICE = '/dev/video0' TV_INPUT = 0 +# Additional options to pass to mplayer in TV mode. +# For example, TV_OPTS = '-vop pp=ci' would turn on deinterlacing. +TV_OPTS = '' + TV_SETTINGS = '%s television %s %s' % (CONF.tv, CONF.chanlist, TV_DEVICE) # This is the size (in MB) of the timeshift buffer, ie: how long you can @@ -928,22 +932,45 @@ RECORD_SERVER_IP = 'localhost' RECORD_SERVER_PORT = 18001 +if os.uname()[0] == 'FreeBSD': + # FreeBSD's bsdbt848 TV driver doesn't support audio settings? + VCR_AUDIO = '' +else: + VCR_AUDIO = (':adevice=%s' % AUDIO_DEVICE + + ':audiorate=32000' + # 44100 for better sound + ':forceaudio:forcechan=1:' + # Forced mono for bug in my driver + 'buffersize=64') # 64MB capture buffer, change? + +# TV capture size for viewing and recording. Max 768x480 for NTSC, +# 768x576 for PAL. Set lower if you have a slow computer! # +# For the 'tvtime' TV viewing application, only the horizontal size is used. +# Set the horizontal size to 400 or 480 if you have a slow (~500MHz) computer, +# it still looks OK, and the picture will not be as jerky. +# The vertical size is always either fullscreen or 480/576 (NTSC/PAL) +# for tvtime. +TV_VIEW_SIZE = (640, 480) +TV_REC_SIZE = (320, 240) # Default for slower computers + +# Input formats for viewing and recording. The format affect viewing +# and recording performance. It is specific to your hardware, so read +# the MPlayer docs and experiment with mplayer to see which one fits +# your computer best. +TV_VIEW_OUTFMT = 'yuy2' # Better quality, slower on pure FB/X11 +TV_REC_OUTFMT = 'yuy2' + # XXX Please see the mencoder docs for more info about the settings # XXX below. Some stuff must be changed (adevice), others probably # XXX should be (Change), or could be in some cases (change?) -VCR_CMD = ('/usr/local/bin/mencoder ' +# Change. Absolute path to the runtime +VCR_CMD = (CONF.mencoder + ' ' + '-tv on:driver=%s:input=%d' % (TV_DRIVER, TV_INPUT) + ':norm=%s' % CONF.tv + ':channel=%(channel)s' +# Filled in by Freevo ':chanlist=%s' % CONF.chanlist + - ':width=320:height=240' + # Change if needed - ':outfmt=yv12' +# Prob. ok, yuy2
Re: [Freevo-devel] FreeBSD and other patches
Lars Eggert wrote: two more patches attached. The first (freevo.patch) eliminates disown which FreeBSD's sh doesn't have. The second removes the audio options from VCR_CMD for FreeBSD. The bsdbt848 driver does not seem to support them. It also adds a new TV_OPTS variable that can be used to pass additional options to mplayer in TV mode. (I use it to turn on deinterlacing.) Here's an updated patch set. It has all the above changes, plus these: 1. Make src/setup_freevo.py find mencoder, and use that instead of the absolute path in VCR_CMD. 2. Make VCR_CMD use TV_REC_SIZE and TV_REC_OUTFMT instead of hardcoded values. 3. Make the recordserver switch the recording input to line on FreeBSD before calling mencoder. Mplayer on FreeBSD does not support adevice, and if the mixer is not set up correctly, no audio will be recorded. For 1.4 to work on FreeBSD, at least patch 3 and the VCR_AUDIO part of the freevo_config patch are required. (I'm of course in favor of comitting the other changes, too :-) Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] company for tux
Gustavo Sverzut Barbieri wrote: BTW, I think the demon is one of the coolest logo/mascot ever made! I agree. It got redone by John Lasseter (now Pixar VP) for 4.3BSD, which probably didn't hurt :-) http://www.mckusick.com/beastie/shirts/bsd4_3.html http://www.pixar.com/companyinfo/aboutus/mte.html Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] FreeBSD and other patches
Lars Eggert wrote: two more patches attached. The first (freevo.patch) eliminates disown which FreeBSD's sh doesn't have. The second removes the audio options from VCR_CMD for FreeBSD. The bsdbt848 driver does not seem to support them. It also adds a new TV_OPTS variable that can be used to pass additional options to mplayer in TV mode. (I use it to turn on deinterlacing.) Here's an updated patch set. It has all the above changes, plus these: 1. Make src/setup_freevo.py find mencoder, and use that instead of the absolute path in VCR_CMD. 2. Make VCR_CMD use TV_REC_SIZE and TV_REC_OUTFMT instead of hardcoded values. 3. Make the recordserver switch the recording input to line on FreeBSD before calling mencoder. Mplayer on FreeBSD does not support adevice, and if the mixer is not set up correctly, no audio will be recorded. Please review. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute Index: freevo === RCS file: /cvsroot/freevo/freevo/freevo,v retrieving revision 1.85 diff -u -r1.85 freevo --- freevo 23 Sep 2003 13:31:23 - 1.85 +++ freevo 5 Oct 2003 17:14:01 - @@ -188,7 +188,9 @@ if [ $1 = start ]; then $RUNAPP python $script echo $! $PID_FILE - disown + if [ `uname -s` != FreeBSD ]; then + disown + fi elif [ $1 = stop ]; then if [ -e $PIDFILE ]; then kill -KILL `cat $PID_FILE` /dev/null 21 @@ -356,7 +358,9 @@ $RUNAPP python $OPTIMZE $FREEVO_PYTHON/main.py $@ /dev/null 21 echo $! $PID_FILE -disown +if [ `uname -s` != FreeBSD ]; then +disown +fi exit 0 fi Index: freevo_config.py === RCS file: /cvsroot/freevo/freevo/freevo_config.py,v retrieving revision 1.267 diff -u -r1.267 freevo_config.py --- freevo_config.py4 Oct 2003 14:38:10 - 1.267 +++ freevo_config.py5 Oct 2003 17:14:02 - @@ -875,6 +875,10 @@ TV_DEVICE = '/dev/video0' TV_INPUT = 0 +# Additional options to pass to mplayer in TV mode. +# For example, TV_OPTS = '-vop pp=ci' would turn on deinterlacing. +TV_OPTS = '' + TV_SETTINGS = '%s television %s %s' % (CONF.tv, CONF.chanlist, TV_DEVICE) # This is the size (in MB) of the timeshift buffer, ie: how long you can @@ -928,22 +932,45 @@ RECORD_SERVER_IP = 'localhost' RECORD_SERVER_PORT = 18001 +if os.uname()[0] == 'FreeBSD': + # FreeBSD's bsdbt848 TV driver doesn't support audio settings? + VCR_AUDIO = '' +else: + VCR_AUDIO = (':adevice=%s' % AUDIO_DEVICE + + ':audiorate=32000' + # 44100 for better sound + ':forceaudio:forcechan=1:' + # Forced mono for bug in my driver + 'buffersize=64') # 64MB capture buffer, change? + +# TV capture size for viewing and recording. Max 768x480 for NTSC, +# 768x576 for PAL. Set lower if you have a slow computer! # +# For the 'tvtime' TV viewing application, only the horizontal size is used. +# Set the horizontal size to 400 or 480 if you have a slow (~500MHz) computer, +# it still looks OK, and the picture will not be as jerky. +# The vertical size is always either fullscreen or 480/576 (NTSC/PAL) +# for tvtime. +TV_VIEW_SIZE = (640, 480) +TV_REC_SIZE = (320, 240) # Default for slower computers + +# Input formats for viewing and recording. The format affect viewing +# and recording performance. It is specific to your hardware, so read +# the MPlayer docs and experiment with mplayer to see which one fits +# your computer best. +TV_VIEW_OUTFMT = 'yuy2' # Better quality, slower on pure FB/X11 +TV_REC_OUTFMT = 'yuy2' + # XXX Please see the mencoder docs for more info about the settings # XXX below. Some stuff must be changed (adevice), others probably # XXX should be (Change), or could be in some cases (change?) -VCR_CMD = ('/usr/local/bin/mencoder ' +# Change. Absolute path to the runtime +VCR_CMD = (CONF.mencoder + ' ' + '-tv on:driver=%s:input=%d' % (TV_DRIVER, TV_INPUT) + ':norm=%s' % CONF.tv + ':channel=%(channel)s' +# Filled in by Freevo ':chanlist=%s' % CONF.chanlist + - ':width=320:height=240' + # Change if needed - ':outfmt=yv12' +# Prob. ok, yuy2 might be faster + ':width=%d:height=%d' % (TV_REC_SIZE[0], TV_REC_SIZE[1]) + + ':outfmt=%s' % TV_REC_OUTFMT + ':device=%s' % TV_DEVICE + - ':adevice=%s' % AUDIO_DEVICE + - ':audiorate=32000' +# 44100 for better sound - ':forceaudio:forcechan=1:' +# Forced mono for bug in my driver - 'buffersize=64' + # 64 Megabyte capture buffer, change? + VCR_AUDIO + # set above ' -ovc lavc -lavcopts ' + # Mencoder lavcodec video codec 'vcodec=mpeg4
Re: [Freevo-devel] scheduled recording usability issue
Hi, Rob, Rob Shortt wrote: Lars Eggert wrote: before I forget this again: removing a scheduled recording does not immediately update the list - I needed to close and reopen it. This is somewhat less than intuitive. This is a known issue (an annoying one) and I have been meaning to get to it... just a bit busy here I guess. It is definately on my mental todo list (maybe I will add it to my real todo list now!). great, I'm glad to see this will receive attention eventually. It's by no means urgent or anything. (It would also be nice if the EPG had an indicator showing which shows are scheduled for recording.) Yes, I'd like to do this as well but need to come up with a non-expensive way to impliment it. The current method would be crazy because it would require a query to the recording server on every cursor move. I think we may leverage freevo's caching mechanism to solve this problem. Similarly, this is just a icing-on-the-cake kinda thing. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] FreeBSD and other patches
Hi, two more patches attached. The first (freevo.patch) eliminates disown which FreeBSD's sh doesn't have. The second removes the audio options from VCR_CMD for FreeBSD. The bsdbt848 driver does not seem to support them. It also adds a new TV_OPTS variable that can be used to pass additional options to mplayer in TV mode. (I use it to turn on deinterlacing.) Please review. Overall, I think we're getting really close to declare porting to FreeBSD a success. The new recordserver works (after removing the audio options with the patch above), media playing works (but see below), TV viewing works, and the webserver works. As soon as 1.4 and the corresponding mmpython version are released, I will submit a port Makefile to the FreeBSD folks. The one remaining issue is that playing audio CDs fails at this time. See my other email about childapp. A minor issue is that I have not tested the games modules on FreeBSD for a lack of ROMs. I've also not tested some other plugins, e.g., for CD ripping. Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute Index: freevo === RCS file: /cvsroot/freevo/freevo/freevo,v retrieving revision 1.85 diff -u -r1.85 freevo --- freevo 23 Sep 2003 13:31:23 - 1.85 +++ freevo 4 Oct 2003 16:18:56 - @@ -188,7 +188,9 @@ if [ $1 = start ]; then $RUNAPP python $script echo $! $PID_FILE - disown + if [ `uname -s` != FreeBSD ]; then + disown + fi elif [ $1 = stop ]; then if [ -e $PIDFILE ]; then kill -KILL `cat $PID_FILE` /dev/null 21 @@ -356,7 +358,9 @@ $RUNAPP python $OPTIMZE $FREEVO_PYTHON/main.py $@ /dev/null 21 echo $! $PID_FILE -disown +if [ `uname -s` != FreeBSD ]; then +disown +fi exit 0 fi Index: freevo_config.py === RCS file: /cvsroot/freevo/freevo/freevo_config.py,v retrieving revision 1.266 diff -u -r1.266 freevo_config.py --- freevo_config.py3 Oct 2003 16:46:13 - 1.266 +++ freevo_config.py4 Oct 2003 16:25:22 - @@ -864,6 +864,10 @@ TV_DEVICE = '/dev/video0' TV_INPUT = 0 +# Additional options to pass to mplayer in TV mode. +# For example, TV_OPTS = '-vop pp=ci' would turn on deinterlacing. +TV_OPTS = '' + TV_SETTINGS = '%s television %s %s' % (CONF.tv, CONF.chanlist, TV_DEVICE) # This is the size (in MB) of the timeshift buffer, ie: how long you can @@ -917,6 +921,15 @@ RECORD_SERVER_IP = 'localhost' RECORD_SERVER_PORT = 18001 +if os.uname()[0] == 'FreeBSD': + # FreeBSD's bsdbt848 TV driver doesn't support audio settings? + VCR_AUDIO = '' +else: + VCR_AUDIO = (':adevice=%s' % AUDIO_DEVICE + + ':audiorate=32000' + # 44100 for better sound + ':forceaudio:forcechan=1:' + # Forced mono for bug in my driver + 'buffersize=64') # 64MB capture buffer, change? + # # XXX Please see the mencoder docs for more info about the settings # XXX below. Some stuff must be changed (adevice), others probably @@ -929,10 +942,7 @@ ':width=320:height=240' + # Change if needed ':outfmt=yv12' +# Prob. ok, yuy2 might be faster ':device=%s' % TV_DEVICE + - ':adevice=%s' % AUDIO_DEVICE + - ':audiorate=32000' +# 44100 for better sound - ':forceaudio:forcechan=1:' +# Forced mono for bug in my driver - 'buffersize=64' + # 64 Megabyte capture buffer, change? + VCR_AUDIO + # set above ' -ovc lavc -lavcopts ' + # Mencoder lavcodec video codec 'vcodec=mpeg4' +# lavcodec mpeg-4 ':vbitrate=1200:' + # Change lower/higher, bitrate Index: src/tv/plugins/mplayer.py === RCS file: /cvsroot/freevo/freevo/src/tv/plugins/mplayer.py,v retrieving revision 1.20 diff -u -r1.20 mplayer.py --- src/tv/plugins/mplayer.py 14 Sep 2003 01:38:59 - 1.20 +++ src/tv/plugins/mplayer.py 4 Oct 2003 16:25:23 - @@ -173,8 +173,8 @@ outfmt = 'outfmt=%s' % config.TV_VIEW_OUTFMT tvcmd = ('tv://%s -tv driver=%s:%s:%s:%s:' - '%s:width=%s:height=%s:%s' % - (tuner_channel, config.TV_DRIVER, device, input, norm, chanlist, w, h, outfmt)) + '%s:width=%s:height=%s:%s %s' % + (tuner_channel, config.TV_DRIVER, device, input, norm, chanlist, w, h, outfmt, config.TV_OPTS)) # Build the MPlayer command args = (config.MPLAYER_NICE, config.MPLAYER_CMD, config.MPLAYER_VO_DEV, @@ -205,8 +205,8 @@ outfmt = 'outfmt=%s' % config.TV_VIEW_OUTFMT tvcmd = ('-tv on:driver
Re: [Freevo-devel] Re: FreeBSD childapp issue w/audio CDs
Dirk Meyer wrote: Lars Eggert wrote: I can't play audio CDs anymore, due to what looks like an issue with childapp. Playing DVDs, and playing media on the hard drive works fine: Looks like bad luck in the threading :-( I added a lock, it should now be fixed (Aubin: maybe your problem is gone, too now). FYI, it's still there with version 1.24 of childapp.py Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] scheduled recording usability issue
Hi, before I forget this again: removing a scheduled recording does not immediately update the list - I needed to close and reopen it. This is somewhat less than intuitive. (It would also be nice if the EPG had an indicator showing which shows are scheduled for recording.) Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] FreeBSD childapp issue w/audio CDs
Hi, I can't play audio CDs anymore, due to what looks like an issue with childapp. Playing DVDs, and playing media on the hard drive works fine: mplayer.py (160): MPlayer.play(): Starting thread, cmd=--prio=-20 /usr/local/bin/mplayer -slave -ac mad, -autosync 100 -nolirc -autoq 100 -screenw 800 -screenh 600 -fs -vo null -ao oss:/dev/dsp -cache 500 -cdda speed=1 -cdrom-device /dev/acd0 cdda://1 self.t1.isAlive()=True, self.t2.isAlive()=True childapp.py (289): stderr: No data, stopping (pid 61542)! childapp.py (289): stdout: No data, stopping (pid 61542)! ChildApp.__init__(), pid=61585, app= /usr/local/bin/mplayer -slave -ac mad, -autosync 100 -nolirc -autoq 100 -screenw 800 -screenh 600 -fs -vo null -ao oss:/dev/dsp -cache 500 -cdda speed=1 -cdrom-device /dev/acd0 cdda://1, poll=0 childapp.py (208): childapp: killing pid 61585 signal 2 Exception in thread Thread-4: Traceback (most recent call last): File /usr/local/lib/python2.3/threading.py, line 436, in __bootstrap self.run() File /media/freevo/src/childapp.py, line 397, in run self.app.kill() File /media/freevo/src/audio/plugins/mplayer.py, line 246, in kill childapp.ChildApp.kill(self, signal.SIGINT) File /media/freevo/src/childapp.py, line 209, in kill os.kill(self.child.pid, signal) OSError: [Errno 3] No such process main.py (321): no eventhandler for event PLAY_START Any ideas? Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] more FreeBSD patches
Aubin Paul wrote: On Sun, Sep 21, 2003 at 10:18:45AM -0700, Lars Eggert wrote: attached is another set of FreeBSD patches. It fixes bash-isms in the startup script, mixer.py and record_daemon.py. These should be nops on Linux. I haven't looked at the other patches yet, but the ossmixer plugin (which ideally, will replace the default mixer) uses OSS in a standard fashion, which is apparently supported on FreeBSD 5, or so I've been told. So should I always enable ossmixer on FreeBSD? (How?) Maybe the patch could still be comitted. It prevents an annoying syntax error: unexpected (or similar) when sh is really sh not bash. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] more FreeBSD patches
Here's another one against mmpython. I'm not sure how the old patch could have ever worked... Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute Index: disc/discinfo.py === RCS file: /cvsroot/mmpython/mmpython/disc/discinfo.py,v retrieving revision 1.14 diff -u -r1.14 discinfo.py --- disc/discinfo.py14 Sep 2003 13:32:12 - 1.14 +++ disc/discinfo.py22 Sep 2003 03:15:32 - @@ -116,10 +116,14 @@ try: fd = os.open(device, os.O_RDONLY | os.O_NONBLOCK) if os.uname()[0] == 'FreeBSD': -cd_toc_entry = array.array('c', '\000'*4096) -(address, length) = cd_toc_entry.buffer_info() -buf = pack('BBHP', CD_MSF_FORMAT, 0, length, address) -s = ioctl(fd, CDIOREADTOCENTRYS, buf) +try: +cd_toc_entry = array.array('c', '\000'*4096) +(address, length) = cd_toc_entry.buffer_info() +buf = pack('BBHP', CD_MSF_FORMAT, 0, length, address) +s = ioctl(fd, CDIOREADTOCENTRYS, buf) +s = CDS_DISC_OK +except: +s = CDS_NO_DISC else: s = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) except: smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] FreeBSD patches for 1.4
Hi, Lars Eggert wrote: some more freevo/mmpython patches required on FreeBSD. They should be NOPs on Linux, but please test this before committing: just a little reminder that these are still pending a review and commit. Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] Re: FreeBSD patches for 1.4
Aubin Paul wrote: On Sat, Sep 06, 2003 at 12:48:04PM -0700, Lars Eggert wrote: Is it possible to not use xine for DVD playback, by the way? Xine on FreeBSD has major issues (read: choppy playback). Mplayer is *much* better. Is there a switch to force xine off and fall back to mplayer? I think if you just navigate to the chapters directly, mplayer will be used. Though Xine shouldn't be any slower since the output methods should be identical. Ah, hadn't tried that. The issue with xine isn't slowness, it's that there's a short 1Hz hiccup on playback, as if DMA wasn't enabled for the drive (which it is.) Mplayer doesn't have that. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] FreeBSD patches for 1.4
Rob Shortt wrote: Lars Eggert wrote: There are still more issues. The new recordserver doesn't appear to work at all yet, and the IMDB plugin was also recently broken. We fixed a bunch of problems with recordserver today, please try the next snapshot or anon cvs tomorrow. I'm running out of the freevo and mmpython CVS trees that should have these changes (if they have been committed yet?) I'll poke at it some more to get you a better diagnosis. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] FreeBSD patches for 1.4
Rob Shortt wrote: Anon CVS is still ~24h behind I think. Ah! Sorry that I didn't get that part earlier. I'll try tomorrow. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] ID3 Album Cover Extraction
Hi, somewhat unrelated feature request that I keep forgetting to bring up: It'd be nice if there was some sort of auto-amazon mode, where as each MP3 is played, whenever it does not have an existing cover, the amazon lookup takes place. (Rather than having to do it manually for each folder.) Lars Aubin Paul wrote: Brian, The ID3 library we use in freevo (well in mmpython) actually includes support for doing this. You can do the extraction like this: import mmpython.audio.eyeD3 as eyeD3 tag = eyeD3.Tag(filename) images = tag.getImages(); for img in images: img.writeFile(); It could probably be added to mmpython as part of caching so it goes into the image cache we use. Aubin On Fri, Sep 05, 2003 at 04:40:21PM -0700, Brian Enigma wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am not sure how relevant this is to Freevo itself, but I have a basic Python script (link below) that may be useful in /contrib. I tend to put album artwork in the ID3 tags of my music (a habit that has arisen from using the latest iTunes). Of course, Freevo does not pick this up (maybe a feature in the future?). To assist in my situation, I wrote a quick program to recursively go through MP3s and pull out album artwork, placing each image alongside the MP3 so that Freevo will pick them up. It works fine, but does stand to use a little improvement. The feature wishlist is at the top of the file. Command line usage information is at the bottom--in the printHelp() function. If anyone else finds it useful, feel free to throw it into /contrib or even hack it apart and include the functionality in a plugin. http://netninja.com/junkdrawer/extractAlbumCover_py.txt -Brian -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.2 (Darwin) iD8DBQE/WR7o0dKNWt3rpSURAvY+AKDxVGIFy37L8SBHKxcygOvJAVxlxgCfavae N/RKOFDVMf6calfFay98v1g= =kYQv -END PGP SIGNATURE- --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] 1.4?
Aubin Paul wrote: Are there any major changes expected before 1.4 or should we start doing pre-releases? It's a big change, and it would be nice to have the packages all available at release time too. I just got back from travel, and will test the current CVS version more on FreeBSD this weekend. I'd be great if 1.4 was in state that would allow Steve and me to push the FreeBSD port into FreeBSD's CVS tree. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] Re: IMDB results
Dirk Meyer wrote: We search for the label, split on the _. So we search for 'fellowship ext 1' The 1 gives us many results we don't want. But for other cases, we need the numbers (Babylon 5, or sequells). The big question now: how can we make it produce better results? What about: 1. search like we search now, the list may be long 2. if the number of return items is greater 10 remove all titles which don't include at least one _word_. So results without 'fellowship' or 'ext' (only containing 1) will be deleted. 3. sort the results: a) Most popular searches to the top b) Inside two areas (popular and not so popular), search by number of matched words: each word in the title and not in the search string hitpoint--, each search word in the title hitpoint += 5. What do you think? I've made a small change locally that (1) throws out any non-word characters from the name (\W) and (2) throws out any single-character words from the name. This seems to produce much better matches. In the example above, it would search for dvd fellowship ext and frind it, instead of searching for dvd [fellowship ext d 1]. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Re: IMDB results
Lars Eggert wrote: I've made a small change locally that (1) throws out any non-word characters from the name (\W) and (2) throws out any single-character words from the name. This seems to produce much better matches. In the example above, it would search for dvd fellowship ext and frind it, instead of searching for dvd [fellowship ext d 1]. I should add that the idea here is to feed imdb more significant words for searching, instead of interpreting the matches it returns. Their search algorithm doesn't seem to be too smart about weighing terms. For the same reason, it may make sense to strip other common short words (in, the, for, not, a, an, of, etc.) fromt he search string. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] Re: [PATCH] third set of FreeBSD patches, alsofor mmpython
Aubin, Aubin Paul wrote: I've applied your Freevo patches, but one of the mmpython-discinfo patches failed, so I haven't made those changes since I don't have a way of testing them here. Can you update them to match the latest CVS? I think discinfo.py in mmpython CVs might have changed since you made your patches. attached. This version also gets the DVD information right on FreeBSD, thanks to Dirk's explanation earlier. For example, for the first Lord of the Rings extended DVD: DISCID read label FELLOWSHIP_EXT_D1 DISCID read id 2002082001133700 DISCID is 2002082001133700FELLOWSHIP_EXT_D1 Nice. Minor issue is that if I use the imdb plugin to look up the media information, it doesn't find it (but comes up with a bunch of other unrelated movies.) Not sure if this is significant. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute ? build Index: factory.py === RCS file: /cvsroot/mmpython/mmpython/factory.py,v retrieving revision 1.7 diff -u -r1.7 factory.py --- factory.py 20 Jul 2003 16:37:57 - 1.7 +++ factory.py 26 Aug 2003 02:16:11 - @@ -200,7 +200,7 @@ return self.create_from_url(name) elif not os.path.exists(name): return None -if stat.S_ISBLK(os.stat(name)[stat.ST_MODE]): +if (os.uname()[0] == 'FreeBSD' and stat.S_ISCHR(os.stat(name)[stat.ST_MODE])) or stat.S_ISBLK(os.stat(name)[stat.ST_MODE]): return self.create_from_device(name) return self.create_from_filename(name) Index: setup.py === RCS file: /cvsroot/mmpython/mmpython/setup.py,v retrieving revision 1.4 diff -u -r1.4 setup.py --- setup.py29 Jun 2003 20:59:58 - 1.4 +++ setup.py26 Aug 2003 02:16:11 - @@ -26,7 +26,9 @@ # Description of the modules and packages in the distribution ext_modules = [ Extension('mmpython/disc/ifoparser', ['disc/ifomodule.c'], - libraries=[ 'dvdread' ]), + libraries=[ 'dvdread' ], + library_dirs=['/usr/local/lib'], + include_dirs=['/usr/local/include']), Extension('mmpython/disc/cdrom', ['disc/cdrommodule.c']) ] ) Index: disc/discinfo.py === RCS file: /cvsroot/mmpython/mmpython/disc/discinfo.py,v retrieving revision 1.9 diff -u -r1.9 discinfo.py --- disc/discinfo.py23 Aug 2003 17:54:14 - 1.9 +++ disc/discinfo.py26 Aug 2003 02:16:12 - @@ -67,6 +67,8 @@ import os import re import time +import array +from struct import * try: @@ -86,10 +88,20 @@ CDROM_DISC_STATUS=0x5327 CDS_AUDIO=100 CDS_MIXED=105 - + +# FreeBSD ioctls - there is no CDROM.py +CDIOREADTOCENTRYS = 0xc0086305 +CD_MSF_FORMAT = 2 + try: fd = os.open(device, os.O_RDONLY | os.O_NONBLOCK) -s = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) +if os.uname()[0] == 'FreeBSD': +cd_toc_entry = array.array('c', '\000'*4096) +(address, length) = cd_toc_entry.buffer_info() +buf = pack('BBHP', CD_MSF_FORMAT, 0, length, address) +s = ioctl(fd, CDIOREADTOCENTRYS, buf) +else: +s = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) except: # maybe we need to close the fd if ioctl fails, maybe # open fails and there is no fd, maye we aren't running @@ -100,7 +112,26 @@ pass return 0 -s = ioctl(fd, CDROM_DISC_STATUS) +if os.uname()[0] == 'FreeBSD': +s = 0 +# We already have the TOC from above +for i in range(0, 4096, 8): +control = unpack('B', cd_toc_entry[i+1])[0] 4 +track = unpack('B', cd_toc_entry[i+2])[0] +if track == 0: +break +if control == 0 and s != CDS_MIXED: +s = CDS_AUDIO +elif control != 0: +if s == CDS_AUDIO: +s = CDS_MIXED +else: +s = 100 + control # ugly, but encodes Linux ioctl returns +elif control == 5: +s = CDS_MIXED + +else: +s = ioctl(fd, CDROM_DISC_STATUS) os.close(fd) if s == CDS_AUDIO or s == CDS_MIXED: return 1 @@ -132,9 +163,21 @@ f = open(device,'rb') f.seek(0x832d) -id = f.read(16) +if os.uname()[0] == 'FreeBSD': +# why doesn't seeking to 0x832d+40 and reading 32 work? +# no idea, do it this way +label = f.read(72); +label = label[40:72] +else: +id = f.read(16) f.seek(32808, 0) -label = f.read(32) +if os.uname()[0] == 'FreeBSD
Re: [Freevo-devel] Re: [PATCH] third set of FreeBSD patches, alsofor mmpython
Dirk, thanks for the explanation! Dirk Meyer wrote: One other question, since I have no Linux box and thus don't know if or how this is supposed to work: When a DVD is inserted, mmpython computes a discid and some mediainfo. Yes, and more. First mmpython checks if it's an audio cd. If yes, we goes checks some track infos and generate an id. Audio CDs work fine without changes. If not, it reads the label and the timestamp of the disc. This is done by reading the raw device. For by Babylon 5 DVDs the label is BABYLON5_SEASON2_DISC3 and the timestamp 2003042310503400. The unique mmpython id is now timestamp+label. Ah. That step seems to fail right now. After that, mmpython/disc/vcdinfo and mmpython/disc/dvdinfo try to find out if it's a vcd or dvd by reading the raw device and guessing. If it is a vcd, the number and length of tracks will be read, if it's a dvd, libdvdread will be used to get more info. That seems to work, too, libdvdread extracts the title info correctly. Should it at some point during this process find a movie name/title to display? Yes, the label. OK, got it. I'll check later tonight where it fails. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] FREEVO_STARTDIR and runapp
Hi, are FREEVO_STARTDIR and runapp now deprecated? Because several scripts still refer to them: [EMAIL PROTECTED]: /media/freevo] grep -Rl FREEVO_STARTDIR . ./WIP/RobShortt/generic_record.py ./WIP/RobShortt/main.py-plugins ./WIP/Thomas/timeshift.py ./boot/freevo ./src/audio/plugins/mplayer.py ./src/main.py ./src/tv/plugins/generic_record.py ./src/tv/plugins/ivtv_basic_tv.py ./src/tv/plugins/mplayer.py ./src/tv/plugins/timeshift.py ./src/tv/plugins/tvtime.py ./src/video/plugins/mplayer.py [EMAIL PROTECTED]: /media/freevo] grep -Rl runapp . ./.cvsignore ./ChangeLog ./freevo ./WIP/Thomas/timeshift.py ./contrib/fbcon/mgafb ./contrib/rpm/freevo-cvs.spec ./contrib/rpm/freevo-src.spec ./contrib/rpm/freevo.spec ./runtime/src/CVS/Entries ./runtime/src/runapp.c ./src/audio/plugins/cdbackup.py ./src/childapp.py ./src/main.py ./src/games/mame_cache.py ./src/www/__init__.py Some of these are false positives, but at least all .py files match. Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] pkill and aumix
Hi, I just found that freevo depends on pkill and aumix. At least on FreeBSD, these don't come with the base system. Could/should they be added to the EXTERNAL_PROGRAMS likst in setup_freevo.py, and thus tested for? Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] CVS users please read
Dirk Meyer wrote: So I want to rename local_conf.py to local_conf.py.sample. No big deal, but I don't know what cvs does when you update and I removed local_conf.py. It may delete your personal settings. So make a backup of this file please, I will rename it next weekend. Ask sourceforge for a repo-copy. That way, the new file will keep the commit history, and the old ones won't be removed during a cvs update. (Make sure they clean any tags on the copy.) Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] [PATCH] first set of FreeBSD patches
Aubin Paul wrote: When you said it will require more work, I just wanted to know if it was developer work, or end user work... Ah! Developer work. The main reason you might have problems with that, is that we have to use Linux ioctl's to identify the media; so if there are BSD equivelants for those, we can add them. i.e. CDROM_DRIVE_STATUS=0x5326 CDSL_CURRENT=( (int ) ( ~ 0 1 ) ) CDS_DISC_OK=4 CDROM_DISC_STATUS=0x5327 CDS_AUDIO=100 CDS_MIXED=105 CDROM_SELECT_SPEED=0x5322 Those are the Linux IOCTL's for certain types of CDs. They're taken from cdrom.py (in Python) which may also exist for the BSDs; as for the audio CDs, we have to read the TOC from the drive so we can do a CD lookup; this is done via a C Python module; it would also need an equivelant. I saw those, and they're very likely different on FreeBSD. However, it looks like the python-2.3 port does not install cdrom.py. Looking at the python sources, the lib/plat-freebsd* directories do not have cdrom.py in them, either. That doesn't look too well. If there is a CDROM.py for FreeBSD, is should also have an ioctl for eject; under linux it's an ioctl to '0x5309' If I can find one, I'll use it. Until now, I simply used cdcontrol -f device eject on FreeBSD where Linux uses eject. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] [PATCH] first set of FreeBSD patches
Hi, Steve O'Hara and me are putting together a freevo port for the FreeBSD ports tree. I think we'll have something useful shortly. In the process of doing this, we've found some Linux-isms in the source tree that we had to fix, and it looks likely we'll find some more as things progress. I've received a private email by one of the committers indicating that I should join the list and then post the patches. Thus, attached to this email are the first couple of diffs against the CVS tree. They should all be no-ops for Linux users: runapp.c.patch is simple, only adds some includes so runapp compiles on FreeBSD. freevo.patch makes the freevo shell script conform to basic sh syntax. I think the sh variant on Linux is actually bash, which is more expressive than FreeBSD's basic sh. config.py.patch enables auto-detection of CD and DVD drives under the FreeBSD device naming scheme. More work will be required to use them though. These are just the first three patches, but they get us to a state where freevo displays its main menu, and at least sees optical drives. More changes will definitly be required, and I'll patch diffs here as we progress. Please review these patches and let us know whether they can be committed as-is, or if not, what changes we should make. Thanks, Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute Index: runapp.c === RCS file: /cvsroot/freevo/freevo/runapp.c,v retrieving revision 1.19 diff -u -r1.19 runapp.c --- runapp.c1 Jul 2003 01:50:47 - 1.19 +++ runapp.c20 Aug 2003 04:27:21 - @@ -23,8 +23,13 @@ #include sched.h #include time.h #include errno.h +#ifdef __FreeBSD__ +#include unistd.h +#include sys/imgact_aout.h +#define N_MAGIC(x) N_GETMAGIC(x) +#else #include linux/a.out.h - +#endif #define LOG(str, args...) { \ static char tmp1[1000]; \ Index: freevo === RCS file: /cvsroot/freevo/freevo/freevo,v retrieving revision 1.66 diff -u -r1.66 freevo --- freevo 17 Aug 2003 13:46:54 - 1.66 +++ freevo 20 Aug 2003 04:26:34 - @@ -37,7 +37,7 @@ export PYTHONPATH=$FREEVO_HOME:$FREEVO_HOME/$src:$FREEVO_HOME/$src/www:$FREEVO_HOME/$src/tv # Is runapp present? If not it needs to be compiled -if ! [ -e $FREEVO_HOME/runapp ]; then +if [ ! -e $FREEVO_HOME/runapp ]; then echo echo * echo * Please note that there is a standalone binary release * @@ -52,7 +52,7 @@ fi # call new x session if needed -if [ $call == freevo ] [ $1 == -fs ]; then +if [ $call = freevo -a $1 = -fs ]; then servernum=0 while true; do @@ -64,7 +64,7 @@ fi # call helper if the script is called as wrapper -if [ $call == freevo ]; then +if [ $call = freevo ]; then script=$FREEVO_HOME/$helpers/$1.py if [ -e $script ]; then shift @@ -86,7 +86,7 @@ fi # cd to the freevo directory if necessary -if ! [ -e src/identifymedia.py ]; then +if [ ! -e src/identifymedia.py ]; then cd $FREEVO_HOME unset FREEVO_HOME fi @@ -108,7 +108,7 @@ # Help -if [ $1 = --help ] || [ $1 = - ] ; then +if [ $1 = --help -o $1 = - ] ; then echo freevo [ script | options] echo options: echo -fsstart freevo in a new x session in fullscreen @@ -146,10 +146,10 @@ # Is freevo.conf present? If not, ./configure is needed # Check the possible locations in prio order -if ! [ -e $FREEVO_STARTDIR/freevo.conf ]; then -if ! [ -e $HOME/.freevo/freevo.conf ]; then -if ! [ -e /etc/freevo/freevo.conf ]; then -if ! [ -e ./freevo.conf ]; then +if [ ! -e $FREEVO_STARTDIR/freevo.conf ]; then +if [ ! -e $HOME/.freevo/freevo.conf ]; then +if [ ! -e /etc/freevo/freevo.conf ]; then +if [ ! -e ./freevo.conf ]; then echo Please run 'freevo setup' first (freevo.conf not found) exit 1 fi @@ -197,7 +197,7 @@ if [ -f $PID_FILE ] ; then PID=`cat $PID_FILE` RUNNING=`ps -ef | grep $PID | grep $APP` -if ! [ $RUNNING = ] ; then +if [ ! $RUNNING = ] ; then echo Freevo's $APP is already running as process $PID. exit 0 fi @@ -231,7 +231,7 @@ if [ -f $PID_FILE ] ; then PID=`cat $PID_FILE` RUNNING=`ps -ef | grep $PID | grep main` -if ! [ $RUNNING = ] ; then +if [ ! $RUNNING = ] ; then echo Freevo is already running as process $PID. exit 0 fi Index: src/config.py === RCS file: /cvsroot/freevo/freevo/src/config.py,v retrieving revision 1.37 diff -u -r1.37 config.py --- src/config.py 15
Re: [Freevo-devel] [PATCH] first set of FreeBSD patches
Hi, Aubin Paul wrote: config.py.patch enables auto-detection of CD and DVD drives under the FreeBSD device naming scheme. More work will be required to use them though. Can you explain that? Is that end user work? If so, what would be needed so we can add it to the Wiki documentation? I'm not sure what you mean by end user work. The issue this patch addresses is device naming: ATA optical drives on FreeBSD are named /dev/cdX, SCSI ones /dev/acdX, where X is a number. cd and acd are the names of the drivers that handle the respective devices. The c partition of a device is slice-spanning, and is usually the one one mounts. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install-steps.html has more on this. For example my DVD drive is /dev/acd0. For data media, I mount /dev/acd0c on /cdrom. For audio media, tracks appear automatically as partitions /dev/acd0t0X. With the patch freevo at least detects the drive. I have not yet been able to make it play audio CDs or even recognize when a media is in the drive, shouldn't it look up the meta-information? I have another patch ready that at least fixes media ejection; FreeBSD has no eject command. Please review these patches and let us know whether they can be committed as-is, or if not, what changes we should make. Will do. Thanks for the quick response! Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: [Freevo-devel] [PATCH] first set of FreeBSD patches
Lars Eggert wrote: I saw those, and they're very likely different on FreeBSD. However, it looks like the python-2.3 port does not install cdrom.py. Looking at the python sources, the lib/plat-freebsd* directories do not have cdrom.py in them, either. That doesn't look too well. It really looks like this file doesn't exist for FreeBSD. However, there is a CDDB python module that claims to support FreeBSD/Linux/Solaris, but isn't currently used by freevo: http://cddb-py.sourceforge.net/ But I'm not sure if it supports all of the functionality you currently use in freevo. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
[Freevo-devel] Re: [PATCH] first set of FreeBSD patches
Dirk, Dirk Meyer wrote: It should be CDROM.py not cdrom.py. If you don't have it, we need the ioctl numbers for FreeBSD and add them directly in the code. thanks for the explanation. FreeBSD's ioctl's are in sys/cdio.h and sys/cdrio.h, kinda like Solaris: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdio.h http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/cdrio.h Is this the information you need? BTW, when porting freevo to FreeBSD, don't forget mmpython. Send patches also to this list. I have made a port of mmpython for FreeBSD, it's sitting in the ports commit queue at http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/55425 The only required patch was the location of includes and libraries, as usual for python ports. The port may still have issues, but the limited use it's getting at the current state of the freevo port hasn't revealed any o far. Lars -- Lars Eggert [EMAIL PROTECTED] USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature