CN114125327A - Video switching method, system, storage medium and terminal equipment - Google Patents
Video switching method, system, storage medium and terminal equipment Download PDFInfo
- Publication number
- CN114125327A CN114125327A CN202111364769.8A CN202111364769A CN114125327A CN 114125327 A CN114125327 A CN 114125327A CN 202111364769 A CN202111364769 A CN 202111364769A CN 114125327 A CN114125327 A CN 114125327A
- Authority
- CN
- China
- Prior art keywords
- video
- player
- picture
- current frame
- switching
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000004590 computer program Methods 0.000 claims description 15
- 239000000872 buffer Substances 0.000 claims description 4
- 238000009877 rendering Methods 0.000 claims 1
- 230000010365 information processing Effects 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/268—Signal distribution or switching
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a video switching method, a video switching system, a storage medium and terminal equipment, which are applied to the technical field of information processing. The intelligent device creates a second player when receiving a video switching request for requesting to switch from a first video to a second video, wherein the first player does not immediately release the video resource of the first video, but the first player releases the corresponding video resource after the second player prepares the video resource of the second video, acquires and displays the current frame video picture of the first player, hides the current frame video picture and displays the video picture of the second video after the second player finishes drawing the video picture of the second video. In the process, after the first player releases the video resource of the first video, the intelligent device can be ensured not to display the black frame but to display the current frame video picture of the first video drawn by the first player before the video resource is released, so that better user experience is provided for a user.
Description
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a video switching method, a video switching system, a storage medium, and a terminal device.
Background
Along with the improvement of living standard of people, smart televisions are more popular in various families, and therefore better video watching experience needs to be brought to users, for example, videos do not have a black screen, and the like. Generally, a Chip-on-Chip (SOC) Chip of a smart television has a customized driver (device) for drawing and displaying a video image, and the device usually has some post-processing functions for improving image quality and increasing image fluency.
However, when the video is displayed through the device, especially in the process of switching the video, the situation of black screen of the video picture may occur, which causes bad experience for the user.
Disclosure of Invention
Embodiments of the present invention provide a video switching method, a video switching system, a storage medium, and a terminal device, which avoid a situation that a video frame is black during a video switching process.
An embodiment of the present invention provides a video switching method, including:
receiving a video switching request, wherein the video switching request is used for requesting to switch from a first video to a second video;
creating a second player according to the video switching request, wherein the second player is used for drawing a video picture of the second video;
when the second player prepares the video resource of the second video, acquiring a current frame video picture of the first video currently drawn by the first player, and displaying the current frame video picture;
controlling the first player to release the video resource of the first video;
and after the second player finishes drawing the video picture of the second video, hiding the video picture of the current frame and displaying the video picture of the second video.
Another aspect of an embodiment of the present invention provides a video switching system, including:
a request receiving unit configured to receive a video switching request for requesting switching from a first video to a second video;
a creating unit, configured to create a second player according to the video switching request, where the second player is used to draw a video picture of the second video;
the acquisition and display unit is used for acquiring a current frame video picture of the first video currently drawn by the first player and displaying the current frame video picture when the second player prepares the video resource of the second video;
a release unit, configured to control the first player to release a video resource of the first video;
and the hidden display unit is used for hiding the current frame video picture and displaying the video picture of the second video after the second player finishes drawing the video picture of the second video.
In another aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a plurality of computer programs, where the computer programs are suitable for being loaded by a processor and executing the video switching method according to an aspect of the embodiment of the present invention.
In another aspect, an embodiment of the present invention further provides a terminal device, including a processor and a memory;
the memory is used for storing a plurality of computer programs, and the computer programs are used for being loaded by the processor and executing the video switching method according to the aspect of the embodiment of the invention; the processor is configured to implement each of the plurality of computer programs.
It can be seen that, in the method of this embodiment, when the intelligent device receives a video switching request for requesting to switch from the first video to the second video, the second player is created, at this time, the first player does not immediately release the video resource of the first video, but the first player releases the corresponding video resource after the second player prepares the video resource of the second video, acquires and displays the current frame video picture of the first player, and after the second player finishes drawing the video picture of the second video, hides the current frame video picture, and displays the video picture of the second video. In the process, after the first player releases the video resource of the first video, the intelligent device can be ensured not to display a black frame but to display a current frame video picture of the first video drawn by the first player before the video resource is released, so that the intelligent device can not display a black screen in the video switching process, and better user experience is provided for users.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a video switching method according to an embodiment of the present invention;
fig. 2 is a flowchart of a video switching method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a display interface of a video frame displayed by a smart device in one embodiment of the invention;
fig. 4 is a flowchart of a video switching method according to an embodiment of the present invention;
FIG. 5a is a relational diagram of a hierarchical presentation of interfaces in an embodiment of the present invention;
FIG. 5b is a schematic diagram of another relationship displayed at each interface level in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a distributed system to which a video switching method is applied in another embodiment of the present invention;
FIG. 7 is a block diagram illustrating an exemplary block structure according to another embodiment of the present invention;
fig. 8 is a schematic logic structure diagram of a video switching system according to an embodiment of the present invention;
fig. 9 is a schematic logical structure diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the present invention provides a video switching method, which is mainly applicable to a method executed by an intelligent device when a user triggers and switches a current first video through the intelligent device, as shown in fig. 1, the intelligent device may include an application upper layer 10, a control layer 11 and a drive layer 12, and in a specific application, the intelligent device may specifically be an intelligent television, and the like, where:
the application upper layer 10 is used for providing an application interface for a user, and the user can initiate an application request through the user interface, such as accessing video data, or switching currently displayed video data of one resolution to video data of another resolution, and the like.
A control part 11 for connecting information transmission between the application upper layer 10 and the driving layer 12; it is also possible to process requests initiated by the application upper layer 10 and to control and manage the operations performed by the driver layer 12. For example:
when initiating a request for accessing a video through the application upper layer 10, the control layer 11 may create a path of player (e.g., a first player) according to the video access request, prepare a corresponding video resource by the first player, and control the driving layer 12 to receive video data of one resolution and draw a video picture, and the control layer 11 may also control the driving layer 12 to display the video picture drawn by the first player; when a video switching request is initiated by applying the upper layer 10, the control layer 11 may create another player (for example, a second player) according to the video switching request, the second player prepares a corresponding video resource, and controls the driving layer 12 to receive video data of another resolution and draw a corresponding video picture, and the control layer 11 also controls the driving layer 12 to display the video picture drawn by the second player, in this process, the first player needs to release the corresponding video resource.
And a driver layer 12 for receiving the video data and displaying the video data, wherein a customized driver (device) can be used in the driver layer 12 to draw a video picture in each video data.
In this embodiment, the control layer 11 in the intelligent device may specifically implement video switching by the following steps:
receiving a video switching request, wherein the video switching request is used for requesting to switch from a first video to a second video; creating a second player according to the video switching request, wherein the second player is used for drawing a video picture of the second video; when the second player prepares the video resource of the second video, acquiring a current frame video picture of the first video currently drawn by the first player, and displaying the current frame video picture; controlling the first player to release the video resource of the first video; and after the second player finishes drawing the video picture of the second video, hiding the video picture of the current frame and displaying the video picture of the second video.
Therefore, in the process, after the first player releases the video resource of the first video, the intelligent device can not display the black frame, but display the current frame video picture of the first video drawn by the first player before the video resource is released, so that the intelligent device can not display the black screen in the video switching process, and better user experience is provided for users.
An embodiment of the present invention provides a video switching method, which is a method executed by the above-mentioned intelligent device, and a flowchart is shown in fig. 2, where the method includes:
It is understood that the smart device may provide a video interface to the user, so that the user may perform an operation on the video interface to access a certain video data (such as the first video) through the video interface, and the smart device may obtain a resolution of the video data according to the operation of the user, decode the video data, and display a video frame of the first video on a display interface. In one case, the display interface of the first video may further include a resolution switching interface, and when the intelligent device receives an operation on the resolution switching interface, a video switching request is received, and a video switching process of this embodiment is initiated, in this case, the second video requested to be switched by the video switching request and the first video are videos with different resolutions and the same content.
In another case, the display interface of the first video may further include a switching interface of another video (for example, a second video), and the user may operate the switching interface of the second video, and when the intelligent device receives an operation on the switching interface of the second video, a video switching request is received, and a video switching process of this embodiment is initiated, in this case, the second video requested to be switched by the video switching request is a video with a resolution different from that of the first video and with a content different from that of the first video.
For example, fig. 3 shows a display interface of a first video, where the first video corresponds to one resolution, the display interface may include a video picture, and may further include a resolution switching interface, specifically, a "resolution" selection window, and a drop-down window of the resolution has options of "standard definition", "high definition", "super definition", and "blue light", and when a user selects another resolution through the selection window, the smart device receives a video switching request; further, the display interface may further include a second video switching interface, for example, the currently displayed video frame is a video frame of episode 1 in a television series, the display interface further includes a selection button of another episode of the television series, and when the user clicks the selection button of another episode, the intelligent device receives a video switching request.
And 102, creating a second player according to the video switching request, wherein the second player is used for drawing a video picture of a second video.
It should be noted that, in the process of displaying a video picture of any video, the intelligent device may specifically create a path of player, and the created path of player is responsible for drawing a video picture according to video data with a resolution, and then the intelligent device displays the video picture drawn by the path of player. After the intelligent device creates the second player according to the video switching request, since a period of time is required from the creation of the second player to the display of the video picture of the second video drawn by the second player by the intelligent device, in order to avoid the situation that the intelligent device provides a user with a black screen in the period of time, in this embodiment, after the second player is created, the first player does not immediately release the video resource of the first video and continues to draw the video picture of the first video, and meanwhile, the second player is responsible for drawing the video picture of the second video, and the operations between the first player and the second player are independent and do not affect each other.
In the process, the intelligent device places the video picture of the first video drawn by the first player on the first interface level for displaying; when the second player prepares the video resource of the second video, the intelligent device may obtain a current frame video picture of the first video drawn by the first player, and when the current frame video picture is displayed, the current frame video picture may be placed at the second interface level for display, and the second interface level covers the first interface level.
Therefore, after the intelligent device displays the current frame video picture on the second interface level, the video picture of the first video continuously drawn by the first player can be placed on the first interface level, the two interface levels cannot be influenced mutually, and the second interface level is shielded above the first interface level, so that the current frame video picture displayed on the second interface level can be seen by a user.
And step 104, controlling the first player to release the video resource of the first video, but the second player will continue to be responsible for drawing the video picture of the second video, and the first player needs to release the corresponding video resource before the second player finishes drawing the video picture of the second video.
Specifically, the intelligent device may control the first player to stop drawing the video frame of the first video after acquiring the first preset time of the video frame of the current frame, and release the video resource of the first video.
In general, after the first player releases the video resource of the first video, the first interface level is not placed with the video picture of the first video, but with a black frame, and if the intelligent device displays the black frame, bad experience is brought to the user.
Furthermore, the intelligent device refreshes the screen according to a certain period, the picture displayed on the screen can be redrawn every time the screen is refreshed, and the picture displayed on the screen by the intelligent device can be refreshed if no new data exists, so that the situations of picture tearing, incomplete screen drawing and the like can be avoided. Therefore, it cannot be guaranteed which time the current frame video picture is displayed for screen refreshing, and when the first preset time of the current frame video picture is obtained, the first player does not immediately release the video resource, but releases the video resource after the first preset time.
The first preset time may be obtained according to a frequency of refreshing a screen of the smart device, specifically, the first preset time is greater than or equal to a buffer time of drawing a picture when the smart device refreshes the screen, and when the picture is drawn, there are at least two front and back buffers, the buffer time may be (1000/60) × 2ms, where 60 is the frequency of refreshing the screen of the smart device, and 1000 is a time in units of ms, for example, the first preset time may be 50 ms.
Further, the first preset time cannot be too long, and it is required to control the first player to release the video resource of the first video as soon as possible before the second player finishes drawing the video picture of the second video, so as to ensure that the second player can control the device in the driver layer of the smart device to draw when drawing the video picture of the second video, without controlling a Graphics Processing Unit (GPU) to synthesize the video picture of the second video. The device in the driving layer is adopted to draw the video picture, so that the picture quality can be improved, and the picture fluency can be increased.
Specifically, after the second player finishes drawing the second preset time of the video picture of the second video, the current frame video picture is hidden. When the current frame video picture is hidden and the video picture of the second video is displayed, the video picture of the second video can be placed on a third interface level for displaying, the third interface level is shielded above the second interface level, and the second interface level is used for placing the current frame video picture.
In practical application, the second player will blank the screen for a period of time between the completion of drawing the video picture of the second video and the display of the second video picture, and the blank screen is that the video picture is not opened and the screen is displayed, so that other pictures are needed to be used for shielding in the period of time, and then the video picture of the current frame is hidden after a second preset time, wherein the second preset time is consistent with the time from the drawing of the video picture to the opening and the screen displaying of the video picture.
Further, when the intelligent device receives a video switching request and requests to switch from a first video to a second video with the same content but different resolution, when the intelligent device acquires a current frame video picture currently drawn by the first player, the position of the current frame video picture in the first video, for example, the current frame video picture at the first time of the first video, may also be recorded, so that the intelligent device may control the second player to draw a video picture of the second video according to the recorded position, specifically, draw a video picture at the first time in the second video, so that when the intelligent device displays the video picture of the second video, the intelligent device directly jumps to the position of the first video before the user watches the first video.
It can be seen that, in the method of this embodiment, when the intelligent device receives a video switching request for requesting to switch from the first video to the second video, the second player is created, at this time, the first player does not immediately release the video resource of the first video, but the first player releases the corresponding video resource after the second player prepares the video resource of the second video, acquires and displays the current frame video picture of the first player, and after the second player finishes drawing the video picture of the second video, hides the current frame video picture, and displays the video picture of the second video. In the process, after the first player releases the video resource of the first video, the intelligent device can be ensured not to display a black frame but to display a current frame video picture of the first video drawn by the first player before the video resource is released, so that the intelligent device can not display a black screen in the video switching process, and better user experience is provided for users.
A specific application example is described below to describe the video switching method of the present invention, in this embodiment, the intelligent device is mainly an intelligent television, as shown in fig. 4, the video switching method of this embodiment may include the following steps:
step 201, a user controls the smart television through a remote controller to access a first video with a first resolution, a control layer in the smart television creates a first player, draws a video picture of the first video through the first player, and the smart television places the video picture of the first video in a first interface level (denoted as surfview 1) for displaying, and a resolution switching interface may be included on a display interface of the video picture of the first video.
Step 202, when a user operates a resolution switching interface displayed on a display interface through a remote controller, an application upper layer of the smart television receives a video switching request and transmits the video switching request to a control layer, wherein the video switching request is used for requesting to switch from a first video to a second video with different resolutions and the same content.
In step 203, the control layer of the smart television creates a second player, and at this time, the first player continues to draw the video frame of the first video without immediately releasing the video resource.
In step 204, the created second player calls a set data resource (setdata source) function and a prepare synchronization (prepareasyc) function, when the control layer of the smart television monitors that the second player prepares a video resource of a second video, that is, the second player completes a prepare completion event, a current frame video picture of the first video currently drawn by the first player can be obtained, and the drive layer of the smart television is controlled to place the current frame video picture in a second interface level (denoted as ImageView) for displaying.
When acquiring the current frame video picture, the control layer may call a Media Metadata retriever (Media Metadata Retrieve) to acquire the current frame video picture.
Further, the control layer may record the position of the current frame video picture in the first video, specifically at the first time in the first video.
Step 205, after a first preset time after the control layer of the smart television acquires the current frame video picture, controlling the first player to release the video resource of the first video, and after the first player releases the corresponding video resource, placing a black frame on the first interface level. The first preset time can be obtained according to the frequency of refreshing the screen of the smart television, and is 50ms, for example.
Step 206, when the first player releases the video resource, the second player starts to draw the video picture of the second video, specifically, a set interface (setSurface) function may be called, and a parameter of the set interface function is a third interface level (denoted as surfaceView 0); then, calling a jump (seekTo) function to jump to the first time of the second video so as to draw a video picture at the first time; and calling a start function to control a driving layer of the intelligent television to draw a video picture of the second video.
The third interface level is used for placing and displaying a video picture of a second video drawn by the second player, and the first time is the position of the current frame video picture recorded by the control layer of the smart television in the first video.
It should be noted that, by performing the above steps, as shown in fig. 5a, the interface level of the smart tv current Activity (Activity) may include a first interface level, i.e., sufaceview 1, for placing the video picture of the first video, a second interface level, i.e., ImageView, for placing the current frame video picture, and a third interface level, i.e., sufaceview 0, for placing the video picture of the second video. The second interface level is shielded above the first interface level, the first interface level is shielded above the third interface level, and the current frame video picture placed at the second interface level is visible to the user without displaying a black frame to the user.
Step 207, the second player calls setSurface, the parameter is the first interface level, namely surfaceView1, and when the second player finishes drawing the video picture of the second video, the Render event can be reported to the control layer.
And step 208, after receiving the second preset time of the Render event, the control layer may hide the current frame video picture and display the video picture of the second video, and specifically, may hide the third interface level at least at the second interface level, where the video picture of the second video is visible to the user.
After steps 207 and 208 are performed, for example, as shown in fig. 5b, the interface level of the current Activity (Activity) of the smart tv may include a second interface level, ImageView, for placing the current video frame and a third interface level, SurfaceView0, for placing the video frame of the second video. And the third interface level is shielded above the second interface level, and a video picture of a second video placed at the third interface level is visible to the user.
As can be seen, the following effects can be achieved by the video switching method in this embodiment:
(1) in the video switching process, the multi-channel player is controlled to execute corresponding operations, so that the drawing of the video picture of the second video is executed by the device in the smart television instead of the GPU, the image quality can be improved, and the picture fluency can be increased.
(2) After video resources of the first video are released in the video switching process, the intelligent device displays a current frame video picture of the first video instead of a black frame, and therefore poor user experience brought to a user is avoided.
In the following, a video switching method according to the present invention is described with another specific application example, where the video switching system in the embodiment of the present invention is mainly a distributed system 100, and the distributed system may include a client 300 and a plurality of nodes 200 (any form of computing devices in an access network, such as a server and a user terminal), and the client 300 and the nodes 200 are connected in a network communication manner.
Taking a distributed system as an example of a blockchain system, referring To fig. 6, which is an optional structural schematic diagram of the distributed system 100 applied To the blockchain system provided in the embodiment of the present invention, the system is formed by a plurality of nodes 200 (computing devices in any form in an access network, such as servers and user terminals) and clients 300, a Peer-To-Peer (P2P, Peer To Peer) network is formed between the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or a terminal, can join to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
Referring to the functions of each node in the blockchain system shown in fig. 6, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization function to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the service implemented by the application includes a code implementing a video switching function, which mainly includes:
receiving a video switching request, wherein the video switching request is used for requesting to switch from a first video to a second video; creating a second player according to the video switching request, wherein the second player is used for drawing a video picture of the second video; when the second player prepares the video resource of the second video, acquiring a current frame video picture of the first video currently drawn by the first player, and displaying the current frame video picture; controlling the first player to release the video resource of the first video; and after the second player finishes drawing the video picture of the second video, hiding the video picture of the current frame and displaying the video picture of the second video.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
Referring to fig. 7, an optional schematic diagram of a Block Structure (Block Structure) provided in the embodiment of the present invention is shown, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
An embodiment of the present invention further provides a video switching system, for example, the foregoing smart television, whose schematic structural diagram is shown in fig. 8, which specifically includes:
a request receiving unit 20, configured to receive a video switching request, where the video switching request is used to request switching from a first video to a second video.
A creating unit 21, configured to create a second player according to the video switching request received by the request receiving unit 20, where the second player is configured to draw a video picture of the second video.
An obtaining and displaying unit 22, configured to obtain a current frame video picture of the first video currently drawn by the first player and display the current frame video picture when the second player created by the creating unit 21 is ready for the video resource of the second video.
The obtaining and displaying unit 22 is specifically configured to, when displaying the current frame video picture, place the current frame video picture on a second interface level for displaying, where the second interface level is blocked above a first interface level, and the first interface level is used for placing a video picture of a first video drawn by the first player.
A releasing unit 23, configured to control the first player to release the video resource of the first video after the acquiring and displaying unit 22 displays the current frame video picture.
The releasing unit 23 is specifically configured to control the first player to release the video resource of the first video after the first preset time of the current frame video picture is obtained. The first preset time is greater than or equal to the buffering time for drawing pictures when the intelligent device refreshes the screen.
A hiding and displaying unit 24, configured to hide the current frame video frame acquired by the acquiring and displaying unit 22 and display the video frame of the second video after the second player finishes drawing the video frame of the second video.
The hiding and displaying unit 24 is specifically configured to hide the current video frame after the second player finishes drawing the video frame of the second video, when the current video frame is hidden, after the second player finishes drawing the video frame of the second video for a second preset time.
The hiding and displaying unit 24 is specifically configured to, when hiding the current frame video picture and displaying the video picture of the second video, place the video picture of the second video on a third interface level for displaying, where the third interface level is hidden above the second interface level, and the second interface level is used for placing the current frame video picture.
Further, the video switching system of the present embodiment may further include:
the interface display unit 25 is configured to display a display interface of the first video, where the display interface includes a resolution switching interface or a switching interface of the second video; in this way, the request receiving unit 20 is specifically configured to receive a video switching request when receiving an operation on the resolution switching interface displayed by the interface display unit 25 or a switching interface of the second video.
A recording control unit 26, configured to record, when the video switching request received by the request receiving unit 20 is used to request to switch from a first video to a second video with the same content but different resolution, and when the obtaining and displaying unit 22 obtains a current frame video picture of the first video currently drawn by the first player, a position of the current frame video picture in the first video; and controlling the second player to draw the video picture of the second video according to the recorded position.
It can be seen that, in the system of this embodiment, when the request receiving unit 20 receives a video switching request for requesting to switch from the first video to the second video, the creating unit 21 creates the second player, and at this time, the first player does not immediately release the video resource of the first video, but after the second player prepares the video resource of the second video, acquires and displays the current frame video frame of the first player, the releasing unit 23 controls the first player to release the corresponding video resource, and after the second player finishes drawing the video frame of the second video, the hiding and displaying unit 24 hides the current frame video frame and displays the video frame of the second video. In the process, after the first player releases the video resource of the first video, the video switching system can be ensured not to display a black frame but to display a current frame video picture of the first video drawn by the first player before the video resource is released, so that the video switching system can not display a black screen in the video switching process, and better user experience is provided for a user.
The present invention further provides a terminal device, a schematic structural diagram of which is shown in fig. 9, where the terminal device may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 30 (e.g., one or more processors) and a memory 31, and one or more storage media 32 (e.g., one or more mass storage devices) for storing applications 321 or data 322. The memory 31 and the storage medium 32 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 32 may include one or more modules (not shown), each of which may include a series of instruction operations for the terminal device. Still further, the central processor 30 may be configured to communicate with the storage medium 32 to execute a series of instruction operations in the storage medium 32 on the terminal device.
Specifically, the application 321 stored in the storage medium 32 includes an application for video switching, and the application may include the request receiving unit 20, the creating unit 21, the obtaining display unit 22, the releasing unit 23, the hiding display unit 24, the interface display unit 25, and the recording control unit 26 in the video switching system, which will not be described herein again. Further, the central processor 30 may be configured to communicate with the storage medium 32, and execute a series of operations corresponding to the application program for video switching stored in the storage medium 32 on the terminal device.
The terminal equipment may also include one or more power supplies 33, one or more wired or wireless network interfaces 34, one or more input-output interfaces 35, and/or one or more operating systems 323, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.
The steps performed by the video switching system in the above method embodiment may be based on the structure of the terminal device shown in fig. 9.
In another aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a plurality of computer programs, where the computer programs are suitable for being loaded by a processor and executing the video switching method executed by the video switching system.
In another aspect, an embodiment of the present invention further provides a terminal device, including a processor and a memory;
the memory is used for storing a plurality of computer programs, and the computer programs are used for being loaded by the processor and executing the video switching method executed by the video switching system; the processor is configured to implement each of the plurality of computer programs.
Further, according to an aspect of the application, a computer program product or a computer program is provided, comprising computer instructions, which are stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the video switching method provided in the above-mentioned various alternative implementations.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The video switching method, system, storage medium and terminal device provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (11)
1. A video switching method, comprising:
receiving a video switching request, wherein the video switching request is used for requesting to switch from a first video to a second video;
creating a second player according to the video switching request, wherein the second player is used for drawing a video picture of the second video;
when the second player prepares the video resource of the second video, acquiring a current frame video picture of the first video currently drawn by the first player, and displaying the current frame video picture;
controlling the first player to release the video resource of the first video;
and after the second player finishes drawing the video picture of the second video, hiding the video picture of the current frame and displaying the video picture of the second video.
2. The method of claim 1, wherein prior to receiving the video handover request, further comprising:
the display interface is used for displaying the first video and comprises a resolution switching interface or a second video switching interface;
the receiving of the video switching request specifically includes: and when receiving the operation of the resolution switching interface or the switching interface of the second video, receiving a video switching request.
3. The method according to claim 1, wherein said displaying the current frame video picture specifically comprises:
and placing the current frame video picture on a second interface level for displaying, wherein the second interface level is shielded above a first interface level, and the first interface level is used for placing a video picture of a first video drawn by the first player.
4. The method of claim 1, wherein the controlling the first player to release the video resource of the first video comprises:
and after the first preset time of the current frame video picture is acquired, controlling the first player to release the video resource of the first video.
5. The method of claim 4, wherein the first preset time is greater than or equal to a buffer time for the smart device to draw the picture while refreshing the screen.
6. The method according to any one of claims 1 to 5, wherein hiding the current frame video frame after the second player finishes rendering the video frame of the second video comprises:
and hiding the current frame video picture after the second player finishes drawing the second preset time of the video picture of the second video.
7. The method according to any one of claims 1 to 5, wherein the video switching request is for requesting switching from a first video to a second video having the same content but different resolution;
when obtaining a current frame video picture of the first video currently drawn by the first player, the method further includes: recording the position of the current frame video picture in a first video;
and controlling the second player to draw the video picture of the second video according to the recorded position.
8. The method according to any one of claims 1 to 5, wherein the hiding the current frame video picture and displaying the video picture of the second video comprises:
and placing the video picture of the second video on a third interface level for displaying, wherein the third interface level is shielded above a second interface level, and the second interface level is used for placing the video picture of the current frame.
9. A video switching system, comprising:
a request receiving unit configured to receive a video switching request for requesting switching from a first video to a second video;
a creating unit, configured to create a second player according to the video switching request, where the second player is used to draw a video picture of the second video;
the acquisition and display unit is used for acquiring a current frame video picture of the first video currently drawn by the first player and displaying the current frame video picture when the second player prepares the video resource of the second video;
a release unit, configured to control the first player to release a video resource of the first video;
and the hidden display unit is used for hiding the current frame video picture and displaying the video picture of the second video after the second player finishes drawing the video picture of the second video.
10. A computer-readable storage medium, characterized in that it stores a plurality of computer programs adapted to be loaded by a processor and to execute the video switching method according to any one of claims 1 to 8.
11. A terminal device comprising a processor and a memory;
the memory is used for storing a plurality of computer programs for being loaded by the processor and executing the video switching method according to any one of claims 1 to 8; the processor is configured to implement each of the plurality of computer programs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111364769.8A CN114125327A (en) | 2021-11-17 | 2021-11-17 | Video switching method, system, storage medium and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111364769.8A CN114125327A (en) | 2021-11-17 | 2021-11-17 | Video switching method, system, storage medium and terminal equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114125327A true CN114125327A (en) | 2022-03-01 |
Family
ID=80397122
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111364769.8A Pending CN114125327A (en) | 2021-11-17 | 2021-11-17 | Video switching method, system, storage medium and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114125327A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050018082A1 (en) * | 2003-07-24 | 2005-01-27 | Larsen Tonni Sandager | Transitioning between two high resolution images in a slideshow |
US20110296478A1 (en) * | 2010-06-01 | 2011-12-01 | Rogers Communications Inc. | Device, method and system for service insertion during content display |
US20170168706A1 (en) * | 2015-12-14 | 2017-06-15 | Le Holdings (Beijing) Co., Ltd. | Method and electronic device for switching videos |
CN108156487A (en) * | 2016-12-02 | 2018-06-12 | 北京邦天信息技术有限公司 | A kind of video broadcasting method and device |
CN109963188A (en) * | 2017-12-22 | 2019-07-02 | 杭州海康威视数字技术股份有限公司 | Switching method, device, electronic equipment and the storage medium of video pictures |
CN110545483A (en) * | 2018-05-29 | 2019-12-06 | 北京字节跳动网络技术有限公司 | Method, device and storage medium for playing media file by switching resolution in webpage |
CN110636372A (en) * | 2019-10-08 | 2019-12-31 | 未来电视有限公司 | Video decoding method, video decoder initialization method and device |
CN110858915A (en) * | 2018-08-24 | 2020-03-03 | 北京字节跳动网络技术有限公司 | Resolution switching method and device in media file playing process and storage medium |
CN110999275A (en) * | 2019-11-14 | 2020-04-10 | 深圳爱特天翔科技有限公司 | Video signal non-black screen switching processing method and device |
CN111866433A (en) * | 2020-07-31 | 2020-10-30 | 腾讯科技(深圳)有限公司 | Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium |
-
2021
- 2021-11-17 CN CN202111364769.8A patent/CN114125327A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050018082A1 (en) * | 2003-07-24 | 2005-01-27 | Larsen Tonni Sandager | Transitioning between two high resolution images in a slideshow |
US20110296478A1 (en) * | 2010-06-01 | 2011-12-01 | Rogers Communications Inc. | Device, method and system for service insertion during content display |
US20170168706A1 (en) * | 2015-12-14 | 2017-06-15 | Le Holdings (Beijing) Co., Ltd. | Method and electronic device for switching videos |
CN108156487A (en) * | 2016-12-02 | 2018-06-12 | 北京邦天信息技术有限公司 | A kind of video broadcasting method and device |
CN109963188A (en) * | 2017-12-22 | 2019-07-02 | 杭州海康威视数字技术股份有限公司 | Switching method, device, electronic equipment and the storage medium of video pictures |
CN110545483A (en) * | 2018-05-29 | 2019-12-06 | 北京字节跳动网络技术有限公司 | Method, device and storage medium for playing media file by switching resolution in webpage |
US20200396504A1 (en) * | 2018-05-29 | 2020-12-17 | Beijing Bytedance Network Technology Co., Ltd. | Method and Device for Playing Media File While Switching Resolution in Webpage and Storage Medium |
CN110858915A (en) * | 2018-08-24 | 2020-03-03 | 北京字节跳动网络技术有限公司 | Resolution switching method and device in media file playing process and storage medium |
CN110636372A (en) * | 2019-10-08 | 2019-12-31 | 未来电视有限公司 | Video decoding method, video decoder initialization method and device |
CN110999275A (en) * | 2019-11-14 | 2020-04-10 | 深圳爱特天翔科技有限公司 | Video signal non-black screen switching processing method and device |
WO2021092827A1 (en) * | 2019-11-14 | 2021-05-20 | 深圳爱特天翔科技有限公司 | Video signal black-screen-free switching processing method and device |
CN111866433A (en) * | 2020-07-31 | 2020-10-30 | 腾讯科技(深圳)有限公司 | Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10271013B2 (en) | Display control method and apparatus | |
WO2020083021A1 (en) | Video recording method and apparatus, video playback method and apparatus, device, and storage medium | |
US20220317825A1 (en) | Method and apparatus for displaying multimedia resources, and storage medium | |
CN104159151A (en) | Device and method for intercepting and processing of videos on OTT box | |
WO2016188276A1 (en) | Video playing method, client and computer storage medium | |
US11582506B2 (en) | Video processing method and apparatus, and storage medium | |
CN111556357B (en) | Method, device and equipment for playing live video and storage medium | |
CN113518247A (en) | Video playing method, related equipment and computer readable storage medium | |
CN108769816B (en) | Video playing method, device and storage medium | |
CN112770168B (en) | Video playing method, related device and equipment | |
CN106998490A (en) | A kind of multi-medium data synchronous method and device | |
CN204013943U (en) | A kind of device that carries out video intercepting and process on OTT box | |
US20240143649A1 (en) | Multimedia information processing method, apparatus, electronic device, and medium | |
WO2023093698A1 (en) | Interaction method for game live-streaming, and storage medium, program product and electronic device | |
CN112055252A (en) | Multi-screen interaction method and device, computer readable medium and electronic equipment | |
CN114845136B (en) | Video synthesis method, device, equipment and storage medium | |
CN114422816A (en) | Live video processing method and device, electronic equipment and storage medium | |
WO2016066056A1 (en) | Image remote projection method, server and client | |
CN114125327A (en) | Video switching method, system, storage medium and terminal equipment | |
CN106231360A (en) | A kind of improve the method for live video opening speed, subscriber equipment and server | |
CN116112617A (en) | Method and device for processing performance picture, electronic equipment and storage medium | |
CN114840159A (en) | Rendering and screen-loading method, device, equipment and medium | |
CN114915810B (en) | Media resource pushing method and intelligent terminal | |
CN116347140A (en) | Video synchronous playing method and device, storage medium and electronic equipment | |
CN115145660A (en) | Multimedia playing method, device, storage medium and terminal equipment |
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 |