CN104837020B - The method and apparatus for playing video - Google Patents

The method and apparatus for playing video Download PDF

Info

Publication number
CN104837020B
CN104837020B CN201410360066.1A CN201410360066A CN104837020B CN 104837020 B CN104837020 B CN 104837020B CN 201410360066 A CN201410360066 A CN 201410360066A CN 104837020 B CN104837020 B CN 104837020B
Authority
CN
China
Prior art keywords
video
decoding
player
playing
hardware
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
Application number
CN201410360066.1A
Other languages
Chinese (zh)
Other versions
CN104837020A (en
Inventor
左洪涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410360066.1A priority Critical patent/CN104837020B/en
Publication of CN104837020A publication Critical patent/CN104837020A/en
Application granted granted Critical
Publication of CN104837020B publication Critical patent/CN104837020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a kind of method and apparatus playing video, belong to field of computer technology.The method includes:Receive the play instruction to target video;Detection is local to be used hardware decoding with the presence or absence of video player;If local, there are video players, and hardware decoding is used, and carrying out video decoding to target video using the decoded mode of software plays.Using the present invention, the using flexible of video player can be improved.

Description

Method and device for playing video
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for playing a video.
Background
With the continuous development of terminal technology, application programs in mobile terminals (such as mobile phones, tablet computers and the like) are more and more abundant. A video player is one of application programs frequently used by a user, and the user can view a network video or a locally stored video, etc. through the video player.
The mobile terminal may be installed with a plurality of video players, which may include a system player and a non-system player, where the system player and the non-system player may generally decode a video through a hardware decoding manner (e.g., through a GPU (graphics processing Unit)), and because the hardware decoding manner has certain defects, for example, it does not support decoding of video files in certain formats, and many non-system players also set a software decoding manner in order to make up for the above defects. In the process of watching the video by using the video player, the video can be played by using a system player or a non-system player according to actual requirements.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
generally, a software decoding manner occupies more CPU (Central Processing Unit) resources, so a non-system player also preferentially uses hardware decoding, and only when the hardware decoding manner cannot decode a video (for example, a GPU does not support decoding of a video file in some formats), the non-system player automatically switches to the software decoding manner to decode the video.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for playing a video. The technical scheme is as follows:
in a first aspect, a method for playing a video is provided, where the method includes:
receiving a playing instruction of a target video;
detecting whether a video player is decoding by using hardware or not locally;
and if the local existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode.
In a second aspect, an apparatus for playing a video is provided, the apparatus comprising:
the receiving module is used for receiving a playing instruction of the target video;
the detection module is used for detecting whether a video player uses hardware decoding or not locally;
and the playing module is used for decoding and playing the target video in a software decoding mode if the local video player uses hardware decoding.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a playing instruction of a target video is received, whether a video player uses hardware decoding is detected, if the video player uses hardware decoding, the target video is decoded and played by using a software decoding mode, so that the decoding mode of the video player playing the video can be detected to determine which decoding mode should be adopted to decode and play the target video, and a plurality of video players can be used to play the video respectively, thereby improving the use flexibility of the video players.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for playing a video according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an interface display when playing a video according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for playing a video according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for playing a video, and as shown in fig. 1, a processing flow of the method may include the following steps:
step 101, receiving a play instruction of a target video.
Step 102, detecting whether a local video player is decoding by using hardware.
And 103, if the local video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode.
In the embodiment of the invention, a playing instruction of a target video is received, whether a video player uses hardware decoding is detected, if the video player uses hardware decoding, the target video is decoded and played by using a software decoding mode, so that the decoding mode of the video player playing the video can be detected to determine which decoding mode should be adopted to decode and play the target video, and a plurality of video players can be used to play the video respectively, thereby improving the use flexibility of the video players.
Example two
The embodiment of the invention provides a method for playing a video, and an execution main body of the method can be a terminal. The terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like.
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, receiving a play instruction of a target video.
The target video may be any video selected by the user to be played.
In implementation, the terminal may be installed with a plurality of video players, which may include a system player and a non-system player, and an application program for integrating and calling the video players may be installed in the terminal, and the application program may provide a display interface of video images and some function buttons, such as a "file" button, a "setup" button, and the like, and the application program may call the system player or the non-system player installed in the terminal through a corresponding interface. Before playing a video, a user may set the type of a video player (i.e., a system player, a non-system player) called by the application program, or may select a video player to be called by the application program through a certain selection mechanism. When a user needs to watch a certain video (namely, a target video), the application program can be started, if the target video is a video stored in the terminal, the user can click an 'open' button provided by the application program, the terminal displays a search prompt box, the user searches an icon of the target video in the terminal through the search prompt box and clicks the icon to select the target video, when the user clicks a determination button, the application program receives a playing instruction, if the target video is the network video, a video list can be arranged in the application program to provide the network video for the user, so that the user can select a network video (namely, the target video) to be watched in the video list, click the icon of the target video, and at the moment, the application program receives the playing instruction.
Step 102, detecting whether a local video player is decoding by using hardware.
The decoding mode of the video player can include software decoding and hardware decoding, the software decoding is a decoding mode for decoding the video by executing a software program by a CPU, and the hardware decoding is a decoding mode for decoding the video by a hardware decoder in a GPU.
In implementation, when a play instruction is received, the application program may traverse each video player currently playing a video, detect a decoding manner used by each video player to play the video, and determine whether there is a video player decoding the video in a hardware decoding manner.
Optionally, since the system player can only decode the video by using a hardware decoding method, in order to simplify the processing process, it may be determined preferentially whether the system player is playing the video, and accordingly, the processing method in step 102 may be as follows:
step one, detecting whether a system player is performing video decoding playing.
In an implementation, a playlist may be set in the application program for recording a video player that is playing a video, and when the video player plays a certain video, the application program may allocate a play identifier in the playlist, where a unique play identifier may be allocated to the system player. After receiving the play instruction, the application program may search in the play list, determine whether a first play identifier corresponding to the system player exists in the play list, determine that the system player is performing video decoding play if the first play identifier exists in the play list, and otherwise, determine that the system player is not performing video decoding play.
Step two, if the system player is performing video decoding playing, determining that the local existing video player is using hardware decoding; if the system player does not perform video decoding playing and the local presence hardware decoding interface is the called video player, determining that the local presence video player is using hardware decoding; if the system player does not play the video decoding and no video player with the hardware decoding interface being called exists locally, it is determined that no video player exists locally and uses the hardware decoding.
In the implementation, there are different detection results in the first step, that is, the system player is playing the decoded video or the system player is not playing the decoded video, and there may be different processing manners for the different detection results, where: if the system player is playing the video decoding, it can be determined that there is a video player that is decoding the video using hardware decoding.
If the system player does not perform video decoding playing, it may further determine whether there is a video player that decodes a video in a hardware decoding manner by determining whether a hardware decoding interface is being invoked, where the process may specifically be: for the non-system player, a technician may set a hardware decoding interface and a software decoding interface for the non-system player, and the application program may call the hardware decoding interface of the non-system player to perform hardware decoding on the video. If the system player does not play the video currently, the application program sequentially detects whether the hardware decoding interface of each video player playing the video is called, if the video player with the called hardware decoding interface exists, it is determined that the video player is playing the video in a hardware decoding mode, otherwise, it is determined that the video player is not playing the video in a hardware decoding mode.
And 103, if the local video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode.
In implementation, since the hardware decoder of the GPU in the terminal cannot be multiplexed, if it is determined through the detection process of step 102 that there is a video player that is decoding the video using the hardware decoding method, the video player that the application program can call decodes the video using the software decoding method. The interface display effect of multiple video players playing videos at the same time can be seen in fig. 2.
Optionally, the application program may automatically invoke a video player adapted to play the target video, and decode and play the target video, and accordingly, the processing procedure of step 103 may include: if the local video player is decoding by using hardware, calling the video player supporting software decoding, and performing video decoding playing on the target video by using a software decoding mode.
In implementation, when it is determined that there are video players that decode video using hardware decoding, the application program may select one of the video players that support software decoding, call the video player, and decode and play the target video using software decoding.
Optionally, the user may set an image drawing manner used when playing the video through the application program, and the processing manner may be: and the application program receives a setting instruction corresponding to the target image drawing mode and records the target image drawing mode. Accordingly, the processing procedure of step 103 may include the following steps: and if the local video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode according to the target image drawing mode.
The image drawing mode is a mode of drawing images of each image frame obtained after decoding to obtain an image to be displayed in the process of playing the video.
In an implementation, the application program may be provided with a plurality of image rendering modes, for example, system Native image rendering, normal BitMap image rendering, OpenGL (Open Graphics Library) rendering based on hardware decoding, Native layer image rendering based on hardware decoding, and the like. The user may select an image drawing mode (i.e., a target image drawing mode) from the list provided by the application program and including the plurality of image drawing modes, as an image drawing mode used when playing a video, and at this time, the application program may receive a setting instruction and may set the image drawing mode of the corresponding video player as the target image drawing mode. When the target video is played, after each image frame of the target video is decoded, the decoded image frame may be drawn and displayed using a set target image drawing manner.
Optionally, in the process of performing video decoding playing on the target video, if it is detected that no video player is currently using hardware decoding, the hardware decoding is used to continue the video decoding playing on the target video.
In implementation, in the process of performing video decoding playing on a target video, whether a video player decoding the video in a hardware decoding manner exists or not may be periodically detected, and if it is detected within a certain period that the video player decoding the video in the hardware decoding manner is not used in the terminal, the application program may switch the decoding manner of the video player playing the target video from software decoding to hardware decoding, so that the video player continues to perform decoding playing on the target video in the hardware decoding manner.
Optionally, as for the detection result in step 102, if there is no video player that is performing video decoding playing in a hardware decoding manner, the target video may be decoded and played in the following manner, which may specifically include the following two manners:
in the first mode, if the local non-existing video player is using hardware decoding, the target video is played by using hardware decoding.
In implementation, since the terminal does not have a video player for decoding the video by using a hardware decoding method, the target video can be decoded and played by using the hardware decoding method in order to reduce the load of a CPU in the terminal.
And secondly, if the local non-existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode.
In implementation, if the file format of the target video is not the file format supported by the GPU for decoding the video, the target video may be decoded and played by using a software decoding manner.
In the embodiment of the invention, a playing instruction of a target video is received, whether a video player uses hardware decoding is detected, if the video player uses hardware decoding, the target video is decoded and played by using a software decoding mode, so that the decoding mode of the video player playing the video can be detected to determine which decoding mode should be adopted to decode and play the target video, and a plurality of video players can be used to play the video respectively, thereby improving the use flexibility of the video players.
EXAMPLE III
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for playing a video, as shown in fig. 3, the apparatus includes:
a receiving module 310, configured to receive a play instruction for a target video;
a detection module 320 for detecting whether there is a video player using hardware decoding;
and the playing module 330 is configured to perform video decoding playing on the target video in a software decoding manner if the local presence video player is using hardware decoding.
Optionally, the detecting module 320 is configured to:
detecting whether a system player is performing video decoding playing;
if the system player is performing video decoding playing, determining that a local existing video player is using hardware decoding;
if the system player does not perform video decoding playing and the local presence hardware decoding interface is the called video player, determining that the local presence video player is using hardware decoding;
if the system player does not play the video decoding and no video player with the hardware decoding interface being called exists locally, it is determined that no video player exists locally and uses the hardware decoding.
Optionally, the apparatus further comprises: the recording module is used for receiving a setting instruction corresponding to the target image drawing mode and recording the target image drawing mode;
a play module 330, configured to:
and if the local video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode according to the target image drawing mode.
Optionally, the playing module 330 is configured to:
if the local video player is decoding by using hardware, calling the video player supporting software decoding, and performing video decoding playing on the target video by using a software decoding mode.
Optionally, the playing module 330 is further configured to:
in the process of performing video decoding playing on the target video, if it is detected that no video player is currently using hardware decoding, the target video is continuously performed with video decoding playing in a hardware decoding mode.
Optionally, the playing module 330 is further configured to:
if the hardware decoding is not used in the local video player, the target video is subjected to video decoding playing in a software decoding mode; or,
if the local non-existing video player is using hardware decoding, the target video is played by using hardware decoding.
In the embodiment of the invention, a playing instruction of a target video is received, whether a video player uses hardware decoding is detected, if the video player uses hardware decoding, the target video is decoded and played by using a software decoding mode, so that the decoding mode of the video player playing the video can be detected to determine which decoding mode should be adopted to decode and play the target video, and a plurality of video players can be used to play the video respectively, thereby improving the use flexibility of the video players.
It should be noted that: in the apparatus for playing video according to the above embodiment, when playing video, only the division of the above functional modules is used for illustration, in practical application, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the apparatus for playing a video and the method for playing a video provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and will not be described herein again.
Example four
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention. Referring to fig. 4, the terminal may be used to implement the method for playing video provided in the above embodiments. Specifically, the method comprises the following steps:
terminal 1200 can include one or more of the following components: processing component 1202, memory 1204, power component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214, and communications component 1216.
The processing component 1202 generally controls overall operation of the terminal 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operation at the terminal 1200. Examples of such data include instructions for any application or method operating on terminal 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 1206 provides power to the various components of terminal 1200. Power components 1206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 1200.
The multimedia components 1208 include a screen providing an output interface between the terminal 1200 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1200 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 1210 is configured to output and/or input audio signals. For example, the audio assembly 1210 includes a Microphone (MIC) configured to receive external audio signals when the terminal 1200 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1204 or transmitted via the communication component 1216. In some embodiments, audio assembly 1210 further includes a speaker for outputting audio signals.
The I/O interface 1212 provides an interface between the processing component 1202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1214 includes one or more sensors for providing various aspects of state assessment for the terminal 1200. For example, sensor assembly 1214 can detect an open/closed state of device 1200, the relative positioning of components, such as a display and keypad of terminal 1200, sensor assembly 1214 can also detect a change in position of terminal 1200 or a component of terminal 1200, the presence or absence of user contact with terminal 1200, orientation or acceleration/deceleration of terminal 1200, and a change in temperature of terminal 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communications component 1216 is configured to facilitate communications between terminal 1200 and other devices, either wired or wirelessly. The terminal 1200 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 1204 comprising instructions, executable by processor 1220 of terminal 1200 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a terminal, enable a mobile terminal to perform a method of playing a video, the method comprising:
receiving a playing instruction of a target video;
detecting whether a video player is decoding by using hardware or not locally;
if the local existing video player is decoding by using hardware, the target video is subjected to video decoding playing by using software decoding.
Optionally, detecting whether the video player is using hardware decoding locally comprises:
detecting whether a system player is performing video decoding playing;
if the system player is performing video decoding playing, determining that a local existing video player is using hardware decoding;
if the system player does not perform video decoding playing and the local presence hardware decoding interface is the called video player, determining that the local presence video player is using hardware decoding;
if the system player does not play the video decoding and no video player with the hardware decoding interface being called exists locally, it is determined that no video player exists locally and uses the hardware decoding.
Optionally, the method further comprises: receiving a setting instruction corresponding to a target image drawing mode, and recording the target image drawing mode;
if the local existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode, wherein the method comprises the following steps:
and if the local video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode according to the target image drawing mode.
Optionally, if the native video player is using hardware decoding, performing video decoding playing on the target video by using software decoding, including:
if the local video player is decoding by using hardware, calling the video player supporting software decoding, and performing video decoding playing on the target video by using a software decoding mode.
Optionally, the method further comprises:
in the process of performing video decoding playing on the target video, if it is detected that no video player is currently using hardware decoding, the target video is continuously performed with video decoding playing in a hardware decoding mode.
Optionally, the method further comprises:
if the hardware decoding is not used in the local video player, the target video is subjected to video decoding playing in a software decoding mode; or,
if the local non-existing video player is using hardware decoding, the target video is played by using hardware decoding.
In the embodiment of the invention, a playing instruction of a target video is received, whether a video player uses hardware decoding is detected, if the video player uses hardware decoding, the target video is decoded and played by using a software decoding mode, so that the decoding mode of the video player playing the video can be detected to determine which decoding mode should be adopted to decode and play the target video, and a plurality of video players can be used to play the video respectively, thereby improving the use flexibility of the video players.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method of playing a video, the method comprising:
receiving a playing instruction of a target video;
detecting whether a video player is decoding by using hardware or not locally;
if the local existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode;
in the process of carrying out video decoding playing on the target video, periodically detecting whether a video player decodes the video in a hardware decoding mode, if it is detected in a certain period that the video player in the terminal does not decode the video in the hardware decoding mode, switching the decoding mode of the video player from software decoding to hardware decoding, and continuing decoding playing on the target video by the video player in the hardware decoding mode;
the detecting whether the video player is using hardware decoding locally comprises:
detecting whether a system player is performing video decoding playing;
if the system player is performing video decoding playing, determining that a locally-existing video player is using hardware decoding;
if the system player does not perform video decoding playing and a local presence video player with a hardware decoding interface being called, determining that the local presence video player is using hardware decoding;
if the system player does not play the video decoding and no video player with the hardware decoding interface being called exists locally, determining that no video player exists locally and uses the hardware decoding.
2. The method of claim 1, further comprising: receiving a setting instruction corresponding to a target image drawing mode, and recording the target image drawing mode;
if the local existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode, including:
and if the local existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode according to the target image drawing mode.
3. The method of claim 1, wherein the playing the target video by decoding the target video by software if the local video player is decoding the target video by hardware comprises:
and if the local existing video player is decoding by using hardware, calling the video player supporting software decoding, and performing video decoding playing on the target video by using a software decoding mode.
4. The method of claim 1, further comprising:
if the local video player does not use hardware decoding, the target video is subjected to video decoding playing in a software decoding mode; or,
and if the local non-existing video player is using hardware decoding, performing video decoding playing on the target video by using a hardware decoding mode.
5. An apparatus for playing video, the apparatus comprising:
the receiving module is used for receiving a playing instruction of the target video;
the detection module is used for detecting whether a video player uses hardware decoding or not locally;
the playing module is used for decoding and playing the target video in a software decoding mode if a local video player uses hardware decoding;
the playing module is further configured to periodically detect whether the video player decodes the video in a hardware decoding manner during the process of playing the target video in a video decoding manner, switch the decoding manner of the video player from software decoding to hardware decoding if it is detected within a certain period that the video player in the terminal does not decode the video in the hardware decoding manner, and continue to play the target video in the hardware decoding manner;
the detection module is configured to:
detecting whether a system player is performing video decoding playing;
if the system player is performing video decoding playing, determining that a locally-existing video player is using hardware decoding;
if the system player does not perform video decoding playing and a local presence video player with a hardware decoding interface being called, determining that the local presence video player is using hardware decoding;
if the system player does not play the video decoding and no video player with the hardware decoding interface being called exists locally, determining that no video player exists locally and uses the hardware decoding.
6. The apparatus of claim 5, further comprising: the recording module is used for receiving a setting instruction corresponding to a target image drawing mode and recording the target image drawing method;
the playing module is used for:
and if the local existing video player is decoding by using hardware, performing video decoding playing on the target video by using a software decoding mode according to the target image drawing mode.
7. The apparatus of claim 5, wherein the playback module is configured to:
and if the local existing video player is decoding by using hardware, calling the video player supporting software decoding, and performing video decoding playing on the target video by using a software decoding mode.
8. The apparatus of claim 5, wherein the playback module is further configured to:
if the local video player does not use hardware decoding, the target video is subjected to video decoding playing in a software decoding mode; or,
and if the local non-existing video player is using hardware decoding, performing video decoding playing on the target video by using a hardware decoding mode.
CN201410360066.1A 2014-07-25 2014-07-25 The method and apparatus for playing video Active CN104837020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410360066.1A CN104837020B (en) 2014-07-25 2014-07-25 The method and apparatus for playing video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410360066.1A CN104837020B (en) 2014-07-25 2014-07-25 The method and apparatus for playing video

Publications (2)

Publication Number Publication Date
CN104837020A CN104837020A (en) 2015-08-12
CN104837020B true CN104837020B (en) 2018-09-18

Family

ID=53814622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410360066.1A Active CN104837020B (en) 2014-07-25 2014-07-25 The method and apparatus for playing video

Country Status (1)

Country Link
CN (1) CN104837020B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309879A (en) * 2017-07-27 2019-02-05 飞狐信息技术(天津)有限公司 A kind of coding/decoding method, device and equipment
CN110636370B (en) * 2018-06-25 2022-02-01 斑马智行网络(香港)有限公司 Video processing method and device, electronic equipment and readable medium
CN113490031B (en) * 2021-06-28 2023-07-18 Vidaa(荷兰)国际控股有限公司 Display equipment and multi-window video playing method
CN116055715B (en) * 2022-05-30 2023-10-20 荣耀终端有限公司 Scheduling method of coder and decoder and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761736A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Video decoding method and device
CN102883218A (en) * 2012-09-21 2013-01-16 北京君正集成电路股份有限公司 Method and equipment for decoding multiple video files
CN103177744A (en) * 2011-12-21 2013-06-26 深圳市快播科技有限公司 Low-power-consumption playing method and device for mobile equipment
CN103339959A (en) * 2011-01-19 2013-10-02 高通股份有限公司 Dynamic video switching

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103339959A (en) * 2011-01-19 2013-10-02 高通股份有限公司 Dynamic video switching
CN102761736A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Video decoding method and device
CN103177744A (en) * 2011-12-21 2013-06-26 深圳市快播科技有限公司 Low-power-consumption playing method and device for mobile equipment
CN102883218A (en) * 2012-09-21 2013-01-16 北京君正集成电路股份有限公司 Method and equipment for decoding multiple video files

Also Published As

Publication number Publication date
CN104837020A (en) 2015-08-12

Similar Documents

Publication Publication Date Title
EP3276976A1 (en) Method, apparatus, host terminal, server and system for processing live broadcasting information
US10282561B2 (en) Method and apparatus for managing application
US20170155958A1 (en) Method, Apparatus and System for Playing Multimedia Data, and Storage Medium
KR101722522B1 (en) Method and apparatus for switching display mode
US9961393B2 (en) Method and device for playing multimedia file
US20190073124A1 (en) Method and apparatus for controlling application
JP2016538663A (en) Method and apparatus for controlling background application and terminal apparatus
US20190235745A1 (en) Method and device for displaying descriptive information
US11545188B2 (en) Video processing method, video playing method, devices and storage medium
CN106033397B (en) Memory buffer area adjusting method, device and terminal
CN105786507B (en) Display interface switching method and device
CN107562349B (en) Method and device for executing processing
CN111031177A (en) Screen recording method, device and readable storage medium
CN108804179B (en) Method, device, terminal and storage medium for displaying notification bar message
CN104616241A (en) Video screen-shot method and device
CN110262692B (en) Touch screen scanning method, device and medium
CN107277628B (en) video preview display method and device
CN112019893A (en) Screen projection method and screen projection device of terminal
US20170090684A1 (en) Method and apparatus for processing information
CN105260247A (en) Method and device for controlling terminal application
US20180365038A1 (en) Display method and device of application interface
CN104837020B (en) The method and apparatus for playing video
CN105912204B (en) Method and device for starting application interface
US20220256230A1 (en) Method and apparatus for video playing
CN107491238B (en) Display method and device of push information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant