Video playing method and device and electronic equipment
By detecting the value of the target application setting surface and determining the playback status, the limitations of the picture-in-picture function of the Android system on control operation and layout are solved, and flexible control of video decoding and display is achieved, improving the stability and flexibility of the Android system.
Patent Information
- Application Number
- CN202410617307.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2025-06-10
AI Technical Summary
The picture-in-picture function provided by the Android system has many restrictions on the operation and layout of the controls, which is difficult to meet the needs of customized function development.
When the target application sets the surface through the Java layer interface of MediaPlayer by detecting that the target application is set, the surface setting value is obtained, the playback status of the multimedia file is determined based on the setting value, and the display is controlled to play the multimedia file according to the playback status.
It realizes flexible control of video decoding and display, avoids excessive dependence on underlying decoding manufacturers, takes into account the application's multiple video window display methods, and improves the software stability and flexibility of the Android system.
Smart Images

Figure CN120128759A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of display technologies, and in particular, to a video playing method, apparatus, and electronic device. Background Art
[0002] Multimedia video playback has become the main function of current smart TVs. With the development of video recording devices and the enhancement of the processing capabilities of smart TV chips, the forms of smart TV video playback are also undergoing different changes. For example, multiple video streams can be supported simultaneously, and videos can be played at multiple positions on the screen in floating window form. Although the Android system provides a picture-in-picture function, the picture-in-picture function provided by the Android system has many restrictions on the operation and layout of controls, and the picture-in-picture function provided by the system cannot meet the design requirements when customizing function development. Summary of the Invention
[0003] To solve the above technical problems, the present disclosure provides a video playing method, apparatus, and electronic device.
[0004] The technical solution of the present disclosure is as follows:
[0005] In a first aspect, the present disclosure provides a display device, including: a processor configured to, during the process of playing a multimedia file, if it is detected that a target application sets a surface through an interface of the Java layer of MediaPlayer, control a communicator to obtain a setting value of the surface; the processor is further configured to determine a playing state of the multimedia file based on the setting value obtained by the communicator; wherein the playing state includes any one of prohibited playing and continued playing; the processor is further configured to control a display to play the multimedia file according to the playing state.
[0006] In a second aspect, the present disclosure provides a video playing method, including: during the process of playing a multimedia file, if it is detected that a target application sets a surface through an interface of the Java layer of MediaPlayer, obtain a setting value of the surface; determine a playing state of the multimedia file based on the setting value; wherein the playing state includes any one of prohibited playing and continued playing; play the multimedia file according to the playing state.
[0007] In a third aspect, the present disclosure provides an electronic device, including: a memory and a processor, the memory is used for storing a computer program; the processor is used for, when executing the computer program, enabling the electronic device to implement any one of the video playing methods provided in the first aspect above.
[0008] Fourthly, the present disclosure provides a computer-readable storage medium, including: a computer program stored on the computer-readable storage medium, which, when executed by a computing device, enables the computing device to implement any of the video playback methods provided in the first aspect above.
[0009] Fifthly, the present invention provides a computer program product, which, when running on a computer, enables the computer to execute any of the video playback methods provided in the first aspect.
[0010] It should be noted that the above computer instructions can be stored in whole or in part on the first computer-readable storage medium. Among them, the first computer-readable storage medium can be packaged together with the processor of the video playback device or separately packaged from the processor of the video playback device. The present disclosure does not make any limitations in this regard.
[0011] The descriptions of the second aspect, the third aspect, the fourth aspect, and the fifth aspect in the present disclosure can refer to the detailed description of the first aspect; and the beneficial effects of the descriptions of the second aspect, the third aspect, the fourth aspect, and the fifth aspect can refer to the analysis of the beneficial effects of the first aspect, which will not be elaborated here.
[0012] In the present disclosure, the name of the above video playback device does not constitute a limitation to the device or functional module itself. 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 the present disclosure and fall within the scope of the claims of the present disclosure and their equivalent technologies.
[0013] These aspects or other aspects of the present disclosure will be more clearly understood in the following description.
[0014] The technical solution provided by the present disclosure has the following advantages compared with the prior art:
[0015] As described above, in the video playback method provided by the present disclosure, during the process of playing a multimedia file, if it is detected that the target application sets the surface through the interface of the Java layer of the MediaPlayer, the set value of the surface is obtained; based on the set value, the playback state of the multimedia file is determined; wherein, the playback state includes any one of prohibited playback and continued playback; the multimedia file is played according to the playback state. In this way, when changing the set value of the surface in the Android media player middleware layer, the control and management of video decoding and display are avoided from overly relying on the underlying decoding manufacturers. At the same time, various video window display methods of the application can be taken into account, and the management and control of the video display window can be carried out flexibly and effectively, which can improve the software stability and flexibility of the Android system, and solve the problem that the picture-in-picture function provided by the Android system has many restrictions on the operation and layout of controls, and the picture-in-picture function provided by the system cannot meet the design requirements when customizing function development. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings herein are incorporated into 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.
[0017] 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.
[0018] Figure 1 It is a schematic diagram of the software architecture of the media player in the prior art;
[0019] Figure 2 It is one of the flow schematic diagrams of the video playback method provided by the embodiment of the present application;
[0020] Figure 3 It is one of the structural schematic diagrams of the display device in the video playback method provided by the embodiment of the present application;
[0021] Figure 4 It is the second structural schematic diagram of the display device in the video playback method provided by the embodiment of the present application;
[0022] Figure 5 It is one of the flow schematic diagrams of the video playback method provided by the embodiment of the present application;
[0023] Figure 6 It is the second flow schematic diagram of the video playback method provided by the embodiment of the present application;
[0024] Figure 7The third schematic flowchart of the video playing method provided by the embodiment of the present application;
[0025] Figure 8 The fourth schematic flowchart of the video playing method provided by the embodiment of the present application;
[0026] Figure 9 The fifth schematic flowchart of the video playing method provided by the embodiment of the present application;
[0027] Figure 10 The schematic structural diagram of the display device provided by the embodiment of the present application;
[0028] Figure 11 The schematic diagram of a chip system provided by the embodiment of the present application. Detailed implementation manners
[0029] 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.
[0030] 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.
[0031] The display device provided by the embodiment 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 2 and Figure 3 A specific implementation manner of the display device of the present application.
[0032] 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, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0033] Figure 1 It is the software architecture of the Android system media player. The most commonly used interface in the application is the Java layer interface of the media player, that is, the Java layer interface of MediaPlayer. The media player middleware layer in the figure is a customized development module for the Android native media player MediaPlayer. It can be seen from this figure that from the application to the underlying player, the interfaces called need to go through several layers including Java, JNI, and C++. In the Android system, the layered call of the interfaces is achieved through cross-process calls.
[0034] To address this issue, this paper proposes a video decoding and display control solution where the surface is set to NULL and restored from NULL to non-NULL. By monitoring the change of the surface state in the media player middleware layer, the operation mode of the video decoding and display module is adjusted, avoiding the abnormal playback problem caused by the change of the surface during video playback. The specific implementation process is as follows:
[0035] Figure 2 It is a schematic diagram of the operation scenario between a display device and a control device according to one or more embodiments of the present application. As Figure 2 shown, the user can operate the display device 200 through the mobile terminal 300 and 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.
[0036] In some embodiments, the electronic device provided by the embodiments of the present application can be the above-mentioned display device 200. Among them, when the display device 200 is playing a multimedia file and needs to modify the surface, the setting value of the surface can be modified through the target application installed on the display device 200. At this time, when the display device 200 is playing a multimedia file and detects that the target application sets the surface through the Java layer interface of MediaPlayer, the setting value of the surface is obtained; the display device 200 determines the playback state of the multimedia file based on the setting value; where the playback state includes any one of prohibited playback and continued playback; the multimedia file is played according to the playback state.
[0037] Figure 3 It shows a hardware configuration block diagram of the display device 200 according to an exemplary embodiment. As Figure 3The display device 200 shown 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, a RAM, a ROM, and first to nth interfaces for input / output. The display 260 can be a display with touch function, such as a touch display. The tuner-demodulator 210 receives broadcast television signals through 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 of the external environment or interact with the outside. The controller 250 and the tuner-demodulator 210 can be located in different split devices, that is, the tuner-demodulator 210 can also be in an external device of the main device where the controller 250 is located, such as an external set-top box, etc.
[0038] 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 the memory. The controller 250 controls the overall operation of the display device 200.
[0039] In some examples, taking the display device 200 of one or more embodiments as an example of a television 1, and the operating system of the television 1 being the Android system, such as Figure 4 As shown, the television 1 can be logically divided into an applications layer (abbreviation "application layer") 21, an application framework layer (abbreviation "framework layer") 22, an Android runtime and system library layer (abbreviation "system runtime library layer") 23, and a kernel layer 24.
[0040] 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 can provide a modification to the surface of the television 1. 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, that is, 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 24 serves as software middleware between the hardware layer and the application layer 21, and is used to manage and control hardware and software resources.
[0041] In some examples, when the TV 1 is playing a multimedia file, if the user needs to modify the surface, the user can modify the setting value of the surface through the target application installed on the TV 1. At this time, during the process of playing the multimedia file, the processing unit 201 of the TV 1 detects whether the target application sets the setting value of the surface through the interface of the Java layer of MediaPlayer through the decoding and display control module of the framework layer 22. If it is detected that the target application sets the surface through the interface of the Java layer of MediaPlayer, the control acquisition unit 202 acquires the setting value of the surface; the processing unit 201 of the TV 1 determines the playback state of the multimedia file based on the setting value acquired by the acquisition unit 202. The processing unit 201 of the TV 1 controls the display unit 203 to play the multimedia file according to the playback state through the decoding and display control module of the framework layer 22.
[0042] Specifically, the storage unit 204 of the TV 1 is used to store data such as the computer program of the video playback method provided by the embodiments of the present disclosure.
[0043] In the following embodiments, the execution subject of the video playback method provided by the embodiments of the present disclosure is the above display device 200, and the display device 200 is the TV 1 as an example to illustrate the method of the embodiments of the present application.
[0044] The embodiments of the present application provide a video playback method, as Figure 5 shown, the video playback method may include S11 - S13.
[0045] S11. During the process of playing a multimedia file, if it is detected that the target application sets the surface through the interface of the Java layer of MediaPlayer, acquire the setting value of the surface.
[0046] S12. Determine the playback state of the multimedia file based on the setting value; wherein, the playback state includes any one of prohibited playback and continued playback;
[0047] In some examples, when the set value is empty, set the video frame dropping status flag to true and perform a prohibition operation; wherein, the prohibition operation includes the operation of prohibiting the display of the multimedia file; when the prohibition operation includes the operation of prohibiting the display of the multimedia file, determine that the playback status is prohibited playback. At the same time, obtain the playback parameters of the multimedia file; wherein, the playback parameters at least include the frame rate and the playback speed; based on the playback parameters, determine the display interval time of the video frames of the multimedia file; perform a frame dropping operation on the undecoded video frames according to the display interval time. In this way, it can be ensured that the video is still consumed at the playback speed, ensuring the normal operation of the file parsing module, and enabling the video data to be decoded and displayed in a timely manner after the surface is reset to non-empty, avoiding long-term image stuttering.
[0048] Or,
[0049] When the set value is non-empty, obtain the video frame dropping status flag; when the video frame dropping status flag is true, stop performing the frame dropping operation on the undecoded video frames at the interval time; decode the multimedia file and display it according to the decoded multimedia file.
[0050] Or, when the video frame dropping status flag is not true, decode the multimedia file and display it according to the decoded multimedia file.
[0051] S13. Play the multimedia file according to the playback status.
[0052] In some examples, the decoding and display control module: detects the set value of the surface set by the target application, and when the set value of the Surface is NULL or is set from NULL to non-empty, performs different setting controls on the video decoding module and the video display module respectively;
[0053] Video decoding module: sends the parsed video raw stream ES (Elementary Stream) data into the video decoder (MediaCodec), and obtains the decoded video data (usually YUV data) from the video decoder (MediaCodec), and controls the video decoding process according to different status flags set by the decoded video data display control module;
[0054] Video display module: performs audio-visual synchronization control on the decoded video data (usually YUV data), and controls the video display process according to different status flags set by the decoding and display control module.
[0055] MediaCodec: The decoding and display module of the Android system. The media player middleware calls the interfaces of this module to set the surface to the underlying system for applying for data buffer (Buffer), and realizes the decoding and display control of video data through the interfaces of this module.
[0056] Among them, the decoding and display control module, the video decoding module, and the display control module all belong to the media player middleware layer.
[0057] In some examples, the software process control for surface change during video playback by the target application: The target application calls the interfaces of the MediaPlayer java layer through the decoding and display control module to set the new setting value of the surface. When the decoding and display control module detects the setting value of the surface set by the target application, it first judges whether the new surface is NULL. If it is not NULL, it detects the flag indicating the frame drop state. If it is currently in the frame drop state, it changes the flag indicating the frame drop state, closes the frame drop state, and performs normal decoding and display of the video. If it is not currently in the frame drop state, it directly performs normal decoding and display of the video; when the newly set surface is NULL, it sets the frame drop state flag to true. Through this state flag, the video decoding module and the display module will prohibit calling the relevant interfaces of MediaCodec and prohibit video decoding and display operations. Next, it obtains the frame rate and playback speed (1x speed, 1.5x speed, 0.8x speed, etc.) of the currently playing video file, estimates the display interval time of video frames based on the frame rate and playback speed, and the video decoding module performs frame dropping operations on the original video stream es data according to the estimated video frame interval time. The purpose of this design is to ensure that the video is still consumed at the playback speed, ensure the normal operation of the file parsing module, and enable the video data to be decoded and displayed in a timely manner after the surface is reset to non-NULL, avoiding long-term image stuttering.
[0058] As can be seen from the above, this proposal realizes the control and management of video decoding and display when the surface changes in the Android media player middleware layer, avoids over-reliance on underlying decoding manufacturers, and can also take into account various video window display methods of applications. It can flexibly and effectively manage and control the video display window, and improve the software stability and flexibility of the Android system.
[0059] In some feasible examples, combined with Figure 5 , such as Figure 6 shown, the above S12 can be specifically implemented through the following S120 and S121.
[0060] S120: If the setting value is empty, set the video frame loss status flag to true and perform a prohibition operation, wherein the prohibition operation includes prohibiting the display of multimedia files. S121: If the prohibition operation includes prohibiting the display of multimedia files, determine that the play status is prohibited.
[0061] In some examples, when the setting value is empty, it indicates that the user needs to perform a customized design. At this time, since the current surface is empty, TV 1 no longer displays the image. If the video frame continues to be decoded, a large amount of computing resources will be occupied. Therefore, the video frame loss status flag can be set to true, so that the video decoding module performs a frame loss operation on the original video stream es data according to the estimated video frame interval time. The purpose of this design is to ensure that the video is still consumed at the playback speed and to ensure the normal operation of the file parsing module. At the same time, by prohibiting the display of multimedia files, it is ensured that TV 1 no longer displays images, avoiding long-term freezes in the picture displayed by TV 1.
[0062] In some possible implementation examples, combined with Figure 6 ,like Figure 7 As shown, the above S13 can be specifically implemented through the following S130-S132.
[0063] S130, when it is determined that the playback state is prohibited, obtaining playback parameters of the multimedia file; wherein the playback parameters include at least a frame rate and a playback speed;
[0064] S131, based on the playback parameters, determine the display interval of the video frames of the multimedia file. In some examples, the playback parameters can be input into the estimation model for prediction to obtain the display interval of the video frames of the multimedia file. The training process of the estimation model is as follows:
[0065] The training sample data and the marking result of the training sample data are obtained, wherein the training sample data includes at least one historical playback parameter, and the marking result includes the historical display interval time corresponding to each historical playback parameter.
[0066] The training sample data is input into the neural network model for learning, and the prediction results of the neural network model for the training sample data are obtained.
[0067] Based on the prediction results and labeling results, the network parameters of the neural network model are adjusted until the neural network model converges to obtain an estimation model.
[0068] In some examples, the actual display time of each frame (the inverse of the frame rate) can be determined according to the frame rate. Then, the display interval time is obtained according to the ratio of the actual display time to the playback speed.
[0069] S132. Perform a frame dropping operation on the undecoded video frames according to the display interval time. In some implementable examples, in combination with Figure 5 , such as Figure 8 shown, the above S12 can be specifically implemented by the following S122, and the above S13 can be specifically implemented by the following S133 and S134.
[0070] S122. When the set value is non-empty, obtain the video frame dropping status flag;
[0071] S133. When the video frame dropping status flag is true, determine that the playback status is to continue playing, and stop performing the frame dropping operation on the undecoded video frames according to the interval time;
[0072] S134. Decode the multimedia file and display it according to the decoded multimedia file.
[0073] In some examples, when the set value is non-empty (i.e., non-empty NULL), it indicates that the user no longer needs to perform customized design. Therefore, the frame dropping operation cannot be performed. That is, when the set value is non-empty, obtain the video frame dropping status flag. When the video frame dropping status flag is true, determine that the playback status is to continue playing, and stop performing the frame dropping operation on the undecoded video frames according to the interval time. Thus, the video decoding module decodes the video frames and, under the control of the display control module, continues to display the decoded video frames on the screen of the TV 1 to ensure the user experience.
[0074] In some implementable examples, in combination with Figure 8 , such as Figure 9 shown, the video playback method provided by the embodiments of the present disclosure further includes: S14.
[0075] S14. When the video frame dropping status flag is not true, determine that the playback status is to continue playing, determine that the playback status is to continue playing, decode the multimedia file, and display it according to the decoded multimedia file.
[0076] In some implementable examples, the prohibited operations further include one or more of prohibiting the invocation of the MediaCodec interface and prohibiting video decoding of the multimedia file.
[0077] In some examples, the prohibited operation is used to prevent the screen display of the TV 1.
[0078] The above mainly introduced the solution provided by the embodiments of the present application from the perspective of methods. To implement the above functions, it includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, combining 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 way of hardware or computer software driving hardware depends on the specific application and design constraints 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.
[0079] The embodiments of the present application can divide the functional modules of the video playback device 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.
[0080] As Figure 10 shown, the embodiments of the present application provide a schematic structural diagram of a display device 200. It includes a processor 101, a communicator 102, and a display 103.
[0081] The processor 101 is configured to, during the process of playing a multimedia file, if it detects that a target application sets a surface through the interface of the Java layer of the MediaPlayer, control the communicator 102 to obtain the setting value of the surface; the processor 101 is further configured to determine the playback state of the multimedia file based on the setting value obtained by the communicator 102; wherein, the playback state includes any one of prohibited playback and continued playback; the processor 101 is further configured to control the display 103 to play the multimedia file according to the playback state.
[0082] In some feasible examples, the processor 101 is further configured to, when the setting value obtained by the communicator 102 is empty, set the video frame drop state flag to true and perform a prohibition operation; wherein, the prohibition operation includes the operation of prohibiting the display of the multimedia file; the processor 101 is further configured to, when the prohibition operation includes the operation of prohibiting the display of the multimedia file, determine that the playback state is prohibited playback.
[0083] In some feasible examples, the processor 101 is further configured to control the communicator 102 to obtain the playback parameters of the multimedia file when it is determined that the playback state is prohibited from playing; wherein, the playback parameters at least include the frame rate and the playback speed; the processor 101 is further configured to determine the display interval of the video frames of the multimedia file based on the playback parameters obtained by the communicator; the processor 101 is further configured to perform a frame dropping operation on the undecoded video frames according to the display interval.
[0084] In some feasible examples, the processor 101 is also configured to control the communicator 102 to obtain the video frame dropping status flag when the set value is non-empty; the processor 101 is also configured to determine that the playback state is to continue playing and stop performing the frame dropping operation on the undecoded video frames according to the interval when the video frame dropping status flag obtained by the communicator 102 is true; the processor 101 is also configured to decode the multimedia file and control the display 103 to display according to the decoded multimedia file.
[0085] In some feasible examples, the processor 101 is also configured to determine that the playback state is to continue playing, decode the multimedia file, and control the communicator 103 to display according to the decoded multimedia file when the video frame dropping status flag is not true.
[0086] In some feasible examples, the prohibition operation further includes one or more of prohibiting the invocation of the interface of MediaCodec and prohibiting the video decoding of the multimedia file.
[0087] Among them, all relevant contents of each step involved in the above method embodiment can be cited to the function description of the corresponding functional module, and its function will not be elaborated here.
[0088] Of course, the display device 200 provided in the embodiments of the present application includes but is not limited to the above modules. For example, the display device 200 may further include a memory 104. The memory 104 can be used to store the program code of the display device 200 and can also be used to store the data generated during the operation of the display device 200, such as the data in the write request, etc.
[0089] As an example, in combination with Figure 4 , the function implemented by the obtaining unit 202 in the television 1 is the same as the function of the communicator 102, the function implemented by the processing unit 201 is the same as the function of the processor 101, the function implemented by the display unit 203 is the same as the function of the display 103, and the function implemented by the storage unit 204 is the same as the function of the memory 104.
[0090] Such as Figure 11As shown in the figure, an embodiment of the present application further provides a chip system, which can be applied to the display device 200 in the foregoing embodiment. 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 foregoing display device 200. 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 display device 200 through the interface circuit 1502. When the computer instructions are executed by the processor 1501, the display device 200 can be made to execute each step executed by the display device 200 in the foregoing embodiment. Of course, the chip system may further include other discrete devices, and the embodiments of the present application do not make specific limitations thereto.
[0091] An embodiment of the present application further provides a computer-readable storage medium for storing computer instructions for the operation of the foregoing display device 200.
[0092] An embodiment of the present application further provides a computer program product including computer instructions for the operation of the foregoing display device 200.
[0093] 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: include: The processor is configured to control the communicator to obtain the setting value of the surface if it is detected that the target application sets the surface through the interface of the Java layer of the MediaPlayer during the playback of the multimedia file; The processor is further configured to determine the play status of the multimedia file based on the setting value obtained by the communicator; wherein the play status includes any one of prohibiting play and continuing play; The processor is further configured to control the display to play the multimedia file according to the playing state.
2. The display device according to claim 1, characterized in that The processor is further configured to, when the setting value obtained by the communicator is empty, set the video frame loss status flag to true and perform a prohibition operation; wherein the prohibition operation includes prohibiting the display of the multimedia file; The processor is further configured to determine that the playback state is playback prohibited when the prohibition operation includes an operation of prohibiting display of the multimedia file.
3. The display device according to claim 2, characterized in that The processor is further configured to control the communicator to obtain the playback parameters of the multimedia file when determining that the playback state is prohibited; wherein the playback parameters include at least a frame rate and a playback speed; The processor is further configured to determine a display interval time of a video frame of the multimedia file based on the playback parameter acquired by the communicator; The processor is further configured to perform a frame dropping operation on undecoded video frames according to the display interval time.
4. The display device according to claim 1, characterized in that The processor is further configured to control the communicator to obtain the video frame loss status identifier when the setting value is non-empty; The processor is further configured to, when the video frame loss status identifier obtained by the communicator is true, determine that the playback status is to continue playback, and stop performing the frame loss operation on the undecoded video frames according to the interval time; The processor is further configured to decode the multimedia file and control the display to display the decoded multimedia file.
5. The display device according to claim 4, characterized in that The processor is further configured to determine that the playback state is to continue playing when the video frame loss state identifier is not true, decode the multimedia file, and control the communicator to display the decoded multimedia file.
6. The display device according to claim 2, characterized in that The prohibition operation also includes prohibiting one or more of calling the MediaCodec interface and prohibiting video decoding of the multimedia file.
7. A video playback method, characterized in that: include: During the playback of multimedia files, if it is detected that the target application sets a surface through the interface of the Java layer of MediaPlayer, the setting value of the surface is obtained; Based on the setting value, determining the playing state of the multimedia file; wherein the playing state includes any one of prohibiting playing and continuing playing; The multimedia file is played according to the playing state.
8. The video playback method according to claim 7, characterized in that: The determining the playing state of the multimedia file based on the setting value includes: When the setting value is empty, the video frame loss status flag is set to true, and a prohibition operation is performed; wherein the prohibition operation includes prohibiting the display of the multimedia file; In a case where the prohibition operation includes an operation of prohibiting display of the multimedia file, the play state is determined to be prohibiting play.
9. The video playback method according to claim 8, characterized in that: Playing the multimedia file according to the playing state includes: When it is determined that the playback state is prohibited, obtaining playback parameters of the multimedia file; wherein the playback parameters at least include a frame rate and a playback speed; Based on the playback parameters, determining a display interval time of the video frames of the multimedia file; A frame dropping operation is performed on the undecoded video frames according to the display interval time.
10. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the video playback method described in any one of claims 7 to 9.