Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3058 Discussions

In Media SDK How Do We Control The Display Pipe Selection

Tibet_M_
Beginner
259 Views

Hardware: Intel® NUC NUC5i5MYHE/NUC5i5MYBE

Processor and graphics: i5-5300U and HD 5500

OS: Windows 8.1 and Windows 10

Our application, which is a display wall processor, requires synchronized display of display output so that there is no tearing in video when, for example, one source input is displayed on multiple display devices. The HD 5500 graphics unit can drive 3 display pipes at the same time, however, it is not clear how we drive different display pipes as part of the Intel Media SDK. The following describes how to drive different display devices with different Graphics hardware, but there  is no mention or discussion in the Intel Media SDK Reference manual (or its guide) as to how to drive different displays from one graphics unit:

Multiple Monitors
Multiple monitors refer to the machine configuration that multiple graphic devices are available. Some of the graphic devices connect to a display, they become active and accessible under the Microsoft* DirectX* infrastructure. For those graphic devices not connected to a display, they are inactive. Specifically, under the Microsoft Direct3D9* infrastructure, those devices are not accessible.
The SDK uses the adapter number to access to a specific graphic device. Usually, the graphic device that drives the main desktop becomes the primary adapter. Other graphic devices take subsequent adapter numbers after the primary adapter. Under the Microsoft Direct3D9 infrastructure, only active adapters are accessible and thus have an adapter number.
The SDK extends the implementation type mfxIMPL as follows
Implementation Type
Definition
MFX_IMPL_HARDWARE
The SDK should initialize on the primary adapter
MFX_IMPL_HARDWARE2
The SDK should initialize on the 2nd graphic adapter
MFX_IMPL_HARDWARE3
The SDK should initialize on the 3rd graphic adapter
MFX_IMPL_HARDWARE4
The SDK should initialize on the 4th graphic adapter
The application can use the above definitions to instruct the SDK library to initializes on a specific graphic device. The application can also use the following definitions for automatic detection:
167 Intel® Media SDK Reference Manual API Version 1.9
Implementation Type
Definition
MFX_IMPL_HARDWARE_ANY
The SDK should initialize on any graphic adapter
MFX_IMPL_AUTO_ANY
The SDK should initialize on any graphic adapter. If not successful, load the software implementation.
If the application uses the Microsoft* DirectX* surfaces for I/O, it is critical that the application and the SDK works on the same graphic device. It is recommended that the application use the following procedure:
1> The application uses the MFXInit function to initialize the SDK library, with option MFX_IMPL_HARDWARE_ANY or MFX_IMPL_AUTO_ANY. The MFXInit function returns MFX_ERR_NONE if successful.
2> The application uses the MFXQueryIMPL function to check the actual implementation type. The implementation type MFX_IMPL_HARDWARE...MFX_IMPL_HARDWARE4 indicates the graphic adapter the SDK works on.
3> The application creates the Direct3D* device on the respective graphic adapter, and passes it to the SDK through the MFXVideoCORE_SetHandle function.
Finally, similar to the switchable graphics cases, it is possible that the user disconnects monitors from the graphic devices or remaps the primary adapter thus causes interruption. If the interruption occurs during the SDK library initialization, the MFXInit function may return MFX_ERR_UNSUPPORTED. This means hardware acceleration is currently not available. It is recommended that the application initialize the SDK library right before the actual decoding, video processing, and encoding operations to determine the hardware acceleration capability.
If the interruption occurs during decoding, video processing, or encoding operations, the SDK functions will return MFX_ERR_DEVICE_LOST or MFX_ERR_DEVICE_FAILED. The application needs to handle these errors and exit gracefully.

0 Kudos
1 Reply
Sravanthi_K_Intel
259 Views

Hi Tibet,

Thanks for the question. Based on your comment, it seems you want to display one input stream on multiple display monitors. I am not sure if you are referring to the case where the three displays, each displays a third of the input stream or all three are displaying the same input stream fully. For example, for 900x600 resolution stream, is each monitor showing 300x600 or each monitor is showing the entire 900x600. 

In either case, here is one way to achieve the effect: Each of your display device is a monitor and all three are attached to the same computation unit, I assume. If that's the case, you have to use your Microsoft or Linux (depending on the OS you are using) video pipes to enable the effect. MSDK pipeline will return surface pointer (or buffer) of the output after decoding each frame - one can create DirectX objects to use this pointer to control how to display the video across multiple devices. Multi-node or multi-monitor display synchronization is out of scope of MSDK itself and falls with Microsoft or Linux. Here is a good article on Microsoft DirectX objects that explains how to create multi display mode - https://msdn.microsoft.com/en-us/library/windows/desktop/bb205075(v=vs.85).aspx. (If you cannot access the link, please look for DXGI Overview and Programming guide in msdn.microsoft.com).

Regarding the "multiple monitor" you are referring from MSDK manual, here we are talking about a system that has multiple graphics cards and how to select the best implementation to execute MSDK pipeline. I dont think this correlates to what you are doing.

Also, I sent you a private email on this topic and to clear confusion, we can hold a phone call and go over this in much detail. I am afraid I may be misunderstanding your questions.

0 Kudos
Reply