def processInfo(self, info):
     if "Duration/float" in info and "TimecodeScale/unsigned" in info and 0 < info["Duration/float"].value:
         try:
             seconds = info["Duration/float"].value * info["TimecodeScale/unsigned"].value * 1e-9
             self.duration = timedelta(seconds=seconds)
         except OverflowError:
             # Catch OverflowError for timedelta
             # (long int too large to convert to int)
             pass
     if "DateUTC/date" in info:
         try:
             self.creation_date = dateToDatetime(info["DateUTC/date"].value)
         except OverflowError:
             pass
     if "WritingApp/unicode" in info:
         self.producer = info["WritingApp/unicode"].value
     if "MuxingApp/unicode" in info:
         self.producer = info["MuxingApp/unicode"].value
     if "Title/unicode" in info:
         self.title = info["Title/unicode"].value
Beispiel #2
0
 def processInfo(self, info):
     if "Duration/float" in info \
     and "TimecodeScale/unsigned" in info \
     and 0 < info["Duration/float"].value:
         try:
             seconds = info["Duration/float"].value * info["TimecodeScale/unsigned"].value * 1e-9
             self.duration = timedelta(seconds=seconds)
         except OverflowError:
             # Catch OverflowError for timedelta
             # (long int too large to convert to int)
             pass
     if "DateUTC/date" in info:
         try:
             self.creation_date = dateToDatetime(info["DateUTC/date"].value)
         except OverflowError:
             pass
     if "WritingApp/unicode" in info:
         self.producer = info["WritingApp/unicode"].value
     if "MuxingApp/unicode" in info:
         self.producer = info["MuxingApp/unicode"].value
     if "Title/unicode" in info:
         self.title = info["Title/unicode"].value
Beispiel #3
0
 def processInfo(self, info):
     if "TimecodeScale/unsigned" in info:
         duration = self.getDouble(info, "Duration")
         if duration is not None:
             try:
                 seconds = duration * info["TimecodeScale/unsigned"].value * 1e-9
                 self.duration = timedelta(seconds=seconds)
             except OverflowError:
                 # Catch OverflowError for timedelta (long int too large
                 # to be converted to an int)
                 pass
     if "DateUTC/date" in info:
         try:
             self.creation_date = dateToDatetime(info["DateUTC/date"].value)
         except OverflowError:
             pass
     if "WritingApp/unicode" in info:
         self.producer = info["WritingApp/unicode"].value
     if "MuxingApp/unicode" in info:
         self.producer = info["MuxingApp/unicode"].value
     if "Title/unicode" in info:
         self.title = info["Title/unicode"].value