Debian Codegraph @

doc/spec/source/programming_guide/VPL_prg_err.rst

raw
1 .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation
2 ..
3 .. SPDX-License-Identifier: CC-BY-4.0
4
5 ==============================
6 Hardware Device Error Handling
7 ==============================
8
9 For implementations that accelerate decoding, encoding, and video processing
10 through a hardware device, API functions may return errors or warnings
11 if the hardware device encounters errors. See the
12 :ref:`Hardware Device Errors and Warnings table <hw-device-errors-table>` for
13 detailed information about the errors and warnings.
14
15 .. _hw-device-errors-table:
16
17 .. list-table:: Hardware Device Errors and Warnings
18 :header-rows: 1
19 :widths: 60 40
20
21 * - **Status**
22 - **Description**
23 * - :cpp:enumerator:`mfxStatus::MFX_ERR_DEVICE_FAILED`
24 - Hardware device returned unexpected errors. |vpl_short_name| was unable to restore operation.
25 * - :cpp:enumerator:`mfxStatus::MFX_ERR_DEVICE_LOST`
26 - Hardware device was lost due to system lock or shutdown.
27 * - :cpp:enumerator:`mfxStatus::MFX_WRN_PARTIAL_ACCELERATION`
28 - The hardware does not fully support the specified configuration. The encoding, decoding, or video processing operation may be partially accelerated.
29 * - :cpp:enumerator:`mfxStatus::MFX_WRN_DEVICE_BUSY`
30 - Hardware device is currently busy.
31
32
33 |vpl_short_name| **Query**, **QueryIOSurf**, and **Init** functions return
34 :cpp:enumerator:`mfxStatus::MFX_WRN_PARTIAL_ACCELERATION` to indicate that the encoding,
35 decoding, or video processing operation can be partially hardware accelerated or
36 not hardware accelerated at all. The application can ignore this warning and
37 proceed with the operation. (Note that |vpl_short_name| functions may return
38 errors or other warnings overwriting
39 :cpp:enumerator:`mfxStatus::MFX_WRN_PARTIAL_ACCELERATION`, as it is a lower priority warning.)
40
41 |vpl_short_name| functions return :cpp:enumerator:`mfxStatus::MFX_WRN_DEVICE_BUSY` to indicate that the
42 hardware device is busy and unable to receive commands at this time. The recommended approach is:
43
44 * If the asynchronous operation returns synchronization point along with :cpp:enumerator:`mfxStatus::MFX_WRN_DEVICE_BUSY` - call the :cpp:func:`MFXVideoCORE_SyncOperation` with it.
45 * If application has buffered synchronization point(s) obtained from previous asynchronous operations - call :cpp:func:`MFXVideoCORE_SyncOperation` with the oldest one.
46 * If no synchronization point(s) available - wait for a few milliseconds.
47 * Resume the operation by resubmitting the request.
48
49
50 .. literalinclude:: ../snippets/prg_err.c
51 :language: c++
52 :start-after: /*beg1*/
53 :end-before: /*end1*/
54 :lineno-start: 1
55
56 The same procedure applies to encoding and video processing.
57
58 |vpl_short_name| functions return :cpp:enumerator:`mfxStatus::MFX_ERR_DEVICE_LOST` or
59 :cpp:enumerator:`mfxStatus::MFX_ERR_DEVICE_FAILED` to indicate that there is a complete
60 failure in hardware acceleration. The application must close and reinitialize
61 the |vpl_short_name| function class. If the application has provided a hardware acceleration
62 device handle to |vpl_short_name|, the application must reset the device.
63
64
65