예제 #1
0
 def test_ReadJpg(self):
     video = Video()
     video.open(testenv.testMedia+'emptyBoard001.avi')
     for frame in range(0, 52):
         ret, jpgImage, quit = video.readFrame(show=True)
         assert ret
         assert jpgImage is not None
         height, width = jpgImage.shape[:2]
         # print ("%d: %d x %d" % (frame,width,height))
         assert (width, height) == (640, 480)
     assert video.frames == 52
예제 #2
0
 def test_ReadVideoWithPause(self):
     video = Video()
     video.open(testenv.testMedia+'emptyBoard001.avi')
     for frame in range(0, 62):
         if frame >= 10 and frame < 20:
             video.pause(True)
         else:
             video.pause(False)
         ret, jpgImage, quit = video.readFrame(show=True)
         # print (video.frames)
         assert ret
         assert jpgImage is not None
         height, width = jpgImage.shape[:2]
         # print ("%d: %d x %d" % (frame,width,height))
         assert (width, height) == (640, 480)
     assert video.frames == 52
예제 #3
0
 def test_ReadVideo(self):
     video = Video()
     video.open(testenv.testMedia+'emptyBoard001.avi')
     video.play()
     print ("played %d frames" % (video.frames))
     assert video.frames == 52
예제 #4
0
 def test_ReadVideoWithPostProcess(self):
     video = Video()
     video.open(testenv.testMedia+'emptyBoard001.avi')
     for frame in range(0, 52):
         ret, jpgImage, quit = video.readFrame(show=True, postProcess=video.addTimeStamp)