Author: dmeyer
Date: Sat Mar 11 19:34:08 2006
New Revision: 1273

Added:
   trunk/WIP/vfs/bin/
   trunk/WIP/vfs/bin/kaa-thumb
      - copied, changed from r1270, /trunk/WIP/thumb2/bin/kaa-thumb2
   trunk/WIP/vfs/src/png.c
      - copied unchanged from r1270, /trunk/WIP/thumb2/src/png.c
   trunk/WIP/vfs/src/thumbd.py
      - copied unchanged from r1270, /trunk/WIP/thumb2/src/server.py
   trunk/WIP/vfs/src/thumbnail.c
      - copied unchanged from r1270, /trunk/WIP/thumb2/src/thumbnail.c
   trunk/WIP/vfs/src/thumbnail.h
      - copied unchanged from r1270, /trunk/WIP/thumb2/src/thumbnail.h
   trunk/WIP/vfs/src/thumbnail.py
      - copied, changed from r1271, /trunk/WIP/thumb2/src/thumbnail.py
   trunk/WIP/vfs/src/videothumb.py
      - copied unchanged from r1270, /trunk/WIP/thumb2/src/videothumb.py
Modified:
   trunk/WIP/vfs/setup.py
   trunk/WIP/vfs/src/__init__.py
   trunk/WIP/vfs/src/item.py

Log:
merge kaa.thumb2 into kaa.vfs

Copied: trunk/WIP/vfs/bin/kaa-thumb (from r1270, 
/trunk/WIP/thumb2/bin/kaa-thumb2)
==============================================================================
--- /trunk/WIP/thumb2/bin/kaa-thumb2    (original)
+++ trunk/WIP/vfs/bin/kaa-thumb Sat Mar 11 19:34:08 2006
@@ -3,7 +3,7 @@
 import sys
 import os
 import kaa
-import kaa.thumb2
+import kaa.vfs
 import kaa.metadata
 
 counter = 0
@@ -30,16 +30,16 @@
     sys.exit(0)
     
 
-size = kaa.thumb2.NORMAL
+size = kaa.vfs.NORMAL
 if sys.argv[1] == '-l':
     sys.argv = sys.argv[1:]
-    size = kaa.thumb2.LARGE
+    size = kaa.vfs.LARGE
 
 
 if sys.argv[1] == '-c':
     print 'clean thumbnails directory'
     listing = []
-    for type in (kaa.thumb2.LARGE, kaa.thumb2.NORMAL):
+    for type in (kaa.vfs.LARGE, kaa.vfs.NORMAL):
         d = os.path.join(os.environ['HOME'], '.thumbnails/%s' % type)
         listing += [ '%s/%s' % (d,x) for x in os.listdir(d) ]
 
@@ -66,7 +66,7 @@
 
 
 for file in sys.argv[1:]:
-    t = kaa.thumb2.Thumbnail(file)
+    t = kaa.vfs.Thumbnail(file)
     t.create(size).connect(finished, t, size)
     counter += 1
 

Modified: trunk/WIP/vfs/setup.py
==============================================================================
--- trunk/WIP/vfs/setup.py      (original)
+++ trunk/WIP/vfs/setup.py      Sat Mar 11 19:34:08 2006
@@ -40,11 +40,27 @@
     print 'kaa.base not installed'
     sys.exit(1)
 
-# check for libdvdread
-ifoparser = Extension('kaa/metadata/disc/ifoparser', ['src/disc/ifomodule.c'],
-                      libraries=[ 'dvdread' ])
+thumbnailer = Extension("kaa.vfs.thumbnailer", ["src/thumbnail.c", "src/png.c" 
],
+                        config='src/config.h')
+
+if not thumbnailer.check_library('imlib2', '1.1.1'):
+    print 'Imlib2 >= 1.1.1 not found'
+    print 'Download from http://enlightenment.freedesktop.org/'
+    sys.exit(1)
+
+if not thumbnailer.check_library('libpng', '1.2.0'):
+    print 'libpng >= 1.2.0 not found'
+    sys.exit(1)
+
+if thumbnailer.check_library('epeg', '0.9'):
+    print 'epeg extention enabled'
+    thumbnailer.config('#define USE_EPEG')
+else:
+    print 'epeg extention disabled'
 
 setup (module      = 'vfs',
        version     = '0.1',
-       description = "Media-oriented VFS"
+       description = "Media-oriented VFS",
+       scripts     = [ 'bin/kaa-thumb' ],
+       ext_modules = [ thumbnailer ]
       )

Modified: trunk/WIP/vfs/src/__init__.py
==============================================================================
--- trunk/WIP/vfs/src/__init__.py       (original)
+++ trunk/WIP/vfs/src/__init__.py       Sat Mar 11 19:34:08 2006
@@ -29,7 +29,7 @@
 #
 # -----------------------------------------------------------------------------
 
-__all__ = [ 'connect', 'get', 'query' ]
+__all__ = [ 'connect', 'get', 'query', 'NORMAL', 'LARGE' ]
 
 import os
 import logging
@@ -37,6 +37,8 @@
 from kaa import ipc
 from client import Client
 
+from thumbnail import Thumbnail, NORMAL, LARGE
+
 # connected client object
 _client = None
 
@@ -55,7 +57,7 @@
 
     if _client:
         return _client
-    
+
     # check logfile
     if not logfile:
         logfile = os.path.join(vfsdb, 'log')

Modified: trunk/WIP/vfs/src/item.py
==============================================================================
--- trunk/WIP/vfs/src/item.py   (original)
+++ trunk/WIP/vfs/src/item.py   Sat Mar 11 19:34:08 2006
@@ -37,9 +37,11 @@
 import stat
 
 # kaa imports
-import kaa.thumb2
 from kaa.strutils import str_to_unicode
 
+# kaa.vfs imports
+from thumbnail import Thumbnail
+
 UNKNOWN = -1
 
 class Item(object):
@@ -94,7 +96,7 @@
     
     def getattr(self, key):
         if key == 'thumbnail' and hasattr(self, 'filename'):
-            return kaa.thumb2.Thumbnail(self.filename, url=self.url)
+            return Thumbnail(self.filename, url=self.url)
 
         if key == 'image':
             image = ''

Copied: trunk/WIP/vfs/src/thumbnail.py (from r1271, 
/trunk/WIP/thumb2/src/thumbnail.py)
==============================================================================
--- /trunk/WIP/thumb2/src/thumbnail.py  (original)
+++ trunk/WIP/vfs/src/thumbnail.py      Sat Mar 11 19:34:08 2006
@@ -157,7 +157,7 @@
 
 
 # connect to ipc
-_server = os.path.join(os.path.dirname(__file__), 'server.py')
+_server = os.path.join(os.path.dirname(__file__), 'thumbd.py')
 _server = ipc.launch(_server, 5, ipc.IPCClient, 
'thumb/socket').get_object('thumb')
 
 _client_id = _server.connect(_callback)


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to