Exemplo n.º 1
0
 def open(self, fname):
     FLVParser.open(self, fname)
     self.movie.info.set_framerate(self.framerate)
     for (tag, _, _, offset) in self.tags:
         if tag == 9:
             self.fp.seek(offset + 1)
             self.setbuff()
             (_, imagewidth) = self.readbits(4), self.readbits(12)
             (_, imageheight) = self.readbits(4), self.readbits(12)
             self.movie.info.set_defaults(imagewidth, imageheight)
             break
     self.frames = []
     tagids = []
     for (tagid, (_, _, t, _)) in enumerate(self.tags):
         if len(self.frames) * 1000 / self.framerate < t:
             self.frames.append(tagids)
             tagids = []
         tagids.append(tagid)
     self.frames.append(tagids)
     return
Exemplo n.º 2
0
 def open(self, fname):
   FLVParser.open(self, fname)
   self.movie.info.set_framerate(self.framerate)
   for (tag, _, _, offset) in self.tags:
     if tag == 9:
       self.fp.seek(offset+1)
       self.setbuff()
       (_, imagewidth) = self.readbits(4), self.readbits(12)
       (_, imageheight) = self.readbits(4), self.readbits(12)
       self.movie.info.set_defaults(imagewidth, imageheight)
       break
   self.frames = []
   tagids = []
   for (tagid,(_,_,t,_)) in enumerate(self.tags):
     if len(self.frames)*1000 / self.framerate < t:
       self.frames.append(tagids)
       tagids = []
     tagids.append(tagid)
   self.frames.append(tagids)
   return
Exemplo n.º 3
0
 def __init__(self, movie, read_mp3, debug=0):
     FLVParser.__init__(self, debug=debug)
     self.movie = movie
     self.read_mp3 = read_mp3
     self.framerate = 12
     return
Exemplo n.º 4
0
 def __init__(self, movie, read_mp3, debug=0):
   FLVParser.__init__(self, debug=debug)
   self.movie = movie
   self.read_mp3 = read_mp3
   self.framerate = 12
   return