CN108521604B - Multi-screen display method and device for redirecting video - Google Patents

Multi-screen display method and device for redirecting video Download PDF

Info

Publication number
CN108521604B
CN108521604B CN201810291613.3A CN201810291613A CN108521604B CN 108521604 B CN108521604 B CN 108521604B CN 201810291613 A CN201810291613 A CN 201810291613A CN 108521604 B CN108521604 B CN 108521604B
Authority
CN
China
Prior art keywords
playing position
video
player
physical display
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810291613.3A
Other languages
Chinese (zh)
Other versions
CN108521604A (en
Inventor
卢亚广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN201810291613.3A priority Critical patent/CN108521604B/en
Publication of CN108521604A publication Critical patent/CN108521604A/en
Application granted granted Critical
Publication of CN108521604B publication Critical patent/CN108521604B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4437Implementing a Virtual Machine [VM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention relates to the technical field of cloud computing, and provides a multi-screen display method and a multi-screen display device for redirected videos.

Description

Multi-screen display method and device for redirecting video
Technical Field
The embodiment of the invention relates to the technical field of cloud computing, in particular to a multi-screen display method and device for redirecting videos.
Background
Under the current era background of cloud computing, application scenarios of VDI (Virtual Desktop Infrastructure) are increasingly widespread, VDI mainly depends on a Virtual machine divided by hypervisors on a physical server, and video and image processing capabilities in the Virtual machine are very expensive, so that original audio and video data to be decoded and processed in the Virtual machine are generally transmitted to a client by using a video redirection technology, and decoding rendering and display are completed at the client. In the current common video redirection application in the market, the position of a client playing window is basically updated in real time according to the position information of the virtual machine playing window, however, in an application scene with multi-screen expansion, the video redirection window is switched by a display, at this time, an exception handling mechanism in the video playing frame restarts the video playing frame, the handling process is complicated and has waiting time, and therefore, the problem of audio and video blockage occurs when the existing method is applied to directly update the position of the playing window, and user experience is affected.
Disclosure of Invention
The embodiment of the invention aims to provide a multi-screen display method and a multi-screen display device for redirecting videos, which are used for solving the problem of audio and video blockage when video redirection is switched among multiple screens.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a multi-screen display method for redirecting videos, which is applied to a client, where the client is in communication connection with a server, a virtual machine player and multiple virtual displays are configured in a virtual machine of the server, the client is configured with a video player and multiple physical displays, and the multiple virtual displays and the multiple physical displays are in one-to-one correspondence, where the method includes: acquiring first video data sent by the server and a real-time playing position of the virtual machine player; caching the first video data in a video cache region of the client; when the real-time playing position is judged to exceed the display range of the current physical display corresponding to the video player, determining a target playing position of the first video data and a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display; adding the first video data from a video cache region of the client to a predefined temporary cache region; stopping the video playing affair being executed in the client, and controlling the video playing frame of the client to restart; and when the video playing frame is detected to be restarted, the first video data is taken out from the temporary buffer area, and the first video data is played at the target playing position of the target physical display.
In a second aspect, an embodiment of the present invention further provides a multi-screen display device for redirecting videos, which is applied to a client, where the client is in communication connection with a server, a virtual machine player and multiple virtual displays are configured in a virtual machine of the server, the client is configured with a video player and multiple physical displays, the multiple virtual displays and the multiple physical displays are in one-to-one correspondence, and the device includes an obtaining module, a caching module, a determining module, an executing module, a restarting module, and a playing module. The acquisition module is used for acquiring first video data sent by the server and a real-time playing position of the virtual machine player; the cache module is used for caching the first video data in a video cache region of the client; the determining module is used for determining a target playing position of the first video data and a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display when the real-time playing position is judged to exceed the display range of the current physical display corresponding to the video player; the execution module is used for adding the first video data from the video cache region of the client to a predefined temporary cache region; the restarting module is used for stopping the video playing affairs being executed in the client and controlling the video playing frame of the client to restart; and the playing module is used for detecting that the video playing frame is restarted and finished, taking out the first video data from the temporary buffer area, and playing the first video data at the target playing position of the target physical display.
Compared with the prior art, the multi-screen display method and the device for redirecting the video provided by the embodiment of the invention have the advantages that when the real-time playing position of the virtual machine player is judged to exceed the display range of the current physical display corresponding to the video player, namely when the video redirecting window is subjected to physical display switching, at the moment, the first video data in the video cache region is firstly put into the temporary cache region, then the video playing transaction executed in the client is stopped, and the video playing frame of the client is initiatively restarted, the first video data in the temporary cache region is played first, so that the problem of audio and video blockage during multi-screen switching in the prior art is avoided, and the user experience of a product is effectively improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating interaction between a server and a client according to an embodiment of the present invention.
Fig. 2 is a block diagram of a client according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a multi-screen display method for redirecting videos according to a first embodiment of the present invention.
FIG. 4 is a block diagram of a multi-screen display apparatus for redirecting video according to a second embodiment of the present invention.
Icon: 10-a server side; 20-a client; 11-virtual machine player; 12-a virtual display; 30-a network; 201-a memory; 202-a memory controller; 203-a processor; 204-peripheral interface; 205-physical display; 300-a multi-screen display device that redirects video; 301-an obtaining module; 302-a cache module; 303-coordinate calculation module; 304-a judgment module; 305-a determination module; 306-an execution module; 307-restart module; 308-Play Module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a server 10 interacting with at least one client 20 according to an embodiment of the present invention. The server 10 can communicate with the client 20 through the network 30 to realize data communication or interaction between the server 10 and the client 20. The virtual machine of the server 10 is configured with a virtual machine player 11, and meanwhile, the virtual machine of the server 10 is also configured with a plurality of virtual displays 12, and the server 10 can redirect the video data in the virtual machine player 11 to the client 20 through the network 30 to complete decoding, rendering and displaying.
In the embodiment of the present invention, the server 10 may be a media server, the server 10 includes at least one virtual machine, and the virtual machine player 11 may be, but is not limited to, a wmp player, a VLC player, and the like. The client 20 may be, but is not limited to, a thin client, a Personal Computer (PC), or the like. The operating system of the client 20 may be, but is not limited to, a Windows system, a Linux system, etc., the client 20 is configured with a video Player, which may be, but is not limited to, a Media Player, a KMPlayer, etc., and the playing window of the video Player on the client 20 is a video redirection window.
Referring to fig. 2, fig. 2 is a block diagram illustrating a client 20 according to an embodiment of the present invention. The client 20 includes a multi-screen display device 300 that redirects video, a memory 201, a memory controller 202, a processor 203, a peripheral interface 204, and a plurality of physical displays 205.
The memory 201, memory controller 202, processor 203, peripheral interface 204 and physical display 205 elements are electrically connected to each other, directly or indirectly, to enable data transfer or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The video-redirected multi-screen display device 300 includes at least one software function module that can be stored in the memory 201 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the client 20. The processor 203 is configured to execute an executable module stored in the memory 201, such as a software function module or a computer program included in the multi-screen display apparatus 300 for redirecting videos.
The Memory 201 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 201 is used for storing a program, and the processor 203 executes the program after receiving an execution instruction.
The processor 203 may be an integrated circuit chip having signal processing capabilities. The Processor 203 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), a voice Processor, a video Processor, and the like; but may also be a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor 203 may be any conventional processor or the like.
The peripheral interface 204 is used to couple various input/output devices to the processor 203 as well as to the memory 201. In some embodiments, the peripheral interface 204, the processor 203, and the memory controller 202 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The physical display 205 is used for playing the video data sent by the server 10 to implement video redirection, the plurality of virtual displays 12 of the server 10 and the plurality of physical displays 205 of the client 20 are in one-to-one correspondence, and the resolutions are the same, when the virtual display 12 of the virtual machine player 11 is switched, that is, when the playing window of the virtual machine player 11 is moved from the 1# virtual display 12 to the 2# virtual display 12, the window of the video redirection needs to be switched accordingly, that is, the window of the video redirection needs to be moved accordingly from the 1# physical display 205 corresponding to the 1# virtual display 12 to the 2# physical display 205 corresponding to the 2# virtual display 12. As an embodiment, both the virtual display 12 and the physical display 205 may be 1920 x 1080 high definition display screens.
First embodiment
Referring to fig. 3, fig. 3 is a flowchart illustrating a multi-screen display method for redirecting videos according to a first embodiment of the present invention. The multi-screen display method for redirecting the video comprises the following steps:
step S101, acquiring first video data sent by a server and a real-time playing position of a virtual machine player.
In the embodiment of the present invention, the first video data may be video data that is currently sent to the client 20 by the server 10 and is to be decoded, rendered and displayed at the client 20, and includes separated video frame data and audio frame data. In the process of redirecting the video, the server 10 monitors the position information of the virtual machine player 11 in real time, and transmits the real-time position information to the client 20, so that the client 20 determines the playing position of the first video data according to the real-time position information, and further the playing picture of the client 20 is consistent with the playing picture of the virtual machine player 11.
The real-time playing position of the virtual machine player 11 is determined by the server 10 according to the display range of the virtual display 12 where the virtual machine player 11 is located, and since the resolutions of the plurality of virtual displays 12 are consistent, the display range of each virtual display 12 can be defined according to the position relationship of the plurality of virtual displays 12, for example, the server 10 has 2 virtual displays 12 respectively arranged in the horizontal and vertical directions, and assuming that the resolution of the virtual display 12 is 1920 × 1080, the display ranges of 4 virtual displays 12 are (0,1920), (0,1080), respectively; (1920,3840), (0,1080); (0,1920), (1080,2160), (1920,3840) and (1080,2160), the server 10 can determine the real-time playing position of the virtual machine player 11, i.e. the horizontal and vertical coordinate interval according to the display range of the 4 virtual displays 12 and send the real-time playing position to the client 20.
When the client 20 decodes the video data sent by the server 10, the decoding is not performed every time the video data sent by one server 10 is received, so that the situation that the video playing is discontinuous is easy to occur. In order to ensure the continuity of video playing, the video data to be decoded is usually buffered.
Step S102, caching the first video data in a video cache region of the client.
In the embodiment of the present invention, the video buffer may be a predefined computer memory in the client 20, and the video buffer is used for buffering video data to be decoded in the client 20, so that the client 20 can conveniently and quickly read the video data to be decoded, and the continuity of video playing can be effectively ensured.
In the embodiment of the present invention, after the real-time playing position of the virtual machine player 11 is obtained, whether the real-time playing position of the virtual machine player 11 exceeds the display range of the current physical display corresponding to the video player may be determined according to a relationship between a center point coordinate of the real-time playing position and the display range of the current physical display corresponding to the video player, that is, whether the virtual machine player 11 performs virtual display 12 switching, so that the embodiment of the present invention may further include step S103 and step S104.
Step S103, calculating the coordinates of the center point of the real-time playing position according to the abscissa interval and the ordinate interval of the real-time playing position.
In the embodiment of the present invention, the coordinate of the center point of the real-time playing position may be solved according to the abscissa interval and the ordinate interval of the real-time playing position, that is, the abscissa of the center point is the middle point of the abscissa interval, and the ordinate of the center point is the middle point of the ordinate interval, for example, the abscissa interval and the ordinate interval of the real-time playing position are (2000,3600) and (200,980), respectively, and then the coordinate of the center point of the real-time playing position is (2800, 590).
And step S104, judging whether the central point coordinate exceeds the display range of the current physical display corresponding to the video player, if so, judging that the real-time playing position exceeds the display range of the current physical display corresponding to the video player.
In the embodiment of the present invention, after the center point coordinate of the real-time playing position is calculated, it is determined whether the center point coordinate exceeds the display range of the current physical display of the client 20, and if the center point coordinate exceeds the display range of the current physical display of the client 20, it is analyzed that the virtual machine player 11 has switched the virtual display 12, for example, the abscissa display range and the ordinate display range of the current physical display are (0,1920) and (0,1080), respectively, and with 1920 and 1080 as a reference, it is seen that the center point abscissa of the real-time playing position is greater than 1920, at this time, it may be determined whether the real-time playing position of the virtual machine player 11 exceeds the display range of the current physical display corresponding to the video player, that is, the virtual machine player 11 has switched the virtual display 12.
It should be noted that, in this embodiment, the center point coordinate of the real-time playing position is greater than the maximum display range of the current physical display or smaller than the minimum display range of the current physical display, and the center point coordinate is considered to exceed the display range of the current physical display of the client 20, the maximum display range includes the horizontal maximum value and the vertical maximum value, and the minimum display range includes the horizontal minimum value and the vertical minimum value. That is, at least one of the center point abscissa greater than the horizontal maximum, the center point ordinate greater than the vertical maximum, the center point abscissa less than the horizontal minimum, and the center point ordinate less than the vertical minimum is considered to exceed the display range of the current physical display corresponding to the video player, for example, the abscissa display range and the ordinate display range of the current physical display are (1920,3840) and (1080,2160), respectively, where 3840 is the horizontal maximum, 1920 is the horizontal minimum, 2160 is the vertical maximum, 1080 is the vertical minimum, and the center point abscissa greater than 3840, the center point ordinate greater than 2160, the center point abscissa less than 1920, and the center point ordinate less than 1080 is considered to exceed the display range of the current physical display.
Step S105, when the real-time playing position is judged to exceed the display range of the current physical display corresponding to the video player, the target playing position of the first video data and the target physical display corresponding to the target playing position are determined according to the real-time playing position of the virtual machine player and the display range of the current physical display.
In the embodiment of the present invention, when the virtual display 12 of the virtual machine player 11 is switched, the physical display 205 of the client 20 needs to be correspondingly switched, and meanwhile, the current playing position of the client 20 needs to be updated according to the real-time playing position of the virtual machine player 11. That is, when the virtual machine player 11 switches the virtual display 12, it is necessary to determine the target physical display after the client 20 switches the physical display 205 and the target playing position for playing the first video data on the target physical display.
In the embodiment of the present invention, the target playing position of the first video data may be determined according to a position coordinate difference between the real-time playing position of the virtual machine player 11 and the current playing position of the video player. Specifically, the position coordinate difference includes a horizontal coordinate difference and a vertical coordinate difference, where the horizontal coordinate difference provides a to-be-moved horizontal coordinate of the current playing position of the client 20, and the vertical coordinate difference provides a to-be-moved vertical coordinate of the current playing position of the client 20, so that the current playing position of the client 20 can be moved according to the to-be-moved horizontal coordinate according to the horizontal coordinate difference, and the current playing position of the client 20 can be moved according to the to-be-moved vertical coordinate according to the vertical coordinate difference, so as to obtain the target playing position of the first video data. For example, the abscissa and ordinate intervals of the real-time playing position of the virtual machine player 11 are (2000,3600) and (200,980), respectively, the abscissa and ordinate intervals of the current playing position of the client 20 are (1000,2600) and (500, 1280), respectively, it can be seen that the abscissa difference is that the abscissa of the current playing position needs to be shifted to the left by 1000, and the ordinate difference is that the ordinate of the current playing position needs to be shifted to the upper by 300, therefore, the abscissa of the current playing position is shifted to the left by 1000, and the ordinate is shifted to the upper by 300, so as to obtain the target playing position of the first video data.
In the embodiment of the present invention, the target physical display corresponding to the target playing position may be determined according to the real-time playing position of the virtual machine player 11 and the display range of the current physical display corresponding to the video player. Specifically, first, a center point coordinate of the real-time playing position may be calculated, where the center point coordinate may be solved according to an abscissa interval and an ordinate interval of the real-time playing position, that is, the center point abscissa is a middle point of the abscissa interval, and the center point ordinate is a middle point of the ordinate interval, for example, the abscissa interval and the ordinate interval of the real-time playing position are (200,2120) and (0,1080), respectively, and then the center point coordinate of the real-time playing position is (1160,540); then, according to the display range of the current physical display corresponding to the video player, a reference coordinate is determined, where the reference coordinate may be the smallest abscissa and ordinate in the display range of the current physical display, for example, assuming that the client 20 is transversely configured with a plurality of physical displays 205, the current physical display is a # 2 display, and the abscissa display range and the ordinate display range thereof are (1920,3840) and (0,1080), respectively, then the reference coordinate at this time is (1920,0), that is, the reference abscissa is 1920 and the reference ordinate is 0; next, judging the sizes of the center point coordinate and the reference coordinate, if the center point abscissa is smaller than the reference abscissa, regarding the previous physical display 205 continuous with the display range of the current physical display as the target physical display, for example, the center point coordinate is (1160,540), the reference coordinate is (1920,0), since 1160 is smaller than 1920, the target physical display is a # 1 display, and the abscissa display range and the ordinate display range thereof are (0,1920) and (0,1080), respectively; if the center point abscissa is larger than the reference abscissa and the center point coordinate exceeds the display range of the current physical display, the next physical display 205 consecutive to the display range of the current physical display is taken as the target physical display, for example, the center point coordinate is (4000,540), the reference coordinate is (1920,0), and since 4000 is larger than 1920 and exceeds the display range of the current physical display (1920,3080), the target physical display is a 3# display, and the abscissa display range and the ordinate display range thereof are (3840,5760) and (0,1080), respectively.
It should be noted that, the above determining process of the target physical display is described by taking an example that the client 20 is horizontally configured with a plurality of physical displays 205, and when the client 20 is vertically configured with a plurality of physical displays 205 or is horizontally and vertically configured with a plurality of physical displays 205 at the same time, the determining process of the target physical display is similar to the above process, and is not described again here.
In an application scenario of multi-screen expansion, when the virtual display 12 of the virtual machine player 11 is switched, the physical display 205 of the client 20 needs to be correspondingly switched, and when the physical display 205 is switched, the video playing frame of the client 20 needs to be reconnected to the renderer, so the video playing frame of the client 20 needs to be restarted, but restarting the video playing frame of the client 20 means that the original video playing position in the client 20 is changed, so the original video data in the video cache area needs to be updated to the video data to be played currently, that is, the original video data needs to be cleared, which may cause a problem of screen loss or audio and video asynchronization within a certain time. To solve this problem, the original video data in the buffer area needs to be stored, and the original video data in the video buffer area needs to be played first after the restart is completed.
And step S106, adding the first video data from the video cache area of the client to a predefined temporary cache area.
In the embodiment of the present invention, the temporary buffer area may be a predefined one computer memory in the client 20, and the temporary buffer area and the video buffer area are two independent computer memories, which do not affect each other. The temporary buffer may be used to buffer the first video data in the video buffer when the client 20 restarts the video playing framework.
Step S107, stopping the video playing affair being executed in the client, and controlling the video playing frame of the client to restart.
In the embodiment of the present invention, after the first video data is added from the video buffer area of the client 20 to the predefined temporary buffer area, the video playing frame of the client 20 is actively restarted. That is, the video playing transaction being executed in the client 20 is stopped, and the video playing framework of the client 20 is controlled to restart to empty the video buffer, specifically, the original video playing program in the client 20 is first closed, then the video decoding framework of the client 20 is restarted, and the parameters required for video decoding are retransmitted. The video playback framework may be, but is not limited to, a Directshow playback framework.
In the prior art, in an application scene of multi-screen expansion, when a window for video redirection is subjected to screen switching, a video playing frame of a client 20 is also restarted, but the restart is processed by an exception handling mechanism inside the video playing frame, the processing process is relatively complex, and waiting time exists, so that the processing time is relatively long, and therefore the problem of audio and video blockage occurs, and user experience and product quality are affected. The active restart mode introduced in the embodiment of the invention has short processing time, only instantaneous screen flicker occurs in the screen switching process, and the user experience of the product is effectively improved.
Step S108, detecting that the video playing frame is restarted, taking out the first video data from the temporary buffer area, and playing the first video data at the target playing position of the target physical display.
In the embodiment of the present invention, after detecting that the video playing frame of the client 20 is restarted, the first video data is fetched from the predefined temporary buffer area and played at the target playing position of the target physical display. After the screen of the client 20 is switched, the first video data in the temporary buffer area is played first when the playing is restarted, so that the problem of screen leakage or audio and video asynchronism within a certain time can be effectively avoided.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
firstly, when the real-time playing position of the virtual machine player 11 is judged to exceed the display range of the current physical display corresponding to the video player, it is analyzed that the virtual machine player 11 is switched to the virtual display 12, at this time, the display window of the video redirection needs to be correspondingly switched to the physical display 205, and the video playing frame of the client 20 is actively restarted, so that the video redirection window of the client 20 is rapidly switched to the target playing position of the target physical display, the problem of audio and video blockage when the video redirection moves among multiple screens can be effectively solved, and the user experience is improved;
secondly, when the real-time playing position of the virtual machine player 11 is judged to exceed the display range of the current physical display corresponding to the video player, when the virtual machine player 11 is analyzed to have the virtual display 12 switched, the first video data is added to a predefined temporary buffer area from the video buffer area of the client 20, and after the video playing frame of the client 20 is restarted, the first video data is taken out from the temporary buffer area to be played at the target playing position, so that the problem of screen omission or audio and video asynchronization within a certain time can be effectively avoided.
Second embodiment
Referring to FIG. 4, FIG. 4 is a block diagram illustrating a multi-screen display apparatus 300 for redirecting videos according to a second embodiment of the present invention. The multi-screen display apparatus 300 for redirecting videos includes an obtaining module 301, a caching module 302, a coordinate calculating module 303, a determining module 304, a determining module 305, an executing module 306, a restarting module 307, and a playing module 308.
The obtaining module 301 is configured to obtain first video data sent by a server and a real-time playing position of a virtual machine player.
The caching module 302 is configured to cache the first video data in a video cache area of the client.
And the coordinate calculation module 303 is configured to calculate a coordinate of a center point of the real-time playing position according to the abscissa interval and the ordinate interval of the real-time playing position.
The determining module 304 is configured to determine whether the center point coordinate exceeds a display range of a current physical display corresponding to the video player, and if so, determine that the real-time playing position exceeds the display range of the current physical display corresponding to the video player.
The determining module 305 is configured to determine a target playing position of the first video data and a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display when it is determined that the real-time playing position exceeds the display range of the current physical display corresponding to the video player.
In this embodiment of the present invention, the determining module 305 is specifically configured to obtain a current playing position of the video player, where the current playing position is on the current physical display; determining a target playing position of the first video data according to a position coordinate difference between a real-time playing position of a virtual machine player and a current playing position of a video player; and determining a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display corresponding to the video player. And the execution module 306 is configured to add the first video data from the video cache area of the client to a predefined temporary cache area.
And a restart module 307, configured to stop the video playing transaction being executed in the client, and control a video playing framework of the client to restart.
The playing module 308 is configured to detect that the video playing frame is restarted, take out the first video data from the temporary buffer area, and play the first video data at a target playing position of the target physical display.
The embodiment of the present invention also discloses a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 203, the multi-screen display method for redirecting videos disclosed in the foregoing embodiment of the present invention is implemented.
To sum up, the multi-screen display method and apparatus for redirecting videos provided by the embodiments of the present invention are applied to a client, where the client is in communication connection with a server, a virtual machine player and multiple virtual displays are configured in a virtual machine of the server, the client is configured with a video player and multiple physical displays, and the multiple virtual displays and the multiple physical displays are in one-to-one correspondence, and the method includes: acquiring first video data sent by a server and a real-time playing position of a virtual machine player; caching the first video data in a video cache region of the client; when the real-time playing position exceeds the display range of the current physical display corresponding to the video player, determining a target playing position of the first video data and a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the current playing position of the display range of the current physical display; adding first video data from a video cache region of a client to a predefined temporary cache region; stopping video playing affairs being executed in the client, and controlling the video playing frame of the client to restart; and when the video playing frame is detected to be restarted, taking out the first video data from the temporary buffer area, and playing the first video data at the target playing position of the target physical display. Compared with the prior art, when the real-time playing position of the virtual machine player is judged to exceed the display range of the current physical display corresponding to the video player, the video redirection window is analyzed to be switched to the physical display, and the video playing frame of the client is actively restarted, so that the video redirection window of the client is rapidly switched to the target playing position of the target physical display, the problem of audio and video blockage is avoided, and the user experience can be effectively improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or 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.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Claims (10)

1. A multi-screen display method for redirecting videos is applied to a client, the client is in communication connection with a server, a virtual machine player and a plurality of virtual displays are configured in a virtual machine of the server, the client is configured with a video player and a plurality of physical displays, the virtual displays and the physical displays are in one-to-one correspondence, and the resolutions of the virtual displays and the physical displays are consistent, and the method comprises the following steps:
acquiring first video data sent by the server and a real-time playing position of the virtual machine player;
caching the first video data in a video cache region of the client;
when the real-time playing position is judged to exceed the display range of the current physical display corresponding to the video player, determining a target playing position of the first video data and a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display;
adding the first video data from a video cache region of the client to a predefined temporary cache region;
stopping the video playing affair being executed in the client, and controlling the video playing frame of the client to restart;
and when the video playing frame is detected to be restarted, the first video data is taken out from the temporary buffer area, and the first video data is played at the target playing position of the target physical display.
2. The method according to claim 1, wherein before the step of determining the target playing position of the first video data and the target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display when it is determined that the real-time playing position exceeds the display range of the current physical display corresponding to the video player, the method further comprises:
calculating the coordinates of the center point of the real-time playing position according to the abscissa interval and the ordinate interval of the real-time playing position;
judging whether the center point coordinate exceeds the display range of the current physical display corresponding to the video player;
and if so, judging that the real-time playing position exceeds the display range of the current physical display corresponding to the video player.
3. The method according to claim 1, wherein the step of determining the target playback position of the first video data and the target physical display corresponding to the target playback position according to the real-time playback position of the virtual machine player and the display range of the current physical display comprises:
acquiring a current playing position of the video player, wherein the current playing position is on the current physical display;
determining a target playing position of the first video data according to a position coordinate difference between a real-time playing position of the virtual machine player and a current playing position of the video player;
and determining a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display corresponding to the video player.
4. The method of claim 3, wherein the position coordinate difference comprises an abscissa difference providing a to-be-moved abscissa of a current playing position of the video player and an ordinate difference providing a to-be-moved ordinate of the current playing position of the video player;
the step of determining the target playing position of the first video data according to the position coordinate difference between the real-time playing position of the virtual machine player and the current playing position corresponding to the video player includes:
moving the current playing position of the video player according to the abscissa to be moved according to the abscissa difference;
and moving the current playing position of the video player according to the vertical coordinate to be moved according to the vertical coordinate difference to obtain the target playing position of the first video data.
5. The method of claim 3, wherein when the client is horizontally configured with multiple physical displays and the virtual machine player switches between two adjacent virtual displays;
the step of determining a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display corresponding to the video player includes:
calculating a central point coordinate of the real-time playing position according to the abscissa interval and the ordinate interval of the real-time playing position, wherein the central point coordinate comprises a central point abscissa and a central point ordinate;
determining a reference coordinate according to a display range of a current physical display corresponding to the video player, wherein the reference coordinate comprises a reference abscissa and a reference ordinate, the reference abscissa is the smallest abscissa in the display range of the current physical display, and the reference ordinate is the smallest ordinate in the display range of the current physical display;
when the center point abscissa is smaller than the reference abscissa, taking a previous physical display continuous with a display range of the current physical display as a target physical display;
and when the central point abscissa is larger than the reference abscissa and the central point coordinate exceeds the display range of the current physical display, taking the next physical display continuous with the display range of the current physical display as a target physical display.
6. A multi-screen display device for redirecting videos is applied to a client, the client is in communication connection with a server, a virtual machine player and a plurality of virtual displays are configured in a virtual machine of the server, the client is configured with a video player and a plurality of physical displays, the virtual displays and the physical displays are in one-to-one correspondence, and the resolutions of the virtual displays and the physical displays are consistent, the device comprises:
the acquisition module is used for acquiring first video data sent by the server and the real-time playing position of the virtual machine player;
the cache module is used for caching the first video data in a video cache region of the client;
the determining module is used for determining a target playing position of the first video data and a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display when the real-time playing position is judged to exceed the display range of the current physical display corresponding to the video player;
the execution module is used for adding the first video data from the video cache region of the client to a predefined temporary cache region;
the restarting module is used for stopping the video playing affairs which are executed in the client and controlling the video playing frame of the client to restart;
and the playing module is used for detecting that the video playing frame is restarted and finished, taking out the first video data from the temporary buffer area, and playing the first video data at the target playing position of the target physical display.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the coordinate calculation module is used for calculating the coordinates of the center point of the real-time playing position according to the abscissa interval and the ordinate interval of the real-time playing position;
and the judging module is used for judging whether the central point coordinate exceeds the display range of the current physical display corresponding to the video player, and if so, judging that the real-time playing position exceeds the display range of the current physical display corresponding to the video player.
8. The apparatus of claim 6, wherein the determination module is specifically configured to:
acquiring a current playing position of the video player, wherein the current playing position is on the current physical display;
determining a target playing position of the first video data according to a position coordinate difference between a real-time playing position of the virtual machine player and a current playing position of the video player;
and determining a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display corresponding to the video player.
9. The apparatus of claim 8, wherein the position coordinate difference comprises an abscissa difference providing a to-be-moved abscissa of a current playing position of the video player and an ordinate difference providing a to-be-moved ordinate of the current playing position of the video player;
the determining module executes a mode of determining a target playing position of the first video data according to a position coordinate difference between a real-time playing position of the virtual machine player and a current playing position of the video player, and the mode includes:
moving the current playing position of the video player according to the abscissa to be moved according to the abscissa difference;
and moving the current playing position of the video player according to the vertical coordinate to be moved according to the vertical coordinate difference to obtain the target playing position of the first video data.
10. The apparatus of claim 8, wherein when the client is horizontally configured with multiple physical displays and the virtual machine player switches between two adjacent virtual displays;
the determining module executes a mode of determining a target physical display corresponding to the target playing position according to the real-time playing position of the virtual machine player and the display range of the current physical display corresponding to the video player, and the mode includes:
calculating a central point coordinate of the real-time playing position according to the abscissa interval and the ordinate interval of the real-time playing position, wherein the central point coordinate comprises a central point abscissa and a central point ordinate;
determining a reference coordinate according to a display range of a current physical display corresponding to the video player, wherein the reference coordinate comprises a reference abscissa and a reference ordinate, the reference abscissa is the smallest abscissa in the display range of the current physical display, and the reference ordinate is the smallest ordinate in the display range of the current physical display;
when the center point abscissa is smaller than the reference abscissa, taking a previous physical display continuous with a display range of the current physical display as a target physical display;
and when the central point abscissa is larger than the reference abscissa and the central point coordinate exceeds the display range of the current physical display, taking the next physical display continuous with the display range of the current physical display as a target physical display.
CN201810291613.3A 2018-03-30 2018-03-30 Multi-screen display method and device for redirecting video Active CN108521604B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810291613.3A CN108521604B (en) 2018-03-30 2018-03-30 Multi-screen display method and device for redirecting video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810291613.3A CN108521604B (en) 2018-03-30 2018-03-30 Multi-screen display method and device for redirecting video

Publications (2)

Publication Number Publication Date
CN108521604A CN108521604A (en) 2018-09-11
CN108521604B true CN108521604B (en) 2020-12-08

Family

ID=63431135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810291613.3A Active CN108521604B (en) 2018-03-30 2018-03-30 Multi-screen display method and device for redirecting video

Country Status (1)

Country Link
CN (1) CN108521604B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522070B (en) * 2018-10-29 2021-07-16 联想(北京)有限公司 Display processing method and system
CN112637681B (en) * 2020-12-22 2022-02-22 新华三大数据技术有限公司 Video redirection method and device
CN112650462B (en) * 2020-12-29 2022-11-04 展讯半导体(南京)有限公司 Image processing method and device, electronic device and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105308536A (en) * 2013-01-15 2016-02-03 厉动公司 Dynamic user interactions for display control and customized gesture interpretation
CN105338291A (en) * 2014-07-29 2016-02-17 杭州海康威视数字技术股份有限公司 Method and device for processing virtual tiled screen
CN105574744A (en) * 2016-01-29 2016-05-11 上海云活科技有限公司 Multi-screen interactive video shopping method
CN105611394A (en) * 2015-12-21 2016-05-25 福建时迅信息科技有限公司 Method and system for redirecting video under VDI environment
CN105791892A (en) * 2016-03-02 2016-07-20 汉柏科技有限公司 Video redirecting method based on desktop cloud, cloud server and video redirecting system
CN106210865A (en) * 2016-07-08 2016-12-07 中霆云计算科技(上海)有限公司 A kind of video reorientation method and system presenting agreement based on remote desktop
CN106851282A (en) * 2017-02-15 2017-06-13 福建时迅信息科技有限公司 The method and system of encoding video pictures data volume is reduced in a kind of VDI agreements
CN107018137A (en) * 2017-04-07 2017-08-04 成都长天信息技术有限公司 A kind of Flash reorientation methods and device
CN107077311A (en) * 2014-10-17 2017-08-18 微软技术许可有限责任公司 Input signal is emulated
US9892589B2 (en) * 2011-10-14 2018-02-13 Bally Gaming, Inc. System and method for cross platform persistent gaming sessions using a mobile device
CN107809671A (en) * 2017-11-20 2018-03-16 深圳市青葡萄科技有限公司 Video is redirected to the method and system of server decoding under a kind of virtualized environment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9892589B2 (en) * 2011-10-14 2018-02-13 Bally Gaming, Inc. System and method for cross platform persistent gaming sessions using a mobile device
CN105308536A (en) * 2013-01-15 2016-02-03 厉动公司 Dynamic user interactions for display control and customized gesture interpretation
CN105338291A (en) * 2014-07-29 2016-02-17 杭州海康威视数字技术股份有限公司 Method and device for processing virtual tiled screen
CN107077311A (en) * 2014-10-17 2017-08-18 微软技术许可有限责任公司 Input signal is emulated
CN105611394A (en) * 2015-12-21 2016-05-25 福建时迅信息科技有限公司 Method and system for redirecting video under VDI environment
CN105574744A (en) * 2016-01-29 2016-05-11 上海云活科技有限公司 Multi-screen interactive video shopping method
CN105791892A (en) * 2016-03-02 2016-07-20 汉柏科技有限公司 Video redirecting method based on desktop cloud, cloud server and video redirecting system
CN106210865A (en) * 2016-07-08 2016-12-07 中霆云计算科技(上海)有限公司 A kind of video reorientation method and system presenting agreement based on remote desktop
CN106851282A (en) * 2017-02-15 2017-06-13 福建时迅信息科技有限公司 The method and system of encoding video pictures data volume is reduced in a kind of VDI agreements
CN107018137A (en) * 2017-04-07 2017-08-04 成都长天信息技术有限公司 A kind of Flash reorientation methods and device
CN107809671A (en) * 2017-11-20 2018-03-16 深圳市青葡萄科技有限公司 Video is redirected to the method and system of server decoding under a kind of virtualized environment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《基于KVM的桌面虚拟化VDI研究以及实现》;周毅;《中国优秀硕士学位论文全文数据库》;20160901;全文 *
《都江堰市教育局教育云桌面系统的设计与实现》;徐斌;《中国优秀硕士学位论文全文数据库》;20171001;全文 *

Also Published As

Publication number Publication date
CN108521604A (en) 2018-09-11

Similar Documents

Publication Publication Date Title
US20200058270A1 (en) Bullet screen display method and electronic device
US11262968B2 (en) Method and system for wireless screen transmission
CN108521604B (en) Multi-screen display method and device for redirecting video
US7675574B2 (en) Display mode switching apparatus, method and program product
US10474343B2 (en) Image processing apparatus, image processing method, and program
US20170171592A1 (en) Method and electronic apparatus for adjusting viewing angle of Smart Television playing panorama videos
KR102463304B1 (en) Video processing method and device, electronic device, computer-readable storage medium and computer program
WO2019006939A1 (en) On-screen comment display method and apparatus, and electronic device
US10271105B2 (en) Method for playing video, client, and computer storage medium
CN111436005B (en) Method and apparatus for displaying image
KR20140030226A (en) Global composition system
US10838691B2 (en) Method and apparatus of audio/video switching
US10110647B2 (en) Method and apparatus for altering bandwidth consumption
WO2022096017A1 (en) Content display method and apparatus
CN109656639B (en) Interface rolling method, device, equipment and medium
CN110401877B (en) Video playing control method and device, electronic equipment and storage medium
US20160269674A1 (en) Dynamic Video Capture Rate Control
US20180095531A1 (en) Non-uniform image resolution responsive to a central focus area of a user
WO2023273854A9 (en) Control display method and apparatus, device, and medium
WO2021190319A1 (en) Interface access method, display apparatus, and electronic device
JPWO2015182189A1 (en) Information processing apparatus, information processing method, and program
US20190294450A1 (en) Method for Interface Refresh Synchronization,Terminal Device, and Non-Transitory Computer-Readable Storage Medium
CN111918098A (en) Video processing method and device, electronic equipment, server and storage medium
CN111918099A (en) Video processing method and device, electronic equipment and storage medium
CN104053002A (en) Video decoding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant