public void CheckCorrectAudioValueListTest() { //Arrange var serviceConfigurator = Factory.CreateMp4MetadataServiceConfigurator(); var metadata = new VideoMetadata() { AudioBps = serviceConfigurator.AudioBps720P1Channel, AudioChannel = AudioChannel.One, AudioCodec = "AAC", AudioProfile = "LC", VideoBps = serviceConfigurator.VideoBps1920X1080, VideoCodec = "AVC", VideoProfile = "Baseline", VideoFps = serviceConfigurator.MaxFps - 1, VideoKeyFrame = serviceConfigurator.KeyFrame, Width = 4096, Height = 2304 }; var metadataService = new MetadataService(serviceConfigurator, metadata); //Act metadataService.AdjustAudioBps(); metadataService.AdjustAudioCodec(); metadataService.AdjustAudioProfile(); //Assert Assert.IsTrue(metadataService.CorrectAudioValueList.All((b) => b.Value)); }
public void CheckCorrectAudioValueListTest() { //Arrange MetadataServiceConfigurator serviceConfigurator = Factory.CreateMp4MetadataServiceConfigurator(); var metadata = new VideoMediaInfo { AudioBitRate = serviceConfigurator.AudioBps720P1Channel, AudioChannels = (int)AudioChannel.One, AudioFormat = "AAC", AudioFormatProfile = "LC", VideoWidth = 4096, VideoHeight = 2304 }; var metadataService = new MetadataService(serviceConfigurator, metadata); //Act metadataService.AdjustAudioBps(); metadataService.AdjustAudioCodec(); metadataService.AdjustAudioProfile(); //Assert Assert.IsTrue(metadataService.CorrectAudioValueList.All((b) => b.Value)); }
public void AdjustAudioProfileTest() { //Arrange const string myCodec1 = "myCodec1"; const string myCodec2 = "myCodec2"; const string anotherProfile = "anotherProfile"; const string firstProfile = "firstProfile"; var audioCodec = new CodecData(myCodec1, null, firstProfile); var supportedAudioCodecs = new List <CodecData>() { audioCodec, new CodecData(myCodec2, null) }; var serviceConfigurator = new MetadataServiceConfigurator(null, null, null, audioCodec, supportedAudioCodecs); var metadata1 = new VideoMetadata() { AudioCodec = myCodec1, AudioProfile = firstProfile }; var metadata2 = new VideoMetadata() { AudioCodec = myCodec1, AudioProfile = anotherProfile }; var metadata3 = new VideoMetadata() { AudioCodec = myCodec2, AudioProfile = anotherProfile }; var metadataWithoutProfile = new VideoMetadata() { AudioCodec = myCodec1, AudioProfile = null }; var metadataService1 = new MetadataService(serviceConfigurator, metadata1); var metadataService2 = new MetadataService(serviceConfigurator, metadata2); var metadataService3 = new MetadataService(serviceConfigurator, metadata3); var metadataService4 = new MetadataService(serviceConfigurator, metadataWithoutProfile); //Act var profile1 = metadataService1.AdjustAudioProfile(); var profile2 = metadataService2.AdjustAudioProfile(); var profile3 = metadataService3.AdjustAudioProfile(); var profile4 = metadataService4.AdjustAudioProfile(); //Assert Assert.AreEqual(firstProfile, profile1); Assert.AreEqual(firstProfile, profile2); Assert.AreEqual(anotherProfile, profile3); Assert.AreEqual(firstProfile, profile4); }
public void CheckCorrectAudioValueListTest() { //Arrange var serviceConfigurator = Factory.CreateMp4MetadataServiceConfigurator(); var metadata = new VideoMetadata() { AudioBps = serviceConfigurator.AudioBps720P1Channel, AudioChannel = AudioChannel.One, AudioCodec = "AAC", AudioProfile = "LC", VideoBps = serviceConfigurator.VideoBps1920X1080, VideoCodec = "AVC", VideoProfile = "Baseline", VideoFps = serviceConfigurator.MaxFps - 1, VideoKeyFrame = serviceConfigurator.KeyFrame, Width = 4096, Height = 2304 }; var metadataService = new MetadataService(serviceConfigurator, metadata); //Act metadataService.AdjustAudioBps(); metadataService.AdjustAudioCodec(); metadataService.AdjustAudioProfile(); //Assert Assert.IsTrue(metadataService.CorrectAudioValueList.All((b) => b.Value)); }
public void AdjustAudioProfileTest() { //Arrange const string myCodec1 = "myCodec1"; const string myCodec2 = "myCodec2"; const string anotherProfile = "anotherProfile"; const string firstProfile = "firstProfile"; var audioCodec = new CodecData(myCodec1, null, firstProfile); var supportedAudioCodecs = new List<CodecData>() { audioCodec, new CodecData(myCodec2,null) }; var serviceConfigurator = new MetadataServiceConfigurator(null, null, null, audioCodec, supportedAudioCodecs); var metadata1 = new VideoMetadata() { AudioCodec = myCodec1, AudioProfile = firstProfile }; var metadata2 = new VideoMetadata() { AudioCodec = myCodec1, AudioProfile = anotherProfile }; var metadata3 = new VideoMetadata() { AudioCodec = myCodec2, AudioProfile = anotherProfile }; var metadataWithoutProfile = new VideoMetadata() { AudioCodec = myCodec1, AudioProfile = null }; var metadataService1 = new MetadataService(serviceConfigurator, metadata1); var metadataService2 = new MetadataService(serviceConfigurator, metadata2); var metadataService3 = new MetadataService(serviceConfigurator, metadata3); var metadataService4 = new MetadataService(serviceConfigurator, metadataWithoutProfile); //Act var profile1 = metadataService1.AdjustAudioProfile(); var profile2 = metadataService2.AdjustAudioProfile(); var profile3 = metadataService3.AdjustAudioProfile(); var profile4 = metadataService4.AdjustAudioProfile(); //Assert Assert.AreEqual(firstProfile, profile1); Assert.AreEqual(firstProfile, profile2); Assert.AreEqual(anotherProfile, profile3); Assert.AreEqual(firstProfile, profile4); }
public void CheckCorrectAudioValueListTest() { //Arrange MetadataServiceConfigurator serviceConfigurator = Factory.CreateMp4MetadataServiceConfigurator(); var metadata = new VideoMediaInfo { AudioBitRate = serviceConfigurator.AudioBps720P1Channel, AudioChannels = (int) AudioChannel.One, AudioFormat = "AAC", AudioFormatProfile = "LC", VideoWidth = 4096, VideoHeight = 2304 }; var metadataService = new MetadataService(serviceConfigurator, metadata); //Act metadataService.AdjustAudioBps(); metadataService.AdjustAudioCodec(); metadataService.AdjustAudioProfile(); //Assert Assert.IsTrue(metadataService.CorrectAudioValueList.All((b) => b.Value)); }