diff options
| author | Yeoh Ee Peng <ee.peng.yeoh@intel.com> | 2020-03-20 17:02:29 +0800 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2020-03-23 07:55:54 +0800 |
| commit | e7520b119cf148989239cda40cac736c3acfcf34 (patch) | |
| tree | 8c5e06646d22737ff0d7e55c02c0f54267d804a9 /lib | |
| parent | 0badb165733c0e12db79c00cc569786354ffe455 (diff) | |
| download | meta-intel-e7520b119cf148989239cda40cac736c3acfcf34.tar.gz | |
runtime/intel_vaapi_driver: Enable sanity test
Sanity test for:
- using intel vaapi driver (i965)
- validate intel vaapi encode was working through gstreamer
- validate intel vaapi decode was working through gstreamer
Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/oeqa/runtime/cases/intel_vaapi_driver.py | 27 |
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..d5989044 --- /dev/null +++ b/lib/oeqa/runtime/cases/intel_vaapi_driver.py | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 2 | from oeqa.runtime.decorator.package import OEHasPackage | ||
| 3 | from oeqa.core.decorator.depends import OETestDepends | ||
| 4 | |||
| 5 | class 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 ! 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)) | ||
