예제 #1
0
    def testStructs(self):
        v = AVFoundation.AVSampleCursorSyncInfo()
        self.assertIsInstance(v.sampleIsFullSync, bool)
        self.assertIsInstance(v.sampleIsPartialSync, bool)
        self.assertIsInstance(v.sampleIsDroppable, bool)

        v = AVFoundation.AVSampleCursorDependencyInfo()
        self.assertIsInstance(v.sampleIndicatesWhetherItHasDependentSamples,
                              bool)
        self.assertIsInstance(v.sampleHasDependentSamples, bool)
        self.assertIsInstance(v.sampleIndicatesWhetherItDependsOnOthers, bool)
        self.assertIsInstance(v.sampleDependsOnOthers, bool)
        self.assertIsInstance(v.sampleIndicatesWhetherItHasRedundantCoding,
                              bool)
        self.assertIsInstance(v.sampleHasRedundantCoding, bool)

        v = AVFoundation.AVSampleCursorStorageRange()
        self.assertIsInstance(v.offset, (int, long))
        self.assertIsInstance(v.length, (int, long))

        v = AVFoundation.AVSampleCursorChunkInfo()
        self.assertIsInstance(v.chunkSampleCount, (int, long))
        self.assertIsInstance(v.chunkHasUniformSampleSizes, bool)
        self.assertIsInstance(v.chunkHasUniformSampleDurations, bool)
        self.assertIsInstance(v.chunkHasUniformFormatDescriptions, bool)
예제 #2
0
    def testStructs(self):
        v = AVFoundation.AVSampleCursorSyncInfo()
        self.assertIsInstance(v.sampleIsFullSync, bool)
        self.assertIsInstance(v.sampleIsPartialSync, bool)
        self.assertIsInstance(v.sampleIsDroppable, bool)

        v = AVFoundation.AVSampleCursorDependencyInfo()
        self.assertIsInstance(
            v.sampleIndicatesWhetherItHasDependentSamples, bool
        )  # noqa: B950
        self.assertIsInstance(v.sampleHasDependentSamples, bool)
        self.assertIsInstance(v.sampleIndicatesWhetherItDependsOnOthers, bool)
        self.assertIsInstance(v.sampleDependsOnOthers, bool)
        self.assertIsInstance(
            v.sampleIndicatesWhetherItHasRedundantCoding, bool
        )  # noqa: B950
        self.assertIsInstance(v.sampleHasRedundantCoding, bool)

        v = AVFoundation.AVSampleCursorStorageRange()
        self.assertIsInstance(v.offset, int)
        self.assertIsInstance(v.length, int)

        v = AVFoundation.AVSampleCursorChunkInfo()
        self.assertIsInstance(v.chunkSampleCount, int)
        self.assertIsInstance(v.chunkHasUniformSampleSizes, bool)
        self.assertIsInstance(v.chunkHasUniformSampleDurations, bool)
        self.assertIsInstance(v.chunkHasUniformFormatDescriptions, bool)

        v = AVFoundation.AVSampleCursorAudioDependencyInfo()
        self.assertIsInstance(v.audioSampleIsIndependentlyDecodable, bool)
        self.assertIsInstance(v.audioSamplePacketRefreshCount, int)
예제 #3
0
    def testStructs(self):
        v = AVFoundation.AVPixelAspectRatio()
        self.assertIsInstance(v.horizontalSpacing, int)
        self.assertIsInstance(v.verticalSpacing, int)

        v = AVFoundation.AVEdgeWidths()
        self.assertIsInstance(v.left, float)
        self.assertIsInstance(v.top, float)
        self.assertIsInstance(v.right, float)
        self.assertIsInstance(v.bottom, float)
예제 #4
0
    def testStructs(self):
        v = AVFoundation.AVAudio3DPoint()
        self.assertIsInstance(v.x, float)
        self.assertIsInstance(v.y, float)
        self.assertIsInstance(v.z, float)

        self.assertTrue(AVFoundation.AVAudio3DVector, AVFoundation.AVAudio3DPoint)

        v = AVFoundation.AVAudio3DVectorOrientation()
        self.assertIsInstance(v.forward, AVFoundation.AVAudio3DVector)
        self.assertIsInstance(v.up, AVFoundation.AVAudio3DVector)

        v = AVFoundation.AVAudio3DAngularOrientation()
        self.assertIsInstance(v.yaw, float)
        self.assertIsInstance(v.pitch, float)
        self.assertIsInstance(v.roll, float)
예제 #5
0
    def testFunctions(self):
        v = AVFoundation.AVAudioMake3DPoint(1.5, 2.5, 3.5)
        self.assertIsInstance(v, AVFoundation.AVAudio3DPoint)
        self.assertEqual(v.x, 1.5)
        self.assertEqual(v.y, 2.5)
        self.assertEqual(v.z, 3.5)

        v = AVFoundation.AVAudioMake3DVector(1.5, 2.5, 3.5)
        self.assertIsInstance(v, AVFoundation.AVAudio3DVector)
        self.assertEqual(v.x, 1.5)
        self.assertEqual(v.y, 2.5)
        self.assertEqual(v.z, 3.5)

        x = AVFoundation.AVAudioMake3DVector(1.5, 2.5, 3.5)
        y = AVFoundation.AVAudioMake3DVector(2.5, 3.5, 4.5)
        v = AVFoundation.AVAudioMake3DVectorOrientation(x, y)
        self.assertIsInstance(v, AVFoundation.AVAudio3DVectorOrientation)
        self.assertEqual(v.forward, x)
        self.assertEqual(v.up, y)

        v = AVFoundation.AVAudioMake3DAngularOrientation(1.5, 2.5, 3.5)
        self.assertIsInstance(v, AVFoundation.AVAudio3DAngularOrientation)
        self.assertEqual(v.yaw, 1.5)
        self.assertEqual(v.pitch, 2.5)
        self.assertEqual(v.roll, 3.5)
예제 #6
0
 def testFunctions(self):
     v = AVFoundation.AVMakeBeatRange(1.5, 2.5)
     self.assertIsInstance(v, AVFoundation.AVBeatRange)
     self.assertEqual(v.start, 1.5)
     self.assertEqual(v.length, 2.5)
예제 #7
0
 def testStructs(self):
     v = AVFoundation.AVBeatRange()
     self.assertIsInstance(v.start, float)
     self.assertIsInstance(v.length, float)
예제 #8
0
 def testStructs(self):
     v = AVFoundation.AVAudioConverterPrimeInfo()
     self.assertEqual(v.leadingFrames, 0)
     self.assertEqual(v.trailingFrames, 0)