summaryrefslogtreecommitdiffstats
path: root/lib/oeqa/runtime/cases/intel_vaapi_driver.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oeqa/runtime/cases/intel_vaapi_driver.py')
-rw-r--r--lib/oeqa/runtime/cases/intel_vaapi_driver.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/intel_vaapi_driver.py b/lib/oeqa/runtime/cases/intel_vaapi_driver.py
new file mode 100644
index 00000000..31e11a81
--- /dev/null
+++ b/lib/oeqa/runtime/cases/intel_vaapi_driver.py
@@ -0,0 +1,27 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class VaapiDriverTest(OERuntimeTestCase):
6
7 @classmethod
8 def tearDownClass(cls):
9 cls.tc.target.run("rm /tmp/vtest_h264.mp4")
10
11 @OEHasPackage(['gstreamer1.0-plugins-base'])
12 @OEHasPackage(['gstreamer1.0-plugins-good'])
13 @OEHasPackage(['gstreamer1.0-vaapi'])
14 @OEHasPackage(['intel-vaapi-driver'])
15 def test_gstreamer_can_encode_with_intel_vaapi_driver(self):
16 (status, output) = self.target.run('gst-inspect-1.0 vaapi')
17 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
18
19 (status, output) = self.target.run('gst-launch-1.0 -ev videotestsrc num-buffers=60 ! '
20 'timeoverlay ! vaapih264enc ! h264parse ! mp4mux ! filesink location=/tmp/vtest_h264.mp4')
21 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
22
23 @OETestDepends(['intel_vaapi_driver.VaapiDriverTest.test_gstreamer_can_encode_with_intel_vaapi_driver'])
24 def test_gstreamer_can_decode_with_intel_vaapi_driver(self):
25 (status, output) = self.target.run('gst-launch-1.0 filesrc location=/tmp/vtest_h264.mp4 ! '
26 'qtdemux ! h264parse ! vaapih264dec ! vaapisink')
27 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))