[Camera][TCSACR-312] Add new preview format 08/231508/1
authorHaesu Gwon <haesu.gwon@samsung.com>
Wed, 22 Apr 2020 07:17:31 +0000 (16:17 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Wed, 22 Apr 2020 07:17:31 +0000 (16:17 +0900)
Change-Id: Ie8cd2037012e089908ca2f58dd4fa83e5af615cc

tct-suite-vs/Tizen.Camera.Tests/testcase/TSEncodedPlane.cs

index ec1dd2e..c7a8c4a 100644 (file)
@@ -7,7 +7,9 @@
 // you entered into with Samsung.
 
 using NUnit.Framework;
+using System;
 using System.Linq;
+using System.Threading;
 using System.Threading.Tasks;
 
 namespace Tizen.Multimedia.Tests
@@ -58,5 +60,38 @@ namespace Tizen.Multimedia.Tests
                 }
             }
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether IsDeltaFrame returns expected value or not.")]
+        [Property("SPEC", "Tizen.Multimedia.EncodedPlane.IsDeltaFrame A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void IsDeltaFrame_PROPERTY_READ_ONLY()
+        {
+            var countDownEvent = new CountdownEvent(1);
+
+            EventHandler<PreviewEventArgs> previewEventHandler = (s, o) => {
+                if ((o.Preview.Plane as EncodedPlane).IsDeltaFrame == true)
+                {
+                    countDownEvent.Signal();
+                }
+            };
+
+            TestCamera.Preview += previewEventHandler;
+
+            try
+            {
+                TestCamera.Settings.EncodedPreviewGopInterval = 6;
+                TestCamera.StartPreview();
+
+                Assert.True(countDownEvent.Wait(3000));
+            }
+            finally
+            {
+                TestCamera.Preview -= previewEventHandler;
+            }
+        }
     }
 }