Multimedia file playing method and display equipment
By analyzing the first frame of video data of the multimedia file and exiting the prompt information when the pre-operation is completed, the accuracy of data buffering prompt information in the video application is solved, and the user experience of playing multimedia files is improved.
Patent Information
- Application Number
- CN202510245372.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, when video applications play multimedia files, the accuracy of displaying data buffer prompt information when video starts to play, resulting in the problem of black screen or excessive display of prompt information.
By acquiring the multimedia data of the multimedia file, analyzing the video data of the first frame, and controlling the display exit prompt information when the pre-operation is completed. The pre-operation includes image initialization and image parameter setting.
Ensure that the video application accurately closes the prompt information when the first frame of video data is ready, improving the user experience.
Smart Images

Figure CN120281977A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multimedia technologies, and in particular, to a method for playing a multimedia file and a display device. Background Art
[0002] Currently, when a video application plays a multimedia file, a prompt message indicating data buffering is displayed at the start of the video, and this prompt message is closed after the video image of the multimedia file is displayed. For example, the video application closes this prompt message after receiving a display message sent by the player indicating the display of the first frame of the multimedia file.
[0003] However, if the video application receives the display message too early or too late, it may cause a black screen to appear or the prompt message indicating data buffering will still be displayed for a period of time after the video starts playing.
[0004] Therefore, how to ensure the accuracy of the video application in closing this prompt message has become an urgent problem to be solved. Summary of the Invention
[0005] To solve the above technical problems, the present disclosure provides a method for playing a multimedia file and a display device.
[0006] The technical solution of the present disclosure is as follows:
[0007] In a first aspect, the present disclosure provides a display device, including: a display configured to display a display interface of a multimedia file; a controller including a control module of a target application; the controller is configured to: the control module responds to a play operation of playing a multimedia file, obtains multimedia data of the multimedia file, and controls the display to display a prompt message for indicating buffering of the multimedia data of the multimedia file; the control module parses the multimedia data to obtain video data of the first frame of the multimedia file; the control module controls the display to exit the display of the prompt message when a pre-operation on the video data of the first frame is completed; wherein, the pre-operation includes one or more of image initialization and image parameter setting.
[0008] In a second aspect, the present disclosure provides a method for playing a multimedia file, including: responding to a play operation of playing a multimedia file, obtaining multimedia data of the multimedia file, and displaying a prompt message for indicating buffering of the multimedia data of the multimedia file; parsing the multimedia data to obtain video data of the first frame of the multimedia file; exiting the display of the prompt message when a pre-operation on the video data of the first frame is completed; wherein, the pre-operation includes one or more of image initialization and image parameter setting.
[0009] In a third aspect, the present disclosure provides an electronic device, including: a memory and a controller, where the memory is used to store a computer program; and the controller is used to cause the electronic device to implement the multimedia file playing method according to any one of the second aspect when executing the computer program.
[0010] In a fourth aspect, the present invention provides a computer-readable storage medium, including: a computer program stored on the computer-readable storage medium, and the computer program is executed by the controller to implement the multimedia file playing method according to any one of the second aspect.
[0011] In a fifth aspect, the present invention provides a computer program product, which causes a computer to execute the multimedia file playing method according to any one of the second aspect when the computer program product runs on the computer.
[0012] It should be noted that the above computer instructions may be stored in whole or in part on a first computer-readable storage medium. Wherein, the first computer-readable storage medium may be packaged together with the controller of the display device or separately packaged from the controller of the display device, and the present disclosure does not make any limitation thereto.
[0013] The descriptions of the second, third, fourth, and fifth aspects in the present disclosure may refer to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second, third, fourth, and fifth aspects may refer to the beneficial effect analysis of the first aspect, which will not be elaborated herein.
[0014] In the present disclosure, the name of the above display device does not limit the device or function module itself. In actual implementation, these devices or function modules may appear under other names. As long as the functions of each device or function module are similar to those of the present disclosure and fall within the scope of the claims of the present disclosure and their equivalent technologies.
[0015] These aspects or other aspects of the present disclosure will be more clearly understood in the following description.
[0016] The technical solution provided by the present disclosure has the following advantages compared with the prior art:
[0017] The display device provided by the present disclosure may be the above-mentioned display device. The target playback responds to a playback operation of playing a multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt message for indicating the buffered multimedia data of the multimedia file; the target playback parses the multimedia data to obtain the video data of the first frame of the multimedia file; when the pre-operation on the video data of the first frame is completed, it is stated that the video data of the first frame needs to be displayed at the next moment. Therefore, at the next moment, while stopping displaying the prompt message, the video data of the first frame is displayed, ensuring that the prompt message is closed at the moment when the target application closes the display, and solving the problem of how to ensure that the video application closes the prompt message. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 It is a schematic diagram of the scenario of the method for playing a multimedia file provided by an embodiment of the present application;
[0021] Figure 2 It is one of the schematic diagrams of the structure of the display device provided by an embodiment of the present application;
[0022] Figure 3 It is another schematic diagram of the structure of the display device provided by an embodiment of the present application;
[0023] Figure 4 It is one of the schematic diagrams of the flowchart of the method for playing a multimedia file provided by an embodiment of the present application;
[0024] Figure 5 It is another schematic diagram of the flowchart of the method for playing a multimedia file provided by an embodiment of the present application;
[0025] Figure 6 It is another schematic diagram of the flowchart of the method for playing a multimedia file provided by an embodiment of the present application;
[0026] Figure 7 It is another schematic diagram of the flowchart of the method for playing a multimedia file provided by an embodiment of the present application;
[0027] Figure 8 It is another schematic diagram of the flowchart of the method for playing a multimedia file provided by an embodiment of the present application;
[0028] Figure 9 This is the sixth flowchart diagram of the multimedia file playing method provided by the embodiments of the present application;
[0029] Figure 10 This is the seventh flowchart diagram of the multimedia file playing method provided by the embodiments of the present application;
[0030] Figure 11 This is the structural schematic diagram of the display device provided by the embodiments of the present application;
[0031] Figure 12 This is the schematic diagram of a chip system provided by the embodiments of the present application. Detailed implementation manners
[0032] In order to more clearly understand the above objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0033] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.
[0034] The display device provided by the embodiments of the present application may have various implementation forms. For example, it may be a television, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is a specific implementation manner of the display device of the present application.
[0035] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0036] Figure 1 Schematic diagram of the operation scenario between a household device and a control device according to one or more embodiments of the present application, as Figure 1 shown, the user can operate the display device 200 through the terminal device 300 and / or the control device 100. The control device 100 can be a remote control. The 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 instructions through the buttons on the remote control, voice input, control panel input, etc. to control the display device 200. In some embodiments, a mobile terminal, a tablet computer, a computer, a laptop computer, and other intelligent devices can also be used to control the display device 200.
[0037] In some embodiments, the display device provided by the embodiments of the present disclosure can be the above-mentioned display device 200. Among them, a target application is installed in the display device 200. When the user needs to play a multimedia file, the multimedia file can be played through the target application. At this time, the target application responds to the play operation of playing the multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt message for indicating the buffered multimedia data of the multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when the target application completes the pre-operation on the video data of the first frame, it indicates that the first frame of the video data needs to be displayed at the next moment. Therefore, at the next moment, while stopping displaying the prompt message, the first frame of the video data is displayed, which ensures the moment when the target application closes the displayed prompt message and solves the problem of how to ensure that the video application closes the prompt message.
[0038] Figure 2 Shows the hardware configuration block diagram of the display device 200 according to an exemplary embodiment. As Figure 2 shown, the display device 200 includes at least one of 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 interface to an nth interface for input / output. The display 260 can be a display with touch function, such as a touch display. The detector 230 is used to collect signals from the external environment or interact with the outside.
[0039] In some examples, the external device interface 240 may include, but is not limited to, the following: a high-definition multimedia interface (HDMI), an analog or data high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc., any one or more interfaces. It can also be a composite input / output interface formed by the above multiple interfaces.
[0040] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations by means of various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200.
[0041] In some examples, taking the display device 200 applying one or more embodiments as the television 1 and the operating system of the television 1 being the Android system as an example, as Figure 3 shown, the television 1 can be logically divided into an applications layer (abbreviated as the "application layer") 21, an application framework layer (abbreviated as the "framework layer") 22, an Android runtime and system library layer (abbreviated as the "system runtime library layer") 23, and a kernel layer 29.
[0042] Among them, the application layer 21 includes one or more applications. The applications can be system applications or third-party applications. For example: the application layer 21 includes a target application, and the target application is used to play multimedia files.
[0043] The framework layer 22 provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer 21. The system runtime library layer 23 provides support for the upper layer, i.e., the framework layer 22. When the framework layer 22 is used, the Android operating system will run the C / C++ libraries included in the system runtime library layer 23 to implement the functions to be achieved by the framework layer 22. The kernel layer 29 serves as software middleware between the hardware layer and the application layer 21 and is used to manage and control hardware and software resources.
[0044] In some examples, the display device provided by the embodiments of the present application may be the above-mentioned television 1. Among them, a target application is installed in the television 1. When playing a multimedia file, the target application calls the media player middleware of the framework layer 22 of the Android system, and listens to the first prompt message (kWhatOutputFramesRendered) of the video demultiplexing and parsing plug-in (MediaCodec) through the media player middleware, and further detects the value of the target identifier (sys.media.video.render), so as to determine the accurate time when the video data of the first frame is displayed. For example, when the user needs to play a multimedia file, the target application can play the multimedia file through the target application. At this time, the processing unit 101 of the target application responds to the play operation of playing the multimedia file, controls the acquisition unit 102 to acquire the multimedia data of the multimedia file, and controls the display unit 103 to display a prompt message for indicating the buffered multimedia data of the multimedia file; the processing unit 101 of the target application parses the multimedia data acquired by the acquisition unit 102 through the video decoding module 202 to obtain the video data of the first frame of the multimedia file; when the processing unit 101 of the target application completes the pre-operation on the video data of the first frame through the decoding display control module 201, the display control module 203 controls the display unit 103 to exit the display of the prompt message. In this way, the target application can determine whether to exit the display of the prompt message based on the first indication information. Since the first prompt message is generated based on whether the pre-operation on the video data of the first frame is completed, when the pre-operation on the video data of the first frame is completed, the display of the prompt message is exited, ensuring the moment when the target application closes the displayed prompt message.
[0045] In some examples, the decoding display control module 201 is a module of the media player middleware, and sends the first indication information to the processing unit 101 of the target application after listening to the information that the pre-operation of the video data of the first frame is executed sent by the display control module 203.
[0046] In some examples, the video decoding module 202 is a module of the media player middleware. The video decoding module 202 sends the parsed video elementary stream (ES) data into the video demultiplexing and parsing plug-in (MediaCodec) of the Android system, and obtains the decoded video data (usually YUV data) from MediaCode, and calls the interface of MediaCode through the decoding display control module 201 to display the decoded video data.
[0047] In some examples, the display control module 203 is a module of the media player middleware. The display control module 203 registers a callback function (CallBack) with MediaCodec to listen for the message kWhatOutputFramesRendered of MediaCodec. kWhatOutputFramesRendered indicates that MediaCodec sends the video data to be displayed to the display plugin. Among them, for the video data of the first decoded frame, it usually needs to wait for operations such as the initialization of the display plugin and the setting of image-related parameters in the display plugin. There is a time difference between the first kWhatOutputFramesRendered and the actual display of the video data of the first frame. Therefore, after the display control module 203 listens for the first kWhatOutputFramesRendered message, it starts a detection process for the specific flag sys.media.video.render, and detects the value of this attribute every 10 ms. When the display plugin is initialized, the initial value of sys.media.video.render is set to 0, and when the first frame of video data is displayed after the display plugin initialization is completed, the target value of sys.media.video.render is set to 1. When the display control module 203 detects that the value of sys.media.video.render is 1, it sends a first indication message indicating that the pre-operations of the video data of the first frame have been completed to the decoding and display control module 201. After that, when the processing unit of the target application determines that the first indication message has been received in the decoding and display control module 201, it exits the display prompt message.
[0048] In some examples, MediaCodec is a decoding module of the Android system. Among them, when the decoding and display control module 201 calls the interface of MediaCode to display the decoded video data, it means that the media player middleware calls the interface of MediaCodec to send the parsed video ES data to the video decoder, and realizes the decoding and display control of the video data through the interface of MediaCodec.
[0049] In some examples, the display plugin HardwareComposer is a display module of the Android system, which is used to render and display the video data decoded by the video decoding module; among them, the display plugin and MediaCodec of the Android system belong to different processes, and the interface call is an asynchronous operation.
[0050] In some examples, the decoding and display control module 201, the video decoding module 202, and the display control module 203 all belong to the media player middleware layer.
[0051] Specifically, when the execution subject of the multimedia file playing method provided in the embodiments of the present disclosure is the television 1, program codes and other data for storing the multimedia file playing method provided in the embodiments of the present disclosure are stored in the storage unit 104 of the television 1.
[0052] In the following embodiments, taking the execution subject of the multimedia file playing method provided in the embodiments of the present disclosure as the above-mentioned television 1 as an example, the method of the embodiments of the present application will be described.
[0053] The embodiments of the present application provide a multimedia file playing method, which is applied to the television 1, as Figure 4 shown. The multimedia file playing method may include S11-S13.
[0054] S11. In response to a playing operation for playing a multimedia file, obtain multimedia data of the multimedia file, and display a prompt message for indicating buffering of the multimedia data of the multimedia file.
[0055] S12. Parse the multimedia data to obtain video data of the first frame of the multimedia file.
[0056] S13. When a pre-operation on the video data of the first frame is completed, exit the display of the prompt message; wherein, the pre-operation includes one or more of image initialization and image parameter setting.
[0057] In some examples, the pre-operation further includes display time prediction; when the pre-operation on the video data of the first frame is completed, exiting the display of the prompt message includes:
[0058] When one or more of image initialization and image parameter setting on the video data of the first frame are completed, start a timer, and obtain the configuration information and operation information of the television 1.
[0059] Based on the size of the data volume of the frame data of the first frame, the configuration information, and the operation information, determine the first running duration, thus completing the operation of display time prediction.
[0060] In some examples, the configuration information includes one or more of the product model and the model of the processor.
[0061] In some examples, the operation information includes one or more of the network upload rate, the network download rate, the memory occupancy rate, and the processor occupancy rate.
[0062] Exemplarily, a first relation table pre-stored in the memory of the television 1 may be queried based on the configuration information to determine a target relation table; wherein, the target relation table includes theoretical durations corresponding to different data volumes and different operation information.
[0063] Query the target relational table based on the size of the data volume and the running information, determine the theoretical duration corresponding to the size of the data volume and the running information, and use this theoretical duration as the first running duration.
[0064] Based on the preset duration and the first running duration, determine the target duration; where the preset duration is equal to the duration required for the TV 1 to perform image initialization and / or image parameter setting on the video data of the first frame.
[0065] When the cumulative duration of the timer is equal to the target duration, exit the display of the prompt message.
[0066] Exemplarily, the first relational table is shown in Table 1.
[0067] Table 1
[0068] Configuration information Theoretical relationship table Configuration information 1 Theoretical relationship table 1 Configuration information 2 Theoretical relationship table 2
[0069] Table 2
[0070]
[0071] At this time, when the TV 1 obtains the video data of the first frame of the multimedia file, it starts the timer and obtains the configuration information and running information of the TV 1. Then, the TV 1 queries Table 1 based on the configuration information, and can determine the theoretical relational table corresponding to the configuration information, and use the theoretical relational table corresponding to the configuration information as the target relational table. Then, the TV 1 queries in the target relational table in Table 2 through the running information and the size of the data volume of the first frame of data, so as to obtain the theoretical duration corresponding to the size of the data volume and the running information, and use this theoretical duration as the first running duration.
[0072] In some examples, the pre-operation further includes timing comparison; when the pre-operation on the video data of the first frame is completed, exiting the display of the prompt message includes:
[0073] When one or more of image initialization and image parameter setting are completed for the video data of the first frame, obtain the actual liquid crystal driving signal of the video data of the first frame for which one or more of image initialization and image parameter setting are completed;
[0074] Perform timing comparison between the current liquid crystal driving signal of the TV 1 and the actual liquid crystal driving signal, and when it is determined that the current liquid crystal driving signal is the same as the actual liquid crystal driving signal, exit the display of the prompt message.
[0075] In some examples, the pre-operation includes display time prediction and timing comparison; when the pre-operation on the video data of the first frame is completed, exiting the display of the prompt message includes:
[0076] When obtaining the video data of the first frame of the multimedia file, start the timer, and obtain the actual liquid crystal driving signal of the video data of the first frame that has completed one or more of image initialization and image parameter settings, as well as the configuration information and operation information of the television 1.
[0077] Based on the size of the data volume of the frame data of the first frame, the configuration information, and the operation information, determine the first running duration;
[0078] When the cumulative duration of the timer is equal to the target duration and the current liquid crystal driving signal is the same as the actual liquid crystal driving signal, exit the display of the prompt message.
[0079] In some examples, when the pre - operation on the video data of the first frame is completed and the display prompt message is exited, the target display information can be created during the pre - operation on the video data of the first frame; wherein, the target display information is used to indicate the pre - operation on the video data. After determining to create the target display information, the target identifier is started. When the value of the target identifier is the target value, the first indication information for displaying the video data of the first frame is generated. Based on the first indication information, the display is controlled to exit the display of the prompt message. For example, when initializing MediaCodec, the initial value of the target identifier sys.media.video.render needs to be assigned 0. The display control module 203 of the media player middleware registers a callback function with MediaCodec. This callback function is used to monitor the first indication information kWhatOutputFramesRendered received by MediaCodec. This message will be received once for each rendered video frame. When the kWhatOutputFramesRendered is received for the first time, the display control module 203 creates a detection thread. This detection thread is used to loop - detect the value of sys.media.video.render. The loop - detection time can be set to detect once every 10 ms. In the Android system's display plugin HardwareComposer, customized modification is required. When the video data of the first frame is actually displayed, the value of sys.media.video.render needs to be set to 1. When the display control module 203 detects that the value of sys.media.video.render is 1, it sends a first indication message indicating that the pre - operation on the video data of the first frame has been completed to the decoding display control module 203 through the video decoding module 202. At the same time, the display control module 203 ends the thread operation. The decoding display control module 202 sends a first indication message indicating that the pre - operation on the video data of the first frame has been completed to the target application, and the entire detection process ends. The detection of sys.media.video.render is carried out in a newly created thread. This design can avoid blocking. At the same time, this thread needs to determine whether the video playback has ended each time it performs detection. If the video has ended playback, no detection is performed and the thread ends.
[0080] As can be seen from the above, for the multimedia file playing method provided by the embodiments of the present disclosure, the target application responds to the playing operation of playing the multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt message for indicating buffering the multimedia data of the multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when the target application completes the pre - operation on the video data of the first frame, it exits the display of the prompt message, ensuring the moment when the target application closes the displayed prompt message.
[0081] In some implementable examples, in combination with Figure 4 , such as Figure 5 shown, the above S13 can be specifically implemented through the following S130 - S133.
[0082] S130. When pre - operating on the video data of the first frame, create target display information; wherein, the target display information is used to indicate that the video data has been pre - operated on.
[0083] S131. After determining that the target display information is created, start the target identifier.
[0084] In some examples, the initial value of the target identifier can be 0.
[0085] S132. When the value of the target identifier is the target value, generate the first indication information for the display of the video data of the first frame.
[0086] In some examples, the target value can be 1.
[0087] In some examples, when the value of the target identifier is the target value, it indicates that the player of the TV 1 needs to display the rendered video data of the first frame at the next moment. Therefore, the player needs to generate the first indication information for the display of the video data of the first frame. Further, the player can notify the target application that it needs to display the rendered video data of the first frame at the next moment. At this time, after receiving the first indication information sent by the player, the target application can control the display to exit the display of the prompt information, so as to more accurately determine the moment to close the display of the prompt information and ensure the user experience.
[0088] S133. Based on the first indication information, control the display to exit the display of the prompt information.
[0089] As can be seen from the above, in the method for playing a multimedia file provided by the embodiments of the present disclosure, the target application responds to the play operation of playing the multimedia file, obtains the multimedia data of the multimedia file, and displays the prompt information for indicating the buffering of the multimedia data of the multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when pre - operating on the video data of the first frame, create target display information; after determining that the target display information is created, start the target identifier; when the value of the target identifier is the target value, generate the first indication information for the display of the video data of the first frame. Based on the first indication information, control the display to exit the display of the prompt information, ensuring the moment when the target application closes the display of the prompt information.
[0090] In some implementable examples, in combination with Figure 5 , such as Figure 6As shown, the above S131 can be specifically implemented by the following S1310.
[0091] S1310: When the callback function returns the second indication information indicating that the target display information has been created, determine that the target display information has been created and start the target identifier; where the callback function is used to monitor the target display information.
[0092] As can be seen from the above, in the multimedia file playing method provided by the embodiments of the present disclosure, the target application responds to the playing operation of playing the multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt information for indicating the multimedia data of the buffered multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when performing a pre-operation on the video data of the first frame, create the target display information; when the callback function returns the second indication information indicating that the target display information has been created, determine that the target display information has been created and start the target identifier; when the value of the target identifier is the target value, generate the first indication information for displaying the video data of the first frame. Based on the first indication information, control the display to exit the display of the prompt information, ensuring the moment when the target application closes the displayed prompt information.
[0093] In some feasible examples, in combination with Figure 5 , such as Figure 7 As shown, the above S132 can be specifically implemented by the following S1320 and S1321.
[0094] S1320: Create a detection thread for circularly detecting the value of the target identifier.
[0095] S1321: When the detection thread determines that the value of the target identifier is the target value, generate the first indication information for displaying the video data of the first frame.
[0096] As can be seen from the above, in the multimedia file playing method provided by the embodiments of the present disclosure, the target application responds to the playing operation of playing the multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt information for indicating the multimedia data of the buffered multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when performing a pre-operation on the video data of the first frame, create the target display information; after determining that the target display information has been created, start the target identifier; create a detection thread for circularly detecting the value of the target identifier; when the detection thread determines that the value of the target identifier is the target value, generate the first indication information for displaying the video data of the first frame. Based on the first indication information, control the display to exit the display of the prompt information, ensuring the moment when the target application closes the displayed prompt information.
[0097] In some feasible examples, in combination with Figure 7 , such as Figure 8As shown, the method for playing a multimedia file provided by an embodiment of the present disclosure further includes: S14.
[0098] S15. When the pre-operation on the video data of the first frame is completed, switch the initial value of the target identifier to the target value.
[0099] As can be seen from the above, for the method for playing a multimedia file provided by an embodiment of the present disclosure, the target application responds to a play operation for playing a multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt message for indicating buffering of the multimedia data of the multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when performing a pre-operation on the video data of the first frame, creates target display information; after determining to create the target display information, starts the target identifier; creates a detection thread for circularly detecting the value of the target identifier; when the pre-operation on the video data of the first frame is completed, switches the initial value of the target identifier to the target value. When the detection thread determines that the value of the target identifier is the target value, generates a first indication message for displaying the video data of the first frame. Based on the first indication message, controls the display to exit the display of the prompt message, ensuring the moment when the target application closes the displayed prompt message.
[0100] In some feasible examples, in combination with Figure 7 , as Figure 9 shown, the above S1321 can be specifically implemented by the following S13210.
[0101] S13210. When the detection thread determines that the value of the target identifier is the initial value and no user operation to end playing the multimedia file is received, continue to obtain the value of the target identifier until the detection thread determines that the value of the target identifier is the target value, and then generate a first indication message for displaying the video data of the first frame.
[0102] As can be seen from the above, for the method for playing a multimedia file provided by an embodiment of the present disclosure, the target application responds to a play operation for playing a multimedia file, obtains the multimedia data of the multimedia file, and displays a prompt message for indicating buffering of the multimedia data of the multimedia file; the target application parses the multimedia data to obtain the video data of the first frame of the multimedia file; when performing a pre-operation on the video data of the first frame, creates target display information; after determining to create the target display information, starts the target identifier; creates a detection thread for circularly detecting the value of the target identifier; when the detection thread determines that the value of the target identifier is the initial value and no user operation to end playing the multimedia file is received, continue to obtain the value of the target identifier until the detection thread determines that the value of the target identifier is the target value, and then generate a first indication message for displaying the video data of the first frame. Based on the first indication message, controls the display to exit the display of the prompt message, ensuring the moment when the target application closes the displayed prompt message.
[0103] In some feasible examples, in combination with Figure 8 , such as Figure 9 shown, the method for playing a multimedia file provided by an embodiment of the present disclosure further includes: S15.
[0104] S15. When the detection thread determines that the value of the target identifier is the initial value and receives a user operation to end the playback of the multimedia file, end the detection thread.
[0105] As can be seen from the above, for the method for playing a multimedia file provided by an embodiment of the present disclosure, the target application responds to a playback operation for playing a multimedia file, obtains multimedia data of the multimedia file, and displays a prompt message for indicating the multimedia data for buffering the multimedia file; the target application parses the multimedia data to obtain video data of the first frame of the multimedia file; when performing a pre-operation on the video data of the first frame, creates target display information; after determining to create the target display information, starts the target identifier; creates a detection thread for circularly detecting the value of the target identifier; when the detection thread determines that the value of the target identifier is the initial value and receives a user operation to end the playback of the multimedia file, ends the detection thread, ensuring the moment when the target application closes the displayed prompt message.
[0106] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. To implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or in the form of computer software driving the hardware depends on the specific application and design constraint conditions of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0107] Embodiments of the present application can divide the display device into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0108] Such as Figure 11 shown, an embodiment of the present application provides a structural schematic diagram of a display device. It includes a controller 101 and a display 102, and the controller 101 includes a control module 1010.
[0109] A display 102, configured to display a display interface of a multimedia file;
[0110] The controller 101 includes a control module 1010 for the target application; the controller 101 is configured to:
[0111] In response to a playback operation of playing a multimedia file, the control module 1010 acquires the multimedia data of the multimedia file and controls the display 102 to display a prompt message for indicating the buffered multimedia data of the multimedia file;
[0112] The control module 1010 parses the multimedia data to obtain the video data of the first frame of the multimedia file;
[0113] When the pre-operation on the video data of the first frame is completed, the control module 1010 controls the display 102 to exit the display of the prompt message; wherein, the pre-operation includes one or more of image initialization and image parameter setting.
[0114] In some implementable examples, when the control module 1010 generates a first indication message for displaying the video data of the first frame when the pre-operation on the video data of the first frame is completed, it is specifically configured to:
[0115] When performing a pre-operation on the video data of the first frame, create target display information; wherein, the target display information is used to indicate that the pre-operation has been performed on the video data;
[0116] After determining that the target display information is created, start the target identifier;
[0117] When the value of the target identifier is the target value, generate a first indication message for displaying the video data of the first frame;
[0118] Based on the first indication message, control the display 102 to exit the display of the prompt message.
[0119] In some implementable examples,
[0120] When the control module 1010 starts the target identifier after determining that the target display information is created, it is specifically configured to:
[0121] When the callback function returns a second indication message indicating that the target display information has been created, determine that the target display information has been created and start the target identifier; wherein, the callback function is used to monitor the target display information.
[0122] In some implementable examples, when the control module 1010 generates a first indication message for displaying the video data of the first frame when the value of the target identifier is the target value, it is specifically configured to:
[0123] Create a detection thread for looping through the values of the target identifier;
[0124] When the detection thread determines that the value of the target identifier is the target value, generate a first indication message for the display of the video data of the first frame.
[0125] In some implementable examples,
[0126] The control module 1010 is further configured to switch the initial value of the target identifier to the target value when the pre-operation on the video data of the first frame is completed.
[0127] In some implementable examples,
[0128] When the control module 1010 executes the operation of generating a first indication message for the display of the video data of the first frame when the detection thread determines that the value of the target identifier is the target value, it is specifically configured as follows:
[0129] When the detection thread determines that the value of the target identifier is the initial value and no user operation to end playing the multimedia file is received, continue to obtain the value of the target identifier until the detection thread determines that the value of the target identifier is the target value, and then generate a first indication message for the display of the video data of the first frame.
[0130] In some implementable examples,
[0131] The control module 1010 is further configured to: when the detection thread determines that the value of the target identifier is the initial value and a user operation to end playing the multimedia file is received, end the detection thread.
[0132] Among them, all relevant contents of each step involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and their functions will not be elaborated here.
[0133] Of course, the display device provided in the embodiments of the present application includes but is not limited to the above modules. For example, the display device may further include a memory 103. The memory 103 can be used to store the program code of the display device and can also be used to store the data generated during the operation of the display device, such as the data in the write request, etc.
[0134] As an example, in combination with Figure 3 , the functions implemented by the processing unit 101 in the television 1 are the same as those of the control module 1010 in the controller 101, the functions implemented by the display unit 103 are the same as those of the display 102, the functions implemented by the acquisition unit 102 in the television 1 are the same as those of the communicator, and the functions implemented by the storage unit 104 are the same as those of the memory 103.
[0135] Such as Figure 12As shown, an embodiment of the present application further provides a chip system, which can be applied to the display device in the foregoing embodiment. The chip system includes at least one processor 1501 and at least one interface circuit 1502. The processor 1501 can be the processor in the above display device. The processor 1501 and the interface circuit 1502 can be interconnected through a line. The processor 1501 can receive and execute computer instructions from the memory of the above display device through the interface circuit 1502. When the computer instructions are executed by the processor 1501, the display device can be made to execute each step performed by the display device in the foregoing embodiment. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations thereto.
[0136] An embodiment of the present application further provides a computer-readable storage medium for storing computer instructions for the operation of the above display device.
[0137] The foregoing are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A display device, characterized in that, Comprising: A display configured to display a display interface of a multimedia file; The controller includes a control module for the target application; The controller is configured to: The control module, in response to a play operation for playing a multimedia file, acquires multimedia data of the multimedia file, and controls the display to display a prompt message for indicating buffering of the multimedia data of the multimedia file; The control module parses the multimedia data to obtain video data of the first frame of the multimedia file; When the pre-operation on the video data of the first frame is completed, the control module controls the display to exit displaying the prompt message; wherein, the pre-operation includes one or more of image initialization and image parameter setting.
2. The display device according to claim 1, wherein When the control module executes and exits displaying the prompt message when the pre-operation on the video data of the first frame is completed, it is specifically configured to: When performing a pre-operation on the video data of the first frame, create target display information; wherein, the target display information is used to indicate that a pre-operation has been performed on the video data; After determining that the target display information is created, start a target identifier; When the value of the target identifier is a target value, generate first indication information for displaying the video data of the first frame; Based on the first indication information, control the display to exit displaying the prompt message.
3. The display device according to claim 2, wherein When the control module executes and starts the target identifier after determining that the target display information is created, it is specifically configured to: When a callback function returns second indication information indicating that the target display information has been created, determine that the target display information has been created and start the target identifier; wherein, the callback function is used to monitor the target display information.
4. The display device according to claim 2, wherein When the control module executes and generates the first indication information for displaying the video data of the first frame when the value of the target identifier is a target value, it is specifically configured to: Create a detection thread for the application to loop and detect the value of the target identifier; When the detection thread determines that the value of the target identifier is a target value, generate the first indication information for displaying the video data of the first frame.
5. The display device according to claim 4, wherein The control module is further configured to switch an initial value of the target identifier to a target value when the pre-operation on the video data of the first frame is completed.
6. The display device according to claim 4, wherein When the control module executes and generates the first indication information for displaying the video data of the first frame when the detection thread determines that the value of the target identifier is a target value, it is specifically configured to: When the detection thread determines that the value of the target identifier is the initial value and no user operation to end the playback of the multimedia file is received, continue to obtain the value of the target identifier until the detection thread determines that the value of the target identifier is the target value, and then generate the first indication information for displaying the video data of the first frame.
7. The display device according to claim 6, wherein: The control module is further configured to: when the detection thread determines that the value of the target identifier is the initial value and a user operation to end the playback of the multimedia file is received, end the detection thread.
8. A method for playing a multimedia file, characterized in that Comprising: In response to a playback operation of playing a multimedia file, obtain the multimedia data of the multimedia file and display a prompt information for indicating buffering the multimedia data of the multimedia file; Parse the multimedia data to obtain the video data of the first frame of the multimedia file; When the pre-operation on the video data of the first frame is completed, stop displaying the prompt information; wherein the pre-operation includes one or more of image initialization and image parameter setting.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the multimedia file playback method according to claim 8.
10. A computer program product, characterized in that, When the computer program product runs on a computer, it causes the computer to implement the multimedia file playback method according to claim 8.