Multi-screen synchronization method, device, display device and computer-readable storage medium
By receiving and adjusting the timestamp of audio and video data, and detecting the picture status of the display device, it solves the problem of audio and video synchronization between the projection end and the receiving end under unstable network conditions, and improves the user experience.
Patent Information
- Application Number
- CN202211513007.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-11-28
AI Technical Summary
When the network is unstable, it is difficult to maintain audio and video synchronization between the screen caster and the receiver, affecting the user experience.
By receiving audio and video data from the sending end, the mirror synchronization mode is determined, and the timestamp is adjusted in film and television mode. In game mode, the picture status of the display device is detected to synchronize audio and video data playback, including adjusting audio and video data to ensure synchronization.
When the network is unstable, the audio and video synchronization between the projection end and the receiving end is ensured, improving user experience and providing a good viewing and visual experience.
Smart Images

Figure CN116017012B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information monitoring, and in particular to a multi-screen synchronization method, device, display equipment and computer-readable storage medium. Background Art
[0002] With the diversified development of smart devices, intelligent interaction between multiple devices and multiple screens has become a common scene in family life. Users usually mirror the screens of mobile phones, tablets, computers, etc. to large-screen TVs to obtain the ultimate audio-visual experience when they are at home. As the screen resolution of mobile devices such as mobile phones is getting higher and higher, the network bandwidth requirements of screen mirroring technology are also increasing. In addition, the user's home network is inevitably unstable from time to time, which will inevitably cause delays, packet loss and retransmission in the process of transmitting data from the mobile phone to the TV, which will lead to the screen asynchrony between the mobile phone and the TV, and the audio and video of the mobile phone screen being played by the TV being asynchrony, which affects the user experience. Therefore, a technology is needed to automatically maintain the screen synchronization between the projection end and the receiving end in the case of unstable network, while maintaining the synchronization of the audio and video played by the receiving end, to ensure the stability of the audio and video synchronization between the projection end and the receiving end. Summary of the invention
[0003] The main purpose of the present invention is to propose a multi-screen synchronization method, device, display device and computer-readable storage medium, aiming to solve the problem that the stability of audio and video synchronization between the projection end and the receiving end cannot be guaranteed when the network is unstable.
[0004] To achieve the above object, the present invention provides a multi-screen synchronization method, which comprises the following steps:
[0005] Receive audio and video data sent by a transmitting end, and determine a mirror synchronization mode corresponding to the audio and video data;
[0006] When the mirror synchronization mode is a film and television mode, adjusting the timestamp of the audio and video data so that the audio and video data are played synchronously;
[0007] When the mirror synchronization mode is a game mode, the picture state of the display device is detected, and the audio and video data of the display device are adjusted to be played synchronously with the audio and video data of the sending end according to the picture state.
[0008] Optionally, when the mirror synchronization mode is a film and television mode, the step of adjusting the playing time of the audio and video data so that the audio and video data are played synchronously includes:
[0009] When the mirror synchronization mode is a film and television mode, obtaining an audio timestamp and a video timestamp of the audio and video data being played;
[0010] Determine whether the audio timestamp is consistent with the video timestamp;
[0011] If they are inconsistent, the audio timestamp is adjusted according to a preset rate until the audio timestamp is consistent with the video timestamp, so that the audio and video data are played synchronously.
[0012] Optionally, the step of adjusting the synchronous playback of the audio and video data of the display device and the audio and video data of the transmitter according to the picture state includes:
[0013] When the state of the picture changes rapidly, inserting a preset transition frame into the display picture of the display device, so that the video data of the display device is played synchronously with the video data of the transmitting end;
[0014] The audio buffer state of the display device is obtained, and the audio playback of the display device is adjusted according to the audio buffer state, so that the audio data of the display device is played synchronously with the audio data of the transmitting end.
[0015] Optionally, the step of adjusting the audio playback of the display device according to the audio buffer state includes:
[0016] When the audio buffer state indicates that redundant data exists in the audio buffer, decoding of the audio data in the audio and video data is stopped, and the redundant data is cleared.
[0017] Optionally, the step of adjusting the synchronous playback of the audio and video data of the display device and the audio and video data of the transmitter according to the picture state further includes:
[0018] When the picture state is in the picture enhancement state, the picture state is switched to the normal state, so that the audio and video data of the display device are played synchronously with the audio and video data of the sending end.
[0019] Optionally, the step of adjusting the synchronous playback of the audio and video data of the display device and the audio and video data of the transmitter according to the picture state further includes:
[0020] When the frame rate of the picture state is lower than the refresh rate of the display device, the display device is controlled to maintain the current picture frame until the decoding of the next picture frame of the current picture frame is completed, so that the audio and video data of the display device can be played synchronously with the audio and video data of the sending end.
[0021] Optionally, the step of detecting the screen state of the display device and inserting a preset transition frame into the screen image of the display device when the screen state changes rapidly further includes:
[0022] The video data in the audio and video data is decoded, and the reference frame of the video data in the decoding process is cancelled, so that the audio and video data of the display device is played synchronously with the audio and video data of the sending end.
[0023] In addition, to achieve the above object, the present invention further provides a multi-screen synchronization device, the multi-screen synchronization device comprising:
[0024] An audio and video playback module, used to receive audio and video data sent by a sending end, and determine a mirror synchronization mode corresponding to the audio and video data;
[0025] A video adjustment module, used for adjusting the timestamp of the audio and video data when the mirror synchronization mode is the video mode, so that the audio and video data can be played synchronously;
[0026] The game adjustment module is used to detect the picture state of the display device when the mirror synchronization mode is the game mode, and adjust the audio and video data of the display device to be played synchronously with the audio and video data of the sending end according to the picture state.
[0027] To achieve the above objectives, the present invention also provides a display device, which includes a memory, a processor, and a multi-screen synchronization program stored in the memory and executable on the processor, wherein the multi-screen synchronization program implements the steps of the multi-screen synchronization method described above when executed by the processor.
[0028] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a multi-screen synchronization program is stored, and when the multi-screen synchronization program is executed by a processor, the steps of the multi-screen synchronization method described above are implemented.
[0029] The present invention proposes a multi-screen synchronization method, device, display device and computer-readable storage medium, which receives audio and video data sent by a transmitter, determines a mirror synchronization mode corresponding to the audio and video data, and adjusts the timestamp of the audio and video data when the mirror synchronization mode is a film and television mode, so that the audio and video data are played synchronously; and when the mirror synchronization mode is a game mode, detects the screen state of the display device, and adjusts the audio and video data of the display device to play synchronously with the audio and video data of the transmitter according to the screen state. Through the above method, the present invention can process the playback state of the display device during screen projection through two different modes, namely, video mode and game mode, and can ensure that the audio and video data are played synchronously in the video mode, giving users a good viewing experience; it can ensure low latency between the transmitter and the display device in the game mode, maintain the screen synchronization between the transmitter and the display device, and give users a good visual experience. At the same time, through automatic adjustment in the two modes, it can ensure the stability of audio and video synchronization between the projection end and the receiving end when the network is unstable, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;
[0031] Figure 2 It is a flowchart of a first embodiment of a multi-screen synchronization method of the present invention;
[0032] Figure 3 This is a detailed flow chart of step S20 in the first embodiment of the multi-screen synchronization method of the present invention;
[0033] Figure 4 This is a detailed flow chart of step S30 in the first embodiment of the multi-screen synchronization method of the present invention;
[0034] Figure 5 It is a schematic diagram of the framework structure of the multi-screen synchronization device of the present invention.
[0035] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0037] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.
[0038] The terminal in the embodiment of the present invention may be a display device, such as a television, a mobile phone, a computer, etc.
[0039] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a DVI interface 1004, a USB interface 1005, and a memory 1006. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The DVI interface 1004 may optionally include a standard wired interface, which is connected to other external devices via a DVI line. The USB interface 1005 may optionally include a standard wired interface, which is connected to other external devices via a USB cable. The memory 1006 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1006 may also be a storage device independent of the aforementioned processor 1001.
[0040] Optionally, the terminal may also include an audio circuit, etc., which will not be described in detail here.
[0041] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0042] like Figure 1 As shown, the memory 1006 as a computer storage medium may include an operating system, a DVI interface module, a USB interface module, a user interface module, and a service monitoring program.
[0043] exist Figure 1 In the terminal shown, the DVI interface 1004 is mainly used to connect to an external device and perform data communication with the external device; the USB interface 1005 is mainly used to connect to an external device and perform data communication with the external device; the user interface 1003 is mainly used to connect to a client and perform data communication with the client; and the processor 1001 can be used to call the service monitoring program stored in the memory 1006 and perform the following operations:
[0044] Receive audio and video data sent by a transmitting end, and determine a mirror synchronization mode corresponding to the audio and video data;
[0045] When the mirror synchronization mode is a film and television mode, adjusting the timestamp of the audio and video data so that the audio and video data are played synchronously;
[0046] When the mirror synchronization mode is a game mode, the picture state of the display device is detected, and the audio and video data of the display device are adjusted to be played synchronously with the audio and video data of the sending end according to the picture state.
[0047] Further, the processor 1001 may call the service monitoring program stored in the memory 1006, and further perform the following operations:
[0048] When the mirror synchronization mode is a film and television mode, obtaining an audio timestamp and a video timestamp of the audio and video data being played;
[0049] Determine whether the audio timestamp is consistent with the video timestamp;
[0050] If they are inconsistent, the audio timestamp is adjusted according to a preset rate until the audio timestamp is consistent with the video timestamp, so that the audio and video data are played synchronously.
[0051] Further, the processor 1001 may call the service monitoring program stored in the memory 1006, and further perform the following operations:
[0052] When the state of the picture changes rapidly, inserting a preset transition frame into the display picture of the display device, so that the video data of the display device is played synchronously with the video data of the transmitting end;
[0053] The audio buffer state of the display device is obtained, and the audio playback of the display device is adjusted according to the audio buffer state, so that the audio data of the display device is played synchronously with the audio data of the transmitting end.
[0054] Further, the processor 1001 may call the service monitoring program stored in the memory 1006, and further perform the following operations:
[0055] When the audio buffer state indicates that redundant data exists in the audio buffer, decoding of the audio data in the audio and video data is stopped, and the redundant data is cleared.
[0056] Further, the processor 1001 may call the service monitoring program stored in the memory 1006, and further perform the following operations:
[0057] When the picture state is in the picture enhancement state, the picture state is switched to the normal state, so that the audio and video data of the display device are played synchronously with the audio and video data of the sending end.
[0058] Further, the processor 1001 may call the service monitoring program stored in the memory 1006, and further perform the following operations:
[0059] When the frame rate of the picture state is lower than the refresh rate of the display device, the display device is controlled to maintain the current picture frame until the decoding of the next picture frame of the current picture frame is completed, so that the audio and video data of the display device can be played synchronously with the audio and video data of the sending end.
[0060] Further, the processor 1001 may call the service monitoring program stored in the memory 1006, and further perform the following operations:
[0061] The video data in the audio and video data is decoded, and the reference frame of the video data in the decoding process is cancelled, so that the audio and video data of the display device is played synchronously with the audio and video data of the sending end.
[0062] The specific embodiments of the display device of the present invention are basically the same as the embodiments of the multi-screen synchronization program described below, and will not be described in detail here.
[0063] Screen mirroring is a technology that encodes the screen and audio of mobile devices such as mobile phones and tablets and transmits them to the large TV screen through the network for decoding and presentation. Through the ultra-clear large screen and excellent sound effects of the TV, it makes up for the hardware shortcomings of the screen size and sound effects of mobile devices such as mobile phones, and achieves more extreme audio-visual effects and immersive gaming experience.
[0064] As multi-screen interaction develops, different screen mirroring protocols have been formed due to different mobile phone manufacturers, including Airplay Mirror protocol of Apple system, Miracast protocol of Android / Windows system, ChromeCast of Google, Cast+ of Huawei and many other standardized protocols that have been promoted, as well as private protocols created by various manufacturers. As a receiving terminal, smart TVs not only need to be compatible with various protocols, but also need to achieve the best mirroring video display experience through software under existing hardware conditions.
[0065] Due to the characteristics of mobile devices, most screen mirroring streaming media is transmitted via WiFi. The screen transmission protocol standard requires maintaining a 25% packet loss rate in a turbulent network environment. The present invention is compatible with various protocols and maintains low latency, high-quality synchronous display effects of the TV in different network environments.
[0066] Conventional synchronization technology must consider both the low latency between the mobile phone and the TV screen, and the synchronization of the audio and video played on the TV, which is difficult to achieve. The present invention is the first to separate the two, and divide them into two modes, "film" and "game", according to different user needs. The film mode mainly considers the integrity and synchronization of audio and video data, and is used for mobile phones and other mobile devices to mirror the played audio and video content to the TV for viewing; while the game mode mainly considers the screen synchronization between the mobile phone and the TV, and is used for mobile phones and other mobile devices to mirror the game to the TV screen for experience.
[0067] For further information, see Figure 2 , Figure 2 This is a flowchart of a first embodiment of a multi-screen synchronization method of the present invention. The multi-screen synchronization method provided by this embodiment includes the following steps:
[0068] Step S10, receiving audio and video data sent by a transmitting end, and determining a mirror synchronization mode corresponding to the audio and video data;
[0069] In this embodiment, the present invention is mainly applied to screen projection between a transmitting end and a display device, wherein the display device may be a smart TV, a display, a projector, a car machine, a tablet computer, a smart phone, or other display devices capable of multi-screen interaction. For ease of description and understanding, the present invention is described by taking a TV as an example. The transmitting end may be a mobile phone, a tablet computer, or other electronic device with a screen projection function. For ease of description and understanding, the present invention is described by taking a mobile phone as an example. It should be noted that since the audio and video data sent by the mobile phone is sent by encoding, after the display device receives the audio and video data, it is also necessary to perform a decoding operation on it in order to play the audio and video data. The mirror synchronization mode includes a film and television mode and a game mode, wherein the film and television mode is the mode in which the video is run when watching a movie or TV series. The game mode is the mode in which the user plays a game on the mobile phone and then projects the screen to the TV.
[0070] Step S20, when the mirror synchronization mode is a film and television mode, adjusting the timestamp of the audio and video data so that the audio and video data are played synchronously;
[0071] When the mirror synchronization mode is in the movie mode, it indicates that the user has a need to watch a movie and needs a better viewing experience. Therefore, the audio and video synchronization on the display device needs to be adjusted to enable the user to achieve a better viewing experience.
[0072] Specifically, in one embodiment, the step S20 further includes:
[0073] Step A21, when the mirror synchronization mode is the video mode, obtaining the audio timestamp and video timestamp of the audio and video data being played;
[0074] In this embodiment, the audio and video data includes audio data and video data, and both the audio data and the video data have corresponding timestamps. For example, in a video, the timestamp of the audio data and the video data corresponding to a duration of 60 seconds is 60 seconds.
[0075] Step S22, determining whether the audio timestamp is consistent with the video timestamp;
[0076] Step S23: If they are inconsistent, the audio timestamp is adjusted according to a preset rate until the audio timestamp is consistent with the video timestamp, so that the audio and video data are played synchronously.
[0077] Step S24: if they are consistent, no processing is performed.
[0078] In this embodiment, the integrity of the audio and video data in the movie mode is very important and cannot be discarded, but this will inevitably lead to the situation where the audio or video is ahead of the user experience, so it is necessary to maintain audio and video synchronization.
[0079] Usually, when the multi-screen interaction starts the handshake, the audio and video decoding capabilities will be determined, so the TV's decoding capabilities can be guaranteed. However, due to the uncertainty of the network and the audio and video packaging methods of different protocols, the data packets of the audio stream and the video stream will occasionally be incompletely synchronized, which requires processing at the receiving end. Usually, audio and video synchronization technology can wait for the audio by slowing down the video decoding, but it is difficult for the TV platform to speed up the video decoding, so this method cannot solve the problem of audio advance.
[0080] This embodiment uses the technology of controlling audio to solve the synchronization problem. When the audio timestamp is greater than the video timestamp, the audio is played at a slightly slower speed until the audio and video are synchronized; conversely, when the video timestamp is greater than the audio timestamp, the audio is played at a slightly faster speed until the audio and video are synchronized. In this way, the video can also play out each frame of data, and the picture fluency is optimal. At the same time, because the human ear is relatively sensitive, the change in the adjustment rate of the audio is controlled as much as possible within a certain threshold, that is, the preset rate, to avoid affecting the user experience. In addition, the audio playback can also be synchronized by slowing down the video decoding.
[0081] Step S30, when the mirror synchronization mode is a game mode, detecting the screen state of the display device, and adjusting the audio and video data of the display device to be played synchronously with the audio and video data of the transmitting end according to the screen state.
[0082] When the mirror synchronization mode is in game mode, low latency is the most important. It is necessary to keep the synchronization between the mobile phone and TV screens as much as possible, that is, to keep the video synchronization. In special cases, the audio can be discarded to keep the video synchronization. For example, when the screen of the display device changes rapidly, that is, when the screen switches between landscape and portrait.
[0083] Specifically, in one embodiment, the step S30 further includes:
[0084] Step S31, when the picture state changes rapidly, inserting a preset transition frame into the display picture of the display device, so that the video data of the display device is played synchronously with the video data of the transmitting end;
[0085] In this embodiment, the rapid change refers to the change when switching pages on the mobile phone, or switching between landscape and portrait modes. For example, the process of switching from the video playback page to the main page is a rapid change. Since the screen is projected from the mobile phone to the TV, the TV will also detect the rapid change of the picture state. The transition frame is a preset picture. When the picture state changes rapidly, the transition frame is inserted into the display screen during the rapid change, which can improve the smoothness of the TV picture, thereby ensuring the synchronization of the video data between the display device and the transmitter. Specifically, the operation of inserting the transition frame can be achieved through MEMC motion enhancement technology. MEMC motion enhancement technology is a motion quality compensation technology used in LCD TVs. It inserts a motion compensation frame (i.e., transition frame) between two traditional frames of images through built-in chip calculations, and processes the original 24-frame video into 60 frames or even 120 frames, thereby avoiding problems such as picture jitter, ghosting, and tailing, making the picture look clearer and smoother.
[0086] Step S32, obtaining the audio buffer state of the display device, and adjusting the audio playback of the display device according to the audio buffer state, so that the audio data of the display device is played synchronously with the audio data of the transmitting end.
[0087] In one embodiment, the step S32 further includes:
[0088] Step A321, when the audio buffer state is that there is redundant data in the audio buffer, stop decoding the audio data in the audio and video data, and clear the redundant data.
[0089] Due to the uncertainty of the wireless network environment, there will still be data packet delays or losses. The screen mirroring protocol will adjust the rate of video packets by reducing the frame rate and bit rate for fast synchronous display. However, due to the continuity of audio data, the sender will continue to send audio packets. In this way, the TV side needs to discard audio frames at appropriate times, especially when the phone screen returns to the main interface or switches between landscape and portrait modes, the interface needs to be synchronized quickly.
[0090] In this embodiment, the audio buffer exists in the display device, and the audio data is first transferred to the buffer before being played. The audio buffer state includes the presence of redundant data and the absence of redundant data, wherein the redundant data is the audio data that exists in the buffer and is ready to be played. In this embodiment, if there is redundant data in the audio buffer, the TV is set to mute, then the audio decoding is stopped and the buffer is cleared, and the mute is canceled after a new audio frame is received, which can avoid abnormal sounds such as plosives and improve the user experience.
[0091] Furthermore, in one embodiment, the step S30 further includes:
[0092] Step A33, when the picture state is in the picture enhancement state, switching the picture state to the normal state, so that the audio and video data of the display device are played synchronously with the audio and video data of the sending end.
[0093] In this embodiment, the ALLM automatic low-latency mode can be used to turn off most of the TV's picture enhancement processing, reduce display delay, and bring a more real-time and smooth picture. Among them, the automatic low-latency mode can automatically set the ideal delay to achieve a smooth, lag-free and uninterrupted viewing and interactive experience, thereby preventing the occurrence of audio and video data asynchrony caused by delays.
[0094] Furthermore, in one embodiment, the step S30 further includes:
[0095] Step A34, when the frame rate of the picture state is lower than the refresh rate of the display device, control the display device to maintain the current picture frame until the decoding of the next picture frame of the current picture frame is completed, so that the audio and video data of the display device can be played synchronously with the audio and video data of the sending end.
[0096] In this embodiment, the frame rate is the frequency at which images in units of frames appear continuously on the display device. When the frame rate is closer to the refresh rate, the displayed image is smoother. When the decoding speed of the display device cannot match the refresh rate, the display of the next frame of the image is delayed to prevent tearing or stuttering effects when the image is refreshed, thereby ensuring that the screen mirroring image is smoother and more detailed.
[0097] In another embodiment, before step S31, the method further includes:
[0098] Step A311, decoding the video data in the audio and video data, and canceling the reference frame of the video data during the decoding process, so that the audio and video data of the display device are played synchronously with the audio and video data of the sending end.
[0099] In this embodiment, in the game mode, the TV directly sends the received audio and video data to the audio and video decoder, and at the same time reduces or cancels the reference frame of the video decoding as much as possible to reduce the decoding delay and ensure the synchronization of the audio and video data between the transmitter and the display device.
[0100] The present invention proposes a multi-screen synchronization method, which receives audio and video data sent by a transmitter, determines a mirror synchronization mode corresponding to the audio and video data, and adjusts the timestamp of the audio and video data when the mirror synchronization mode is a film and television mode, so that the audio and video data are played synchronously; and when the mirror synchronization mode is a game mode, detects the screen state of the display device, and adjusts the audio and video data of the display device to play synchronously with the audio and video data of the transmitter according to the screen state. Through the above method, the present invention can process the playback state of the display device during screen projection respectively through two different modes, namely, video mode and game mode, and can ensure that the audio and video data are played synchronously in the video mode, giving users a good viewing experience; it can ensure low latency between the transmitter and the display device in the game mode, maintain the screen synchronization between the transmitter and the display device, and give users a good visual experience. At the same time, through automatic adjustment in the two modes, it can ensure the stability of audio and video synchronization between the projection end and the receiving end when the network is unstable, thereby improving the user experience.
[0101] Furthermore, based on the first embodiment of the multi-screen synchronization method of the present invention, a second embodiment of the present invention is proposed. This embodiment provides a multi-screen synchronization device, and the multi-screen synchronization device includes:
[0102] An audio and video playback module, used to receive audio and video data sent by a sending end, and determine a mirror synchronization mode corresponding to the audio and video data;
[0103] A video adjustment module, used for adjusting the timestamp of the audio and video data when the mirror synchronization mode is the video mode, so that the audio and video data can be played synchronously;
[0104] The game adjustment module is used to detect the picture state of the display device when the mirror synchronization mode is the game mode, and adjust the audio and video data of the display device to be played synchronously with the audio and video data of the sending end according to the picture state.
[0105] For the specific implementation of this embodiment, please refer to the first embodiment, and the present invention will not be described in detail here.
[0106] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a multi-screen synchronization program is stored, and when the multi-screen synchronization program is executed by a processor, the following operations are implemented:
[0107] Receive audio and video data sent by a transmitting end, and determine a mirror synchronization mode corresponding to the audio and video data;
[0108] When the mirror synchronization mode is a film and television mode, adjusting the timestamp of the audio and video data so that the audio and video data are played synchronously;
[0109] When the mirror synchronization mode is a game mode, the picture state of the display device is detected, and the audio and video data of the display device are adjusted to be played synchronously with the audio and video data of the sending end according to the picture state.
[0110] Furthermore, when the business monitoring program is executed by the processor, the following operations are also implemented:
[0111] When the mirror synchronization mode is a film and television mode, obtaining an audio timestamp and a video timestamp of the audio and video data being played;
[0112] Determine whether the audio timestamp is consistent with the video timestamp;
[0113] If they are inconsistent, the audio timestamp is adjusted according to a preset rate until the audio timestamp is consistent with the video timestamp, so that the audio and video data are played synchronously.
[0114] Furthermore, when the business monitoring program is executed by the processor, the following operations are also implemented:
[0115] When the state of the picture changes rapidly, inserting a preset transition frame into the display picture of the display device, so that the video data of the display device is played synchronously with the video data of the transmitting end;
[0116] The audio buffer state of the display device is obtained, and the audio playback of the display device is adjusted according to the audio buffer state, so that the audio data of the display device is played synchronously with the audio data of the transmitting end.
[0117] Furthermore, when the business monitoring program is executed by the processor, the following operations are also implemented:
[0118] When the audio buffer state indicates that redundant data exists in the audio buffer, decoding of the audio data in the audio and video data is stopped, and the redundant data is cleared.
[0119] Furthermore, when the business monitoring program is executed by the processor, the following operations are also implemented:
[0120] When the picture state is in the picture enhancement state, the picture state is switched to the normal state, so that the audio and video data of the display device are played synchronously with the audio and video data of the sending end.
[0121] Furthermore, when the business monitoring program is executed by the processor, the following operations are also implemented:
[0122] When the frame rate of the picture state is lower than the refresh rate of the display device, the display device is controlled to maintain the current picture frame until the decoding of the next picture frame of the current picture frame is completed, so that the audio and video data of the display device can be played synchronously with the audio and video data of the sending end.
[0123] Furthermore, when the business monitoring program is executed by the processor, the following operations are also implemented:
[0124] The video data in the audio and video data is decoded, and the reference frame of the video data in the decoding process is cancelled, so that the audio and video data of the display device is played synchronously with the audio and video data of the sending end.
[0125] The specific embodiments of the computer-readable storage medium of the present invention are substantially the same as the above-mentioned embodiments of the business monitoring program, and are not described in detail herein.
[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0129] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A multi-screen synchronization method, applied to a display device, characterized in that: The multi-screen synchronization method comprises the steps of: Receive audio and video data sent by a transmitting end, and determine a mirror synchronization mode corresponding to the audio and video data; When the mirror synchronization mode is a film and television mode, adjusting the timestamp of the audio and video data so that the audio and video data are played synchronously; When the mirror synchronization mode is a game mode, detecting a screen state of a display device, and adjusting the synchronous playback of audio and video data of the display device and the audio and video data of the transmitting end according to the screen state; The step of adjusting the audio and video data of the display device to be played synchronously with the audio and video data of the transmitting end according to the picture state comprises: When the screen state is a fast-changing state, inserting a preset transition frame into the display screen of the display device so that the video data of the display device is played synchronously with the video data of the transmitting end; the fast-changing state includes page switching and horizontal and vertical screen switching; Acquire the audio buffer state of the display device, and adjust the audio playback of the display device according to the audio buffer state, so that the audio data of the display device is played synchronously with the audio data of the transmitting end; The step of adjusting the audio playback of the display device according to the audio buffer state comprises: When the picture state is in a fast-changing state, if there is redundant data in the audio buffer, the display device is set to be muted, audio decoding is stopped, and the audio buffer is cleared. After receiving a new audio frame, the muting is canceled.
2. The multi-screen synchronization method according to claim 1, characterized in that: When the mirror synchronization mode is the film and television mode, the step of adjusting the playing time of the audio and video data so that the audio and video data are played synchronously includes: When the mirror synchronization mode is a film and television mode, obtaining an audio timestamp and a video timestamp of the audio and video data being played; Determine whether the audio timestamp is consistent with the video timestamp; If they are inconsistent, the audio timestamp is adjusted according to a preset rate until the audio timestamp is consistent with the video timestamp, so that the audio and video data are played synchronously.
3. The multi-screen synchronization method according to claim 1, characterized in that: The step of adjusting the audio playback of the display device according to the audio buffer state comprises: When the audio buffer state is a state where redundant data exists in the audio buffer, decoding of the audio data in the audio and video data is stopped, and the redundant data is cleared.
4. The multi-screen synchronization method according to claim 1, characterized in that: The step of adjusting the synchronous playback of the audio and video data of the display device and the audio and video data of the transmitting end according to the picture state also includes: When the picture state is in the picture enhancement state, the picture state is switched to the normal state, so that the audio and video data of the display device are played synchronously with the audio and video data of the sending end.
5. The multi-screen synchronization method according to claim 1, characterized in that: The step of adjusting the synchronous playback of the audio and video data of the display device and the audio and video data of the transmitting end according to the picture state also includes: When the frame rate of the picture state is lower than the refresh rate of the display device, the display device is controlled to maintain the current picture frame until the decoding of the next picture frame of the current picture frame is completed, so that the audio and video data of the display device can be played synchronously with the audio and video data of the sending end.
6. The multi-screen synchronization method according to claim 1, characterized in that: Before the step of detecting the screen state of the display device and inserting a preset transition frame into the screen image of the display device when the screen state changes rapidly, the step further includes: The video data in the audio and video data is decoded, and the reference frame of the video data in the decoding process is cancelled, so that the audio and video data of the display device is played synchronously with the audio and video data of the sending end.
7. A multi-screen synchronization device, characterized in that: The multi-screen synchronization device comprises: An audio and video playback module, used to receive audio and video data sent by a sending end, and determine a mirror synchronization mode corresponding to the audio and video data; A video adjustment module, used for adjusting the timestamp of the audio and video data when the mirror synchronization mode is the video mode, so that the audio and video data can be played synchronously; A game adjustment module, used for detecting the screen state of the display device when the mirror synchronization mode is the game mode, and adjusting the synchronous playback of the audio and video data of the display device and the audio and video data of the transmitting end according to the screen state; The game adjustment module is also used to insert a preset transition frame into the display screen of the display device when the screen state is a rapidly changing state, so that the video data of the display device is played synchronously with the video data of the sending end; the rapidly changing state includes page switching and horizontal and vertical screen switching; obtain the audio buffer state of the display device, and adjust the audio playback of the display device according to the audio buffer state, so that the audio data of the display device is played synchronously with the audio data of the sending end; when the screen state is a rapidly changing state, if there is redundant data in the audio buffer, the display device is set to mute, then the audio decoding is stopped and the audio buffer is cleared, and the mute is canceled after receiving a new audio frame.
8. A display device, characterized in that: The display device includes a memory, a processor, and a multi-screen synchronization program stored in the memory and executable on the processor. When the multi-screen synchronization program is executed by the processor, the steps of the multi-screen synchronization method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a multi-screen synchronization program, and when the multi-screen synchronization program is executed by a processor, the steps of the multi-screen synchronization method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Video and audio processing system, video processing apparatus, audio processing apparatus, output apparatus, and method of controlling the system
CN101047777A
Audio / video synchronization method and device
CN104618786A
Intelligent control display system and control method
CN111651133A
Screen projection method and device based on VR equipment, equipment and storage medium
CN112019877A
Mirror image screen projection terminal playing system and method
CN112367542A
