[Test]
[Category("P1")]
- [Description("VideoFrameDecoded test")]
+ [Description("Check if VideoFrameDecoded event is raised")]
[Property("SPEC", "Tizen.Multimedia.Player.VideoFrameDecoded E")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
{
try
{
- var player = await GetPreparedPlayer(Constants.VideoFileSource);
+ var player = GetIdlePlayer();
+ player.SetSource(Constants.VideoFileSource);
+ player.EnableExportingVideoFrame();
+ await player.PrepareAsync();
using (var eventWaiter = EventAwaiter<VideoFrameDecodedEventArgs>.Create())
{
}
}
+ [Test]
+ [Category("P1")]
+ [Description("Check EnableExportingVideoFrame does not throw exceptions")]
+ [Property("SPEC", "Tizen.Multimedia.Player.EnableExportingVideoFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void EnableExportingVideoFrame_CHECK()
+ {
+ try
+ {
+ var player = GetIdlePlayer();
+ player.SetSource(Constants.VideoFileSource);
+
+ Assert.That(() => player.EnableExportingVideoFrame(), Throws.Nothing);
+ }
+ catch(NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.RawVideo) == false)
+ {
+ Assert.Pass($"The feature({Features.RawVideo} is not supported.");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("EnableExportingVideoFrame throw exception if the player is not in a valid state")]
+ [Property("SPEC", "Tizen.Multimedia.Player.EnableExportingVideoFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task EnableExportingVideoFrame_THROWS_IF_NOT_VALID_STATE()
+ {
+ try
+ {
+ var player = await GetPreparedPlayer(Constants.VideoFileSource);
+
+ Assert.That(() => player.EnableExportingVideoFrame(),
+ Throws.InvalidOperationException);
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.RawVideo) == false)
+ {
+ Assert.Pass($"The feature({Features.RawVideo} is not supported.");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the EnableExportingVideoFrame if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.Player.EnableExportingVideoFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void EnableExportingVideoFrame_DISPOSED()
+ {
+ try
+ {
+ GetIdlePlayer().Dispose();
+
+ Assert.That(() => TestPlayer.EnableExportingVideoFrame(),
+ Throws.TypeOf<ObjectDisposedException>());
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.RawVideo) == false)
+ {
+ Assert.Pass($"The feature({Features.RawVideo} is not supported.");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check DisableExportingVideoFrame does not throw exceptions")]
+ [Property("SPEC", "Tizen.Multimedia.Player.DisableExportingVideoFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task DisableExportingVideoFrame_CHECK()
+ {
+ try
+ {
+ var player = GetIdlePlayer();
+ Assert.That(() => player.DisableExportingVideoFrame(), Throws.Nothing);
+
+ player.SetSource(Constants.VideoFileSource);
+ await player.PrepareAsync();
+ Assert.That(() => player.DisableExportingVideoFrame(), Throws.Nothing);
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.RawVideo) == false)
+ {
+ Assert.Pass($"The feature({Features.RawVideo} is not supported.");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("DisableExportingVideoFrame throw exception if the player is not in a valid state")]
+ [Property("SPEC", "Tizen.Multimedia.Player.DisableExportingVideoFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task DisableExportingVideoFrame_THROWS_IF_NOT_VALID_STATE()
+ {
+ try
+ {
+ var player = await GetPlayingPlayer(Constants.VideoFileSource);
+
+ Assert.That(() => player.DisableExportingVideoFrame(),
+ Throws.InvalidOperationException);
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.RawVideo) == false)
+ {
+ Assert.Pass($"The feature({Features.RawVideo} is not supported.");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the DisableExportingVideoFrame if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.Player.DisableExportingVideoFrame M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void DisableExportingVideoFrame_DISPOSED()
+ {
+ try
+ {
+ GetIdlePlayer().Dispose();
+
+ Assert.That(() => TestPlayer.DisableExportingVideoFrame(), Throws.TypeOf<ObjectDisposedException>());
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.RawVideo) == false)
+ {
+ Assert.Pass($"The feature({Features.RawVideo} is not supported.");
+ }
+ }
+ }
#endregion
#region VideoStreamChanged