def open(self): MovieOutputStream.open(self) # open window (x, y, w, h) = self.info.clipping self.imagesize = (int(w * (self.info.scaling or 1)), int(h * (self.info.scaling or 1))) self.screen = SWFScreen(x, y, w, h) (self.winwidth, self.winheight) = self.imagesize self.font = pygame.font.SysFont(pygame.font.get_default_font(), self.font_size) (fw1, fh1) = self.font.size('00000 ') (fw2, fh2) = self.font.size('[>] ') self.panel_x0 = 0 self.panel_x1 = fw1 self.panel_x2 = fw1 + fw2 self.panel_y0 = self.winheight self.panel_y1 = self.winheight + fh1 / 2 self.panel_h = fh1 self.panel_w = lowerbound(64, self.winwidth - fw1 - fw2 - 4) self.slide_h = fh1 / 2 self.slide_w = 8 self.actualwidth = self.panel_w + fw1 + fw2 + 4 self.window = pygame.display.set_mode( (self.actualwidth, self.winheight + self.panel_h)) self.playing = True return
def open(self): MovieOutputStream.open(self) # open window (x, y, w, h) = self.info.clipping self.imagesize = (int(w * (self.info.scaling or 1)), int(h * (self.info.scaling or 1))) self.screen = SWFScreen(x, y, w, h) (self.winwidth, self.winheight) = self.imagesize self.font = pygame.font.SysFont(pygame.font.get_default_font(), self.font_size) (fw1, fh1) = self.font.size("00000 ") (fw2, fh2) = self.font.size("[>] ") self.panel_x0 = 0 self.panel_x1 = fw1 self.panel_x2 = fw1 + fw2 self.panel_y0 = self.winheight self.panel_y1 = self.winheight + fh1 / 2 self.panel_h = fh1 self.panel_w = lowerbound(64, self.winwidth - fw1 - fw2 - 4) self.slide_h = fh1 / 2 self.slide_w = 8 self.actualwidth = self.panel_w + fw1 + fw2 + 4 pygame.display.set_caption(self.info.filename, self.info.filename) self.window = pygame.display.set_mode((self.actualwidth, self.winheight + self.panel_h)) self.cursor_image = None self.cursor_pos = None self.playing = True self.mp3_out = self.mp3_dec = None # import pymedia # self.mp3_out = subprocess.Popen(['mpg123','-q','-'], stdin=subprocess.PIPE) # self.mp3_dec = pymedia.audio.acodec.Decoder('mp3') # self.mp3_out = pymedia.audio.sound.Output(44100,2,pymedia.audio.sound.AFMT_S16_LE) return
def open(self): MovieOutputStream.open(self) # open window (x,y,w,h) = self.info.clipping self.imagesize = ( int(w*(self.info.scaling or 1)), int(h*(self.info.scaling or 1)) ) self.screen = SWFScreen(x, y, w, h) (self.winwidth, self.winheight) = self.imagesize self.font = pygame.font.SysFont(pygame.font.get_default_font(), self.font_size) (fw1,fh1) = self.font.size('00000 ') (fw2,fh2) = self.font.size('[>] ') self.panel_x0 = 0 self.panel_x1 = fw1 self.panel_x2 = fw1+fw2 self.panel_y0 = self.winheight self.panel_y1 = self.winheight + fh1/2 self.panel_h = fh1 self.panel_w = lowerbound(64, self.winwidth-fw1-fw2-4) self.slide_h = fh1/2 self.slide_w = 8 self.actualwidth = self.panel_w+fw1+fw2+4 pygame.display.set_caption(self.info.filename, self.info.filename) self.window = pygame.display.set_mode((self.actualwidth, self.winheight+self.panel_h)) self.cursor_image = None self.cursor_pos = None self.playing = True self.mp3_out = self.mp3_dec = None #import pymedia #self.mp3_out = subprocess.Popen(['mpg123','-q','-'], stdin=subprocess.PIPE) #self.mp3_dec = pymedia.audio.acodec.Decoder('mp3') #self.mp3_out = pymedia.audio.sound.Output(44100,2,pymedia.audio.sound.AFMT_S16_LE) return