[Jahshaka-cvs] jah/jahplayer common.py, 1.1, 1.2 encoder.py, 1.17, 1.18
Status: Beta
Brought to you by:
jahshaka
From: Charles Y. <lil...@us...> - 2006-12-14 14:44:35
|
Update of /cvsroot/jahshaka/jah/jahplayer In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18183/jahplayer Modified Files: common.py encoder.py Log Message: + Reduces wrapper to minimum for frame rate conversion and drops some unwanted parameters Index: encoder.py =================================================================== RCS file: /cvsroot/jahshaka/jah/jahplayer/encoder.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- encoder.py 14 Dec 2006 09:45:09 -0000 1.17 +++ encoder.py 14 Dec 2006 14:44:31 -0000 1.18 @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # jahplayer - A widget library representation. # Copyright (C) 2006 VM Inc. @@ -73,34 +75,29 @@ self.rescale_modes[ self.rescale_keys[ 5 ] ] = ( 1440, 1080 ) self.rescale_modes[ self.rescale_keys[ 6 ] ] = ( 1600, 1200 ) - self.fps_keys = [ "Default", "1/5 fps", "1 fps", "12 fps", "15 fps", "24 fps", "PAL", "NTSC", "30 fps", "50 fps", "60 fps" ] + self.fps_keys = [ "Default", "12 fps", "15 fps", "24 fps", "PAL", "NTSC", "30 fps" ] self.fps_modes = { } - self.fps_modes[ self.fps_keys[ 0 ] ] = ( 30, 1 ) - self.fps_modes[ self.fps_keys[ 1 ] ] = ( 1, 5 ) - self.fps_modes[ self.fps_keys[ 2 ] ] = ( 1, 1 ) - self.fps_modes[ self.fps_keys[ 3 ] ] = ( 12, 1 ) - self.fps_modes[ self.fps_keys[ 4 ] ] = ( 15, 1 ) - self.fps_modes[ self.fps_keys[ 5 ] ] = ( 24, 1 ) - self.fps_modes[ self.fps_keys[ 6 ] ] = ( 25, 1 ) - self.fps_modes[ self.fps_keys[ 7 ] ] = ( 30000, 1001 ) - self.fps_modes[ self.fps_keys[ 8 ] ] = ( 30, 1 ) - self.fps_modes[ self.fps_keys[ 9 ] ] = ( 50, 1 ) - self.fps_modes[ self.fps_keys[ 10 ] ] = ( 60, 1 ) + self.fps_modes[ self.fps_keys[ 0 ] ] = ( 25, 1 ) + self.fps_modes[ self.fps_keys[ 1 ] ] = ( 12, 1 ) + self.fps_modes[ self.fps_keys[ 2 ] ] = ( 15, 1 ) + self.fps_modes[ self.fps_keys[ 3 ] ] = ( 24, 1 ) + self.fps_modes[ self.fps_keys[ 4 ] ] = ( 25, 1 ) + self.fps_modes[ self.fps_keys[ 5 ] ] = ( 30000, 1001 ) + self.fps_modes[ self.fps_keys[ 6 ] ] = ( 30, 1 ) - self.audio_keys = [ "12025", "22050", "32000", "44100", "48000" ] + self.audio_keys = [ "22050", "32000", "44100", "48000" ] self.audio_modes = {} - self.audio_modes[ self.audio_keys[ 0 ] ] = 12025 - self.audio_modes[ self.audio_keys[ 1 ] ] = 22050 - self.audio_modes[ self.audio_keys[ 2 ] ] = 32000 - self.audio_modes[ self.audio_keys[ 3 ] ] = 44100 - self.audio_modes[ self.audio_keys[ 4 ] ] = 48000 + self.audio_modes[ self.audio_keys[ 0 ] ] = 22050 + self.audio_modes[ self.audio_keys[ 1 ] ] = 32000 + self.audio_modes[ self.audio_keys[ 2 ] ] = 44100 + self.audio_modes[ self.audio_keys[ 3 ] ] = 48000 self.dv_keys = [ "PAL", "PAL 16:9", "NTSC", "NTSC 16:9" ] self.dv_modes = {} - self.dv_modes[ self.dv_keys[ 0 ] ] = { "rescale": (720, 576), "fps": (25, 1), "sar": (59, 54), "aspect_ratio": 1.0 + 1.0/3 } - self.dv_modes[ self.dv_keys[ 1 ] ] = { "rescale": (720, 576), "fps": (25, 1), "sar": (118, 81), "aspect_ratio": 1.0 + 7.0/9 } - self.dv_modes[ self.dv_keys[ 2 ] ] = { "rescale": (720, 480), "fps": (30000, 1001), "sar": (10, 11), "aspect_ratio": 1.0 + 1.0/3 } - self.dv_modes[ self.dv_keys[ 3 ] ] = { "rescale": (720, 480), "fps": (30000, 1001), "sar": (40, 33), "aspect_ratio": 1.0 + 7.0/9 } + self.dv_modes[ self.dv_keys[ 0 ] ] = { "rescale": (720, 576), "fps": (25, 1), "sar": (59, 54), "aspect_ratio": 4.0 / 3.0 } + self.dv_modes[ self.dv_keys[ 1 ] ] = { "rescale": (720, 576), "fps": (25, 1), "sar": (118, 81), "aspect_ratio": 16.0 / 9.0 } + self.dv_modes[ self.dv_keys[ 2 ] ] = { "rescale": (720, 480), "fps": (30000, 1001), "sar": (10, 11), "aspect_ratio": 4.0 / 3.0 } + self.dv_modes[ self.dv_keys[ 3 ] ] = { "rescale": (720, 480), "fps": (30000, 1001), "sar": (40, 33), "aspect_ratio": 16.0 / 9.0 } # setup the ui self.app = app @@ -209,7 +206,7 @@ "filter:temporal", "in=%i" % ( _in ), "out=%i" % ( out ), - "filter:threader", + #"filter:threader", "filter:wrapper", "fps_num=%i" % ( fps[0] ), "fps_den=%i" % ( fps[1] ) ] Index: common.py =================================================================== RCS file: /cvsroot/jahshaka/jah/jahplayer/common.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- common.py 12 Dec 2006 10:28:24 -0000 1.1 +++ common.py 14 Dec 2006 14:44:31 -0000 1.2 @@ -209,6 +209,7 @@ samples_required = openmedialib.audio_samples_for_frame( self.store_index, self.src_frequency, self.fps_num.value_as_int( ), self.fps_den.value_as_int( ) ) + for i in self.frame_store.keys( ): if i < input_requested: self.frame_store.pop( i ) @@ -226,8 +227,7 @@ frame = self.frame_store[ input_requested ] frame.set_audio( self.reseat.retrieve( samples_required, False ) ) frame.set_fps( self.fps_num.value_as_int( ), self.fps_den.value_as_int( ) ) - frame.set_position( self.in_point.value_as_int( ) + self.map_dest_to_source( self.position ) ) - self.resample( frame ) + frame.set_position( input_requested ) return frame def seek( self, position, relative = False ): |