A screen projection method, device and electronic device

By dynamically adjusting the audio and video clocks during screen mirroring to achieve frame synchronization, the screen mirroring latency problem is solved, resulting in more accurate frame synchronization and optimized playback time.

CN119071551BActive Publication Date: 2025-10-28HISENSE VISUAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410578359.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2025-10-28
Estimated Expiration
2044-05-10

AI Technical Summary

Technical Problem

When casting from a PC or mobile phone, the first frame contains audio data, causing the receiving end to synchronize the frame using an audio clock. However, subsequent frames do not contain audio data, making frame synchronization impossible and resulting in a significant delay in the casting process.

Method used

During screen mirroring, if the first frame contains both video and audio data, the audio clock is used for frame synchronization. If subsequent frames only contain video data, the video clock is used for frame synchronization to ensure accurate frame synchronization.

Benefits of technology

By dynamically adjusting the clock, the inability of video frames to perform preset operations due to a lack of audio data is avoided, thus reducing playback latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071551B_ABST
    Figure CN119071551B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of screen mirroring technology, and more particularly to a screen mirroring method, apparatus, and electronic device. The method includes: in response to a screen mirroring operation, acquiring screen mirroring data of a multimedia file to be mirrored; parsing the screen mirroring data; if the frame data of the first frame in the screen mirroring data includes both video data and audio data, using the audio clock corresponding to the audio data as the master clock for frame synchronization; if it is determined that the frame data of other frames besides the first frame only contains video data, changing the master clock from the audio clock to the video clock corresponding to the video data, and performing frame synchronization according to the video clock; performing frame synchronization according to a target clock, and playing the screen mirroring data; wherein the target clock includes either the audio clock or the video clock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of screen projection technology, and in particular to a screen projection method, device and electronic device. Background Technology

[0002] When casting from a PC or mobile phone, if the first frame of the sending end (PC or mobile phone) contains both video and audio data, and subsequent frames only contain video data and no audio data, the receiving end (TV) will synchronize the frames using the audio data's clock when receiving the frames sent by the sending end. Since the first frame contains audio data, the receiving end cannot obtain the audio data's clock, thus preventing frame synchronization and resulting in a significant delay in the casting process. Summary of the Invention

[0003] To address the aforementioned technical problems, this disclosure provides a screen projection method, apparatus, and electronic device.

[0004] The technical solution disclosed herein is as follows:

[0005] In a first aspect, this disclosure provides a display device, comprising: a processor configured to, in response to a screen projection operation, control a communicator to acquire screen projection data of a multimedia file to be projected; the processor is further configured to parse the screen projection data acquired by the communicator, and if the frame data of the first frame in the screen projection data includes video data and audio data, perform frame synchronization using the audio clock corresponding to the audio data as the master clock; the processor is further configured to, if it is determined that the frame data of other frames besides the first frame contains only video data, change the master clock from the audio clock to the video clock corresponding to the video data, and perform frame synchronization according to the video clock; the processor is further configured to perform frame synchronization according to a target clock, and control the display to play the screen projection data; wherein the target clock includes either an audio clock or a video clock.

[0006] Secondly, this disclosure provides a screen casting method, comprising: in response to a screen casting operation, acquiring screen casting data of a multimedia file to be cast; parsing the screen casting data; if the frame data of the first frame in the screen casting data includes video data and audio data, using the audio clock corresponding to the audio data as the master clock for frame synchronization; if it is determined that the frame data of other frames besides the first frame only contains video data, changing the master clock from the audio clock to the video clock corresponding to the video data, and performing frame synchronization according to the video clock; performing frame synchronization according to a target clock, and playing the screen casting data; wherein the target clock includes either the audio clock or the video clock.

[0007] Thirdly, this disclosure provides an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to cause the electronic device to implement any of the screen projection methods provided in the first aspect above when executing the computer program.

[0008] Fourthly, this disclosure provides a computer-readable storage medium, comprising: a computer program stored on the computer-readable storage medium, wherein when the computer program is executed by a computing device, the computing device implements any of the screen projection methods provided in the first aspect above.

[0009] Fifthly, the present invention provides a computer program product that, when run on a computer, causes the computer to execute a screen projection method as provided in any of the first aspects.

[0010] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on the first computer-readable storage medium. The first computer-readable storage medium may be packaged together with the processor of the projection device, or it may be packaged separately from the processor of the projection device; this disclosure does not impose any limitations on this.

[0011] The descriptions of the second, third, fourth, and fifth aspects in this disclosure can be referenced to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second, third, fourth, and fifth aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0012] In this disclosure, the names of the aforementioned projection devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those of this disclosure, they fall within the scope of this disclosure and its equivalents.

[0013] These or other aspects of this disclosure will become more readily apparent in the following description.

[0014] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0015] As can be seen, the screen casting method provided in this disclosure, in response to a screen casting operation, acquires the screen casting data of the multimedia file to be cast; parses the screen casting data, and if the frame data of the first frame in the screen casting data includes both video and audio data, uses the audio clock corresponding to the audio data as the master clock for frame synchronization; if it is determined that the frame data of other frames besides the first frame only contains video data, the master clock is changed from the audio clock to the video clock corresponding to the video data, and frame synchronization is performed according to the video clock. This avoids the inability to perform preset operations on video frames when there is no audio or video, thus enabling accurate frame synchronization and reducing playback latency. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0018] Figure 1 One of the flowcharts of the screen projection method provided in the embodiments of this application;

[0019] Figure 2 This is one of the structural schematic diagrams of the display device in the screen projection method provided in the embodiments of this application;

[0020] Figure 3 This is the second schematic diagram of the display device in the screen projection method provided in the embodiments of this application;

[0021] Figure 4 One of the flowcharts of the screen projection method provided in the embodiments of this application;

[0022] Figure 5 The second schematic flowchart of the screen projection method provided in the embodiments of this application;

[0023] Figure 6 The third flowchart illustrating the screen projection method provided in this application embodiment;

[0024] Figure 7 The fourth flowchart illustrating the screen projection method provided in this application embodiment;

[0025] Figure 8 Fifth flowchart illustrating the screen projection method provided in this application embodiment;

[0026] Figure 9 This is a schematic diagram of the structure of a display device provided in an embodiment of this application;

[0027] Figure 10 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0028] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0029] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0030] The display device provided in this application can have various implementation forms, such as a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is one specific embodiment of the display device of this application.

[0031] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0032] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device according to one or more embodiments of this application, such as... Figure 1 As shown, a user can operate the display device 200 via a mobile terminal 300 and a control device 100. The control device 100 can be a remote control, and communication between the remote control and the display device includes infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the display device 200. The user can input user commands through buttons on the remote control, voice input, control panel input, etc., to control the display device 200. In some embodiments, a mobile terminal, tablet computer, computer, laptop computer, and other smart devices can also be used to control the display device 200.

[0033] In some embodiments, the electronic device provided in this application can be the display device 200 described above. When a user needs to cast content to the display device 200, they can do so using an electronic device such as a mobile phone. In this case, the display device 200 responds to the casting operation by acquiring the casting data of the multimedia file to be cast. The display device 200 parses the casting data. If the frame data of the first frame in the casting data includes both video and audio data, the display device 200 uses the audio clock corresponding to the audio data as the master clock for frame synchronization. If the display device 200 determines that the frame data of other frames besides the first frame only contains video data, it changes the master clock from the audio clock to the video clock corresponding to the video data and performs frame synchronization according to the video clock. The display device 200 performs frame synchronization according to the target clock and plays the casting data. Thus, the casting is completed.

[0034] As can be seen, in the screen casting method provided in this embodiment, the display device 200 typically uses the audio clock as the master clock for frame synchronization during the playback of screen casting data. However, when the frame data of frames other than the first frame only contains video data, the corresponding audio clock cannot be obtained, making it impossible to perform preset operations on the video frames. If the preset operation is a frame dropping operation, it is necessary to parse and play each video frame, thus increasing the playback time of the video frames. Because the playback time of the video frames is longer, the playback progress of the screen casting terminal (such as a mobile phone or other electronic device) may differ from the playback progress of the display device 200, resulting in playback delay. To address this, the screen casting method provided in this embodiment, in response to the screen casting operation, obtains the screen casting data of the multimedia file to be cast; parses the screen casting data; if the frame data of the first frame in the screen casting data includes both video data and audio data, the audio clock corresponding to the audio data is used as the master clock for frame synchronization; if it is determined that the frame data of frames other than the first frame only contains video data, the master clock is changed from the audio clock to the video clock corresponding to the video data, and frame synchronization is performed according to the video clock. This avoids the inability to preset operations on video frames when there is no audio or video, thus enabling accurate frame synchronization and reducing playback latency.

[0035] Figure 2 A hardware configuration block diagram of a display device 200 according to an exemplary embodiment is shown. For example... Figure 2The display device 200 shown includes at least one of the following: a tuner / demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first to nth interface for input / output. The display 260 may be a touch-enabled display, such as a touch screen display. The tuner / demodulator 210 receives broadcast television signals via wired or wireless reception and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. The detector 230 is used to collect signals from the external environment or signals interacting with the external environment. The controller 250 and the tuner / demodulator 210 may be located in different separate devices; that is, the tuner / demodulator 210 may also be located in an external device of the main device containing the controller 250, such as an external set-top box.

[0036] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.

[0037] In some examples, the display device 200 of one or more embodiments is a television set 1, and the operating system of the television set 1 is the Android system, for example... Figure 3 As shown, TV 1 can be logically divided into an application layer (referred to as "application layer") 21, an application framework layer (referred to as "framework layer") 22, an Android runtime and system library layer (referred to as "system runtime library layer") 23, and a kernel layer 24.

[0038] The application layer 21 includes one or more applications. These applications can be system applications or third-party applications. For example, application layer 21 may include a first application that provides screen mirroring functionality. The framework layer 22 provides application programming interfaces (APIs) and programming frameworks for the applications in application layer 21. The system runtime library layer 23 provides support for the upper layer, namely the framework layer 22. When the framework layer 22 is used, the Android operating system runs the C / C++ libraries contained in the system runtime library layer 23 to implement the functions required by the framework layer 22. The kernel layer 24 acts as software middleware between the hardware layer and application layer 21, managing and controlling hardware and software resources.

[0039] In some examples, taking Mircast as an example, after TV 1 is turned on, if a user needs to project content from another device (such as a projection device) onto TV 1, the user can select the control corresponding to the first application provided by TV 1. In response to the selection of the target control for providing the projection function, the processing unit 201 of TV 1 creates a player (e.g., the processing unit 201 creates the player in the Java interface layer of application layer 21; the player creation process includes: creating a surface, setting MediaDataSource (e.g., setting the projection data sent by the projection device to be stored in a buffer, and setting the player to read the projection data from the buffer), setting low latency attributes (e.g., disabling motion compensation, image quality processing, etc.), and creating audio / video in the native framework of application layer 21). The video processing module (Video_thread) and the synchronous rendering module (Video_refresh_thred) are used to read the projection data from the buffer and input it to the demultiplexer (DEMUX) for demultiplexing to obtain the first data. The video processing module also inputs the first data to the decoder for decoding to obtain the second data (e.g., Medciacode). Then, the video processing module performs image recognition on the second data to obtain the first processing result of the first frame image of the current frame; simultaneously, the video processing module stores the second data at a specified location in frame layer 22. The synchronous rendering module reads the second data stored at a specified location (e.g., the ES cache module) and performs audio-visual synchronization (Avsync) on the second data to obtain the third data. The synchronous rendering module also renders the third data to obtain the projection image. After creating the player and establishing a communication connection with the projection terminal, the processing unit 201 of the television set 1 controls the acquisition unit 202 to acquire the projection data of the multimedia file to be projected. The processing unit 201 of the television set 1 parses the projection data acquired by the acquisition unit 202. If the frame data of the first frame in the projection data includes both video data and audio data, the audio clock corresponding to the audio data is used as the master clock for frame synchronization. If the processing unit 201 of the television set 1 determines that the frame data of other frames besides the first frame only contains video data, the master clock is changed from the audio clock to the video clock corresponding to the video data, and frame synchronization is performed according to the video clock. The processing unit 201 of the television set 1 performs frame synchronization according to the target clock and controls the display unit 203 to play the projection data.

[0040] Specifically, the storage unit 204 of the television set 1 is used to store data such as computer programs for the screen projection method provided in this embodiment.

[0041] In the following embodiments, the execution subject of the screen projection method provided in the embodiments of this disclosure is the above-mentioned display device 200, and the display device 200 is a television set 1, to illustrate the method of the embodiments of this application.

[0042] This application provides a screen mirroring method, such as... Figure 4 As shown, the screen projection method may include S11-S14.

[0043] S11. In response to the screen casting operation, obtain the screen casting data of the multimedia file to be cast.

[0044] S12. Analyze the screen projection data. If the first frame of the screen projection data includes both video and audio data, use the audio clock corresponding to the audio data as the master clock for frame synchronization.

[0045] S13. If it is determined that the frame data of all frames except the first frame contains only video data, the master clock is changed from the audio clock to the video clock corresponding to the video data, and frame synchronization is performed according to the video clock.

[0046] S14. Perform frame synchronization according to the target clock and play the screen projection data; wherein, the target clock includes either the audio clock or the video clock.

[0047] In some examples, the mobile phone and TV use the Real-Time Streaming Protocol (RTSP) to control and transmit video streams. When the TV receives the screen mirroring data packet from the mobile phone, it creates a player, sets low-latency attributes during player configuration, creates a read thread, and reads data in real time. After reading the data, it performs demuxing to parse the information in the stream, such as the video-related format (width, height, frame rate, video encoding format) and the audio-related format (number of channels, audio format, etc.). Then, it creates audio and video decoders respectively according to the relevant video and audio formats. Simultaneously, if the TV determines that the first frame of the received screen mirroring data packet contains both audio and video data, it uses the audio clock as the primary clock; otherwise, it uses the video clock. Otherwise, it switches to a 2-channel and creates a thread that checks the received data stream type every 5 seconds. If it finds that there is only video data and no audio data, it changes the synchronization clock to the video clock; if both video and audio are present, it dynamically updates the synchronization clock to the audio clock again. As can be seen, the screen casting method provided in this embodiment, in response to a screen casting operation, acquires the screen casting data of the multimedia file to be cast; parses the screen casting data, and if the frame data of the first frame in the screen casting data includes both video and audio data, uses the audio clock corresponding to the audio data as the master clock for frame synchronization; if it is determined that the frame data of other frames besides the first frame only contains video data, the master clock is changed from the audio clock to the video clock corresponding to the video data, and frame synchronization is performed according to the video clock. This avoids the inability to perform preset operations on video frames when there is no audio or video, thus enabling accurate frame synchronization and reducing playback latency.

[0048] In some feasible examples, combining Figure 4 ,like Figure 5 As shown, the screen projection method provided in this embodiment of the disclosure further includes S15.

[0049] S15. If it is determined that the frame data of other frames besides the first frame contains both video and audio data, change the master clock from the video clock to the audio clock corresponding to the audio data, and perform frame synchronization according to the audio clock.

[0050] In some examples, during the playback of screen-cast data on TV 1, some frame data may contain both video and audio data, while others may contain only video data. Therefore, the screen-casting method provided in this disclosure, when the master clock is an audio clock, if the received frame data contains only video data, changes the master clock from the audio clock to the video clock corresponding to the video data. When the master clock is a video clock, if the received frame data contains both video and audio data, changes the master clock from the video clock to the audio clock corresponding to the audio data. In this way, the master clock can be accurately obtained.

[0051] In some feasible examples, combining Figure 4 ,like Figure 6 As shown, the above S14 can be specifically implemented through the following S140-S143.

[0052] S140. Perform frame synchronization according to the target clock and obtain the parsed projection data.

[0053] S141. When rendering the parsed projection data, obtain the total number of video frames that have not yet been decoded and rendered.

[0054] S142. Based on the total number, obtain the display duration of the video frames.

[0055] S143. Play the video frames in the screen projection data according to the display duration.

[0056] In some examples, when determining the display duration of video frames based on the total number, the relationship between the total number and a preset threshold can be used to determine whether to adjust the display duration of video frames. For example, if the preset threshold is 1, and TV 1 determines that the total number is greater than 1, the display duration of the video frame is adjusted from the first duration to the second duration, and this second duration is used as the display duration of the video frame in the next frame. Since the total number of currently undecoded and unrendered video frames is greater than the preset threshold, this indicates that some of the screen projection data sent by the projection terminal (such as a mobile phone) has not been displayed in time. Therefore, TV 1 can adjust the decoding and rendering time of video frames by adjusting the display duration of the video frames in the received screen projection data. For example, if TV 1 determines that the total number is greater than 1, the display duration of the video frame is adjusted from the first duration to the second duration. Since the second duration is shorter than the first duration, the decoding and rendering speed of the video frames can be accelerated, thereby avoiding latency issues.

[0057] In some examples, when obtaining the display duration of a video frame based on the total number, the difference between the current display duration of the video frame and the ratio of the total number to 1000 can be calculated, and this difference can be used as the display duration of the video frame in the next frame. That is, the display duration of the video frame in the next frame is equal to... t represents the current display duration of the video frame, and A represents the total number.

[0058] In some examples, when obtaining the display duration of a video frame based on the total number, a duration relationship table can be queried based on the total number to determine the preset duration corresponding to that total number. Then, this preset duration is used as the display duration of the frame, that is, the display duration of the video frame is adjusted from the first duration to the preset duration, and this preset duration is used as the display duration of the video frame in the next frame.

[0059] For example, the duration relationship table is shown in Table 1.

[0060] Table 1

[0061] total Preset duration 1 30ms 2 25ms 3 20ms 4 5ms

[0062] Typically, the display duration of a frame is 33.33ms. To prevent slow decoding due to older chips lacking low latency, the display method provided in this embodiment dynamically configures the frame display duration, thereby enabling the decoded YUV data to be rendered as quickly as possible and dumping the YUV buffer. This allows the frame data cached in the es cache module to be sent to the decoder for decoding and rendering as soon as possible, thus reducing latency.

[0063] For example, when the total number is 1, as shown in Table 1, the preset duration is 30ms. At this time, the display duration of the frame before adjustment is 33.33ms. Therefore, the display duration of the video frame can be shortened to reduce latency.

[0064] In some examples, when determining the display duration of a video frame based on the total number, the difference between the current display duration of the video frame and the ratio of the total number to 1000 can be calculated, and this difference can be used as the target duration. Simultaneously, a duration relationship table can be consulted based on the total number to determine the preset duration corresponding to that total number. Furthermore, if the total number is determined to be greater than 1, the display duration of the video frame is adjusted from the first duration to the second duration. Then, the average of the target duration, the preset duration, and the second duration is used as the display duration of the video frame in the next frame. Alternatively, the minimum of the target duration, the preset duration, and the second duration can be used as the display duration of the video frame in the next frame.

[0065] In some examples, the first duration is the initial display duration of the video frame, such as 33.33ms.

[0066] In some feasible examples, combining Figure 6 ,like Figure 7 As shown, the above S142 can be specifically implemented through the following S1420.

[0067] S1420. When the total number is greater than 1, adjust the display duration of the video frame from the first duration to the second duration; wherein the second duration is less than the first duration.

[0068] In some feasible examples, combining Figure 7 ,like Figure 8 As shown, the screen projection method provided in this embodiment of the disclosure further includes S16.

[0069] S16. After adjusting the display duration of the video frame from the first duration to the second duration, if it is determined that the total number is less than or equal to 1, the display duration of the video frame is adjusted from the second duration to the first duration.

[0070] In some examples, during the rendering process after video decoding, the number of received video ES buffers is monitored in real time. If the number of video ES buffers is greater than 1, it indicates that the underlying decoding is too slow. For example, if the underlying chip is old and lacks low latency, the decoding will be too slow. In this case, the ES data is buffered, and the decoded YUV data is rendered as soon as possible. The YUV buffer is dumped to send the video frames stored in the ES buffer module to the decoder and renderer as soon as possible, thereby reducing latency.

[0071] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0072] This application embodiment can divide the screen projection device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0073] like Figure 9 As shown in the diagram, an embodiment of this application provides a schematic diagram of the structure of a display device 200. It includes a processor 101, a communicator 102, and a display 103.

[0074] The processor is configured to, in response to a screen mirroring operation, control the communicator to acquire screen mirroring data of the multimedia file to be mirrored; the processor is also configured to parse the screen mirroring data acquired by the communicator, and if the frame data of the first frame in the screen mirroring data includes both video data and audio data, use the audio clock corresponding to the audio data as the master clock for frame synchronization; the processor is also configured to, if it is determined that the frame data of other frames besides the first frame contains only video data, change the master clock from the audio clock to the video clock corresponding to the video data, and perform frame synchronization according to the video clock; the processor is also configured to perform frame synchronization according to a target clock and control the display to play the screen mirroring data; wherein, the target clock includes either the audio clock or the video clock.

[0075] In some implementable examples, the processor is also configured to change the master clock from the video clock to the audio clock corresponding to the audio data if it is determined that the frame data of frames other than the first frame contains both video and audio data, and to perform frame synchronization according to the audio clock.

[0076] In some implementable examples, the processor is further configured to perform frame synchronization according to a target clock and control the communicator to acquire the parsed projection data; the processor is further configured to acquire the total number of currently undecoded and unrendered video frames when rendering the parsed projection data acquired by the communicator; the processor is further configured to acquire the display duration of the video frames based on the total number; and the processor is further configured to control the display to play the video frames in the projection data according to the display duration.

[0077] In some implementable examples, the processor is further configured to adjust the display duration of a video frame from a first duration to a second duration when the total number is greater than 1; wherein the second duration is less than the first duration.

[0078] In some implementable examples, the processor is further configured to, after adjusting the display duration of a video frame from a first duration to a second duration, adjust the display duration of the video frame from the second duration to the first duration if it is determined that the total number is less than or equal to 1.

[0079] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and their functions will not be repeated here.

[0080] Of course, the display device 200 provided in this application embodiment includes, but is not limited to, the modules described above. For example, the display device 200 may also include a memory 104. The memory 104 may be used to store the program code of the display device 200, and may also be used to store data generated by the display device 200 during operation, such as data in write requests.

[0081] As an example, combined Figure 3 The acquisition unit 202 in the television set 1 performs the same function as the communicator 102, the processing unit 201 performs the same function as the processor 101, the display unit 203 performs the same function as the display 103, and the storage unit 204 performs the same function as the memory 104.

[0082] like Figure 10 As shown, this application embodiment also provides a chip system that can be applied to the display device 200 in the foregoing embodiments. The chip system includes at least one processor 1501 and at least one interface circuit 1502. The processor 1501 may be the processor in the display device 200. The processor 1501 and the interface circuit 1502 are interconnected via a circuit. The processor 1501 can receive and execute computer instructions from the memory of the display device 200 through the interface circuit 1502. When the computer instructions are executed by the processor 1501, the display device 200 can perform the various steps performed by the display device 200 in the foregoing embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application embodiment.

[0083] This application also provides a computer-readable storage medium for storing computer instructions executed by the display device 200.

[0084] This application also provides a computer program product, including computer instructions executed by the above-described display device 200.

[0085] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A display device, characterized in that, include: The processor is configured to control the communicator to acquire the projection data of the multimedia file to be projected in response to the projection operation; The processor is further configured to parse the projection data acquired by the communicator, and if the frame data of the first frame in the projection data includes video data and audio data, the audio clock corresponding to the audio data is used as the master clock for frame synchronization. The processor is further configured to, if it is determined that the frame data of frames other than the first frame contains only video data, change the master clock from the audio clock to the video clock corresponding to the video data, and perform frame synchronization according to the video clock; The processor is also configured to perform frame synchronization according to a target clock and control the display to play the projected data; wherein the target clock includes either the audio clock or the video clock.

2. The display device according to claim 1, characterized in that, The processor is further configured to, if it is determined that the frame data of other frames besides the first frame contains video data and audio data, change the master clock from the video clock to the audio clock corresponding to the audio data, and perform frame synchronization according to the audio clock.

3. The display device according to claim 1, characterized in that, The processor is further configured to perform frame synchronization according to the target clock and control the communicator to acquire the parsed projection data; The processor is further configured to, when rendering the parsed projection data obtained by the communicator, obtain the total number of video frames that are currently not decoded and rendered; The processor is further configured to obtain the display duration of video frames based on the total number; The processor is further configured to control the display to play video frames from the projected data according to the display duration.

4. The display device according to claim 3, characterized in that, The processor is further configured to adjust the display duration of the video frame from a first duration to a second duration when the total number is greater than 1; wherein the second duration is less than the first duration.

5. The display device according to claim 4, characterized in that, The processor is further configured to, after adjusting the display duration of a video frame from a first duration to a second duration, adjust the display duration of the video frame from the second duration to the first duration if it is determined that the total number is less than or equal to 1.

6. A screen projection method, characterized in that, include: In response to a screen mirroring operation, obtain the screen mirroring data of the multimedia file to be mirrored; The screen projection data is parsed. If the frame data of the first frame in the screen projection data includes video data and audio data, the audio clock corresponding to the audio data is used as the master clock for frame synchronization. If it is determined that the frame data of other frames besides the first frame contains only video data, the master clock is changed from the audio clock to the video clock corresponding to the video data, and frame synchronization is performed according to the video clock. Frame synchronization is performed according to the target clock, and the projected data is played; wherein, the target clock includes either the audio clock or the video clock.

7. The screen projection method according to claim 6, characterized in that, The method further includes: If it is determined that the frame data of other frames besides the first frame contains both video and audio data, the master clock is changed from the video clock to the audio clock corresponding to the audio data, and frame synchronization is performed according to the audio clock.

8. The screen projection method according to claim 6, characterized in that, The step of synchronizing frames according to the target clock and playing the projected data includes: Perform frame synchronization according to the target clock and obtain the parsed projection data; When rendering the parsed projection data, obtain the total number of video frames that have not yet been decoded and rendered; Based on the total number, the display duration of the video frame is obtained; Play the video frames from the projected data according to the specified display duration.

9. The screen projection method according to claim 8, characterized in that, The step of obtaining the display duration of video frames based on the total number includes: If the total number is greater than 1, the display duration of the video frame is adjusted from the first duration to the second duration; wherein the second duration is less than the first duration.

10. A computer-readable storage medium, characterized in that, include: The computer-readable storage medium stores a computer program that, when executed by a computing device, causes the computing device to implement the screen projection method according to any one of claims 6-9.

Citation Information

Patent Citations

  • Audio and video synchronous playing method and device, terminal and storage medium

    CN110324689A

  • Screen projection method, screen projection system and electronic equipment

    CN117956212A