CN107360458B - Play control method, device, storage medium and terminal - Google Patents
Play control method, device, storage medium and terminal Download PDFInfo
- Publication number
- CN107360458B CN107360458B CN201710526390.XA CN201710526390A CN107360458B CN 107360458 B CN107360458 B CN 107360458B CN 201710526390 A CN201710526390 A CN 201710526390A CN 107360458 B CN107360458 B CN 107360458B
- Authority
- CN
- China
- Prior art keywords
- playing
- audio
- audio data
- video data
- progress
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44204—Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/4424—Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/65—Transmission of management data between client and server
- H04N21/658—Transmission by the client directed to the server
- H04N21/6587—Control parameters, e.g. trick play commands, viewpoint selection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8173—End-user applications, e.g. Web browser, game
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The embodiment of the invention provides a playing control method, a playing control device, a storage medium and a terminal. The playing control method comprises the following steps: in the process of playing an audio-video file by a playing application, when the playing application is detected to be switched from foreground operation to background operation, the audio data of the audio-video file is kept to be continuously played and the playing of the video data of the audio-video file is suspended; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; and playing the video data according to the target playing progress so as to enable the video data and the audio data to be played synchronously. The invention has the advantage of improving the convenience of play control.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a play control method, apparatus, storage medium, and terminal.
Background
With the development of terminal technology, mobile terminals have begun to change from simply providing telephony devices to a platform for running general-purpose software. The platform no longer aims at providing call management, but provides an operating environment including various application software such as call management, game and entertainment, office events, mobile payment and the like, and with a great deal of popularization, the platform has been deeply developed to the aspects of life and work of people.
When a user uses a mobile terminal to play an audio-video file, when the user encounters content that the user does not want to see, the user generally directly uses a fast forward mode to process the content, but the user may miss some wonderful content by directly fast forwarding, and the operation is very inconvenient.
Disclosure of Invention
The embodiment of the invention provides a playing control method, a playing control device, a storage medium and a terminal, which can improve the convenience of control during audio and video playing.
The embodiment of the invention provides a play control method, which comprises the following steps:
in the process of playing an audio-video file by a playing application, when the playing application is detected to be switched from foreground operation to background operation, the audio data of the audio-video file is kept to be continuously played and the playing of the video data of the audio-video file is suspended;
when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data;
acquiring a target playing progress of the video data according to the first playing progress of the audio data;
and playing the video data according to the target playing progress so as to enable the video data and the audio data to be played synchronously.
An embodiment of the present invention provides a playback control apparatus, including:
the first playing control module is used for keeping the audio data of the audio file to be played continuously and pausing the playing of the video data of the audio file when the playing application is detected to be switched from foreground operation to background operation in the process of playing the audio file by the playing application;
the first obtaining module is used for obtaining a current first playing progress of the audio data when the situation that the playing application is switched from background running to foreground running is detected;
the second acquisition module is used for acquiring the target playing progress of the video data according to the first playing progress of the audio data;
and the second playing control module is used for playing the video data according to the target playing progress so as to enable the video data and the audio data to be played synchronously.
The embodiment of the invention provides a storage medium, which stores a plurality of instructions, wherein the instructions are loaded by a processor and execute any one of the methods.
An embodiment of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method according to any one of the above descriptions.
In the process of playing the audio-video file by the playing application, when the playing application is detected to be switched from foreground operation to background operation, the embodiment of the invention keeps the audio data of the audio-video file to be continuously played and stops playing the video data of the audio-video file; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; playing the video data according to the target playing progress so that the video data and the audio data are played synchronously; therefore, the playing control of the video and audio files is realized, and the method has the beneficial effect of improving the convenience of the playing control.
Drawings
Fig. 1 is a schematic view of a scenario of a play control method according to an embodiment of the present invention.
Fig. 2 is a first flowchart of a playback control method according to an embodiment of the present invention.
Fig. 3 is a second flowchart of a playback control method according to an embodiment of the present invention.
Fig. 4 is a first structural diagram of a playback control apparatus according to an embodiment of the present invention.
Fig. 5 is a first structural diagram of a playback control apparatus according to an embodiment of the present invention.
Fig. 6 is a first structural diagram of a playback control apparatus according to an embodiment of the present invention.
Fig. 7 is a first structural diagram of a playback control apparatus according to an embodiment of the present invention.
Fig. 8 is a first structural diagram of a playback control apparatus according to an embodiment of the present invention.
Fig. 9 is a block diagram of a terminal according to an embodiment of the present invention.
Fig. 10 is another structural diagram of a terminal in an embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
In the description that follows, embodiments of the invention are described with reference to steps and symbols of operations performed by one or more computers, unless otherwise indicated. It will thus be appreciated that those steps and operations, which are referred to herein several times as being computer-executed, include being manipulated by a computer processing unit in the form of electronic signals representing data in a structured form. This manipulation transforms the data or maintains it at locations in the computer's memory system, which may reconfigure or otherwise alter the computer's operation in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific details shown, since one skilled in the art will recognize that various steps and operations described below may be implemented in hardware.
Referring to fig. 1, fig. 1 is a scene diagram of a play control method according to an embodiment of the present invention. The playing control method is mainly applied to terminals such as mobile phones and PADs. For example, taking a mobile phone as an example, when a user plays a television play with the mobile phone, the user suddenly needs to watch an XX map, so as to facilitate traveling or just to view a certain place mentioned in the television play, so that the playing application is switched from foreground running to background running, and the XX map is opened, and during switching, the playing of the video data of the video file is paused, and the audio data of the video file is played. When the application is switched back to play, the video data and the audio data are played synchronously.
Referring to fig. 2, fig. 2 is a flowchart of a play control method according to an embodiment of the present invention, in which the play control method includes the following steps:
s101, in the process of playing the audio-video file, when the situation that the playing application is switched from foreground operation to background operation is detected, the playing of the video data of the audio-video file is paused, and the playing of the audio data of the audio-video file is continued.
The playing application can be a Tencent player, a Youku player, a potato player and the like, and can be played not only online but also locally.
The video file can be a common television play, a movie, a comprehensive program, a sports event and the like. The video and audio file comprises video data and audio data. The video data provides image information for users during playing, the audio data provides audio information during playing, and the video data and the audio data are played synchronously without the dislocation of sound and images.
In this step, when it is detected that the playback application is switched from foreground operation to background operation, for example, when the user plays a tv play with a mobile phone's youth player, the playback application continues to play audio information and stops playing video information when the user needs to switch to screen to return information, write a novel, watch a web page, and so on. That is, after the screen is switched, the user can judge the playing progress according to the played audio data, and after the playing of the video data is paused, the utilization rate of a CPU (Central processing Unit) can be reduced, and the power consumption is reduced. Moreover, the user can cut away when encountering a picture which is not wanted to be seen, and judge whether the picture is played completely according to the played audio data, so that the watching experience of the user is improved, and the intelligent control system of playing is improved.
In the scheme, the scenes need to be learned, and the audio data can still be played and the video data can be paused after the switching only in the preset scenes. For example, learning is performed on a telephone scene, a music playing scene, and the like, and when a scene for playing an audio/video file is switched to these scenes, a playing application running in the background directly suspends the playing of video data and audio data. In the scenes of watching a novel scene, viewing a short message scene, using an application irrelevant to audio and the like, the audio data can still be played after switching, and the video data is paused to be played.
S102, when it is detected that the playing application is switched back to the foreground operation from the background operation, a first playing progress of the audio data is obtained.
When the playing application is switched back to the foreground for operation, the audio data and the video data need to be played synchronously, and because the playing application is in the background operation period, the audio data is played and the video data is paused, the progress of the audio data and the video data is not synchronized, and when the audio data and the video data are played simultaneously again, the target playing progress of the video data needs to be obtained according to the first playing progress of the audio playing data.
S103, acquiring a target playing progress corresponding to the video data according to the first playing progress.
In the step, in a specific application process, the target playing progress is obtained according to the time axes of the audio data and the video data. For example, when the first progress shows that the time axis of the audio data runs to a position of 10 minutes and 25 seconds, the running position of the playing time axis of the video data also needs to be 10 minutes and 25 seconds to synchronize the audio data with the video data. Therefore, the target playing progress of the video data is obtained in a time axis synchronization mode.
And S104, synchronously playing the video data and the audio data according to the target playing progress and the first playing progress.
In this step, according to the current position of the time axis of the video data acquired in step S103, the video data is jumped from the pause position to the current position to start playing, so that the playing of the video data and the playing of the audio data are synchronized, and the normal playing of the video and audio file is realized.
As can be seen from the above, in the process of playing an audio-visual file by a playing application, when it is detected that the playing application is switched from foreground operation to background operation, the embodiment of the present invention keeps the audio data of the audio-visual file being continuously played and suspends the playing of the video data of the audio-visual file; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; playing the video data according to the target playing progress so that the video data and the audio data are played synchronously; therefore, the playing control of the audio and video files is realized, and the method has the advantages of reducing power consumption and improving the playing intelligence.
Referring to fig. 3, fig. 3 is a flowchart of a play control method according to an embodiment of the present invention, in which the play control method includes the following steps:
s201, in the process of playing the audio and video file, when the situation that the playing application is switched from foreground operation to background operation is detected, the playing of the video data of the audio and video file is paused, and the playing of the audio data of the audio and video file is continued.
The playing application can be a Tencent player, a Youku player, a potato player and the like, and can be played not only online but also locally.
The video file can be a common television play, a movie, a comprehensive program, a sports event and the like. The video and audio file comprises video data and audio data. The video data provides image information for users during playing, the audio data provides audio information during playing, and the video data and the audio data are played synchronously without the dislocation of sound and images.
In this step, when it is detected that the playback application is switched from foreground operation to background operation, for example, when the user plays a tv play with a mobile phone's youth player, the playback application continues to play audio information and stops playing video information when the user needs to switch to screen to return information, write novels, and so on. That is, after the screen is switched, the user can judge the playing progress according to the played audio data, and after the playing of the video data is paused, the utilization rate of a CPU (Central processing Unit) can be reduced, and the power consumption is reduced.
In some embodiments, this step S201 includes:
and S2011, monitoring running states of the playing application in real time, wherein the running states comprise foreground running and background running.
S2022, when it is monitored that the playing application is switched from foreground operation to background operation, the audio data of the audio-video file is kept to be continuously played and the video data of the audio-video file is paused to be played.
S202, when the fact that the playing application is switched back to the foreground running from the background running is detected, a current first playing progress of the audio data is obtained, and the playing of the audio data is paused.
When the playing application is switched back to the foreground for operation, the audio data and the video data need to be played synchronously, and because the playing application is in the background operation period, the audio data is played and the video data is paused, the progress of the audio data and the video data is not synchronized, and when the audio data and the video data are played simultaneously again, the target playing progress of the video data needs to be obtained according to the first playing progress of the audio playing data. Moreover, when switching back to the foreground, there may be a delay in calculating the target playing progress of the video data, so that the playing of the audio data is suspended first.
S203, obtaining a target playing progress corresponding to the video data according to the first playing progress.
In the step, in a specific application process, the target playing progress is obtained according to the time axes of the audio data and the video data. For example, when the first progress shows that the time axis of the audio data runs to a position of 10 minutes and 25 seconds, the running position of the playing time axis of the video data also needs to be 10 minutes and 25 seconds to synchronize the audio data with the video data. Therefore, the target playing progress of the video data is obtained in a time axis synchronization mode.
In some embodiments, this step S203 includes:
s2031, a first time point corresponding to the first playing progress on a first time axis of the audio data is obtained.
The audio data and the video data are played with a time axis, and the start time of the time axis is the same because the audio data and the video data are played synchronously at the beginning. Each first playing progress corresponds to a first time point on the first time axis.
S2032, a second time point on a second time axis of the video data is obtained according to the first time point, and the first time point is the same as the second time point.
In order to synchronously play the audio data and the video data, a second time point corresponding to the target playing progress on a second time axis must be obtained, and in this scenario, the time corresponding to the second time point is the same as the time corresponding to the first time point.
S2033, obtaining the target playing progress of the video data according to the second time point.
After the second time point on the second time axis is obtained, the target playing progress of the video data to be played synchronously with the audio data can be obtained.
S204, playing the video data according to the target playing progress, and playing the audio data according to the first playing progress so that the video data and the audio data are played synchronously.
In this step, the playing progress of the video data is jumped from the pause position to the currently located second time point to start playing according to the second time point obtained in step S203, and the audio data is started to be played according to the first playing progress while the video data is started to be played, so that the playing of the video data and the playing of the audio data are synchronized, and the normal playing of the audio and video file is realized.
In some embodiments, between step S201 and step S202, the following steps may be further included:
s500, when the fact that the playing application is switched from foreground running to background running is detected, the duration of the background running exceeds the preset duration, the playing of the audio data is paused. For example, the preset time period may be set to 5 minutes. When the preset time length is exceeded, the user does not switch the playing application from the background operation to the foreground operation, which indicates that the user does not want to watch the audio and video file when the user is occupied, and therefore, the audio data is directly paused to be played.
In some embodiments, between step S201 and step S202, the following steps may be further included:
s600, when it is detected that the playing application is switched from foreground operation to background operation, and the duration of the background operation exceeds a preset duration, the volume of playing the audio data is reduced. For example, the preset time period may be set to 5 minutes. When the preset time length is exceeded, the user does not switch the playing application from the background operation to the foreground operation, which indicates that the user does not want to watch the audio-video file during occupation or does not have space during occupation, and therefore, the audio data playing volume is gradually reduced.
As can be seen from the above, in the process of playing an audio-visual file by a playing application, when it is detected that the playing application is switched from foreground operation to background operation, the embodiment of the present invention keeps the audio data of the audio-visual file being continuously played and suspends the playing of the video data of the audio-visual file; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; playing the video data according to the target playing progress so that the video data and the audio data are played synchronously; therefore, the playing control of the video and audio file is realized.
Referring to fig. 4, fig. 4 is a structural diagram of a playback control apparatus according to an embodiment of the present invention. In this embodiment, the playback control apparatus 300 includes a first playback control module 301, a first obtaining module 302, a second obtaining module 303, and a second playback control module 304.
The first play control module 301 is configured to, in a process of playing an audio-video file by a play application, when it is detected that the play application is switched from foreground operation to background operation, keep the audio data of the audio-video file to continue playing and pause playing the video data of the audio-video file.
Referring to fig. 5, in some embodiments, the first playback control module 301 includes: a monitoring unit 3011 and a first playback control unit 3012.
The monitoring unit 3011 is configured to monitor running states of a playing application in real time, where the running states include foreground running and background running; the first play control unit 3012 is configured to, when it is monitored that the play application is switched from foreground operation to background operation, keep the audio data of the audio and video file to continue playing and pause playing the video data of the audio and video file.
The first obtaining module 302 is configured to obtain a current first playing progress of the audio data when it is detected that the playing application is switched from a background running to a foreground running.
Referring to fig. 6, in some embodiments, the first obtaining module 302 includes a first obtaining unit 3021, a second obtaining unit 3022, and a third obtaining unit 3023.
The first obtaining unit 3021 is configured to obtain a first time point on a first time axis of the audio data, where the first time point corresponds to the first playing progress. The second obtaining unit 3022 is configured to obtain a second time point on a second time axis of the video data according to the first time point, where the first time point is the same as the second time point. The third acquiring unit 3023 is configured to acquire a target playing progress of the video data according to the second time point.
The second obtaining module 303 is configured to obtain a target playing progress of the video data according to the first playing progress of the audio data.
The second playing control module 304 is configured to play the video data according to the target playing progress, so that the video data and the audio data are played synchronously.
In some embodiments, the first obtaining module 301 is configured to, when it is detected that the playback application is switched from a background operation to a foreground operation, obtain a current first playback progress of the audio data, and pause playback of the audio data; correspondingly, the second playing control module 304 is configured to play the video data according to the target playing progress, and play the audio data according to the first playing progress, so that the video data and the audio data are played synchronously.
Referring to fig. 7, in some embodiments, the playback control apparatus 300 further includes a pause module 305. The pause module 305 is configured to pause the playing of the audio data when the duration of the background operation exceeds a preset duration after the playback application is switched from the foreground operation to the background operation.
Referring to fig. 8, in some embodiments, the playback control apparatus 300 further includes a volume control module 306. The volume control module 306 is configured to gradually decrease the playing volume of the audio data when it is detected that the duration of the background operation exceeds a preset duration after the playing application is switched from the foreground operation to the background operation.
As can be seen from the above, in the process of playing an audio-visual file by a playing application, when it is detected that the playing application is switched from foreground operation to background operation, the embodiment of the present invention keeps the audio data of the audio-visual file being continuously played and suspends the playing of the video data of the audio-visual file; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; playing the video data according to the target playing progress so that the video data and the audio data are played synchronously; therefore, the playing control of the video and audio file is realized.
Referring to fig. 9, fig. 9 is a structural diagram of a terminal according to an embodiment of the present invention. The terminal 400 comprises a processor 401, a memory 402, said processor 401 being adapted to perform the method in the above described embodiments by invoking a computer program in said memory 402. For example, it may perform the following steps: in the process of playing an audio-video file by a playing application, when the playing application is detected to be switched from foreground operation to background operation, the audio data of the audio-video file is kept to be continuously played and the playing of the video data of the audio-video file is suspended; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; and playing the video data according to the target playing progress so as to enable the video data and the audio data to be played synchronously.
As can be seen from the above, in the process of playing an audio-visual file by a playing application, when it is detected that the playing application is switched from foreground operation to background operation, the embodiment of the present invention keeps the audio data of the audio-visual file being continuously played and suspends the playing of the video data of the audio-visual file; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; playing the video data according to the target playing progress so that the video data and the audio data are played synchronously; therefore, the playing control of the video and audio files is realized, and the method has the advantages of reducing power consumption and improving the convenience of playing control.
Referring to fig. 10, fig. 10 is another structural diagram of a terminal according to an embodiment of the present invention. The terminal 500 may be a mobile phone, a tablet computer, etc. The terminal 500 may include Radio Frequency (RF) circuitry 501, memory 502 including one or more computer-readable storage media, input unit 503, display unit 504, sensor 505, audio circuitry 506, Wireless Fidelity (WiFi) module 507, processor 508 including one or more processing cores, and power supply 509. Those skilled in the art will appreciate that the terminal structure shown in fig. 10 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 501 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information of a base station and then sending the received downlink information to the one or more processors 508 for processing; in addition, data relating to uplink is transmitted to the base station.
The memory 502 may be used to store software programs and modules, and the processor 508 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502.
The input unit 503 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 503 may include a touch-sensitive surface as well as other input devices.
The display unit 504 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof.
The terminal may also include at least one sensor 505, such as light sensors, motion sensors, and other sensors.
WiFi belongs to short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 507, and provides wireless broadband internet access for the user. Although fig. 10 shows the WiFi module 507, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the terminal, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby integrally monitoring the mobile phone.
The terminal also includes a power supply 509 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 508 via a power management system that may be used to manage charging, discharging, and power consumption. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the processor 508 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the application program stored in the memory 502, so as to implement the following functions: in the process of playing an audio-video file by a playing application, when the playing application is detected to be switched from foreground operation to background operation, the audio data of the audio-video file is kept to be continuously played and the playing of the video data of the audio-video file is suspended; when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data; acquiring a target playing progress of the video data according to the first playing progress of the audio data; and playing the video data according to the target playing progress so as to enable the video data and the audio data to be played synchronously.
Various operations of embodiments are provided herein. In one embodiment, the one or more operations may constitute computer readable instructions stored on one or more computer readable media, which when executed by an electronic device, will cause the computing device to perform the operations. The order in which some or all of the operations are described should not be construed as to imply that these operations are necessarily order dependent. Those skilled in the art will appreciate alternative orderings having the benefit of this description. Moreover, it should be understood that not all operations are necessarily present in each embodiment provided herein.
Also, as used herein, the word "preferred" is intended to serve as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a concrete fashion. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise or clear from context, "X employs A or B" is intended to include either of the permutations as a matter of course. That is, if X employs A; b is used as X; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing examples.
Also, although the disclosure has been shown and described with respect to one or more implementations, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and alterations, and is limited only by the scope of the appended claims. In particular regard to the various functions performed by the above described components (e.g., elements, resources, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the disclosure. In addition, while a particular feature of the disclosure may have been disclosed with respect to only one of several implementations, such feature may be combined with one or more other features of the other implementations as may be desired and advantageous for a given or particular application. Furthermore, to the extent that the terms "includes," has, "" contains, "or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term" comprising.
Each functional unit in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Each apparatus or system described above may perform the method in the corresponding method embodiment.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, therefore, the scope of the present invention shall be determined by the appended claims.
Claims (10)
1. A playback control method, comprising the steps of:
in the process of playing an audio-video file by a playing application, when the situation that the playing application is switched from foreground operation to background operation is detected, judging whether a current scene is a preset scene or not, wherein the preset scene is a scene without audio playing and is obtained by learning;
if the current scene is a preset scene, keeping the audio data of the audio-video file to be continuously played and pausing the playing of the video data of the audio-video file, wherein the audio-video file comprises video data and audio data, the audio data provides audio information during playing, and the video data provides image information during playing;
when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data;
acquiring a target playing progress of the video data according to the first playing progress of the audio data, the first time axis of the audio data and the second time axis of the video data, and specifically including: acquiring a first time point corresponding to the first playing progress on a first time axis of the audio data; acquiring a second time point on a second time axis of the video data according to the first time point; acquiring a target playing progress of the video data according to the second time point;
playing the video data according to the target playing progress so that the video data and the audio data are played synchronously; the method specifically comprises the following steps: jumping the playing progress of the video data from a pause position to the second time point to start playing, so that the video data and the audio data are played synchronously.
2. The playback control method according to claim 1, wherein the step of obtaining a current first playback progress of the audio data when detecting that the playback application is switched from a background playback to a foreground playback comprises:
when the fact that the playing application is switched back to the foreground running from the background running is detected, acquiring a current first playing progress of the audio data, and pausing the playing of the audio data;
the step of playing the video data according to the target playing progress so that the video data and the audio data are played synchronously comprises:
and playing the video data according to the target playing progress, and playing the audio data according to the first playing progress so as to enable the video data and the audio data to be played synchronously.
3. The playback control method according to claim 1, wherein before the step of obtaining the current first playback progress of the audio data when it is detected that the playback application is switched from a background playback to a foreground playback, the method further comprises:
and when the fact that the duration of the background operation exceeds the preset duration after the playing application is switched from the foreground operation to the background operation is detected, the playing of the audio data is suspended.
4. The playback control method according to claim 1, wherein before the step of obtaining the current first playback progress of the audio data when it is detected that the playback application is switched from a background playback to a foreground playback, the method further comprises:
and when the fact that the duration of the background operation exceeds the preset duration after the playing application is switched from the foreground operation to the background operation is detected, gradually reducing the playing volume of the audio data.
5. A playback control apparatus, comprising:
the first playing control module is used for judging whether a current scene is a preset scene or not when the playing application is detected to be switched from foreground operation to background operation in the process of playing the audio-video file by the playing application, wherein the preset scene is a scene without audio playing and is obtained by learning;
if the current scene is a preset scene, keeping the audio data of the audio-video file to be continuously played and pausing the playing of the video data of the audio-video file, wherein the audio-video file comprises video data and audio data, the audio data provides audio information during playing, and the video data provides image information during playing;
the first obtaining module is used for obtaining a current first playing progress of the audio data when the situation that the playing application is switched from background running to foreground running is detected;
the second acquisition module is used for acquiring the target playing progress of the video data according to the first playing progress of the audio data, the first time axis of the audio data and the second time axis of the video data;
the first obtaining module comprises:
a first obtaining unit, configured to obtain a first time point, corresponding to the first playing progress, on a first time axis of the audio data;
a second obtaining unit, configured to obtain a second time point on a second time axis of the video data according to the first time point;
a third obtaining unit, configured to obtain a target playing progress of the video data according to the second time point;
the second playing control module is used for playing the video data according to the target playing progress so as to enable the video data and the audio data to be played synchronously;
the second play control module is further configured to: jumping the playing progress of the video data from a pause position to the second time point to start playing, so that the video data and the audio data are played synchronously.
6. The playback control apparatus according to claim 5, wherein the first obtaining module is configured to, when it is detected that the playback application is switched from a background operation to a foreground operation, obtain a current first playback progress of the audio data, and pause playback of the audio data;
the second playing control module is used for playing the video data according to the target playing progress and playing the audio data according to the first playing progress so as to enable the video data and the audio data to be played synchronously.
7. The playback control apparatus according to claim 5, further comprising:
and the pause module is used for pausing the playing of the audio data when the duration of the background running exceeds the preset duration after the playing application is detected to be switched from the foreground running to the background running.
8. The playback control apparatus according to claim 5, further comprising:
and the volume control module is used for gradually reducing the playing volume of the audio data when the duration of the background operation exceeds the preset duration after the playing application is detected to be switched from the foreground operation to the background operation.
9. A storage medium storing a plurality of instructions, wherein the instructions are loaded by a processor and perform the method of any of claims 1-4.
10. A terminal, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method according to any one of claims 1-4 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710526390.XA CN107360458B (en) | 2017-06-30 | 2017-06-30 | Play control method, device, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710526390.XA CN107360458B (en) | 2017-06-30 | 2017-06-30 | Play control method, device, storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107360458A CN107360458A (en) | 2017-11-17 |
CN107360458B true CN107360458B (en) | 2020-02-14 |
Family
ID=60274144
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710526390.XA Active CN107360458B (en) | 2017-06-30 | 2017-06-30 | Play control method, device, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107360458B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107872584A (en) * | 2017-11-24 | 2018-04-03 | 维沃移动通信有限公司 | A kind of multi-media processing method, multimedia equipment and terminal |
CN107908929B (en) * | 2017-11-24 | 2020-07-31 | 腾讯音乐娱乐科技(深圳)有限公司 | Method and device for playing audio data |
CN110019855B (en) * | 2017-12-04 | 2023-07-21 | 沪江教育科技(上海)股份有限公司 | Method and device for controlling braking effect according to time axis, storage medium and electronic equipment |
CN108668011B (en) * | 2018-03-30 | 2020-12-18 | 联想(北京)有限公司 | Output method, output device and electronic device |
CN108566561B (en) * | 2018-04-18 | 2022-01-28 | 腾讯科技(深圳)有限公司 | Video playing method, device and storage medium |
CN109151496B (en) * | 2018-07-25 | 2021-04-23 | 维沃移动通信有限公司 | Music playing method and mobile terminal |
CN109346111B (en) * | 2018-10-11 | 2020-09-04 | 广州酷狗计算机科技有限公司 | Data processing method, device, terminal and storage medium |
CN109451157A (en) * | 2018-11-09 | 2019-03-08 | 广州虎牙科技有限公司 | A kind of audio-frequency inputting method, device, equipment and storage medium |
CN109862193B (en) * | 2019-04-12 | 2020-10-02 | 珠海天燕科技有限公司 | Incoming call video control method and device in terminal |
CN110248240A (en) * | 2019-06-11 | 2019-09-17 | 北京达佳互联信息技术有限公司 | Playback method, device, electronic equipment and the storage medium of video |
CN110309348A (en) * | 2019-07-05 | 2019-10-08 | 广州酷狗计算机科技有限公司 | Playback of songs method, apparatus and system |
CN113133670B (en) * | 2020-01-17 | 2023-03-21 | 佛山市顺德区美的电热电器制造有限公司 | Cooking equipment, cooking control method and device |
CN115134640A (en) * | 2021-03-25 | 2022-09-30 | 华为技术有限公司 | Synchronous playing method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103024490A (en) * | 2012-12-26 | 2013-04-03 | 北京奇艺世纪科技有限公司 | Method and device supporting independent playing of audio and video |
CN104639986A (en) * | 2014-12-31 | 2015-05-20 | 小米科技有限责任公司 | Multimedia data playing method and device |
CN104994432A (en) * | 2015-06-25 | 2015-10-21 | 海信集团有限公司 | Method for switching audio and video applications and television |
CN105979060A (en) * | 2015-12-03 | 2016-09-28 | 乐视致新电子科技(天津)有限公司 | Play method and device |
CN106792075A (en) * | 2017-01-04 | 2017-05-31 | 合网络技术(北京)有限公司 | Video broadcasting method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3530833B2 (en) * | 2001-05-23 | 2004-05-24 | シャープ株式会社 | Electronic device having video output function, program and recording medium |
-
2017
- 2017-06-30 CN CN201710526390.XA patent/CN107360458B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103024490A (en) * | 2012-12-26 | 2013-04-03 | 北京奇艺世纪科技有限公司 | Method and device supporting independent playing of audio and video |
CN104639986A (en) * | 2014-12-31 | 2015-05-20 | 小米科技有限责任公司 | Multimedia data playing method and device |
CN104994432A (en) * | 2015-06-25 | 2015-10-21 | 海信集团有限公司 | Method for switching audio and video applications and television |
CN105979060A (en) * | 2015-12-03 | 2016-09-28 | 乐视致新电子科技(天津)有限公司 | Play method and device |
CN106792075A (en) * | 2017-01-04 | 2017-05-31 | 合网络技术(北京)有限公司 | Video broadcasting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107360458A (en) | 2017-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107360458B (en) | Play control method, device, storage medium and terminal | |
CN104883358B (en) | Interactive approach based on recommendation and device | |
JP6877808B2 (en) | Methods, devices, and systems for processing video stream data | |
CN106686396B (en) | Method and system for switching live broadcast room | |
CN106792120B (en) | Video picture display method and device and terminal | |
CN111294638B (en) | Method, device, terminal and storage medium for realizing video interaction | |
CN108900856B (en) | Video frame rate prediction method, device and equipment | |
WO2017202348A1 (en) | Video playing method and device, and computer storage medium | |
CN111866433B (en) | Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium | |
CN106803993B (en) | Method and device for realizing video branch selection playing | |
CN103391473B (en) | Method and device for providing and acquiring audio and video | |
CN110784771B (en) | Video sharing method and electronic equipment | |
CN106254903B (en) | A kind of synchronous broadcast method of multi-medium data, apparatus and system | |
CN110248245B (en) | Video positioning method and device, mobile terminal and storage medium | |
CN108196947B (en) | Application running state control method and mobile terminal | |
CN108900855B (en) | Live content recording method and device, computer readable storage medium and server | |
CN106406924B (en) | Control method and device for starting and quitting picture of application program and mobile terminal | |
US9781380B2 (en) | Method, apparatus and terminal for playing multimedia content | |
CN103488450A (en) | Method, device and terminal equipment for projecting picture | |
CN112040324A (en) | Playing progress adjusting method and device, storage medium and terminal | |
CN107277592B (en) | Multimedia data playing method and device based on embedded platform and storage medium | |
CN112203116A (en) | Video generation method, video playing method and related equipment | |
CN106817621B (en) | Mobile terminal and video backup and play method and device thereof | |
CN113793625B (en) | Audio playing method and device | |
CN111372127B (en) | Data transmission method and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: Guangdong Opel Mobile Communications Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |