예제 #1
0
 def test_matroska(self):
     fmt = ContainerFormat('matroska')
     self.assertTrue(fmt.is_input)
     self.assertTrue(fmt.is_output)
     self.assertEqual(fmt.name, 'matroska')
     self.assertEqual(fmt.long_name, 'Matroska')
     self.assertIn('mkv', fmt.extensions)
예제 #2
0
 def test_matroska(self):
     fmt = ContainerFormat("matroska")
     self.assertTrue(fmt.is_input)
     self.assertTrue(fmt.is_output)
     self.assertEqual(fmt.name, "matroska")
     self.assertEqual(fmt.long_name, "Matroska")
     self.assertIn("mkv", fmt.extensions)
     self.assertFalse(fmt.no_file)
예제 #3
0
    def test_stream_segment(self):
        # This format goes by two names, check both.
        fmt = ContainerFormat("stream_segment")
        self.assertFalse(fmt.is_input)
        self.assertTrue(fmt.is_output)
        self.assertEqual(fmt.name, "stream_segment")
        self.assertEqual(fmt.long_name, "streaming segment muxer")
        self.assertEqual(fmt.extensions, set())
        self.assertTrue(fmt.no_file)

        fmt = ContainerFormat("ssegment")
        self.assertFalse(fmt.is_input)
        self.assertTrue(fmt.is_output)
        self.assertEqual(fmt.name, "ssegment")
        self.assertEqual(fmt.long_name, "streaming segment muxer")
        self.assertEqual(fmt.extensions, set())
        self.assertTrue(fmt.no_file)
예제 #4
0
 def test_mov(self):
     fmt = ContainerFormat("mov")
     self.assertTrue(fmt.is_input)
     self.assertTrue(fmt.is_output)
     self.assertEqual(fmt.name, "mov")
     self.assertEqual(fmt.long_name, "QuickTime / MOV")
     self.assertIn("mov", fmt.extensions)
     self.assertFalse(fmt.no_file)
예제 #5
0
    def test_mov_options(self):

        mov = ContainerFormat('mov')
        options = mov.descriptor.options
        by_name = {opt.name: opt for opt in options}

        opt = by_name.get('use_absolute_path')

        self.assertIsInstance(opt, Option)
        self.assertEqual(opt.name, 'use_absolute_path')

        # This was not a good option to actually test.
        self.assertIn(opt.type, (OptionType.BOOL, OptionType.INT))
예제 #6
0
 def test_mov(self):
     fmt = ContainerFormat('mov')
     self.assertTrue(fmt.is_input)
     self.assertTrue(fmt.is_output)
     self.assertEqual(fmt.name, 'mov')
     self.assertEqual(fmt.long_name, 'QuickTime / MOV')