diff options
Diffstat (limited to 'lib/oeqa/runtime')
| -rw-r--r-- | lib/oeqa/runtime/cases/intel_mediasdk.py | 34 |
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 @@ | |||
| 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 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 | |||
