() => _codec.Configure(format, true, MediaCodecTypes.Software));
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if codec object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.Configure M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Configure_THROWS_IF_DISPOSED()
+ {
+ _codec.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() =>
+ _codec.Configure(VideoDecoderParser.Format, false, MediaCodecTypes.Software),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P2")]
[Description("ProcessInput throws if the specified packet is null")]
Assert.Throws<ArgumentNullException>(() => _codec.ProcessInput(null));
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if codec object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.ProcessInput M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void ProcessInput_THROWS_IF_DISPOSED()
+ {
+ var mediaFormat = new VideoMediaFormat(MediaFormatVideoMimeType.H263, new Size(352, 288));
+
+ _codec.Configure(VideoDecoderParser.Format, false, MediaCodecTypes.Software);
+ _codec.Prepare();
+
+ _codec.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _codec.ProcessInput(MediaPacket.Create(mediaFormat)),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P2")]
[Description("Prepare throws if not configured")]
Assert.Throws<InvalidOperationException>(() => _codec.Prepare());
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if codec object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.Prepare M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Prepare_THROWS_IF_DISPOSED()
+ {
+ _codec.Configure(VideoDecoderParser.Format, false, MediaCodecTypes.Software);
+
+ _codec.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _codec.Prepare(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Unprepare throws if all resources are not unloaded")]
Assert.DoesNotThrow(() => _codec.Unprepare());
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if codec object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.Unprepare M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Unprepare_THROWS_IF_DISPOSED()
+ {
+ _codec.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _codec.Unprepare(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("GetCodecType returns zero if the specified type is not supported")]
Assert.AreEqual(0, (int)_codec.GetCodecType(true, MediaFormatVideoMimeType.Argb));
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if codec object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.GetCodecType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "bool, MediaFormatVideoMimeType")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetCodecType_THROWS_IF_DISPOSED()
+ {
+ _codec.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _codec.GetCodecType(true, MediaFormatVideoMimeType.Argb),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("SupportedAudioCodecs has elements")]
Assert.DoesNotThrow(() => _codec.FlushBuffers());
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if codec object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.FlushBuffers M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void FlushBuffers_THROWS_IF_DISPOSED()
+ {
+ _codec.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _codec.FlushBuffers(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Check if the codec is not supported in MediaCodec")]