Disclosure of Invention
The invention aims to provide a method for expanding a computer desktop without an additional display card, which can completely control a virtual screen by software, has low cost and low cost, can realize the best effect by self-adapting the resolution according to the resolution of a receiving end, can set the favorite resolution and can change the shape of the virtual desktop.
In order to solve the technical problems, the invention adopts a technical scheme that: the method for expanding the computer desktop without an additional display card is provided, and comprises the following steps:
1) developing a system driver, calling a driving virtual display interface provided by the system, developing an application layer program, communicating with a driver, and controlling the increase and decrease of a virtual screen;
2) developing different receiving end programs, receiving and displaying the expanded screen data sent by the sending end;
3) developing a function capable of controlling and adjusting resolution;
4) the function of adjusting the virtual screen by clipping is developed.
Further, the system driver of step 1) provides a user mode driver model for the indirect display driver model to support monitors that are not connected to the traditional GPU display output.
Further, the indirect display driver is a UMDF driver.
Further, the UMDF driver is developed by an indirect display driver class extension to interact with the windows graphics subsystem in the following manner:
11) creating a graphics adapter representing an indirect display device;
12) a report monitor connected and disconnected with the system;
13) providing an indication of a connected monitor;
14) providing available display modes;
15) support for other display functions, such as hardware mouse cursor, gamma, I2C communications, and protected content;
16) a desktop image to be displayed on a monitor is processed.
Further, the indirect display driver implements functions such as device communication, power management, plug and play, and the like.
Further, the indirect display driver class extensions represent components of the indirect display device using an extensible UMDF object model that allows driver-specific storage to be associated with each indirect display driver class extension.
The invention has the beneficial effects that: the method for expanding the computer desktop without the additional display card can completely control the virtual screen by software, does not need the additional display card, has low cost, can achieve the best effect by self-adapting the resolution according to the resolution of the receiving end, can set the favorite resolution, and can change the virtual desktop shape.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. Examples of these preferred embodiments are illustrated in the accompanying drawings. The embodiments of the invention shown in the drawings and described in accordance with the drawings are exemplary only, and the invention is not limited to these embodiments.
It should be noted that, in order to avoid obscuring the present invention with unnecessary details, only the structures and/or processing steps closely related to the scheme according to the present invention are shown in the drawings, and other details not so relevant to the present invention are omitted.
Also, in the description of the present invention, the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, only for convenience of description and simplification of description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Referring to fig. 1 to 3, an embodiment of the present invention includes: a method for expanding a computer desktop without an additional display card comprises the following steps:
1) developing a system driver, calling a driving virtual display interface provided by the system, developing an application layer program, communicating with a driver, and controlling the increase and decrease of a virtual screen;
2) developing different receiving end programs, receiving and displaying the expanded screen data sent by the sending end;
3) developing a function capable of controlling and adjusting resolution;
4) the function of cutting and adjusting the virtual screen is developed so as to achieve the effect of special shapes such as circles and the like which are wanted by people.
Further, the system driver of step 1) provides a user mode driver model for the indirect display driver model to support monitors that are not connected to the traditional GPU display output.
Further, the indirect display driver is a UMDF driver.
Further, the UMDF driver is developed by an indirect display driver class extension to interact with the windows graphics subsystem in the following manner:
11) creating a graphics adapter representing an indirect display device;
12) a report monitor connected and disconnected with the system;
13) providing an indication of a connected monitor;
14) providing available display modes;
15) support for other display functions, such as hardware mouse cursor, gamma, I2C communications, and protected content;
16) a desktop image to be displayed on a monitor is processed.
Further, the indirect display driver implements functions such as device communication, power management, plug and play, and the like.
Further, the indirect display driver class extensions represent components of the indirect display device using an extensible UMDF object model that allows driver-specific storage to be associated with each indirect display driver class extension.
The embodiment of the invention is shown in FIG. 1, and can extend an infinite number of computer desktops to any terminal with screen display:
1. a plurality of virtual desktops can be virtualized without installing an additional display card on the computer.
2. Multiple desktops can be respectively expanded to different terminal equipment with display screen
3. Multiple desktops can modify the screen projection mode: expansion, replication
4. The virtual desktop can be increased or decreased at will
5. The resolution of the virtual desktop can be adjusted dynamically at will, and 4K is supported to the maximum
6. The display of the virtual desktop may not be square in the conventional sense, but may be virtualized into a shape such as a circle.
The overall process of the embodiment of the present invention is shown in fig. 2:
the design provides a new method for multi-screen display of the computer, the virtual screen is completely controlled by software, no additional display card is needed, the cost is low, the resolution can be self-adaptive according to the resolution of the receiving end to achieve the best effect, the favorite resolution can be set, and the virtual desktop shape can be changed.
The Indirect Display Driver (IDD) model provides a simple user-mode driver model to support monitors that are not connected to a traditional GPU display output. For example, connected to a computer via USB and connected to its conventional (VGA, DVI, HDMI, DP, etc.) converter.
The IDD is a UMDF driver provided by a third party to the device. It interacts with the windows graphics subsystem using the functionality disclosed by IddCx (developed by indirect display driver class extensions) in the following way:
creating a graphics adapter representing an indirect display device;
a report monitor connected and disconnected with the system;
providing an indication of a connected monitor;
providing available display modes;
support for other display functions, such as hardware mouse cursor, gamma, I2C communications, and protected content;
a desktop image to be displayed on a monitor is processed.
Since IDD is a UMDF driver, it is also responsible for implementing all UMDF functions, such as device communication, power management, plug and play, etc.
The IDD runs in session 0 without running any components in the user session, so any driver instability does not affect the stability of the whole system.
An embodiment of the present invention provides an architectural overview as shown in FIG. 3:
IddCx (indirect display driver class extension) uses an extensible UMDF object model to represent components of an indirect display device. The Umdf object model allows driver-specific storage to be associated with each IddCx.
The order of creating the IDD object is as follows:
the driver first creates an IDDCX _ ADAPTER object.
The driver will then create an IDDCX _ MONITOR object.
After creating the IDDCX _ ADAPTER and IDDCX _ MONITOR objects, the operating system will create and send IDDCX _ SWAPCHAIN and IDDCX _ OPMCTX objects to the driver.
More detailed information about these objects is provided below.
IDDCX _ adapt: this object represents a single logical display adapter created by the driver in a two-phase process:
the driver calls the IddCxAdapterInitAsync callback function.
The OS calls the driver's EvtIddCxAdapterInitFinishedDI to complete the initialization.
The IDD model does not explicitly destroy adapter callbacks. Upon successful completion of the adapter initialization sequence, the adapter will be active until the UMDF device delivered at initialization stops. When an adapter is created, the driver provides static adapter information about the indirect display adapter.
The simplest case of handling a multifunction device is that there is a one-to-one mapping between the UMDF device object created by the plug-and-play subsystem of the attached indirect display device and the IDDCX _ ADAPTER object created by the Indirect Display Driver (IDD).
More complex schemes are possible in which a single indirect display connector contains multiple plug-and-play devices. For example, an indirect display solution may have multiple PnP device functions, such as a microphone (audio driver) and a camera (video driver). In this case, the IDD is responsible for creating one IDDCX _ ADAPTER object for the UMDF device objects created by each PnP device. In this scenario, the driver needs to consider the following:
IDDCX _ ADAPTER should be created only after all PnP devices that make up the indirect display solution have successfully booted.
When creating an adapter, the driver must pass a single WDFDEVICE, thus requiring the use of logic to determine which UMDF device it will pass through.
If any of the devices comprising the indirect display adapter experience a hardware error, the driver should report all of the devices that caused the adapter to experience the error.
IDDCX _ MONITOR: this object represents a particular monitor connected to a certain connector on the indirect display adapter.
The driver creates the monitor object in a two-phase process:
it first calls the iddcxminitrorcreate callback to create the IDDCX _ MONITOR object. It then calls the iddcxmitorrarval callback to complete the monitor arrival. When the MONITOR is unplugged, the driver will call the IddCxMonitorDecortiure callback to report that the MONITOR has been unplugged, which will cause the object of IDDCX _ MONITOR to be destroyed. The IddCxMonitorDeparture needs to call the IddCxMonitorDepartureIddCxMonitorArrival sequence again even if the same monitor has been reconnected. IDDCX _ MONITOR is a child object of the IDDCX _ ADAPTER object.
IDDCX _ SWAPCHAIN: this object represents an existence that will provide a desktop image to be displayed on a connected monitor. There are multiple buffers that allow the OS to assemble the next desktop image in one buffer while the IDD accesses another buffer. IDDCX _ SWAPCHAIN is a sub-stage of IDDCX _ MONITOR, and therefore, only one is assigned to the presence of a given MONITOR at any one time.
The OS creates and destroys the IDDCX _ SWAPCHAIN object and assigns/assigns them to monitors using the EvtIddCxMonitorAssignSwapChain and EvtIddMonitorUnssignSwapChain Ddi calls.
IDDCX _ OPMCTX: this object represents an active output protection manager (OPM from a single application OPM context) context that applications can use to control output protection on a single monitor. Multiple OPM contexts on a given monitor may be active at the same time. The operating system calls the driver using the driver's EvtIddCxMonitorOPMCreateProtectedOutput and EvtIdxMonitorOPMDestroyProtectedOutput DDI calls to create and destroy the OPM context.
The invention has the beneficial effects that: the method for expanding the computer desktop without an additional display card can be used without adding any additional computer hardware, mainly adopts the API of the system, develops the UMDF driver according to the API provided by the system, and virtualizes one virtual desktop after another by an application program through controlling the driver, and is mainly used for scenes such as multi-screen office, multi-screen display, multi-screen operation and the like. The method has the advantages of high stability, simple operation, low time delay, strong real-time effect and effective reduction of cost.
Furthermore, it should be noted that in the present specification, "include" or any other variation thereof is intended to cover a non-exclusive inclusion, so that a process, a method, an article or an apparatus including a series of elements includes not only those elements but also other elements not explicitly listed, or further includes elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be understood that although the present description refers to embodiments, not every embodiment contains only a single technical solution, and such description is for clarity only, and those skilled in the art should take the description as a whole, and the technical solutions in the embodiments may be appropriately combined to form other embodiments understood by those skilled in the art.