Changeset db5304ba69956c405ec4d52122aeb9d863218024

Show
Ignore:
Timestamp:
12/02/07 21:36:08 (1 year ago)
Author:
Jason Michalski <armooo@armooo.net>
git-committer:
Jason Michalski <armooo@armooo.net> 1196652968 -0600
git-parent:

[f119c965fdada55f12312fd1eed9e5dbc4f32b49], [df37f8482406e455b5a03c8382cad2372571adc4]

git-author:
Jason Michalski <armooo@armooo.net> 1196652968 -0600
Message:

Merge branch 'master' into subfolders-8.3

Conflicts:

config.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • config.py

    r10bf9e4 rdb5304b  
    8484        return True 
    8585 
     86def getOptres(): 
     87    try: 
     88        optres = config.get('Server', 'optres') 
     89        if optres.lower() == 'true': 
     90            return True 
     91        else: 
     92            return False 
     93    except NoOptionError: 
     94        return False 
     95 
    8696def get(section, key): 
    8797    return config.get(section, key) 
     
    116126        return b 
    117127 
     128def nearestTivoHeight(height): 
     129    return nearest(height, getValidHeights()) 
     130 
    118131def nearestTivoWidth(width): 
    119132    return nearest(width, getValidWidths()) 
     
    122135    if tsn and config.has_section('_tivo_' + tsn): 
    123136        try: 
    124             height = int(config.get('_tivo_' + tsn, 'height_br')) 
     137            height = int(config.get('_tivo_' + tsn, 'height')) 
    125138            return nearest(height, getValidHeights()) 
    126139        except NoOptionError: 
     
    129142    try: 
    130143        height = int(config.get('Server', 'height')) 
    131         return nearest(height, getValidHeights()
     144        return nearestTivoHeight(height
    132145    except NoOptionError: #default 
    133146        return 480 
     
    174187        return config.get('Server', 'max_video_br') 
    175188    except NoOptionError: #default to 17M 
    176         return '17M
     189        return '17408k
    177190 
    178191def getBuffSize(): 
  • plugins/video/transcode.py

    r10bf9e4 rdb5304b  
    7676    debug_write(['aspect169:', aspect169, '\n']) 
    7777 
     78    optres = Config.getOptres() 
     79 
     80    debug_write(['optres:', optres, '\n']) 
     81 
     82    if optres: 
     83        optHeight = Config.nearestTivoHeight(height) 
     84        optWidth = Config.nearestTivoWidth(width) 
     85        if optHeight < TIVO_HEIGHT: 
     86            TIVO_HEIGHT = optHeight 
     87        if optWidth < TIVO_WIDTH: 
     88            TIVO_WIDTH = optWidth 
     89 
    7890    d = gcd(height,width) 
    7991    ratio = (width*100)/height 
    8092    rheight, rwidth = height/d, width/d 
    8193 
    82     debug_write(['select_aspect: File=', inFile, ' Type=', type, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' ratio=', ratio, ' rheight=', rheight, ' rwidth=', rwidth, '\n']) 
     94    debug_write(['select_aspect: File=', inFile, ' Type=', type, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' ratio=', ratio, ' rheight=', rheight, ' rwidth=', rwidth, ' TIVO_HEIGHT=', TIVO_HEIGHT, 'TIVO_WIDTH=', TIVO_WIDTH, '\n']) 
    8395 
    8496    multiplier16by9 = (16.0 * TIVO_HEIGHT) / (9.0 * TIVO_WIDTH) 
  • pyTivoConfigurator.py

    r6f08163 rdf37f84  
    88        def buildContainerList(self): 
    99            frame = Frame(self) 
    10             frame.pack(fill=Y, expand=1) 
     10            frame.pack(fill=BOTH, expand=1) 
    1111            scrollbar = Scrollbar(frame, orient=VERTICAL) 
    1212            self.container_list = Listbox(frame, yscrollcommand=scrollbar.set) 
     
    2525 
    2626        def buildButtons(self): 
    27             frame = Frame(
    28             frame.pack(fill=Y, expand=1
     27            frame = Frame(self
     28            frame.pack(fill=X
    2929 
    3030            save_button = Button(frame, text="Save", command=self.save) 
     
    5656        def buildPath(self): 
    5757            frame = Frame(self) 
    58             frame.pack(fill=Y, expand=1
     58            frame.pack(fill=X
    5959            l = Label(frame, text="Path") 
    6060            l.pack(side=LEFT) 
     
    6464 
    6565            self.path = Entry(frame) 
    66             self.path.pack(side=RIGHT, fill=Y, expand=1) 
     66            self.path.pack(side=RIGHT, fill=X, expand=1) 
    6767 
    6868 
     
    9999            Frame.__init__(self, master) 
    100100            self.master.title('pyTivoConfigurator') 
    101             self.pack(
     101            self.pack(fill=BOTH, expand=1
    102102 
    103103            import os