def test_can_filter_on_key_frames_and_start_stop_frame_and_interval(self):
     job = mpf.VideoJob('Test', FRAME_FILTER_TEST_VIDEO, 5, 21, dict(USE_KEY_FRAMES='true', FRAME_INTERVAL='2'),
                        {}, None)
     cap = mpf_util.VideoCapture(job)
     self.assert_expected_frames_shown(cap, (5, 15))
 def test_can_set_frame_position_on_ts_file(self):
     cap = mpf_util.VideoCapture(test_util.get_data_file_path('bbb24p_00_short.ts'))
     self.assertTrue(cap.set_frame_position(7))
     frame = next(cap)
     self.assertGreater(frame.size, 0)
 def test_can_filter_on_key_frames(self):
     job = mpf.VideoJob('Test', FRAME_FILTER_TEST_VIDEO, 0, 1000, dict(USE_KEY_FRAMES='true'), {}, None)
     cap = mpf_util.VideoCapture(job)
     self.assert_expected_frames_shown(cap, (0, 5, 10, 15, 20, 25))
 def test_no_frames_skipped_when_filter_params_provided_but_frame_filtering_disabled(self):
     cap = mpf_util.VideoCapture(create_video_job(0, 1, 3), True, False)
     self.assert_expected_frames_shown(cap, range(30))