Re: [Freevo-devel] Website

2003-05-29 Thread Aubin Paul
On Thu, May 29, 2003 at 11:18:58AM +0200, Dirk Meyer wrote:
> Aubin, I like your new website. We should make this our new one. You
> should have the permissions to copy the website to sf.net, but maybe
> some files belong to Krister or me and you don't have write access on
> the file. I have done a chmod g+w, it should be no problem for you to
> override my files, Krister: can you do the same?

To be honest, I never tried moving the files into the document root, I
just tried to copy over the old tentative/ directory. But I can try
moving the stuff in place later today. I have a class in a few
moments...

But before I do anything else, here's a quick checklist of things (add
to it so I can add those before putting it up)

* Add sourceforge logo/Krister's web "bug" 

> And we should change the how to download section to describe the
> special possiblities for Gentoo and Debian.

Anything else?

Aubin


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-devel] Re: new event code breaks lirc

2003-05-29 Thread Aubin Paul
Is the code I suggested ok to do what you wanted?

On Thu, May 29, 2003 at 11:01:27AM +0200, Dirk Meyer wrote:
> Aubin Paul wrote:
> > Unless Dischi has objections, I'll make the change to do something
> > like:
> >
> > ---
> >
> > if not (e == self.key_event_mapper(code)):
> > e = self.key_event_mapper(osd._cb)
> >
> Do it. Sorry, I only tested keyboard.
> 
> Dischi
> 
> -- 
> Universe.SYS corrupted. Reboot? [Y/N]


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src/tv v4l2.py,1.1,1.2

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv31449

Modified Files:
v4l2.py 
Log Message:
Make sure we close the device when done.


Index: v4l2.py
===
RCS file: /cvsroot/freevo/freevo/src/tv/v4l2.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** v4l2.py 28 May 2003 23:32:50 -  1.1
--- v4l2.py 29 May 2003 12:08:45 -  1.2
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.2  2003/05/29 12:08:45  rshortt
+ # Make sure we close the device when done.
+ #
  # Revision 1.1  2003/05/28 23:32:50  rshortt
  # V4L device control by Thomas Schueppel.
***
*** 123,126 
--- 126,134 
else:
print "Video Opened at %s" % device
+ 
+ 
+   def close(self):
+   os.close(self.device)
+ 
  
def setchanlist(self, chanlist):




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/tv/plugins ivtv_record.py,1.1,1.2

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/src/tv/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv31449/plugins

Modified Files:
ivtv_record.py 
Log Message:
Make sure we close the device when done.


Index: ivtv_record.py
===
RCS file: /cvsroot/freevo/freevo/src/tv/plugins/ivtv_record.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ivtv_record.py  29 May 2003 00:45:53 -  1.1
--- ivtv_record.py  29 May 2003 12:08:46 -  1.2
***
*** 11,14 
--- 11,17 
  # ---
  # $Log$
+ # Revision 1.2  2003/05/29 12:08:46  rshortt
+ # Make sure we close the device when done.
+ #
  # Revision 1.1  2003/05/29 00:45:53  rshortt
  # Plugin to record using an ivtv (PVR-250/350) based capture card.
***
*** 117,123 
  ' ', '_'))
  
- #while self.mode == 'record' and self.app.isAlive():
- #time.sleep(0.5)
- 
  (v_norm, v_input, v_clist, v_dev) = config.TV_SETTINGS.split()
  v_norm = string.upper(v_norm)
--- 120,123 
***
*** 159,167 
  print "Width: %i, Height: %i" % (width,height)
  print "Read Frequency: %i" % v.getfreq()
- # print v.gettuner(0)
  
  now = time.time()
  stop = now + self.prog.rec_duration
- # stop = now + 15
  
  v_in  = open('/dev/video0', 'r')
--- 159,165 
***
*** 174,177 
--- 172,177 
  v_in.close()
  v_out.close()
+ v.close()
+ v = None
  
  print('Record_Thread::run: finished recording')




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/www/htdocs index.rpy,1.4,1.5

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/src/www/htdocs
In directory sc8-pr-cvs1:/tmp/cvs-serv22091

Modified Files:
index.rpy 
Log Message:
Applied a patch by Mike Ruelle that adds info about disk free, scheduled recordings, 
and shows the time.


Index: index.rpy
===
RCS file: /cvsroot/freevo/freevo/src/www/htdocs/index.rpy,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** index.rpy   22 May 2003 21:33:23 -  1.4
--- index.rpy   29 May 2003 11:40:42 -  1.5
***
*** 12,15 
--- 12,18 
  # ---
  # $Log$
+ # Revision 1.5  2003/05/29 11:40:42  rshortt
+ # Applied a patch by Mike Ruelle that adds info about disk free, scheduled 
recordings, and shows the time.
+ #
  # Revision 1.4  2003/05/22 21:33:23  outlyer
  # Lots of cosmetic changes:
***
*** 55,60 
  import sys, time
  
! import record_client
  from web_types import HTMLResource, FreevoResource
  
  TRUE = 1
--- 58,65 
  import sys, time
  
! import record_client 
  from web_types import HTMLResource, FreevoResource
+ import util
+ import config
  
  TRUE = 1
***
*** 68,74 
  fv.printHeader('Welcome', 'styles/main.css')
  
  (server_available, schedule) = record_client.connectionTest()
  if not server_available:
! fv.res += 'Notice: The recording server is down.'
  
  fv.printSearchForm()
--- 73,98 
  fv.printHeader('Welcome', 'styles/main.css')
  
+ fv.res += 'Freevo Web Status as of %s' % time.strftime('%B %d 
%H:%M', time.localtime())
+ 
  (server_available, schedule) = record_client.connectionTest()
  if not server_available:
! fv.res += 'Notice: The recording server is 
down.'
! else:
! fv.res += 'The recording server is up and 
running.'
! 
! (got_schedule, recordings) = record_client.getScheduledRecordings()
! if got_schedule:
! num_sched_progs = len(recordings.getProgramList().values())
! if num_sched_progs == 1:
! fv.res += 'One program scheduled to 
record.'
! elif num_sched_progs > 0:
! fv.res += '%i programs scheduled to 
record.' % num_sched_progs
! else:
! fv.res += 'No programs scheduled to 
record.'
! else:
! fv.res += 'No programs scheduled to 
record.'
! 
! diskfree = '%i of %i Mb free in %s'  % ( (( 
util.freespace(config.DIR_RECORD) / 1024) / 1024), 
((util.totalspace(config.DIR_RECORD) /1024) /1024), config.DIR_RECORD)
! fv.res += '' + diskfree + ''
  
  fv.printSearchForm()




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo freevo_config.py,1.186,1.187

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv15378

Modified Files:
freevo_config.py 
Log Message:
add some doc

Index: freevo_config.py
===
RCS file: /cvsroot/freevo/freevo/freevo_config.py,v
retrieving revision 1.186
retrieving revision 1.187
diff -C2 -d -r1.186 -r1.187
*** freevo_config.py29 May 2003 09:24:12 -  1.186
--- freevo_config.py29 May 2003 09:33:17 -  1.187
***
*** 205,208 
--- 205,215 
# shutdown
  
+ #
+ # see src/event.py for a list of all possible events. You can add more keybindings
+ # by adding them to the correct hash. E.g. pressing 1 should send 'contrast -100'
+ # to mplayer, just write the folling line to your local_conf.py
+ #
+ # EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -100')
+ #
  EVENTS = {
  'menu': MENU_EVENTS,




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-devel] Re: Developing with Freevo

2003-05-29 Thread Dirk Meyer
"Michael Ditze" wrote:
> Hi there,
>
> I am basically a newbie to freevo and want to start developing. What I
> would like to do is to add a button to one of the menus and call a
> script once the button is pressed. I read the documentation and browsed
> the program files but could not find a hint how to do this, probably
> because I am also new to Python. Can anyone give me short starting
> description how to develop with Freevo?

Make a fresh CVS chackout and take a look at src/event.py. There is
the complete list of key-event mappings. Use the FUNCTION_CALL event
to do what you want:

in local_config.py:

def call_me():
   do-some-stuff

EVENTS['menu']['the-button-you-like'] = Event(FUNCTION_CALL, arg=call_me)

Untested, but it should work



Dischi

-- 
Take care to get what you like, otherwise you will be forced to like
what you get.


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo freevo_config.py,1.185,1.186

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv12625

Modified Files:
freevo_config.py 
Log Message:
import * from event

Index: freevo_config.py
===
RCS file: /cvsroot/freevo/freevo/freevo_config.py,v
retrieving revision 1.185
retrieving revision 1.186
diff -C2 -d -r1.185 -r1.186
*** freevo_config.py28 May 2003 15:01:24 -  1.185
--- freevo_config.py29 May 2003 09:24:12 -  1.186
***
*** 98,102 
  
  import plugin
! import event
  
  
--- 98,102 
  
  import plugin
! from event import *
  
  
***
*** 206,215 
  
  EVENTS = {
! 'menu': event.MENU_EVENTS,
! 'input'   : event.INPUT_EVENTS,
! 'video'   : event.VIDEO_EVENTS,
! 'audio'   : event.AUDIO_EVENTS,
! 'games'   : event.GAMES_EVENTS,
! 'image'   : event.IMAGE_EVENTS
  }
  
--- 206,215 
  
  EVENTS = {
! 'menu': MENU_EVENTS,
! 'input'   : INPUT_EVENTS,
! 'video'   : VIDEO_EVENTS,
! 'audio'   : AUDIO_EVENTS,
! 'games'   : GAMES_EVENTS,
! 'image'   : IMAGE_EVENTS
  }
  




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-devel] Website

2003-05-29 Thread Dirk Meyer
Hi,

Aubin, I like your new website. We should make this our new one. You
should have the permissions to copy the website to sf.net, but maybe
some files belong to Krister or me and you don't have write access on
the file. I have done a chmod g+w, it should be no problem for you to
override my files, Krister: can you do the same?

And we should change the how to download section to describe the
special possiblities for Gentoo and Debian.


Dischi

-- 
There are two ways to write error-free programs. Only the third one
works.



---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src/plugins rom_drives.py,1.8,1.9

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv5979/src/plugins

Modified Files:
rom_drives.py 
Log Message:
small fix again

Index: rom_drives.py
===
RCS file: /cvsroot/freevo/freevo/src/plugins/rom_drives.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rom_drives.py   28 May 2003 15:11:43 -  1.8
--- rom_drives.py   29 May 2003 09:06:18 -  1.9
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.9  2003/05/29 09:06:18  dischi
+ # small fix again
+ #
  # Revision 1.8  2003/05/28 15:11:43  dischi
  # small bugfix
***
*** 576,580 
  media.videoinfo = VideoItem(mplayer_files[0], None)
  media.videoinfo.media = media
! media.videoinfo.media_id = media_id
  
  if movie_info:
--- 579,584 
  media.videoinfo = VideoItem(mplayer_files[0], None)
  media.videoinfo.media = media
! media.videoinfo.media_id = media.id
! media.videoinfo.label = media.label
  
  if movie_info:




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-devel] Re: new event code breaks lirc

2003-05-29 Thread Dirk Meyer
Aubin Paul wrote:
> Unless Dischi has objections, I'll make the change to do something
> like:
>
> ---
>
> if not (e == self.key_event_mapper(code)):
>   e = self.key_event_mapper(osd._cb)
>
Do it. Sorry, I only tested keyboard.

Dischi

-- 
Universe.SYS corrupted. Reboot? [Y/N]


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-devel] Movie directory

2003-05-29 Thread Petri Damstén
Hi,

Most of my folders in movie folder contain only one movie. One movie can have 
many files though (cd1.mpg, cd2.mpg, cdx.sub, movie.nfo, movie.fxd, 
movie.jpg, ...) so saving it to it's own folder is more convenient. But since 
it's only one movie it could be one shown as VideoItem (and not as a folder) 
in movie browser. This way 'real' folders which have more than one item would 
be sorted first and imdb info would be shown for those that have only one 
movie in folder. 

Any comments?


I made some modifications to src/video/__init__.py to implement this feature. 
If there is fxd file with same name as the folder it's handled as VideoItem 
and not as a folder.

return a list of items based on the files
"""
items = []
8<--
for file in copy.copy(files):
if (os.path.isdir(file)):
if (os.path.basename(file)[0] == '.'):
files.remove(file)
continue
f = os.path.join(file, os.path.basename(file) + '.' + 
config.SUFFIX_VIDEO_DEF_FILES[0])
if (os.path.isfile(f)):
x = xml_parser.save_parseMovieFile(f, parent, files)
if x:
files.remove(file)
items += x
8<--
for file in util.find_matches(files, config.SUFFIX_VIDEO_DEF_FILES):
x = xml_parser.save_parseMovieFile(file, parent, files)
if x:

-Petri-





---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src event.py,1.4,1.5

2003-05-29 Thread outlyer
Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv12478

Modified Files:
event.py 
Log Message:
Fix seeking in video too...


Index: event.py
===
RCS file: /cvsroot/freevo/freevo/src/event.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** event.py28 May 2003 19:54:23 -  1.4
--- event.py29 May 2003 03:28:22 -  1.5
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.5  2003/05/29 03:28:22  outlyer
+ # Fix seeking in video too...
+ #
  # Revision 1.4  2003/05/28 19:54:23  outlyer
  # REW/FFWD were reversed (REW was going forward, FFWD was going backwards)
***
*** 290,295 
  'LEFT'  : Event(SEEK, arg=-60),
  'RIGHT' : Event(SEEK, arg=60),
! 'REW'   : Event(SEEK, arg=10),
! 'FFWD'  : Event(SEEK, arg=-10),
  'MENU'  : MENU,
  'DISPLAY'   : TOGGLE_OSD,
--- 293,298 
  'LEFT'  : Event(SEEK, arg=-60),
  'RIGHT' : Event(SEEK, arg=60),
! 'REW'   : Event(SEEK, arg=-10),
! 'FFWD'  : Event(SEEK, arg=10),
  'MENU'  : MENU,
  'DISPLAY'   : TOGGLE_OSD,




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


Re: [Freevo-devel] new event code breaks lirc

2003-05-29 Thread Aubin Paul
Unless Dischi has objections, I'll make the change to do something
like:

---

if not (e == self.key_event_mapper(code)):
e = self.key_event_mapper(osd._cb)

---

Aubin


On Wed, May 28, 2003 at 10:51:23PM +0200, Robert Winder wrote:
> Wednesday, May 28, 2003, 9:51:36 PM, Aubin wrote:
> 
> > Hi Dischi,
> 
> > I don't know if I'm the only one seeing this, but upon updating and
> > restarting freevo, all my remote keypresses were being ignored, so I
> > looked in the rc.poll()
> 
> > And this is what I saw:
> 
> > e = self.key_event_mapper(osd._cb)
> 
> > but I had to change it to:
> 
> > e = self.key_event_mapper(code)
> 
> > otherwise the keypress is discarded, since I'm not using the keyboard,
> > and e was being set to 'None' instead of being checked against the
> > hash.
> 
> > I would commit this change, but I want to make sure I'm not the only
> > one and it's not something peculiar about my system.
> 
> Got same prob after checkout 10 minutes ago.
> 
> 
>/Robert 
> 
> 
> 
> ---
> This SF.net email is sponsored by: eBay
> Get office equipment for less on eBay!
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> ___
> Freevo-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/freevo-devel


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-devel] timeshift plugin

2003-05-29 Thread Rob Shortt
The timeshift.py now lives in src/tv/plugins/, freq.py and v4l2.py are 
in src/tv.  I have committed a plugin for recording with ivtv based 
cards, it is in src/tv/plugins/, and I have begun (nothing in it yet) a 
class for ivtv bindings that extends the Videodev class in v4l2.py.  It 
will have methods to manipulate ivtv-specific setting like bitrate and 
stream type (mpeg1/mpeg2_ps/DVD etc).

-Rob

Thomas Schueppel wrote:
	Hi Rob,

thanks. Indeed timeshift.py is a continuation of the
on in the tv-directory. If I understand the new plugin
stuff right, it should now reside in the tv/plugins
directory to be correctly loaded as a tv-plugin
(same way as tvtime).


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo record_config.py,1.3,1.4

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv32294

Modified Files:
record_config.py 
Log Message:
Plugin to record using an ivtv (PVR-250/350) based capture card.


Index: record_config.py
===
RCS file: /cvsroot/freevo/freevo/record_config.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** record_config.py14 May 2003 12:24:31 -  1.3
--- record_config.py29 May 2003 00:45:52 -  1.4
***
*** 20,23 
--- 20,27 
  
  plugin.activate('plugins.generic_record')
+ # Use the next line instead if you have an ivtv based card (PVR-250/350)
+ # and want freevo to do everthing for you.  TV_SETTINGS must be set up
+ # right in your local_conf.py
+ # plugin.activate('plugins.ivtv_record')
  
  LOGDIR = '/var/log/freevo'




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/tv/plugins ivtv_record.py,NONE,1.1

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/src/tv/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv32294/src/tv/plugins

Added Files:
ivtv_record.py 
Log Message:
Plugin to record using an ivtv (PVR-250/350) based capture card.


--- NEW FILE: ivtv_record.py ---

#if 0 /*
# ---
# ivtv_record.py - A plugin to record tv using an ivtv based card.
# ---
# $Id: ivtv_record.py,v 1.1 2003/05/29 00:45:53 rshortt Exp $
#
# Notes:
# Todo:
#
# ---
# $Log: ivtv_record.py,v $
# Revision 1.1  2003/05/29 00:45:53  rshortt
# Plugin to record using an ivtv (PVR-250/350) based capture card.
#
#
#
# ---
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al. 
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# --- */
#endif

import sys, string
import random
import time, os
import threading
import signal

import config
import tv_util, v4l2
import childapp 
import plugin 

DEBUG = 1

TRUE = 1
FALSE = 0

NORMS = { 'NTSC'  : 0,
  'PAL  ' : 1,
  'SECAM' : 2  }

CHUNKSIZE = 65536


class PluginInterface(plugin.Plugin):
def __init__(self):
plugin.Plugin.__init__(self)

print 'ACTIVATING IVTV RECORD PLUGIN'
plugin.register(Recorder(), 'RECORD')


class Recorder:

def __init__(self):
self.thread = Record_Thread()
self.thread.setDaemon(1)
self.thread.mode = 'idle'
self.thread.start()


def Record(self, rec_prog):

self.thread.mode = 'record'
self.thread.prog = rec_prog
self.thread.mode_flag.set()

print('Recorder::Record: %s' % rec_prog)


def Stop(self):
self.thread.mode = 'stop'
self.thread.mode_flag.set()



class Record_Thread(threading.Thread):

def __init__(self):
threading.Thread.__init__(self)

self.mode = 'idle'
self.mode_flag = threading.Event()
self.prog  = ''
self.app = None

def run(self):
while 1:
print('Record_Thread::run: mode=%s' % self.mode)
if self.mode == 'idle':
self.mode_flag.wait()
self.mode_flag.clear()

elif self.mode == 'record':
print 'Record_Thread::run: started recording'

video_save_file = '%s/%s.mpeg' % (config.DIR_RECORD, 
 string.replace(self.prog.filename,
' ', '_'))

#while self.mode == 'record' and self.app.isAlive():
#time.sleep(0.5)

(v_norm, v_input, v_clist, v_dev) = config.TV_SETTINGS.split()
v_norm = string.upper(v_norm)

v = v4l2.Videodev(v_dev)

print 'Setting chanlist to %s' % v_clist
v.setchanlist(v_clist)

print 'Setting Channel to %s' % self.prog.tunerid
v.setchannel(self.prog.tunerid)

print "Enumerating supported Standards."
try: 
for i in range(0,255):
(index,id,name,junk,junk,junk) = v.enumstd(i)
print "  %i: 0x%x %s" % (index, id, name)
except:
pass
print 'Setting Standard to %s' % v_norm
v.setinput(NORMS.get(v_norm))
print "Current Standard is: 0x%x" % v.getstd()

print "Enumerating supported Inputs."
try:
for i in range(0,255):
(index,name,type,audioset,tuner,std,status) = v.enuminput(i)
print "  %i: %s" % (index, name)
except:
pass
print "Input: %i" % v.getinput()
print "Setting Input to 4"
v.setinput(4)

(driver,card,b

[Freevo-cvslog] freevo/src/tv freq.py,NONE,1.1 v4l2.py,NONE,1.1

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv7413

Added Files:
freq.py v4l2.py 
Log Message:
V4L device control by Thomas Schueppel.


--- NEW FILE: freq.py ---
#if 0 /*
# ---
# freq.py - Video Channel Frequencies
# ---
# $Id: freq.py,v 1.1 2003/05/28 23:32:49 rshortt Exp $
#
# Notes:
# Todo:
#
# ---
# $Log: freq.py,v $
# Revision 1.1  2003/05/28 23:32:49  rshortt
# V4L device control by Thomas Schueppel.
#
#
#
# ---
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al. 
[...1168 lines suppressed...]


CHANLIST = {
 "us-bcast" : dict(NTSC_BCAST),
 "us-cable" : dict(NTSC_CABLE),
 "us-cable-hrc" : dict(NTSC_HRC),
 "japan-bcast"  : dict(NTSC_BCAST_JP),
 "japan-cable"  : dict(NTSC_CABLE_JP),
 "europe-west"  : dict(PAL_EUROPE),
 "europe-east"  : dict(PAL_EUROPE_EAST),
 "italy": dict(PAL_ITALY),
 "newzealand"   : dict(PAL_NEWZEALAND),
 "australia": dict(PAL_AUSTRALIA),
 "ireland"  : dict(PAL_IRELAND),
 "france"   : dict(SECAM_FRANCE),
 "china-bcast"  : dict(PAL_CHINA),
 "canada-cable" : dict(NTSC_CABLE_CAN),
 "southafrica"  : dict(PAL_BCAST_ZA),
 "argentina": dict(ARGENTINA),
}

--- NEW FILE: v4l2.py ---
#if 0 /*
# ---
# v4l2.py - V4L2 python interface.
# ---
# $Id: v4l2.py,v 1.1 2003/05/28 23:32:50 rshortt Exp $
#
# Notes: http://bytesex.org/v4l/spec/
# Todo:
#
# ---
# $Log: v4l2.py,v $
# Revision 1.1  2003/05/28 23:32:50  rshortt
# V4L device control by Thomas Schueppel.
#
#
#
# ---
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al. 
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# --- */
#endif

import freq
import os
import struct
import fcntl

_IOC_NRBITS = 8
_IOC_TYPEBITS = 8
_IOC_SIZEBITS = 14
_IOC_DIRBITS = 2

_IOC_NRMASK = ((1 << _IOC_NRBITS)-1)
_IOC_TYPEMASK = ((1 << _IOC_TYPEBITS)-1)
_IOC_SIZEMASK = ((1 << _IOC_SIZEBITS)-1)
_IOC_DIRMASK = ((1 << _IOC_DIRBITS)-1)

_IOC_NRSHIFT = 0 
_IOC_TYPESHIFT = (_IOC_NRSHIFT+_IOC_NRBITS)
_IOC_SIZESHIFT = (_IOC_TYPESHIFT+_IOC_TYPEBITS)
_IOC_DIRSHIFT = (_IOC_SIZESHIFT+_IOC_SIZEBITS)

# Direction bits.
_IOC_NONE = 0
_IOC_WRITE = 1
_IOC_READ = 2

def _IOC(dir,type,nr,size):
return (((dir)  << _IOC_DIRSHIFT) | \
   (ord(type) << _IOC_TYPESHIFT) | \
   ((nr)   << _IOC_NRSHIFT) | \
   ((size) << _IOC_SIZESHIFT))

def _IO(type,nr): return _IOC(_IOC_NONE,(type),(nr),0)
def _IOR(type,nr,size): return _IOC(_IOC_READ,(type),(nr),struct.calcsize(size))
def _IOW(type,nr,size): return _IOC(_IOC_WRITE,(type),(nr),struct.calcsize(size))
def _IOWR(type,nr,size): return 
_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),struct.calcsize(size))

# used to decode ioctl numbers..
def _IOC_DIR(nr): return (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
def _IOC_TYPE(nr): return (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
def _IOC_NR(nr): return (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
def _IOC_SIZE(nr): return (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)

FREQUENCY_ST = "III32x"
GETFREQ_NO   = _IOWR('V', 56, FREQUENCY_ST)
SETFREQ_NO   = _IOW('V', 57, FREQUENCY_ST)

SETFREQ_NO_V4L = _IOW('v', 15, "L")

QUERYCAP_ST  = "16s32s32sLL16x"
QUERYCAP_NO  = _IOR('V',  0, QUERYCAP_ST)

ENUMSTD_ST   = "LQ24s2LL16x"
ENUMSTD_NO   = _IOWR('V', 25, ENUMSTD_ST)

STANDARD_ST  = "Q"
GETSTD_NO= _IOR('V', 23, STANDARD_ST)
SETSTD_NO= _IOW('V', 24, STANDARD_ST)

ENUMINPUT_ST = "L32sLLLQL16x"
ENUMINPUT_NO = _IOWR('V', 26, ENUMINPUT_ST)

INPUT_ST  = "L";
GETINPUT_NO  = _IOR('V', 38, INPUT_ST)
SETINPUT_NO 

[Freevo-cvslog] freevo/src/tv/plugins timeshift.py,NONE,1.1

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/src/tv/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv7209

Added Files:
timeshift.py 
Log Message:
Timeshift plugin by Thomas Schueppel.  Still WIP.


--- NEW FILE: timeshift.py ---
#if 0 /*
# ---
# timeshift.py - TV Plugin for timeshifted viewing
# ---
# $Id: timeshift.py,v 1.1 2003/05/28 23:31:52 rshortt Exp $
#
# Notes:
# Todo:
#
# ---
# $Log: timeshift.py,v $
# Revision 1.1  2003/05/28 23:31:52  rshortt
# Timeshift plugin by Thomas Schueppel.  Still WIP.
#
#
#
# ---
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 Krister Lagerstrom, et al. 
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# --- */
#endif

import config

import time, os
import threading
import signal

import util# Various utilities
import osd # The OSD class, used to communicate with the OSD daemon
import rc  # The RemoteControl class.
import childapp # Handle child applications
import tv.epg_xmltv as epg # The Electronic Program Guide

import plugin
import v4l2 # Video4Linux2 Python Interface
import pyshift  # Timeshift Interface

# Set to 1 for debug output
DEBUG = config.DEBUG

TRUE = 1
FALSE = 0

TIMESHIFT_READAHEAD = 4 # Amount (in MB) of Data read before shifting 
is started 
TIMESHIFT_INPUT = '/dev/video0' # File to read from
TIMESHIFT_CHUNKSIZE = 65536 # Amount to read repeatedly (in Bytes)

# Create the OSD object
osd = osd.get_singleton()

class PluginInterface(plugin.Plugin):
"""
Plugin to watch tv with mplayer.
"""
def __init__(self):
plugin.Plugin.__init__(self)

# create the mplayer object and register it
plugin.register(MPlayer(), plugin.TV)


class MPlayer:

__muted= 0
__igainvol = 0

def __init__(self):
self.thread = MPlayer_Thread()
self.thread.setDaemon(1)
self.thread.start()
self.tuner_chidx = 0# Current channel, index into config.TV_CHANNELS
self.videodev = None

def TunerSetChannel(self, tuner_channel):
for pos in range(len(config.TV_CHANNELS)):
channel = config.TV_CHANNELS[pos]
if channel[2] == tuner_channel:
self.tuner_chidx = pos
return
print 'ERROR: Cannot find tuner channel "%s" in the TV channel listing' % 
tuner_channel
self.tuner_chidx = 0


def TunerGetChannelInfo(self):
'''Get program info for the current channel'''

(chan_id, chan_name, tuner_id,) = config.TV_CHANNELS[self.tuner_chidx]

channels = epg.get_guide().GetPrograms(start=time.time(),
   stop=time.time(), chanids=[chan_id])

if channels and channels[0] and channels[0].programs:
start_s = time.strftime('%H:%M', 
time.localtime(channels[0].programs[0].start))
stop_s = time.strftime('%H:%M', 
time.localtime(channels[0].programs[0].stop))
ts = '(%s-%s)' % (start_s, stop_s)
prog_info = '%s %s' % (ts, channels[0].programs[0].title)
else:
prog_info = 'No info'

return tuner_id, chan_name, prog_info


def TunerGetChannel(self):
return config.TV_CHANNELS[self.tuner_chidx][2]


def TunerNextChannel(self):
self.tuner_chidx = (self.tuner_chidx+1) % len(config.TV_CHANNELS)


def TunerPrevChannel(self):
self.tuner_chidx = (self.tuner_chidx-1) % len(config.TV_CHANNELS)


def Play(self, mode, tuner_channel=None, channel_change=0):

if tuner_channel != None:

try:
self.TunerSetChannel(tuner_channel)
except ValueError:
pass

if mode == 'tv':
tuner_channel = self.TunerGetChannel()

cf_norm, cf_input, cf_clist, cf_device = config.TV_SETTINGS.split()

w, h = config.TV_VIEW_S

[Freevo-cvslog] freevo/Docs CREDITS,1.21,1.22

2003-05-29 Thread rshortt
Update of /cvsroot/freevo/freevo/Docs
In directory sc8-pr-cvs1:/tmp/cvs-serv5317

Modified Files:
CREDITS 
Log Message:
Adding Thomas Schueppel and Michael Ruelle.


Index: CREDITS
===
RCS file: /cvsroot/freevo/freevo/Docs/CREDITS,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** CREDITS 23 Mar 2003 18:35:28 -  1.21
--- CREDITS 28 May 2003 23:25:07 -  1.22
***
*** 75,76 
--- 75,85 
  Matthieu Weber <[EMAIL PROTECTED]>
  o DTD and implementation of fxd movie informations
+ 
+ Thomas Schueppel <[EMAIL PROTECTED]>
+ o v4l2 python interface
+ o video channel frequencies
+ o timeshift plugin, pyshift modules and mplayer timefhifting patch
+ 
+ Michael Ruelle <[EMAIL PROTECTED]>
+ o Freevo web interface enhancements
+ 




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


Re: [Freevo-devel] new event code breaks lirc

2003-05-29 Thread Robert Winder
Wednesday, May 28, 2003, 9:51:36 PM, Aubin wrote:

> Hi Dischi,

> I don't know if I'm the only one seeing this, but upon updating and
> restarting freevo, all my remote keypresses were being ignored, so I
> looked in the rc.poll()

> And this is what I saw:

> e = self.key_event_mapper(osd._cb)

> but I had to change it to:

> e = self.key_event_mapper(code)

> otherwise the keypress is discarded, since I'm not using the keyboard,
> and e was being set to 'None' instead of being checked against the
> hash.

> I would commit this change, but I want to make sure I'm not the only
> one and it's not something peculiar about my system.

Got same prob after checkout 10 minutes ago.


   /Robert 



---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src event.py,1.3,1.4

2003-05-29 Thread outlyer
Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv17414

Modified Files:
event.py 
Log Message:
REW/FFWD were reversed (REW was going forward, FFWD was going backwards)


Index: event.py
===
RCS file: /cvsroot/freevo/freevo/src/event.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** event.py28 May 2003 17:55:15 -  1.3
--- event.py28 May 2003 19:54:23 -  1.4
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.4  2003/05/28 19:54:23  outlyer
+ # REW/FFWD were reversed (REW was going forward, FFWD was going backwards)
+ #
  # Revision 1.3  2003/05/28 17:55:15  dischi
  # fixed mixer button names
***
*** 306,311 
  'LEFT'  : Event(SEEK, arg=-60),
  'RIGHT' : Event(SEEK, arg=60),
! 'REW'   : Event(SEEK, arg=10),
! 'FFWD'  : Event(SEEK, arg=-10),
  'UP': PLAYLIST_PREV,
  'DOWN'  : PLAYLIST_NEXT,
--- 309,314 
  'LEFT'  : Event(SEEK, arg=-60),
  'RIGHT' : Event(SEEK, arg=60),
! 'REW'   : Event(SEEK, arg=-10),
! 'FFWD'  : Event(SEEK, arg=10),
  'UP': PLAYLIST_PREV,
  'DOWN'  : PLAYLIST_NEXT,




---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-devel] new event code breaks lirc

2003-05-29 Thread Aubin Paul
Hi Dischi,

I don't know if I'm the only one seeing this, but upon updating and
restarting freevo, all my remote keypresses were being ignored, so I
looked in the rc.poll()

And this is what I saw:

e = self.key_event_mapper(osd._cb)

but I had to change it to:

e = self.key_event_mapper(code)

otherwise the keypress is discarded, since I'm not using the keyboard,
and e was being set to 'None' instead of being checked against the
hash.

I would commit this change, but I want to make sure I'm not the only
one and it's not something peculiar about my system.

Aubin


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src/plugins idlebar.py,1.8,1.9

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv7282/src/plugins

Modified Files:
idlebar.py 
Log Message:
pass object to draw to all sub-plugins

Index: idlebar.py
===
RCS file: /cvsroot/freevo/freevo/src/plugins/idlebar.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** idlebar.py  28 May 2003 17:36:27 -  1.8
--- idlebar.py  28 May 2003 18:12:39 -  1.9
***
*** 22,25 
--- 22,28 
  # ---
  # $Log$
+ # Revision 1.9  2003/05/28 18:12:39  dischi
+ # pass object to draw to all sub-plugins
+ #
  # Revision 1.8  2003/05/28 17:36:27  dischi
  # make the weather zone a parameter
***
*** 106,110 
  osd.putsurface(self.toolbar_surface,0,0)
  for p in self.plugins:
! p.draw()
  rect = (0,0,osd.width,75)
  osd.update(rect)
--- 109,113 
  osd.putsurface(self.toolbar_surface,0,0)
  for p in self.plugins:
! p.draw((type, object))
  rect = (0,0,osd.width,75)
  osd.update(rect)
***
*** 121,125 
  self._type = 'idlebar'
  
! def draw(self):
  return
  
--- 124,128 
  self._type = 'idlebar'
  
! def draw(self, (type, object)):
  return
  
***
*** 133,137 
  self.CLOCKFONT = config.OSD_DEFAULT_FONTNAME
  
! def draw(self):
  clock = time.strftime('%a %I:%M %P')
  osd.drawstring(clock,580,40,fgcolor=0xff,font=self.CLOCKFONT,ptsize=12)
--- 136,140 
  self.CLOCKFONT = config.OSD_DEFAULT_FONTNAME
  
! def draw(self, (type, object)):
  clock = time.strftime('%a %I:%M %P')
  osd.drawstring(clock,580,40,fgcolor=0xff,font=self.CLOCKFONT,ptsize=12)
***
*** 161,165 
  return 0
  
! def draw(self):
  if self.checkmail() > 0:
  osd.drawbitmap(self.MAILIMAGE,25,25)
--- 164,168 
  return 0
  
! def draw(self, (type, object)):
  if self.checkmail() > 0:
  osd.drawbitmap(self.MAILIMAGE,25,25)
***
*** 182,186 
  return 0
  
! def draw(self):
  if self.checktv() == 1:
  osd.drawbitmap(self.TVLOCKED,100,25)
--- 185,189 
  return 0
  
! def draw(self, (type, object)):
  if self.checktv() == 1:
  osd.drawbitmap(self.TVLOCKED,100,25)
***
*** 237,241 
  return temperature, icon
  
! def draw(self):
  temp,icon = self.checkweather()
  osd.drawbitmap('plugins/weather/icons/' + icon,160,30)
--- 240,244 
  return temperature, icon
  
! def draw(self, (type, object)):
  temp,icon = self.checkweather()
  osd.drawbitmap('plugins/weather/icons/' + icon,160,30)




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-devel] Re: [PLUGIN] simple diskfree plugin

2003-05-29 Thread Dirk Meyer
den_RDC wrote:
> Well, i created my first plugin for freevo, a simple diskfree plugin. 
> Hopefully somebody will find it usefull. A picture explains more than a 
> thousand words, so check this 
> http://dancevision.blub.be/privboot/df-plugin.jpg .
> It can be put in audio/plugins, video/plugins and image/plugins, but u need to 
> adapt the menuparent variable. If someones nows how to detect this 
> automagically, please tell me.

In CVS. I made the plugin only working for directories to show the df
of the selected directory. The plugin is not active as default. Since
the plugin only provides some informations, maybe we should make it
possible to have items you can't select.


Dischi

-- 
Life can only be understood backwards but it must be lived forwards.


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src/plugins df.py,1.1,1.2

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv32568/src/plugins

Modified Files:
df.py 
Log Message:
moved freespace and totalspace from df.py to util.py

Index: df.py
===
RCS file: /cvsroot/freevo/freevo/src/plugins/df.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** df.py   28 May 2003 17:51:28 -  1.1
--- df.py   28 May 2003 17:58:48 -  1.2
***
*** 11,14 
--- 11,17 
  # ---
  # $Log$
+ # Revision 1.2  2003/05/28 17:58:48  dischi
+ # moved freespace and totalspace from df.py to util.py
+ #
  # Revision 1.1  2003/05/28 17:51:28  dischi
  # added df item plugin for directories from den_RDC
***
*** 38,46 
  
  
- import os
- import sys
- import config
- import statvfs
  import plugin
  
  class PluginInterface(plugin.ItemPlugin):
--- 41,46 
  
  
  import plugin
+ import util
  
  class PluginInterface(plugin.ItemPlugin):
***
*** 52,57 
  if item.type == 'dir':
  diskfree = '%i of %i Mb free'  % \
!( (( self.freespace(item.dir) / 1024) / 1024),
!  ((self.totalspace(item.dir) /1024) /1024))
  return  [ ( self.dud, diskfree) ]
  else:
--- 52,57 
  if item.type == 'dir':
  diskfree = '%i of %i Mb free'  % \
!( (( util.freespace(item.dir) / 1024) / 1024),
!  ((util.totalspace(item.dir) /1024) /1024))
  return  [ ( self.dud, diskfree) ]
  else:
***
*** 59,77 
  return []
  
! def freespace(self, path):
! """ freespace(path) -> integer
! Return the number of bytes available to the user on the file system
! pointed to by path."""
! s = os.statvfs(path)
! return s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE])
! 
! 
! def totalspace(self, path):
! """ totalspace(path) -> integer
! Return the number of total bytes available on the file system
! pointed to by path."""
! s = os.statvfs(path)
! return s[statvfs.F_BLOCKS] * long(s[statvfs.F_BSIZE])
! 
  def dud(self, arg=None, menuw=None):
  pass
--- 59,63 
  return []
  
! 
  def dud(self, arg=None, menuw=None):
  pass




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src util.py,1.26,1.27

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv32568/src

Modified Files:
util.py 
Log Message:
moved freespace and totalspace from df.py to util.py

Index: util.py
===
RCS file: /cvsroot/freevo/freevo/src/util.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** util.py 11 May 2003 16:21:31 -  1.26
--- util.py 28 May 2003 17:58:47 -  1.27
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.27  2003/05/28 17:58:47  dischi
+ # moved freespace and totalspace from df.py to util.py
+ #
  # Revision 1.26  2003/05/11 16:21:31  dischi
  # delete whitespaces at the end in format_text
***
*** 87,90 
--- 90,94 
  import glob
  import os
+ import statvfs
  import string, fnmatch, re
  import md5
***
*** 496,499 
--- 500,522 
  return devices
  
+ def freespace(path):
+ """
+ freespace(path) -> integer
+ Return the number of bytes available to the user on the file system
+ pointed to by path.
+ """
+ s = os.statvfs(path)
+ return s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE])
+ 
+ 
+ def totalspace(path):
+ """
+ totalspace(path) -> integer
+ Return the number of total bytes available on the file system
+ pointed to by path.
+ """
+ s = os.statvfs(path)
+ return s[statvfs.F_BLOCKS] * long(s[statvfs.F_BSIZE])
+ 
  
  #




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src event.py,1.2,1.3

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv30901

Modified Files:
event.py 
Log Message:
fixed mixer button names

Index: event.py
===
RCS file: /cvsroot/freevo/freevo/src/event.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** event.py28 May 2003 15:01:24 -  1.2
--- event.py28 May 2003 17:55:15 -  1.3
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.3  2003/05/28 17:55:15  dischi
+ # fixed mixer button names
+ #
  # Revision 1.2  2003/05/28 15:01:24  dischi
  # improved event handling
***
*** 223,228 
  
  GLOBAL_EVENTS = {
! 'VOLUP' : MIXER_VOLUP,
! 'VOLDOWN'   : MIXER_VOLDOWN,
  'MUTE'  : MIXER_MUTE
  }
--- 226,231 
  
  GLOBAL_EVENTS = {
! 'VOL+'  : MIXER_VOLUP,
! 'VOL-'  : MIXER_VOLDOWN,
  'MUTE'  : MIXER_MUTE
  }




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/plugins df.py,NONE,1.1

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv29244

Added Files:
df.py 
Log Message:
added df item plugin for directories from den_RDC

--- NEW FILE: df.py ---
#if 0 /*
# ---
# df.py - really simple diskfree plugin for freevo
# created by den_RDC
# ---
# $Id: df.py,v 1.1 2003/05/28 17:51:28 dischi Exp $
#
# Notes:
# Todo:
#
# ---
# $Log: df.py,v $
# Revision 1.1  2003/05/28 17:51:28  dischi
# added df item plugin for directories from den_RDC
#
#
# ---
# Freevo - A Home Theater PC framework
# Copyright (C) 2002 Krister Lagerstrom, et al. 
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# --- */
#endif


import os
import sys
import config
import statvfs
import plugin

class PluginInterface(plugin.ItemPlugin):

def __init__(self):
plugin.ItemPlugin.__init__(self)

def actions(self, item): 
if item.type == 'dir':
diskfree = '%i of %i Mb free'  % \
   ( (( self.freespace(item.dir) / 1024) / 1024),
 ((self.totalspace(item.dir) /1024) /1024))
return  [ ( self.dud, diskfree) ]
else:
print item.type
return []

def freespace(self, path):
""" freespace(path) -> integer
Return the number of bytes available to the user on the file system
pointed to by path."""
s = os.statvfs(path)
return s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE])


def totalspace(self, path):
""" totalspace(path) -> integer
Return the number of total bytes available on the file system
pointed to by path."""
s = os.statvfs(path)
return s[statvfs.F_BLOCKS] * long(s[statvfs.F_BSIZE])

def dud(self, arg=None, menuw=None):
pass




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/plugins idlebar.py,1.7,1.8

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv24138/src/plugins

Modified Files:
idlebar.py 
Log Message:
make the weather zone a parameter

Index: idlebar.py
===
RCS file: /cvsroot/freevo/freevo/src/plugins/idlebar.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** idlebar.py  2 May 2003 05:50:31 -   1.7
--- idlebar.py  28 May 2003 17:36:27 -  1.8
***
*** 12,16 
  #   plugin.activate('idlebar.mail',level=10, args=('/var/spool/mail/dmeyer', ))
  #   plugin.activate('idlebar.tv',  level=20)
! #   plugin.activate('idlebar.weather', level=30)
  #   plugin.activate('idlebar.clock',   level=50)
  #   
--- 12,16 
  #   plugin.activate('idlebar.mail',level=10, args=('/var/spool/mail/dmeyer', ))
  #   plugin.activate('idlebar.tv',  level=20)
! #   plugin.activate('idlebar.weather', level=30, args=('timezone', ))
  #   plugin.activate('idlebar.clock',   level=50)
  #   
***
*** 22,25 
--- 22,28 
  # ---
  # $Log$
+ # Revision 1.8  2003/05/28 17:36:27  dischi
+ # make the weather zone a parameter
+ #
  # Revision 1.7  2003/05/02 05:50:31  outlyer
  # Stopgap to workaround a crash...
***
*** 188,194 
  
  class weather(IdleBarPlugin):
! def __init__(self):
  IdleBarPlugin.__init__(self)
! self.METARCODE = 'CYYZ'
  self.WEATHERCACHE = '/var/cache/freevo/weather'
  self.CLOCKFONT = 'skins/fonts/Trebuchet_MS.ttf'
--- 191,197 
  
  class weather(IdleBarPlugin):
! def __init__(self, zone='CYYZ'):
  IdleBarPlugin.__init__(self)
! self.METARCODE = zone
  self.WEATHERCACHE = '/var/cache/freevo/weather'
  self.CLOCKFONT = 'skins/fonts/Trebuchet_MS.ttf'




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src childapp.py,1.9,1.10

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv20201/src

Modified Files:
childapp.py 
Log Message:
fixed bug when child is dead

Index: childapp.py
===
RCS file: /cvsroot/freevo/freevo/src/childapp.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** childapp.py 24 Apr 2003 19:55:44 -  1.9
--- childapp.py 28 May 2003 17:24:23 -  1.10
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.10  2003/05/28 17:24:23  dischi
+ # fixed bug when child is dead
+ #
  # Revision 1.9  2003/04/24 19:55:44  dischi
  # comment cleanup for 1.3.2-pre4
***
*** 157,160 
--- 160,165 
  self._handle_input()
  except IOError:
+ pass
+ except ValueError:
  pass
  




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


Re: [Freevo-devel] New event on tvguide

2003-05-29 Thread Rob Shortt
FABRE Sylvain wrote:
OK, great, i have seen the pictures in the thumnails list and this is what
i am waiting for !!!
For which release is it planned ??
It will be in CVS once I get off my behind and fix up some small isues. ;)

We'll see how things go tonight after work.

-Rob



---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-devel] New event on tvguide

2003-05-29 Thread FABRE Sylvain
OK, great, i have seen the pictures in the thumnails list and this is what
i am waiting for !!!
For which release is it planned ??

> Aubin Paul wrote:
>> Speaking of popups, do we want to come up with a scheme to put the
>> "notification" icons into the skins the same way the left/right etc.
>> arrows work? I'm always reluctant to modify the xml parser, but I have
>> icons for the following (in CVS)
>>
>> skins/images/popup:
>> popup_warn.png
>> popup_wait.png
>> popup_alert.png
>>
>> and they'd all work with the popup system.
>
> I agree, this should be integrated into the skins.
>
>>
>> Also, am I missing something or is it still possible to make a rounded
>> popup window? I'd like to make sure the popups "fit" the curved feel
>> of the skin...
>
> Right now the gui.* code lacks support for rounded boxes/frames but I
> mean for it to be added soon.
>
> -Rob
>
>
>
> ---
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> ___
> Freevo-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/freevo-devel
>



---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-devel] New event on tvguide

2003-05-29 Thread Rob Shortt
Aubin Paul wrote:
Speaking of popups, do we want to come up with a scheme to put the
"notification" icons into the skins the same way the left/right etc.
arrows work? I'm always reluctant to modify the xml parser, but I have
icons for the following (in CVS)
skins/images/popup:
popup_warn.png
popup_wait.png
popup_alert.png
and they'd all work with the popup system. 
I agree, this should be integrated into the skins.

Also, am I missing something or is it still possible to make a rounded
popup window? I'd like to make sure the popups "fit" the curved feel
of the skin...
Right now the gui.* code lacks support for rounded boxes/frames but I 
mean for it to be added soon.

-Rob



---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-devel] New event on tvguide

2003-05-29 Thread Alan Murrell
Hey Rob

http://ettin.danicar.net/freevo/prog_actions_Med.jpg.0.html
> ? :)

I am *very* impressed, and cannot wait for this to
make it into the main Freevo branch.

I recently got digital cable, and love a lot of the
features of the program guide, such as searching for
programs, and setting them up to record, watch, etc. 
It looks like a lot of these features will be making
it into Freevo soon :-)  I just wish my TV card could
handle the digital cable, but I guess for now I'll
just have to be content with using a splitter and only
recording regular cable (as before) with Freevo :-)

Alan


__ 
Post your free ad now! http://personals.yahoo.ca


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-cvslog] freevo/src/video mplayer.py,1.40,1.41

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv6897/video

Modified Files:
mplayer.py 
Log Message:
fixed seeking bug

Index: mplayer.py
===
RCS file: /cvsroot/freevo/freevo/src/video/mplayer.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** mplayer.py  28 May 2003 15:02:02 -  1.40
--- mplayer.py  28 May 2003 15:34:43 -  1.41
***
*** 21,24 
--- 21,27 
  # ---
  # $Log$
+ # Revision 1.41  2003/05/28 15:34:43  dischi
+ # fixed seeking bug
+ #
  # Revision 1.40  2003/05/28 15:02:02  dischi
  # reactivated seeking by first pressing 0
***
*** 410,414 
  
  if event == SEEK:
! self.thread.app.write('seek %s\n', event.arg)
  return TRUE
  
--- 413,417 
  
  if event == SEEK:
! self.thread.app.write('seek %s\n' % event.arg)
  return TRUE
  




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/audio/plugins mplayer.py,1.7,1.8

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv6897/audio/plugins

Modified Files:
mplayer.py 
Log Message:
fixed seeking bug

Index: mplayer.py
===
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/mplayer.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** mplayer.py  28 May 2003 15:02:49 -  1.7
--- mplayer.py  28 May 2003 15:34:43 -  1.8
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.8  2003/05/28 15:34:43  dischi
+ # fixed seeking bug
+ #
  # Revision 1.7  2003/05/28 15:02:49  dischi
  # ported detach plugin to new event model and other small fixes
***
*** 215,219 
  
  elif event == SEEK:
! self.thread.app.write('seek %s\n', event.arg)
  return TRUE
  
--- 218,222 
  
  elif event == SEEK:
! self.thread.app.write('seek %s\n' % event.arg)
  return TRUE
  




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/video mplayer.py,1.39,1.40

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv21820

Modified Files:
mplayer.py 
Log Message:
reactivated seeking by first pressing 0

Index: mplayer.py
===
RCS file: /cvsroot/freevo/freevo/src/video/mplayer.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** mplayer.py  27 May 2003 17:53:35 -  1.39
--- mplayer.py  28 May 2003 15:02:02 -  1.40
***
*** 21,24 
--- 21,27 
  # ---
  # $Log$
+ # Revision 1.40  2003/05/28 15:02:02  dischi
+ # reactivated seeking by first pressing 0
+ #
  # Revision 1.39  2003/05/27 17:53:35  dischi
  # Added new event handler module
***
*** 130,134 
  import osd# The OSD class, used to communicate with the OSD daemon
  import rc # The RemoteControl class.
! import event as em
  import plugin
  
--- 133,138 
  import osd# The OSD class, used to communicate with the OSD daemon
  import rc # The RemoteControl class.
! 
! from event import *
  import plugin
  
***
*** 193,196 
--- 197,202 
  self.filename = None
  self.app_mode = 'video'
+ self.seek = 0
+ self.seek_timer = threading.Timer(0, self.reset_seek)
   
  def play(self, filename, options, item, mode = None):
***
*** 335,339 
  """
  
! if event == em.STOP and not self.seek:
  if self.mode == 'dvdnav':
  self.thread.app.write('dvdnav 6\n')
--- 341,370 
  """
  
! if event == VIDEO_MANUAL_SEEK:
! self.seek = 0
! rc.set_context('input')
! return TRUE
! 
! if event.context == 'input':
! if event in INPUT_ALL_NUMBERS:
! self.reset_seek_timeout()
! self.seek = self.seek * 10 + int(event);
! return TRUE
! 
! elif event == INPUT_ENTER:
! self.seek_timer.cancel()
! self.seek *= 60
! self.thread.app.write('seek ' + str(self.seek) + ' 2\n')
! print "seek "+str(self.seek)+" 2\n"
! self.seek = 0
! return TRUE
! 
! elif event == INPUT_QUIT:
! print 'seek stopped'
! self.seek_timer.cancel()
! self.seek = 0
! return TRUE
! 
! if event == STOP:
  if self.mode == 'dvdnav':
  self.thread.app.write('dvdnav 6\n')
***
*** 343,347 
  return self.item.eventhandler(event)
  
! if event == em.STORE_BOOKMARK:
  # Bookmark the current time into a file
  
--- 374,378 
  return self.item.eventhandler(event)
  
! if event == STORE_BOOKMARK:
  # Bookmark the current time into a file
  
***
*** 357,385 
  return TRUE
  
! if event in ( em.STOP, em.PLAY_END, em.USER_END, em.DVD_PROTECTED ):
  self.stop()
  return self.item.eventhandler(event)
  
! # try to find the event in RC_MPLAYER_CMDS 
! e = config.RC_MPLAYER_CMDS.get(event.name, None)
! if e:
! self.thread.app.write('%s\n' % config.RC_MPLAYER_CMDS[event][0])
  return TRUE
  
! if event == em.MENU:
  if self.mode == 'dvdnav':
  self.thread.app.write('dvdnav 5\n')
  return TRUE
  
! if event == em.TOGGLE_OSD:
  self.thread.app.write('osd\n')
  return TRUE
  
! if event == em.PAUSE or event == em.PLAY:
  self.thread.app.write('pause\n')
  return TRUE
  
! if event == em.SEEK:
! self.thread.app.write('seek %s\n', em.arg)
  return TRUE
  
--- 388,414 
  return TRUE
  
! if event in ( STOP, PLAY_END, USER_END, DVD_PROTECTED ):
  self.stop()
  return self.item.eventhandler(event)
  
! if event == VIDEO_SEND_MPLAYER_CMD:
! self.thread.app.write('%s\n' % event.arg)
  return TRUE
  
! if event == MENU:
  if self.mode == 'dvdnav':
  self.thread.app.write('dvdnav 5\n')
  return TRUE
  
! if event == TOGGLE_OSD:
  self.thread.app.write('osd\n')
  return TRUE
  
! if event == PAUSE or event == PLAY:
  self.thread.app.write('pause\n')
  return TRUE
  
! if event == SEEK:
! self.thread.app.write('seek %s\n', event.arg)
  return TRUE
  
***
*** 407,473 
  #return TRUE
  
- #if event == rc.ENTER:
- 

[Freevo-cvslog] freevo/src/plugins rom_drives.py,1.7,1.8

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv27441

Modified Files:
rom_drives.py 
Log Message:
small bugfix

Index: rom_drives.py
===
RCS file: /cvsroot/freevo/freevo/src/plugins/rom_drives.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** rom_drives.py   27 May 2003 17:53:35 -  1.7
--- rom_drives.py   28 May 2003 15:11:43 -  1.8
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.8  2003/05/28 15:11:43  dischi
+ # small bugfix
+ #
  # Revision 1.7  2003/05/27 17:53:35  dischi
  # Added new event handler module
***
*** 573,576 
--- 576,580 
  media.videoinfo = VideoItem(mplayer_files[0], None)
  media.videoinfo.media = media
+ media.videoinfo.media_id = media_id
  
  if movie_info:




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-wikilog] [Freevo Wiki] Update of "UserInterfaceIdeas"

2003-05-29 Thread freevo-wikilog
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Freevo Wiki" for change 
notification.

The following page has been changed by 194.196.100.116:
http://freevo.sourceforge.net/cgi-bin/moin.cgi/UserInterfaceIdeas

--
@@ -2,6 +2,12 @@
 
 'To be completed...'
 
+It would be nice to have an interface whereby audio sources/files/playlists could be 
selected (presumably using the remote) without needing to turn on the TV. 
+One way to do this might be to allow a limited number (99 for convenient selection 
from a remote keypad?) of presets which would be set up with the video output turned 
on. Each preset would be either a streaming source, an audio file or
+a playlist.
+With LCD output, this could be better still, the user could set up hierarchies of 
presets, and use the remote and the LCD to navigate to the required preset.
+
+
 
 For when the streaming audio support returns, a .fxd (xml) file would be nice to have 
for each 'radio' station as in the following example I made:
 


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-wikilog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-wikilog


[Freevo-cvslog] freevo/src event.py,1.1,1.2 main.py,1.43,1.44

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv21466/src

Modified Files:
event.py main.py 
Log Message:
improved event handling

Index: event.py
===
RCS file: /cvsroot/freevo/freevo/src/event.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** event.py27 May 2003 17:58:07 -  1.1
--- event.py28 May 2003 15:01:24 -  1.2
***
*** 1,3 
--- 1,45 
+ #if 0 /*
+ # ---
+ # event.py - Global events for Freevo
+ # ---
+ # $Id$
+ #
+ # Notes:
+ # Todo:
+ #
+ # ---
+ # $Log$
+ # Revision 1.2  2003/05/28 15:01:24  dischi
+ # improved event handling
+ #
+ #
+ # ---
+ # Freevo - A Home Theater PC framework
+ # Copyright (C) 2002 Krister Lagerstrom, et al. 
+ # Please see the file freevo/Docs/CREDITS for a complete list of authors.
+ #
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or
+ # (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MER-
+ # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ # Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+ # with this program; if not, write to the Free Software Foundation, Inc.,
+ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #
+ # --- */
+ #endif
+ 
+ 
  class Event:
+ """
+ an event is passed to the different eventhandlers in Freevo to
+ activate some action.
+ """
  def __init__(self, name, arg=None, context=None):
  if isinstance(name, Event):
***
*** 17,21 
--- 59,77 
  
  
+ def __str__(self):
+ """
+ return the event as string
+ """
+ return self.name
+ 
+ 
+ def __int__(self):
+ """
+ return the event as int (the last char of the name will be returned
+ as integer value
+ """
+ return int(self.name[-1])
  
+ 
  def __cmp__(self, other):
  """
***
*** 29,71 
  
  
- MIXER_VOLUP= Event('MIXER_VOLUP')
- MIXER_VOLDOWN  = Event('MIXER_VOLDOWN')
- MIXER_MUTE = Event('MIXER_MUTE')
  
- PLAYLIST_NEXT  = Event('PLAYLIST_NEXT')
- PLAYLIST_PREV  = Event('PLAYLIST_PREV')
  
! EJECT  = Event('EJECT')
  
! MENU_LEFT  = Event('MENU_LEFT')
! MENU_RIGHT = Event('MENU_RIGHT')
! MENU_UP= Event('MENU_UP')
! MENU_DOWN  = Event('MENU_DOWN')
! MENU_PAGEUP= Event('MENU_PAGEUP')
! MENU_PAGEDOWN  = Event('MENU_PAGEDOWN')
  
! MENU_GOTO_MAINMENU = Event('MENU_GOTO_MAINMENU')
! MENU_BACK_ONE_MENU = Event('MENU_BACK_ONE_MENU')
  
! MENU_SELECT= Event('MENU_SELECT')
! MENU_PLAY_ITEM = Event('MENU_PLAY_ITEM')
! MENU_SUBMENU   = Event('MENU_SUBMENU')
! MENU_CHANGE_STYLE  = Event('MENU_CHANGE_STYLE')
  
! TV_START_RECORDING = Event('TV_START_RECORDING')
! TV_CHANNEL_UP  = Event('TV_CHANNEL_UP')
! TV_CHANNEL_DOWN= Event('TV_CHANNEL_DOWN')
  
- SEEK   = Event('SEEK')
- PLAY   = Event('PLAY')
- PAUSE  = Event('PAUSE')
- STOP   = Event('STOP')
- STORE_BOOKMARK = Event('STORE_BOOKMARK')
- MENU   = Event('MENU')
- TOGGLE_OSD = Event('TOGGLE_OSD')
  
! GAMES_CONFIG   = Event('GAMES_CONFIG')
! GAMES_RESET= Event('GAMES_RESET')
! GAMES_SNAPSHOT = Event('GAMES_SNAPSHOT')
  
  IMAGE_ZOOM_GRID1   = Event('IMAGE_ZOOM_GRID1')
--- 85,161 
  
  
  
  
! #
! # Default actions Freevo knows
! #
  
! MIXER_VOLUP= Event('MIXER_VOLUP')
! MIXER_VOLDOWN  = Event('MIXER_VOLDOWN')
! MIXER_MUTE = Event('MIXER_MUTE')
!
! PLAYLIST_NEXT  = Event('PLAYLIST_NEXT')
! PLAYLIST_PREV  = Event('PLAYLIST_PREV')
!
! EJECT  = Event('EJECT')
!
! #
! # Menu
! #
  
! MENU_LEFT  = Event('MENU_LEFT')
! MENU_RIGHT = Event('MENU_RIGHT')
! MENU_UP= Event('MENU_UP')
! MENU_DOWN  = Event('MENU_DOWN')
! MENU_PAGEUP= Event('MENU_PAGEUP')
! MENU_PAGEDOWN  = Event('MENU_PAGEDOWN')
!
! MENU_GOTO_MAINMENU = Event('MENU_GOTO_MAINMENU')
! MENU_BACK_ONE_MENU = Event('MENU_BAC

[Freevo-cvslog] freevo/src/image viewer.py,1.23,1.24

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/image
In directory sc8-pr-cvs1:/tmp/cvs-serv22351

Modified Files:
viewer.py 
Log Message:
small bugfixes

Index: viewer.py
===
RCS file: /cvsroot/freevo/freevo/src/image/viewer.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** viewer.py   27 May 2003 17:53:35 -  1.23
--- viewer.py   28 May 2003 15:03:15 -  1.24
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.24  2003/05/28 15:03:15  dischi
+ # small bugfixes
+ #
  # Revision 1.23  2003/05/27 17:53:35  dischi
  # Added new event handler module
***
*** 88,96 
  self.osd_mode = 0# Draw file info on the image
  self.zoom = 0   # Image zoom
! self.zoom_btns = { em.IMAGE_NO_ZOOM.name:0, em.IMAGE_ZOOM_GRID1.name:1,
!em.IMAGE_ZOOM_GRID2.name:2, em.IMAGE_ZOOM_GRID3.name:3,
!em.IMAGE_ZOOM_GRID4.name:4, em.IMAGE_ZOOM_GRID5.name:5,
!em.IMAGE_ZOOM_GRID6.name:6, em.IMAGE_ZOOM_GRID7.name:7,
!em.IMAGE_ZOOM_GRID8.name:8, em.IMAGE_ZOOM_GRID9.name:9 }
  
  self.slideshow = TRUE  # currently in slideshow mode
--- 91,99 
  self.osd_mode = 0# Draw file info on the image
  self.zoom = 0   # Image zoom
! self.zoom_btns = { str(em.IMAGE_NO_ZOOM):0, str(em.IMAGE_ZOOM_GRID1):1,
!str(em.IMAGE_ZOOM_GRID2):2, str(em.IMAGE_ZOOM_GRID3):3,
!str(em.IMAGE_ZOOM_GRID4):4, str(em.IMAGE_ZOOM_GRID5):5,
!str(em.IMAGE_ZOOM_GRID6):6, str(em.IMAGE_ZOOM_GRID7):7,
!str(em.IMAGE_ZOOM_GRID8):8, str(em.IMAGE_ZOOM_GRID9):9 }
  
  self.slideshow = TRUE  # currently in slideshow mode
***
*** 324,329 
  # zoom to one third of the image
  # 1 is upper left, 9 is lower right, 0 zoom off
! elif event in self.zoom_btns:
! self.zoom = self.zoom_btns[event]
  
  if self.zoom:
--- 327,332 
  # zoom to one third of the image
  # 1 is upper left, 9 is lower right, 0 zoom off
! elif str(event) in self.zoom_btns:
! self.zoom = self.zoom_btns[str(event)]
  
  if self.zoom:




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


[Freevo-cvslog] freevo/src/audio/plugins detach.py,1.3,1.4 mplayer.py,1.6,1.7

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv22142

Modified Files:
detach.py mplayer.py 
Log Message:
ported detach plugin to new event model and other small fixes

Index: detach.py
===
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/detach.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** detach.py   27 May 2003 17:53:34 -  1.3
--- detach.py   28 May 2003 15:02:49 -  1.4
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.4  2003/05/28 15:02:49  dischi
+ # ported detach plugin to new event model and other small fixes
+ #
  # Revision 1.3  2003/05/27 17:53:34  dischi
  # Added new event handler module
***
*** 56,65 
  def __init__(self):
  plugin.MainMenuPlugin.__init__(self)
! config.RC_MPLAYER_AUDIO_CMDS['DISPLAY'] = ( self.detach, 'detach player' )
  self.player = None
  self.show_item = menu.MenuItem('Show player', action=self.show)
  
! def detach(self, player):
! gui   = player.playerGUI
  
  # hide the player and show the menu
--- 59,68 
  def __init__(self):
  plugin.MainMenuPlugin.__init__(self)
! config.EVENTS['audio']['DISPLAY'] = em.Event(em.FUNCTION_CALL, 
arg=self.detach)
  self.player = None
  self.show_item = menu.MenuItem('Show player', action=self.show)
  
! def detach(self):
! gui   = plugin.getbyname(plugin.AUDIO_PLAYER).playerGUI
  
  # hide the player and show the menu

Index: mplayer.py
===
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/mplayer.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mplayer.py  27 May 2003 17:53:34 -  1.6
--- mplayer.py  28 May 2003 15:02:49 -  1.7
***
*** 10,13 
--- 10,16 
  # ---
  # $Log$
+ # Revision 1.7  2003/05/28 15:02:49  dischi
+ # ported detach plugin to new event model and other small fixes
+ #
  # Revision 1.6  2003/05/27 17:53:34  dischi
  # Added new event handler module
***
*** 56,68 
  import string
  import threading, signal
  
  import config # Configuration handler. reads config file.
  import util   # Various utilities
  import childapp   # Handle child applications
- import event as em
  
! # RegExp
! import re
  import plugin
  
  DEBUG = config.DEBUG
--- 59,72 
  import string
  import threading, signal
+ import re
  
  import config # Configuration handler. reads config file.
  import util   # Various utilities
  import childapp   # Handle child applications
  
! import rc
  import plugin
+ from event import *
+ 
  
  DEBUG = config.DEBUG
***
*** 195,221 
  """
  
! if event == 'AUDIO_PLAY_END':
! event = em.PLAY_END
  
! if event in ( em.STOP, em.PLAY_END, em.USER_END ):
  self.playerGUI.stop()
  return self.item.eventhandler(event)
  
! # try to find the event in RC_MPLAYER_CMDS 
! e = config.RC_MPLAYER_AUDIO_CMDS.get(event, None)
! if e:
! e = config.RC_MPLAYER_AUDIO_CMDS[event][0]
! if callable(e):
! e(self)
! else:
! self.thread.app.write('%s\n' % e)
! return TRUE
! 
! elif event == em.PAUSE or event == em.PLAY:
  self.thread.app.write('pause\n')
  return TRUE
  
! elif event == em.SEEK:
! self.thread.app.write('seek %s\n', em.arg)
  return TRUE
  
--- 199,219 
  """
  
! if event == AUDIO_PLAY_END:
! event = PLAY_END
  
! if event == AUDIO_SEND_MPLAYER_CMD:
! self.thread.app.write('%s\n' % event.arg)
! return TRUE
! 
! if event in ( STOP, PLAY_END, USER_END ):
  self.playerGUI.stop()
  return self.item.eventhandler(event)
  
! elif event == PAUSE or event == PLAY:
  self.thread.app.write('pause\n')
  return TRUE
  
! elif event == SEEK:
! self.thread.app.write('seek %s\n', event.arg)
  return TRUE
  
***
*** 324,328 
  
  if self.mode == 'play':
! rc.post_event(em.AUDIO_PLAY_END)
  
  self.mode = 'idle'
--- 322,326 
  
  if self.mode == 'play':
! rc.post_event(AUDIO_PLAY_END)
  
  self.mode = 'idle'




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make y

[Freevo-cvslog] freevo freevo_config.py,1.184,1.185

2003-05-29 Thread dischi
Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv21466

Modified Files:
freevo_config.py 
Log Message:
improved event handling

Index: freevo_config.py
===
RCS file: /cvsroot/freevo/freevo/freevo_config.py,v
retrieving revision 1.184
retrieving revision 1.185
diff -C2 -d -r1.184 -r1.185
*** freevo_config.py27 May 2003 17:53:33 -  1.184
--- freevo_config.py28 May 2003 15:01:24 -  1.185
***
*** 142,146 
   the software scaler for fast CPUs'''),
  (3.3,
!  '''Added AUDIO_FORMAT_STRING to customize the audio item title generation''')]
  
  
--- 142,150 
   the software scaler for fast CPUs'''),
  (3.3,
!  '''Added AUDIO_FORMAT_STRING to customize the audio item title generation'''),
! (3.4,
!  '''Removed RC_MPLAYER_CMDS for video and audio. Set special handling (and
!  other key mappings with the variable EVENTS. See event.py for possible
!  events''')]
  
  
***
*** 201,205 
# shutdown
  
! EVENTS = event.default_events
  
  # ==
--- 205,216 
# shutdown
  
! EVENTS = {
! 'menu': event.MENU_EVENTS,
! 'input'   : event.INPUT_EVENTS,
! 'video'   : event.VIDEO_EVENTS,
! 'audio'   : event.AUDIO_EVENTS,
! 'games'   : event.GAMES_EVENTS,
! 'image'   : event.IMAGE_EVENTS
! }
  
  # ==
***
*** 544,565 
  
  LIRCRC = '/etc/freevo/lircrc'
- 
- #
- # List of mplayer commands. It's a simple mapping from buttons on your
- # remote to mplayer slave commands.
- #
- # lirc comand : ( 'mplayer slave command', 'description')
- #
- # For a list of possible mplayer commands read input/input.c from the
- # mplayer source tree -- don't believe the manual ;-)
- #
- # Example to use the SUB button to toggle subtitle visibility:
- #
- # RC_MPLAYER_CMDS = {
- # 'SUB' : ( 'sub_visibility', 'Toggle subtitle visibility' )
- # }
- 
- RC_MPLAYER_CMDS   = {}
- RC_MPLAYER_AUDIO_CMDS = {}
  
  #
--- 555,558 




---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog


Re: [Freevo-devel] New event on tvguide

2003-05-29 Thread Aubin Paul
On Wed, May 28, 2003 at 08:19:42AM -0300, Rob Shortt wrote:
> I have made a new class for each new popup.  They will be residing in 
> the src/tv directory.  I am not sure if this could be hooked in by using 
> a plugin or not, I just added another event in tvguide.py.

Speaking of popups, do we want to come up with a scheme to put the
"notification" icons into the skins the same way the left/right etc.
arrows work? I'm always reluctant to modify the xml parser, but I have
icons for the following (in CVS)

skins/images/popup:
popup_warn.png
popup_wait.png
popup_alert.png

and they'd all work with the popup system. 

Also, am I missing something or is it still possible to make a rounded
popup window? I'd like to make sure the popups "fit" the curved feel
of the skin...

Aubin


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-wikilog] [Freevo Wiki] Update of "HelpContents"

2003-05-29 Thread freevo-wikilog
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Freevo Wiki" for change 
notification.

The following page has been changed by 62.24.67.247:
http://freevo.sourceforge.net/cgi-bin/moin.cgi/HelpContents

--
@@ -19,3 +19,4 @@
 If you find any errors on the help pages, describe them on MoinMoin:HelpErrata. 
 
 ''[Please do not add redundant information on these pages (which has to be maintained 
at two places then), and follow the established structure of help pages. Also note 
that the master set of help pages is not public, that this very page you read and all 
other help pages may be overwritten when the wiki software is updated. So if you have 
major contributions that should not get lost, send an extra notification notice to the 
MoinMoin user mailing list.]''
+úúú


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
Freevo-wikilog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-wikilog