summaryrefslogtreecommitdiffstats
path: root/lib/oeqa
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2020-03-20 17:02:28 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-03-23 07:55:54 +0800
commit0badb165733c0e12db79c00cc569786354ffe455 (patch)
tree6ecb389bfb19f549d6c690c312773492cfaed249 /lib/oeqa
parente35522c28c63e981ed5f8502000fb40c408c7fa5 (diff)
downloadmeta-intel-0badb165733c0e12db79c00cc569786354ffe455.tar.gz
runtime/intel_mediasdk: Enable sanity test
Sanity test for: - using intel media driver (iHD) - validate intel msdk encode was working through gstreamer - validate intel msdk 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/oeqa')
-rw-r--r--lib/oeqa/runtime/cases/intel_mediasdk.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/intel_mediasdk.py b/lib/oeqa/runtime/cases/intel_mediasdk.py
new file mode 100644
index 00000000..4ae7d580
--- /dev/null
+++ b/lib/oeqa/runtime/cases/intel_mediasdk.py
@@ -0,0 +1,34 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class MsdkTest(OERuntimeTestCase):
6
7 @classmethod
8 def tearDownClass(cls):
9 cls.tc.target.run("rm /tmp/mtest_h264.mp4")
10
11 @OEHasPackage(['gstreamer1.0-plugins-base'])
12 @OEHasPackage(['gstreamer1.0-plugins-good'])
13 @OEHasPackage(['gstreamer1.0-plugins-bad'])
14 @OEHasPackage(['intel-mediasdk'])
15 @OEHasPackage(['intel-media-driver', 'libigfxcmrt7'])
16 def test_gstreamer_can_encode_with_msdk_and_intel_media_driver(self):
17 (status, output) = self.target.run('gst-inspect-1.0 msdk')
18 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
19
20 (status, output) = self.target.run('export LIBVA_DRIVER_NAME=iHD; '
21 'gst-launch-1.0 -ev videotestsrc num-buffers=120 ! timeoverlay ! '
22 'msdkh264enc ! video/x-h264,profile=main ! h264parse ! '
23 'filesink location=/tmp/mtest_h264.mp4')
24 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
25
26 @OETestDepends(['intel_mediasdk.MsdkTest.test_gstreamer_can_encode_with_msdk_and_intel_media_driver'])
27 def test_gstreamer_can_decode_with_msdk_and_intel_media_driver(self):
28 (status, output) = self.target.run('export LIBVA_DRIVER_NAME=iHD; '
29 'gst-launch-1.0 filesrc location=/tmp/mtest_h264.mp4 ! '
30 'h264parse ! msdkh264dec ! '
31 'msdkh265enc rate-control=cbr bitrate=5000 gop-size=30 b-frames=2 ! '
32 'video/x-h265,profile=main ! h265parse ! fakesink')
33 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
34