Video stream management for remote graphical user interfaces

Embodiments enable display updates other than a video stream in a graphical user interface (GUI) to be rendered, encoded, and transmitted exclusive of the video stream. A virtual machine generates a GUI that includes an encoded video stream and other display updates. A virtual graphics processing unit (VGPU) stack associated with the VM renders the other display updates of the GUI to a framebuffer. The rendered display updates are encoded and transmitted to a client for display. The encoded video stream, or a modified (e.g., reduced bit rate) version of the encoded video stream, may be transmitted to the client, such that the client can display the encoded video stream within the GUI. For example, the encoded video stream may be selectively transmitted to the client based on the performance capabilities of the client.

BACKGROUND

Remote desktop technology allows a user of a client computing device to interact with a graphical user interface (e.g., a desktop interface) that is managed by a server computing device. The graphical user interface (GUI) includes display information to be presented on a display for a user. For example, display updates generated by software applications executed by the server may be rendered to a framebuffer at the server and then transmitted to the client for display. The framebuffer stores pixel color values for every pixel for an output display. Remote desktop and computing applications export the GUI to a remote device, referred to herein as the “client device.” Conversely, user inputs (e.g., mouse clicks and keystrokes) at the client device may be transmitted to the server for input into applications or other software running at the server.

To limit the amount of data transferred between the server and client, the GUI may be encoded. For example, the server may compress every frame and/or calculate differences between a current rendering (e.g., frame) of the desktop interface and a previous rendering, and transmit the differences to the client, rather than transmitting the entirety of the desktop interface.

Further, the desktop interface may be “virtual,” generated by a virtual machine (VM) executed by the server. In such virtual desktop infrastructures (VDIs), the GUI may be rendered by a virtual graphics processing unit (VGPU) stack associated with the VM, encoded, and transmitted to the client for display. When a video stream provided in encoded form is to be displayed within the desktop interface, the VGPU decodes the encoded video stream and renders the decoded video stream within the desktop interface. The desktop interface, including the decoded video stream, is then encoded and transmitted to the client.

SUMMARY

The methods and systems described herein enable display updates other than a video stream in a graphical user interface (GUI), such as a virtual desktop, to be transmitted to a client exclusive of the video stream. In exemplary embodiments, a VM executed by a server generates a GUI that includes an encoded video stream and other display updates. A virtual graphics processing unit (VGPU) stack associated with the VM renders the other display updates of the GUI to a framebuffer without decoding or rendering the video stream to the framebuffer. The server encodes the rendered display updates and transmits the encoded display updates to a client for display. In some embodiments, the encoded video stream, or a modified (e.g., reduced bit rate) version of the encoded video stream, is transmitted to the client using a communication channel other than the communication channel used to transmit the encoded GUI, such that the client can decode and display the encoded video stream within the GUI.

DETAILED DESCRIPTION

Embodiments described herein facilitate reducing server computing load in a virtual desktop infrastructure (VDI) by rendering display updates to a graphical user interface (GUI) other than a video stream, and encoding and transmitting the rendered display updates, exclusive of the video stream, to a client. Accordingly, the encoded video stream need not be decoded and rendered within the GUI by the server, potentially reducing the volume (e.g., the quantity and/or the size) of display updates that are encoded and transmitted to the client. As a result, the utilization of processor and/or network resources used to encode and transmit such display updates may also be reduced.

In some embodiments, the encoded video stream is discarded by the server. In other embodiments, the server transmits the encoded video stream to the client separately from other display updates in the GUI or modifies (e.g., reduces the bit rate of) the encoded video stream and transmits the modified version of the encoded video stream to the client separately from other display updates in the GUI. For example, the server may determine the performance capabilities (e.g., network bandwidth or a hardware attribute) of the client and determine whether to prevent transmission of the encoded video stream, transmit the original encoded video stream, or transmit a modified version of the encoded video stream based on the performance capabilities.

FIG. 1is a block diagram of an exemplary system100for providing remote access to a GUI, such as a virtual desktop interface. In exemplary embodiments, a server computing device105(“server”) executes a virtual machine (VM)110that generates a GUI for display at a client computing device115(“client”). For example, the GUI may include a desktop interface produced by a guest operating system executed within VM110. In addition, or alternatively, the GUI may include graphical elements (e.g., a window) produced by a software application executed by such a guest OS.

In exemplary embodiments, VM110generates the GUI by instructing a virtual graphics processing unit (VGPU) stack120that is associated with VM110to draw and display graphical elements, such as windows, fields, icons, images, and input controls (e.g., buttons), of the GUI. The instructions to the VGPU may be referred to as “display updates.” VGPU stack120includes, for example, a graphics driver (not shown), which may be included in VM110, a software-emulated or “virtual” graphics device (not shown), such as a virtual graphics adapter, and a virtual display device (not shown), such as a virtual monitor (e.g., liquid crystal display). Software applications executed by VM110interact with the graphics driver of VGPU stack120, either directly or via the guest OS. The virtual graphics device interacts with guest software executing in the VM as would a physical graphics device.

VGPU stack120renders the display updates in the GUI as instructed by VM110. In exemplary embodiments, VGPU stack120renders the display updates by drawing a frame of pixels depicting the graphical elements to one or more framebuffers (not shown) provided by the virtual graphics device (not shown). Successive frames may be drawn by updating the framebuffer(s), such as by drawing successive frames to alternating framebuffers, or “multiple buffering.”

Client115receives the encoded display updates and decodes the encoded display updates using a GUI decoder130. The decoded display updates are displayed at a view screen135of client115to update the GUI as instructed by VM110, such as by rendering the decoded display updates to a framebuffer of a physical graphics device that is connected to a physical display device.

In some scenarios, a video stream is displayed within the GUI. For example, a user of client115may access a video stored at server105using a local video playback application140, or may access a video hosted on a network (e.g., the World Wide Web) using a network streaming application145, both of which are executed at server105by VM110. Such videos are typically provided in the form of an encoded video stream, which enables the video to be compressed using a video-specific compression algorithm (e.g., including interframe compression). For example, a video stream may be compressed using the H.264 standard for video compression. Accordingly, displaying the video stream using the process described above may involve decoding the encoded video stream, generating display updates based on the video stream, and rendering the display updates to the framebuffer using VGPU stack120. Such an implementation would trigger a display update in the GUI each time successive frames of the video stream differ, even if nothing within the GUI other than the video stream was modified. As a result, GUI encoder125would encode and transmit the display update for each such change, essentially re-encoding the video stream. In addition to imposing a computing load on server105, such an implementation may provide a video stream that client115is incapable of displaying at an acceptable quality level (e.g., frame rate) due to performance limitations of client115.

FIG. 2is a flowchart of an exemplary method200for providing access to a GUI using system100(shown inFIG. 1). Referring toFIGS. 1 and 2, as described above, server105executes205VM110. As VM110executes, VGPU stack120receives210a request to display a video stream (e.g., from local video playback application140or network streaming application145) within the GUI. The video stream is provided (e.g., stored locally or streamed from another computing device) in encoded form.

VGPU stack120renders220display updates in the GUI other than the video stream to the framebuffer. VGPU stack120may or may not render the video stream, depending on a configuration of server105and/or a configuration provided by client115, such as a configuration parameter indicating that client115supports “video redirection” (e.g., receiving the encoded video stream in a communication channel separate from that used to transmit230other display updates).

When the configuration specifies that the video stream should not be rendered by VGPU stack120, VGPU stack120keeps the encoded video stream separate from other display updates in the GUI. For example, VGPU stack120may substitute222a placeholder for the encoded video stream within the GUI. In some embodiments, VGPU stack120substitutes222a placeholder for the video stream by rendering the area of the GUI occupied by the video stream as a solid color and/or as a textual message or image indicating that the encoded video stream has been suppressed. GUI encoder125encodes225the rendered display updates, which exclude the video stream, and transmits230the encoded display updates to client115, as described above with reference toFIG. 1.

When the configuration specifies that the video stream should be rendered by VGPU stack120, VGPU stack120decodes and renders227the video stream to the framebuffer with the other display updates. GUI encoder125encodes228the rendered display updates, including the video stream. Optionally, GUI encoder125may exclude the video stream and/or substitute a placeholder for the video stream, as described above, when encoding228the rendered display updates. For example, GUI encoder125may determine whether to encode the video stream based on a configuration parameter provided by client115. Performing such exclusion and/or substitution at GUI encoder125enables system100to accommodate scenarios in which video redirection capabilities change during the computing session in which the GUI is presented. For example, if client115becomes unable to support video redirection due to a malfunction, client115may request that GUI encoder125include the video stream when encoding228display updates. Similarly, if the computing session is disconnected from a first client that supports video redirection and reconnected to a second client that does not support video redirection, the second client may request that GUI encoder125include the video stream when encoding228display updates. In response to such a request, GUI encoder125encodes228the video stream along with the other display updates and transmits230the encoded display updates to client115.

In exemplary embodiments, rendering220and encoding225display updates other than the video stream for transmission230to client115avoids decoding of the video stream by VGPU stack120and re-encoding of the decoded video stream as display updates within the GUI by GUI encoder125. Accordingly, the utilization of computing resources (e.g., processor cycles and/or network bandwidth) associated with providing the GUI to client115may be significantly reduced. Such a computing resource utilization reduction may be especially pronounced where server105provides GUIs to a plurality of clients115. In some embodiments, VGPU stack120decodes and renders227the video stream to the framebuffer, but GUI encoder125excludes the video stream when encoding228display updates. Such embodiments incur some computing resource (e.g., processor cycles) utilization due to the decoding and rendering227but still exhibit reduced computing resource (e.g., processor cycles and network bandwidth) utilization by avoiding encoding and transmission of display updates based on the video stream.

Further, where client115is a device with limited computing resources, such as a smart phone or a device with limited network bandwidth, the encoded video stream may not be displayable at client115at an acceptable level of quality. For example, client device115may display only a portion of the frames in the video stream (also known as “dropping” frames), potentially causing the video stream to be unintelligible. In such scenarios, omitting the encoded video stream from display updates transmitted230to client115may not negatively affect the computing experience of a user at client115.

Exemplary embodiments omit decoding and rendering227of the video stream using VGPU stack120, at the level of a graphics driver or a virtual device. For example, VGPU stack120may, when queried for capabilities by the guest OS of VM110, advertise hardware acceleration of one or more video decoding operations (e.g., motion compensation, de-interlacing, decryption, post-processing, and/or supported encodings). Accordingly, software applications, such as local video playback application140and network streaming application145, may delegate decoding and rendering of an encoded video stream to VGPU stack120using a standard, general-purpose interface that supports hardware acceleration, such as DirectX Video Acceleration (DXVA), provided by Microsoft Windows™. Accordingly, the video stream may be decoded and rendered227, or omitted, as determined by VGPU stack120. Such embodiments enable server105to accommodate video streams provided by any software application, rather than accommodating only applications that use a specialized application programming interface (API).

In some embodiments, the encoded video stream is not provided to client115. In other embodiments, the encoded video stream is optionally transmitted to client115. In such embodiments, an intercept module150executed by server105captures the encoded video stream from VGPU stack120using a stream capture component155. A control module160of intercept module150selects235one of three available transmission actions: a) preventing transmission of the encoded video stream, b) transmitting the encoded video stream, and c) transmitting a modified version of the encoded video stream.

As one example, control module160may be configured to always select235a predetermined transmission action. As another example, intercept module150may be configured to select235a transmission action based on a preference or configuration associated with VM110, with client115, and/or with the user of client115. In addition, or alternatively, control module160may select235a transmission action based on client performance capabilities (e.g., provided by a capabilities module165), as described in more detail below.

Intercept module150performs the selected transmission action. When prevention of transmission is selected235, intercept module150discards240the encoded video stream, such that the encoded video stream is not transmitted to client115. When transmission of the encoded video stream is selected235, intercept module150transmits245the original encoded video stream, as received from VGPU stack120, to client115. In exemplary embodiments, GUI encoder125transmits230the encoded display updates to client115using a first communication channel (e.g., a first network socket), and intercept module150transmits245the encoded video stream to client115using a second communication channel (e.g., a second network socket).

Client115receives the encoded video stream and decodes the encoded video stream using a video decoder170. Video decoder170may include a hardware decoder and/or a software decoder executed by a processor of client115. For example, some examples of client115, such as a netbook, may not include a hardware decoder. Other examples of client115, such as a desktop computer, may include a hardware decoder (e.g., a graphics processing unit, GPU) capable of performing at least some video decoding hardware acceleration. Whether implemented as hardware, software, or both, video decoder170decodes the encoded video stream, and client115renders the decoded video stream within the GUI using a video overlay component175, such that the decoded video stream is displayed within the GUI to the user of client115.

When transmission of a modified version of the encoded video stream is selected235, prior to transmitting245the video stream, intercept module150modifies250the encoded video stream using a transcoder180. In exemplary embodiments, transcoder180modifies the encoded video stream's encoding, bit rate, frame rate, and/or resolution. For example, transcoder180may reduce the bit rate of the encoded video stream by decoding the video stream and re-encoding the decoded video stream using a video compression algorithm that achieves a higher compression ratio than that achieved by the compression algorithm used to encode the original encoded video stream, and/or using video compression parameters that allow a greater amount of data loss than allowed by the parameters used to encode the original encoded video stream. As another example, transcoder180may decode the video stream, scale the decoded video stream to a lower resolution than the resolution of the original encoded video stream, and encode the scaled video stream. Such modification250enables server105to reduce the network bandwidth used to transmit245the encoded video stream to client115, and/or to reduce the computing load incurred by client115in decoding the encoded video stream.

In exemplary embodiments, control module160also transmits255control information associated with the video stream and/or with the GUI to client115. The control information includes video stream attributes (e.g., the video compression format, the resolution, the frame rate, and/or the bit rate of the video stream), one or more dimensions (e.g., the width and/or height) of the video stream, the position (e.g., an x-coordinate, a y-coordinate, and/or a z-coordinate) of the video stream within the GUI, and/or compositing information associated with the video stream and the GUI (e.g., which graphical elements, if any, underlay or overlay the video stream in the GUI). Video overlay component175of client115renders the decoded video stream within the GUI based on the control information. For example, if other graphical elements in the GUI overlap the video stream, video overlay component175may overlay the video stream on the graphical elements that are positioned below the video stream (e.g., elements having a lower z-coordinate than that of the video stream) and overlay the graphical elements that are positioned above the video stream (e.g., elements having a higher z-coordinate than that of the video stream) on the video stream. Accordingly, aside from any modification250performed by transcoder180, the video stream is displayed in view screen135of client115as the video stream would be displayed to a local user at server105, but without incurring the computing resource utilization of decoding the video stream and re-encoding the video stream within the GUI at server105.

As described above, in some embodiments, VGPU stack120and/or GUI encoder125provides a message and/or an image indicating that the video stream has been suppressed. When the encoded video stream is transmitted245to client115, video overlay component175may overlay the video stream on such an indication, whereas when the encoded video stream is discarded240, the indication is shown. In other embodiments, no such indication is provided by server105, and when server105discards240the encoded video stream, video overlay component175renders a message or image indicating the suppression of the video stream at the position (e.g., as indicated by the control information) of the video stream within the GUI. For example, video overlay component may display a message such as “Video stream suppressed at remote desktop.”

As described above, control module160may select235a transmission action based on a configuration of control module160, VM110, client115, and/or the user of client115. In some embodiments, the transmission action is selected235based on one or more performance capabilities of client115. In such embodiments, capabilities module165determines232client performance capabilities, such as a network bandwidth of client115, a hardware attribute of client115(e.g., processor speed, amount of memory, and/or presence of a hardware video decoder170), hardware acceleration of one or more video decoding operations (e.g., motion compensation, de-interlacing, decryption, post-processing, and/or supported encodings), a resolution of client115, and/or a frame rate of video displayed at client115. For example, the client performance capabilities may be stored as a profile associated with client115and may be manually or automatically defined.

In some embodiments, capabilities module165determines232client performance capabilities at least in part by receiving the capabilities from client115. In the embodiment shown inFIG. 1, capabilities module165receives the client performance capabilities via a view agent185that communicates with client115. For example, view agent185may operate as a proxy for client115, such that capabilities module165can request and receive capabilities of client115from view agent185, which relays requests and responses between capabilities module165and client115. In addition, or alternatively, client115may initiate a transmission of its performance capabilities to capabilities module165, for example, when initializing a remote desktop session with server105.

Control module160receives the performance capabilities from capabilities module165and selects235a transmission option based on the performance capabilities. As an example, control module160may select235preventing transmission of the encoded video stream, or modifying the encoded video stream (e.g., to reduce the bit rate), if client115does not include a hardware video decoder.

In exemplary embodiments, control module160selects235a transmission option by comparing a client performance capability to a predetermined threshold value. For example, if the network bandwidth of client115(e.g., the bandwidth from server105to client115) is less than a minimum video streaming threshold value (e.g., 500 kilobits per second, kbps), control module160may select235preventing transmission of the encoded video stream, such that the video stream does not interfere with display of the GUI. If the network bandwidth is greater than the minimum video streaming threshold value and less than a moderate video streaming threshold value (e.g., 1000 kbps), control module160may select235modifying the encoded video stream to reduce the bit rate, such that the video stream may be transmitted to client115without interfering with the display of the GUI. If the network bandwidth is greater than the moderate video streamlining threshold value, control module160may select235transmitting the original encoded video stream.

Threshold values may be predetermined, as described above, or may be determined by control module160based on attributes of the encoded video stream. In an exemplary embodiment, control module160selects235the transmission option in part by calculating a minimum video streaming threshold value based on the bit rate of the encoded video stream received by stream capture component155. For example, the threshold value may be equal to the sum of the bit rate of the encoded video stream, an estimated average bandwidth associated with transmitting230display updates in the GUI, and, optionally, a predetermined bandwidth overhead value representing an estimated amount of bandwidth used by client115for purposes other than displaying the GUI and/or representing an estimated amount by which the available bandwidth may fluctuate. In another embodiment, control module160calculates a desired resolution threshold value equal to the resolution of the encoded video stream received by stream capture component155.

In some embodiments, control module160selects235the transmission option based on a plurality of performance capabilities. For example, a first set of threshold values (e.g., minimum processor speed) may be applied when client115includes a hardware video decoder170, and a second set of threshold values may be applied when client115does not include a hardware video decoder170.

In one embodiment, when control module160selects235modifying the video stream, transcoder180modifies250the encoded video stream based on a predetermined set of target attributes, such as a target bit rate, a target frame rate, a target resolution, and/or a target encoding. For example, whenever modification is selected235, transcoder180may modify250the encoded video stream by decoding the encoded video stream and re-encoding the decoded video stream using a predetermined resolution and/or a predetermined bit rate expected to enable client115to decode and display the video stream.

In another embodiment, transcoder180modifies250the encoded video stream based on the performance capabilities of client115, such as by determining248(e.g., calculating) one or more target attributes for the video stream based on the performance capabilities, and modifying250the encoded video stream using the determined target attributes. As one example, transcoder180may determine248a target encoding from a set of encodings supported by client115and re-encode the video stream using the target encoding. As another example, transcoder180may determine248a target resolution that is equal to the resolution of client115and modify250the encoded video stream by scaling the video stream such that the resolution of the transmitted video stream is less than or equal to the target resolution. As yet another example, transcoder180may reduce the bit rate of the video stream to a target bit rate that is based on the processor speed and/or bandwidth of client115.

In some embodiments, transcoder180determines248a target attribute by evaluating a mathematical function (e.g., a stepwise or continuous function) using one or more client capabilities as input values. For example, such a function may provide a target bit rate that is positively correlated with the processor speed and/or the bandwidth of client115.

Some performance capabilities, such as processor speed and the presence of a hardware video decoder170, are static. Other performance capabilities, such as bandwidth and frame rate, may be dynamic. Accordingly, the process of determining232client performance capabilities and selecting235a transmission action may be performed repeatedly, such that control module160can adapt the transmission action as the client performance capabilities change over time. For example, if client115is a mobile device, the bandwidth of client115may change significantly as client115moves out of range a wireless local area network (WLAN) and begins communicating with server105using a mobile data (e.g., 3G or 4G) network. Similarly, client115may detect and report to capabilities module165(via view agent185) the frame rate of encoded video stream as it is decoded and rendered to view screen135. If the detected frame rate is less than the frame rate of the encoded video stream transmitted245to client115, control module160may select235modifying the video stream to reduce the bit rate.

Exemplary Operating Environment

The operations described herein may be performed by a computer or computing device. A computer or computing device may include one or more processors or processing units, system memory, and some form of computer readable storage media. Computer-readable storage media are tangible and non-transitory and store information such as computer readable instructions, data structures, program modules, or other data. Exemplary computer readable storage media include hard disk drives, flash memory drives, digital versatile discs (DVDs), compact discs (CDs), and magnetic tape cassettes.

The operations illustrated and described herein may be implemented as computer-executable instructions encoded on a computer-readable medium, in hardware programmed or designed to perform the operations, or both. Aspects of the disclosure transform a general-purpose computer into a special-purpose computing device when programmed to execute the operations described herein.