CN111698548B - Video playing method and device - Google Patents
Video playing method and device Download PDFInfo
- Publication number
- CN111698548B CN111698548B CN201910185375.2A CN201910185375A CN111698548B CN 111698548 B CN111698548 B CN 111698548B CN 201910185375 A CN201910185375 A CN 201910185375A CN 111698548 B CN111698548 B CN 111698548B
- Authority
- CN
- China
- Prior art keywords
- video
- playing
- played
- panes
- pane
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4438—Window management, e.g. event handling following interaction with the user interface
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/485—End-user interface for client configuration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/485—End-user interface for client configuration
- H04N21/4858—End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The embodiment of the invention provides a video playing method, which comprises the following steps: determining the number of first panes occupied by a plurality of videos to be played; dividing a video playing area into a plurality of panes according to the number of the first panes; and aiming at each video to be played, determining a first playing window corresponding to the video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane. Therefore, the division condition of the video playing area can be adjusted in real time according to the number of the first panes occupied by the video to be played, so that the method for adjusting the video window is more flexible, and the requirements of users are met as much as possible.
Description
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a video playing method and apparatus.
Background
In some scenarios, multiple video windows need to be played in the screen at the same time, for example, when road monitoring is performed, multiple road monitoring video windows at intersections are played in real time in the screen. In this case, it is sometimes necessary to adjust the number, size, and position of video windows played in the screen.
In the related art, the method for adjusting the video window generally includes: the method comprises the steps of defining multiple video window segmentation types in advance, firstly selecting the video window segmentation types by a user, then segmenting a video playing area according to the video window segmentation type selected by the user, and laying out an adjusted video window according to a segmentation result, so that the adjustment of the video window is realized.
However, in the above method, the number of predefined video window segmentation types is usually limited, and the situation of adjusting the video window is difficult to predict, that is, the predefined video window segmentation types may be difficult to meet the requirement of adjusting the video window in practical situations.
Disclosure of Invention
The embodiment of the invention aims to provide a video playing method and a video playing device so as to realize flexible adjustment of a video window and meet the requirements of users. The specific technical scheme is as follows:
the embodiment of the invention provides a video playing method, which comprises the following steps:
determining the number of first panes occupied by a plurality of videos to be played;
dividing a video playing area into a plurality of panes according to the number of the first panes;
and aiming at each video to be played, determining a first playing window corresponding to the video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane.
Optionally, the determining the number of first panes that a plurality of videos to be played need to occupy includes:
acquiring size information of a plurality of videos to be played;
and calculating the number of first panes occupied by the videos to be played according to the size information.
Optionally, the dividing the video playing area into a plurality of panes according to the number of the first panes includes:
determining a plurality of candidate segmentation types according to the number of the first panes;
selecting the segmentation type with the largest area of a single pane from the multiple candidate segmentation types as a target segmentation type;
and dividing the video playing area into a plurality of panes according to the target division type.
Optionally, the method further includes:
acquiring a newly added video, and determining the number of second panes required to be occupied by the newly added video and the corresponding pane layout;
judging whether the number of blank panes in the video playing area is smaller than the number of second panes, wherein the blank panes are panes for not playing the video currently;
if not, judging whether the layout of a blank pane in the video playing area is matched with the layout of the pane corresponding to the newly added video;
if the newly added videos are matched, sequentially determining newly added playing windows corresponding to the newly added videos according to a preset sequence, and playing the newly added videos in the corresponding newly added playing windows, wherein the newly added playing windows comprise at least one blank pane;
if the number of the blank panes in the video playing area is less than the number of the second panes, or the layout of the blank panes in the video playing area is not matched with the layout of the pane corresponding to the newly added video, according to the pane layout corresponding to the newly added video, the sum of the first pane number and the second pane number, dividing the video playing area into a plurality of panes, respectively determining second playing windows corresponding to the newly added video and the original video to be played, playing the new video in a second playing window corresponding to the new video, playing the original video to be played in a second playing window corresponding to the original video to be played, the second playing window comprises at least one pane, and the original video to be played is a video which is played in the video playing area before the newly added video is obtained.
Optionally, the determining the second playing windows corresponding to the newly added video and the original video to be played respectively includes:
determining a second playing window corresponding to an original video to be played by taking the number of rows and columns of panes in a first playing window originally corresponding to the original video to be played as the number of rows and columns of panes in a second playing window currently corresponding to the original video to be played;
and determining a second playing window corresponding to the newly added video based on a blank pane except for a pane contained in the second playing window corresponding to the original video to be played and the layout of the pane corresponding to the newly added video.
Optionally, the method further includes:
determining videos to be closed, wherein the videos to be closed are one or more of the videos to be played;
judging whether the position of the pane corresponding to the video to be closed in the video playing area comprises an edge line and/or an edge column;
if the video to be played comprises the edge row and/or the edge column, judging whether panes for playing other videos to be played except the video to be closed exist on the edge row and/or the edge column;
if the video does not exist, closing the video to be closed, deleting the edge row and/or edge column corresponding to the video to be closed, and amplifying other panes except the edge row and/or edge column corresponding to the video to be closed in an equal ratio until the video playing area is filled;
and if the position of the pane corresponding to the video to be closed in the video playing area does not include an edge row and/or an edge column, or other videos to be played except the video to be closed exist in the edge row and/or the edge column corresponding to the video to be closed, closing the video to be closed.
Optionally, the method further includes:
determining a video to be moved and a moving instruction for the video to be moved, wherein the video to be moved is one of the videos to be played;
determining a target position corresponding to the video to be moved according to the moving instruction;
judging whether the target position exceeds the video playing area, if so, adding row and/or column panes according to the target position, determining a third playing window corresponding to the video to be moved based on the added panes and the target position, and reducing all the panes in an equal ratio to fill the video playing area; if the video to be moved does not exceed the target position, determining a third playing window corresponding to the video to be moved based on the target position, and playing the video to be moved in the third playing window;
judging whether a video to be played currently exists in a pane corresponding to the third playing window, if so, taking the video to be played currently played in the pane corresponding to the third playing window as a video to be exchanged, determining a fourth playing window corresponding to the video to be exchanged, and playing the video to be exchanged in the fourth playing window, wherein the fourth playing window comprises at least one pane occupied by the video to be moved before moving;
judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and amplifying all panes in an equal ratio until the video playing area is filled.
Optionally, the method further includes:
determining a video to be zoomed and a zooming instruction aiming at the video to be zoomed, wherein the video to be zoomed is one or more of the videos to be played;
determining a zooming area corresponding to the video to be zoomed according to the zooming instruction, and judging whether other videos to be played except the video to be zoomed exist in the zooming area;
if not, judging whether the zooming area has a part exceeding the video playing area;
if yes, increasing row and/or column panes according to the position of the zooming area, playing the video to be zoomed in the pane corresponding to the zooming area, and zooming out all the panes in an equal ratio until the video playing area is filled;
if not, playing the video to be zoomed in a pane corresponding to the zooming area; judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and amplifying all panes in an equal ratio until the video playing area is filled.
Optionally, the method further includes:
determining a video to be processed and a dragging instruction aiming at the video to be processed;
determining a fifth playing window corresponding to the video to be processed according to the dragging instruction;
under the condition that a pane in which the video to be played is played exists in the fifth playing window, closing the video to be played in the pane in the fifth playing window;
judging whether the fifth playing window exceeds the video playing area;
if so, adding row and/or column panes according to the position of the fifth playing window, and playing the video to be processed in the pane corresponding to the fifth playing window; reducing all panes in equal proportion to fill the video playing area;
and if not, playing the video to be processed in a pane corresponding to a fifth playing window corresponding to the video to be processed.
Optionally, when there are a plurality of videos to be processed, the playing the video to be processed in the pane corresponding to the fifth playing window includes:
for each video to be processed, sequentially playing the video to be processed in the fifth playing window according to a preset time interval; or the like, or, alternatively,
and aiming at each video to be processed, determining a sub-playing window corresponding to the video to be processed, wherein the sub-playing window comprises at least one pane corresponding to the fifth playing window, the video to be processed is played in the corresponding sub-playing window, and the sub-playing windows corresponding to the videos to be processed are not overlapped.
Optionally, the method further includes:
receiving a map window opening instruction;
according to a preset map display rule, dividing the video playing area into a plurality of panes;
for each video to be played, determining a sixth playing window corresponding to the video to be played, and playing the video to be played in the corresponding sixth playing window, wherein the sixth playing window comprises at least one pane; and determining a pane corresponding to the map window, and displaying the map window.
Optionally, the position and size change of the video played in the video playing area is displayed in an animation mode.
An embodiment of the present invention further provides a video playing device, where the device includes:
the device comprises a determining module, a display module and a display module, wherein the determining module is used for determining the number of first panes occupied by a plurality of videos to be played;
the dividing module is used for dividing the video playing area into a plurality of panes according to the number of the first panes;
the playing module is used for determining a first playing window corresponding to each video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane.
The embodiment of the invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any video playing method when executing the program stored in the memory.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any of the above video playing methods.
An embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned video playing methods.
According to the video playing method and device provided by the embodiment of the invention, the number of first panes occupied by a plurality of videos to be played is determined, the video playing area is divided into a plurality of panes according to the number of the first panes, further, for each video to be played, a first playing window corresponding to the video to be played is determined, and the video to be played is played in the corresponding first playing window, wherein the first playing window comprises at least one pane. Therefore, the division condition of the video playing area can be adjusted in real time according to the number of the first panes occupied by the video to be played, so that the method for adjusting the video window is more flexible, and the requirements of users are met as much as possible. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
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, 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 the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a video playing method according to an embodiment of the present application;
fig. 2(a) is a schematic flow chart illustrating that some videos are newly added in a current video playing area for playing according to an embodiment of the present application;
fig. 2(b) is another schematic flow chart illustrating that some videos are newly added in the current video playing area to be played by applying the embodiment of the present application;
fig. 3 is another schematic flow chart illustrating that some videos are newly added in a current video playing area to be played by applying the embodiment of the present application;
fig. 4 is a schematic flow chart illustrating closing some videos to be played in a current video playing area according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart illustrating moving some videos in a current video playing area according to an embodiment of the present application;
FIG. 6 is a schematic view of another process for moving some videos in the current video playing area according to the embodiment of the present application;
FIG. 7 is a schematic view of another process for moving some videos in the current video playing area according to an embodiment of the present application;
FIG. 8 is a schematic flow chart illustrating scaling of videos in a current video playing area according to an embodiment of the present application;
FIG. 9 is a schematic view of another process for scaling some videos in the current video playing area according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a video playback device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
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.
In some scenarios, multiple video windows need to be played in the screen at the same time, for example, when road monitoring is performed, multiple road monitoring video windows at intersections are played in real time in the screen. In this case, it is sometimes necessary to adjust the number, size, and position of video windows played in the screen.
In the related art, the method for adjusting the video window generally includes: the method comprises the steps of defining multiple video window segmentation types in advance, firstly selecting the video window segmentation types by a user, then segmenting a video playing area according to the video window segmentation type selected by the user, and laying out an adjusted video window according to a segmentation result, so that the adjustment of the video window is realized.
However, in the above method, the number of predefined video window segmentation types is usually limited, and the situation of adjusting the video window is difficult to predict, that is, the predefined video window segmentation types may be difficult to meet the requirement of adjusting the video window in practical situations.
In order to solve the foregoing technical problems, embodiments of the present application provide a video playing method and apparatus, where the method may be applied to various electronic devices that can be applied to video playing, such as a computer, a mobile terminal, a monitor, and the like, and is not limited specifically.
The following generally describes the video playback provided by the embodiments of the present application.
In one implementation, the video playing method includes:
determining the number of first panes occupied by a plurality of videos to be played;
dividing a video playing area into a plurality of panes according to the number of the first panes;
and aiming at each video to be played, determining a first playing window corresponding to the video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane.
As can be seen from the above, the video playing method and device provided by the embodiment of the invention can adjust the division condition of the video playing area in real time according to the number of the first panes that the video to be played needs to occupy, so that the method for adjusting the video window is more flexible, and the requirements of the user are met as much as possible.
The following describes in detail a video playing method provided in an embodiment of the present application through a specific embodiment.
As shown in fig. 1, a schematic flow chart of a video playing method provided in the embodiment of the present application includes the following steps:
s101: determining the number of first panes occupied by a plurality of videos to be played.
The video to be played refers to a video to be played for the first time in the video playing area, in other words, before the video to be played is played, no video being played exists in the video playing area. For example, the video to be played may be a monitoring video acquired in real time or a historical video stored in the storage device, each video to be played has a default size, and each video to be played may occupy one pane or a plurality of panes according to the default size, which is not limited specifically.
In this step, the step of determining the number of the first panes that the multiple videos to be played need to occupy may be performed after the videos to be played are acquired, or the step of determining the number of the first panes that the multiple videos to be played need to occupy may be performed after a play instruction of the user is received.
In one case, the size information of the videos to be played may be obtained according to the determined videos to be played, and then the total required number of panes for the videos to be played is determined as the first number of panes according to the obtained size information. The size information may reflect the size of the video to be played, that is, the size of the picture of the video to be played, or the size information may also reflect the length-width ratio of the video to be played, and different length-width ratios may also correspond to different numbers of panes.
Or, in one case, the default size of each to-be-played video is the same, then, the number of the first panes may be directly determined according to the number of the to-be-played videos, for example, the default size of each to-be-played video may be set to occupy one pane, and thus, the number of the to-be-played videos is the number of the first panes.
S102: and dividing the video playing area into a plurality of panes according to the number of the first panes.
For example, first, a plurality of candidate segmentation types may be determined according to the number of the first panes, then, a segmentation type with the largest area of a single pane is selected from the plurality of candidate segmentation types as a target segmentation type, and then, the video playing area is segmented into a plurality of panes according to the target segmentation type.
For example, the target segmentation type may be a segmentation type with the largest area of a single pane, or a segmentation type with a ratio of the single pane closest to a preset ratio, or a segmentation type with a correlation between panes closest to an expected correlation between panes.
For example, when the first pane number is 9, the candidate segmentation types may include 3 × 3 segmentation, 3 × 4 segmentation, 2 × 5 segmentation, and the like, and in the case where the target segmentation type is the segmentation type having the largest area of a single pane, the 3 × 3 segmentation is the target segmentation type.
S103: and aiming at each video to be played, determining a first playing window corresponding to the video to be played, and playing the video to be played in the corresponding first playing window, wherein each first playing window comprises at least one pane.
After the video playing area is divided into a plurality of panes, a first playing window corresponding to each video to be played can be determined, and then the video to be played can be played in each first playing window. In one case, if the number of the first panes is the number of the videos to be played, that is, each video to be played occupies one pane, any pane may be randomly used as a first playing window of any video to be played, or each pane may be sequentially used as a first playing window of each video to be played from left to right and from top to bottom according to a preset sequence; in another case, if the number of panes corresponding to each video to be played is arbitrary, the first playing window corresponding to each video to be played may be sequentially determined according to the sequence of the occupied pane numbers from large to small, and is not particularly limited.
It can be understood that during the video playing process, the video being played is often adjusted, for example, the video is added, the video being played is closed, or the video is moved, replaced, or scaled, and so on.
When a user needs to add some new videos in the current video playing area for playing, for example, the user can play the new videos by double clicking/clicking the video resources on the video resource tree; or the newly-added video is played by checking the video resources on the video resource tree and clicking a playing key; or, the newly added video is played through other ways except for the dragging operation, which is not limited specifically. The instruction for playing the video through the drag operation is referred to as a drag instruction, and how to play the video according to the drag instruction may be described in detail in the following embodiments, which will not be described in detail herein.
In the process of video playing, some videos need to be added in the current video playing area for playing. The method comprises the steps of firstly, acquiring a newly added video, determining the number of second panes occupied by the newly added video and corresponding pane layouts, and then judging whether the number of blank panes in a video playing area is smaller than the number of second panes, wherein the blank panes refer to panes which do not play the video currently, the pane layouts refer to the position relationship between the panes occupied by the newly added video, and the pane layouts corresponding to the videos occupying the same number of panes may be different. For example, the number of panes occupied by the newly added video a is 1, and the layout of the corresponding panes is 1 × 1; the number of the panes occupied by the newly added video B is 6, and the layout of the corresponding panes is 2 x 3, namely two rows and three columns; the number of panes occupied by the newly added video C is also 6, and the corresponding pane layout is 3 × 2, that is, three rows and two columns.
If not, judging whether the layout of the blank pane in the video playing area is matched with the pane layout corresponding to the newly added video. For example, the pane layout corresponding to the newly added video may be two horizontally parallel panes, and the video playing area may be two vertically arranged blank panes, in which case, the layout of the blank pane in the video playing area may be considered to be not matched with the pane layout corresponding to the newly added video, and conversely, if the video playing area is also two horizontally parallel blank panes, the layout of the blank pane in the video playing area may be considered to be matched with the pane layout corresponding to the newly added video.
And if so, sequentially determining newly added playing windows corresponding to the newly added videos according to a preset sequence, and playing the newly added videos in the corresponding newly added playing windows, wherein each newly added playing window comprises at least one blank pane.
If the number of blank panes in the video playing area is less than the number of second panes, or the layout of the blank panes in the video playing area is not matched with the layout of the panes corresponding to the newly added video, dividing the video playing area into a plurality of panes according to the sum of the layout of the panes corresponding to the newly added video, the number of the first panes and the number of the second panes, respectively determining a second playing window corresponding to the newly added video and the original video to be played, playing the newly added video in the second playing window corresponding to the newly added video, playing the original video to be played in the second playing window corresponding to the original video to be played, wherein the second playing window comprises at least one pane, and the original video to be played is the video which has been played in the video playing area before the newly added video is obtained.
For each video to be played, determining the manner of the second playing window corresponding to the newly added video and the original video to be played respectively may be:
on one hand, the number of rows and columns of the pane in the first playing window corresponding to the original video to be played is used as the number of rows and columns of the pane in the second playing window corresponding to the original video to be played currently, and the second playing window corresponding to the original video to be played is determined. On the other hand, the second playing window corresponding to the newly added video can be determined based on the layout of the blank panes except for the panes included in the second playing window corresponding to the original video to be played and the panes corresponding to the newly added video.
Or, when the second playing windows corresponding to the newly added video and the original video to be played are determined respectively, the corresponding second playing windows may be determined again for each of the original video to be played and the newly added video, and each of the original video to be played and the newly added video may be played in the corresponding second playing window, that is, the position of the original video to be played in the video playing area may change, which is beneficial to further reasonably dividing and distributing all the original video to be played and the newly added video.
For example, as shown in fig. 2(a), videos 1, 2 and 3 are to-be-played videos, videos 4 and 5 are newly added videos, wherein, the number of the panes occupied by the videos 4 and 5 is 1, the corresponding pane layouts are 1 × 1, in the case where the number of blank first panes in the video playback area is not less than the number of second panes, whether the layout of the blank pane in the video playing area is matched with the layout of the pane corresponding to the newly added video can be further judged, obviously, the layout of the blank pane in fig. 2(a) matches the layout of the pane corresponding to the newly added video, that is, the layout of the blank pane can place two 1 × 1 playing windows, so that, the second playing windows corresponding to the newly added videos may be sequentially determined according to a preset sequence, for example, according to a sequence from left to right and from top to bottom, and the newly added videos are played in the corresponding second playing windows.
In addition, as shown in fig. 2(b), videos 1, 2, and 3 are videos to be played, and video 4 is a newly added video, where the number of panes that video 4 needs to occupy is 2, and the corresponding pane layout is 2 × 1, and when the number of blank first panes in the video playing area is not less than the number of second panes, it can be further determined whether the layout of blank panes in the video playing area matches the pane layout corresponding to the newly added video, obviously, the layout of blank panes in fig. 2(b) matches the pane layout corresponding to the newly added video, that is, a 2 × 1 playing window can be placed at the lower left corner according to the layout of blank panes, so that two panes at the lower left corner of the video playing area can be used as a second playing window of the newly added video, and the newly added video can be played in the corresponding second playing window. If the pane layout of the video 4 is 1 × 2, the layout of the blank pane cannot be matched with the pane layout corresponding to the newly added video, and at this time, the pane of the video playing area needs to be re-divided.
Or, as shown in fig. 3, videos 1, 2, 3, and 4 are original videos to be played, and videos 5, 6, 7, 8, and 9 are newly added videos, where the number of panes occupied by the videos 5, 6, 7, 8, and 9 is all 1, and the corresponding pane layouts are all 1 × 1, when the number of blank panes in the video playing area is less than the second number of panes, the video playing area may be divided into multiple panes according to the sum of the first number of panes and the second number of panes, where, during the division, there may be multiple candidate division types, for example, 3 × 3 division, 3 × 4 division, 2 × 5 division, and then, the division type with the largest area of a pane is selected as the target division type, that is, 3 × 3 division, and further, the target division type may be based on a blank pane, a window, and a window, other than the second playing window included in the original video to be played, The layout of the panes corresponding to the newly added video is determined, and the second playing window corresponding to the newly added video is determined, for example, blank panes can be sequentially used as panes corresponding to the newly added video according to the sequence from left to right and from top to bottom, the newly added video to be played is played in the corresponding panes, the relative positions of the videos 1, 2, 3 and 4 can be kept unchanged, the video 1 is in the first row and the first column before the division, and then the video 1 is still in the first row and the first column after the division.
When a user needs to close some videos in a current video playing area, firstly, a video to be closed can be determined, wherein the video to be closed is one or more of a plurality of videos to be played, then, whether a position of a window pane corresponding to the video to be closed in the video playing area contains an edge row and/or an edge column or not is judged, and if yes, whether window panes for playing other videos to be played except the video to be closed exist in the edge row and/or the edge column corresponding to the video to be closed or not is judged; if the video to be closed does not exist, closing the video to be closed, deleting the edge row and/or the edge column corresponding to the video to be closed, amplifying the panes except the edge row and/or the edge column corresponding to the video to be closed in an equal ratio to fill the video playing area, and if the position of the pane corresponding to the video to be closed in the video playing area is not the edge row and/or the edge column, or other videos to be played except the video to be closed exist in the edge row and/or the edge column corresponding to the video to be closed, closing the video to be closed.
For example, as shown in fig. 4, videos 1, 2, 3, and 4 are all to-be-played videos, where the video 4 is a to-be-closed video, and a position of a pane corresponding to the video 4 in the video playing area includes an edge row and an edge column of the video playing area, so after the to-be-closed video 4 is closed, the edge row and the edge column corresponding to the to-be-closed video may be deleted, and a first playing window corresponding to other to-be-played videos except for the pane corresponding to the to-be-closed video and/or the edge column may be scaled up to fill the video playing area.
When a user needs to move some videos in a current video playing area, firstly, a video to be moved and a moving instruction for the video to be moved can be determined, the video to be moved is one of a plurality of videos to be played, then, a target position corresponding to the video to be moved can be determined according to the moving instruction, whether the target position exceeds the video playing area or not is judged, if yes, a row and/or column pane is added according to the target position, a third playing window corresponding to the video to be moved is determined based on the added pane and the target position, and all panes are reduced in an equal ratio mode to fill the video playing area; and if the video to be moved does not exceed the target position, determining a third playing window corresponding to the video to be moved based on the target position, and playing the video to be moved in the third playing window.
When the third playing window is determined, the third playing window may be determined according to all panes having overlapping portions with the target position, or the third playing window may also be determined according to the size of the video to be moved by using the center position of the target position as the center position of the third playing window, which is not limited specifically.
In an implementation manner, the target playing window may also be determined according to the overlapping area of the target position and each pane. For example, when the overlapping area of a certain pane and the target position is greater than the preset area, the pane may be used as one of the panes included in the third playback window, or when the overlapping area of a certain pane and the target position is greater than the area of the pane that is not overlapped with the target position, that is, the overlapping area of the pane and the target position is greater than one half of the total area of the pane, the pane may be used as one of the panes included in the third playback window, and the like, which is not limited specifically.
In addition, after the third playing window corresponding to the video to be moved is determined, whether the video to be played currently exists in the pane corresponding to the third playing window can be further judged, if yes, the video to be played currently played in the pane corresponding to the third playing window is taken as the video to be exchanged, a fourth playing window corresponding to the video to be exchanged is determined, and the video to be exchanged is played in the fourth playing window, wherein the fourth playing window comprises at least one pane occupied by the video to be moved before moving.
For example, the fourth playing window may include all panes occupied by the video to be moved before moving, may also include only a part of panes occupied by the video to be moved before moving according to the size of the video to be exchanged, and the fourth playing window specifically includes which pane, which may be determined according to the relative position of the pane corresponding to the video to be exchanged in the third playing window, or may sequentially use the panes occupied by the video to be moved before moving as the panes included in the fourth playing window according to a preset sequence. In one case, the number of the videos to be exchanged is multiple, and at this time, according to the original relative positions of the multiple videos to be exchanged, the fourth playing window corresponding to each video to be exchanged is respectively determined in the pane occupied by the video to be moved before the movement.
Meanwhile, whether blank edge lines and/or blank edge columns exist in the video playing area can be judged; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and amplifying all panes in an equal ratio until the video playing area is filled. Thus, the video playing area can be utilized to play the video to the maximum extent.
For example, as shown in fig. 5, videos 1, 2, 3, 4, 5, and 6 are all to-be-played videos, wherein a user needs to move the video 1 to a target position, so after receiving a movement instruction, first, it can be determined whether a target position of the video 1 exceeds a video playing area, and it can be seen that the target position of the video 1 does not exceed the video playing area, so that a third playing window corresponding to the video 1 can be determined based on the target position, and the video 1 is played in the third playing window, and in addition, it can be seen that, before moving the video 1, videos 5 and 6 being played exist in a pane corresponding to the third playing window, so that the videos 5 and 6 can be determined to be exchanged videos, and further, a fourth playing window corresponding to the videos 5 and 6 can be determined, according to relative positions of the panes corresponding to the videos 5 and 6 in the third playing window and a pane occupied by the video 1 before moving, and determining a fourth playing window corresponding to the videos 5 and 6, and then playing the videos 5 and 6 in the fourth playing window.
Or, as shown in fig. 6, videos 1, 2, 3, and 4 are all to-be-played videos, where a user needs to move the position of the video 1, so that after receiving a movement instruction, first, it may be determined whether a target position of the video 1 exceeds a video playing area, and it may be seen that the target position of the video 1 exceeds a leftmost edge column of the video playing area, so that a column of panes may be added at the target position, and based on the added panes and the target position, a third playing window corresponding to the video 1 is determined, the video 1 is played at the third playing window, and all the panes are scaled down to fill the video playing area.
Or, as shown in fig. 7, the videos 1, 2, 3, and 4 are all to-be-played videos, where a user needs to move the position of the video 1, so that after receiving a movement instruction, first, it may be determined whether the target position of the video 1 exceeds the video playing area, and it can be seen that the target position of the video 1 does not exceed the video playing area, therefore, a third playing window corresponding to the video 1 may be determined according to the target position, and the video 1 is played in the third playing window. In addition, after that, it can be seen that blank edge rows and/or columns exist in the video playing area, therefore, after the blank edge rows and/or the blank edge columns exist in the video playing area, the blank edge rows and/or the blank edge columns can be deleted, and all panes can be scaled up to fill the video playing area.
When a user needs to zoom some videos in the current video playing area, first, a video to be zoomed and a zoom instruction for the video to be zoomed can be determined, the video to be zoomed is one or more of a plurality of videos to be played, then, according to the zooming instruction, determining the zooming area corresponding to the video to be zoomed, judging whether other videos to be played except the video to be zoomed exist in the zooming area, if not, judging whether the zooming area has a part exceeding the video playing area, if so, increasing the edge row and/or edge column of the pane in the video playing area according to the position of the zooming area, playing the video to be zoomed in a pane corresponding to the zooming area, zooming all playing windows in an equal ratio until the video playing area is filled, and if not, playing the video to be zoomed in the pane corresponding to the zooming area; judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, amplifying all panes in an equal ratio until the video playing area is filled, and if the video to be played exists in the zooming area, not zooming the video to be zoomed. And if the zooming area contains other videos to be played except the videos to be zoomed, not processing the zooming instruction, and keeping the videos to be zoomed to be played in the original corresponding playing window.
For example, as shown in fig. 8, videos 1, 2, 3, and 4 are all to-be-played videos, wherein the user needs to enlarge the size of video 1, and thus, after receiving the zoom instruction, first, it can be determined whether there are other videos to be played in the zoom area other than the video to be zoomed, and it can be seen that there are no other videos to be played in the zoom area of video 1, in this case, it is judged whether or not the zoom area has a portion exceeding the video playing area, and it is obvious that the zoom area of the video 1 has a portion exceeding the video playing area, and therefore, the edge rows and/or edge columns of the pane in the video playing area can be increased according to the position of the zooming area, and playing the video 1 to be zoomed in the pane corresponding to the zooming area, and then zooming out all the panes in equal proportion until the video playing area is filled.
Or, as shown in fig. 9, videos 1, 2, 3, and 4 are all to-be-played videos, where a user needs to reduce the size of the video 1, so after receiving a zoom instruction, first, it may be determined whether there are other to-be-played videos except for the to-be-zoomed video in the zoom region, and it may be seen that there are no other to-be-played videos in the zoom region of the video 1. After that, further, it can be determined whether there are blank edge rows and/or columns in the video playing area; it can be seen that there are blank edge rows and/or blank edge columns in the video playing area, and therefore, the blank edge rows and/or blank edge columns are deleted, and all panes are scaled up to fill the video playing area.
When a user needs to drag some videos into a current video playing area for video playing, firstly, a to-be-processed video and a dragging instruction for the to-be-processed video can be determined, then, a fifth playing window corresponding to the to-be-processed video is determined according to the dragging instruction, under the condition that a window pane for playing the to-be-played video exists in the fifth playing window, the to-be-played video in the window pane in the fifth playing window is closed, further, whether the fifth playing window exceeds the video playing area or not can be judged, if so, line and/or column panes are added according to the position of the fifth playing window, and the to-be-processed video is played in the window pane corresponding to the fifth playing window; and reducing all the panes in equal proportion until the video playing area is filled, and if not, playing the video to be processed in a fifth playing window corresponding to the video to be processed.
In this case, when the to-be-processed video is played in the pane corresponding to the fifth playing window, for each to-be-processed video, the to-be-processed video may be sequentially played in the fifth playing window according to the preset time interval, for example, if the to-be-processed video is video 1, 2, or 3, and the preset time interval may be 30 seconds, then the to-be-processed video may be first played in the fifth playing window for 30 seconds 1, then alternately played in the fifth playing window for 30 seconds 2, then alternately played in the fifth playing window for 30 seconds 3, and then returned to play in the fifth playing window for 30 seconds 1, so that the to-be-processed video is alternately played.
Or, for each to-be-processed video, determining a sub-play window corresponding to the to-be-processed video, and then playing the to-be-processed video in the corresponding sub-play window, where each sub-play window includes at least one pane corresponding to a fifth play window, the sub-play windows corresponding to the to-be-processed videos are not overlapped with each other, the number of panes and the layout of panes corresponding to each sub-play window may be the same, or a corresponding sub-play window may be determined for each to-be-processed video according to the sizes of different to-be-processed videos, which is not specifically limited.
For example, if the videos to be processed are videos 1, 2, and 3, the pane corresponding to the fifth playing window may be divided into 3 sub-playing windows a, b, and c, where each sub-playing window may include one pane or may be formed by multiple panes, then the sub-playing windows corresponding to the videos 1, 2, and 3 to be processed, such as the sub-playing window a corresponding to the video 1, the sub-playing window b corresponding to the video 2, and the sub-playing window c corresponding to the video 3, may be determined respectively, and then each video to be processed is played in the corresponding sub-playing window respectively.
In addition, a user can also open a map opening mode in a video playing area, in this case, firstly, a map window opening instruction is received, then, according to a preset map display rule, the video playing area is divided into a plurality of panes, further, for each video to be played, a sixth playing window corresponding to the video to be played is determined, the video to be played is played in the corresponding sixth playing window, and the sixth playing window comprises at least one pane; and determining a pane corresponding to the map window, and displaying the map window.
For example, the preset map display rule may be that a map window is located in the upper left corner of a video playing area and corresponds to 3 × 3 panes, then, after receiving a map window opening instruction, the video playing area may be re-divided according to the number of panes corresponding to the map window and the number of current panes, the video playing area is divided into a plurality of panes, and then, for each video to be played, the video to be played or a corresponding sixth playing window is determined, and the video to be played is played in the corresponding sixth playing window, where the sixth playing window includes at least one pane; and a map window is shown on the 3 x 3 panes in the upper left corner of the video playback area.
It is understood that the map window is similar to other video playing windows, and in the map mode, the process of adjusting the playing video, such as adding a new video, closing the playing video, or moving, replacing, or zooming the video, is similar to the foregoing process.
In the embodiment of the invention, the position and size change of the played video in the video playing area can be displayed in an animation mode. The adjustment process of the video playing window is displayed by the animation effect, the operation processes of adding, closing, moving, exchanging, zooming, dragging and the like can be clearly embodied, and the change of the position and the size of the video in the process from the original layout to the new layout can be clearly embodied, so that the user experience is improved.
As can be seen from the above, in the video playing method provided in the embodiment of the present invention, the number of first panes that a plurality of videos to be played need to occupy is determined, and according to the number of the first panes, the video playing area is divided into a plurality of panes, and then for each video to be played, a first playing window corresponding to the video to be played is determined, and the video to be played is played in the corresponding first playing window, where the first playing window includes at least one pane. Therefore, the division condition of the video playing area can be adjusted in real time according to the number of the first panes occupied by the video to be played, so that the method for adjusting the video window is more flexible, and the requirements of users are met as much as possible.
An embodiment of the present application further provides a video playing device, as shown in fig. 10, which is a schematic structural diagram of the video playing device provided in the embodiment of the present application, and the video playing device includes:
the determining module 1001 is configured to determine the number of first panes that a plurality of videos to be played need to occupy;
a dividing module 1002, configured to divide the video playing area into multiple panes according to the number of the first panes;
the playing module 1003 is configured to determine, for each video to be played, a first playing window corresponding to the video to be played, and play the video to be played in the corresponding first playing window, where the first playing window includes at least one pane.
In an implementation manner, the determining module 1001 is specifically configured to:
acquiring size information of a plurality of videos to be played;
and calculating the number of the first panes occupied by the videos to be played according to the size information.
In one implementation, the dividing module 1002 is specifically configured to:
determining a plurality of candidate segmentation types according to the number of the first panes;
selecting a segmentation type with the largest area of a single pane from a plurality of candidate segmentation types as a target segmentation type;
and according to the target segmentation type, segmenting the video playing area into a plurality of panes.
In one implementation, the apparatus further includes an add-on video playing module 1004 configured to:
acquiring a newly added video, and determining the number of second panes required to be occupied by the newly added video and the corresponding pane layout;
judging whether the number of blank panes in the video playing area is smaller than the number of second panes, wherein the blank panes are panes for not playing the video currently;
if not, judging whether the layout of a blank pane in the video playing area is matched with the layout of a pane corresponding to the newly added video;
if so, sequentially determining newly added playing windows corresponding to the newly added videos according to a preset sequence, and playing the newly added videos in the corresponding newly added playing windows, wherein the newly added playing windows comprise at least one blank pane;
if the number of blank panes in the video playing area is less than the number of second panes, or the layout of the blank panes in the video playing area is not matched with the layout of the panes corresponding to the newly added video, dividing the video playing area into a plurality of panes according to the sum of the layout of the panes corresponding to the newly added video, the number of the first panes and the number of the second panes, respectively determining a second playing window corresponding to the newly added video and the original video to be played, playing the newly added video in the second playing window corresponding to the newly added video, playing the original video to be played in the second playing window corresponding to the original video to be played, wherein the second playing window comprises at least one pane, and the original video to be played is the video which has been played in the video playing area before the newly added video is obtained.
In one implementation, the newly added video playing module 1004 is further configured to:
determining a second playing window corresponding to the original video to be played by taking the row and column number of panes in a first playing window originally corresponding to the original video to be played as the row and column number of panes in a second playing window currently corresponding to the original video to be played;
and determining a second playing window corresponding to the newly added video based on the layout of the blank window panes and the window panes corresponding to the newly added video except the window panes contained in the second playing window corresponding to the original video to be played.
In one implementation, the apparatus further includes a shutdown video module 1005 configured to:
determining videos to be closed, wherein the videos to be closed are one or more of a plurality of videos to be played;
judging whether the position of a pane corresponding to the video to be closed in a video playing area is an edge row and/or an edge column;
if the video is the edge row and/or the edge column, judging whether a pane which plays the video to be played except the video to be closed exists on the edge row and/or the edge column corresponding to the video to be closed;
if the video does not exist, closing the video to be closed, deleting the edge row and/or edge column corresponding to the video to be closed, and amplifying other panes except the edge row and/or edge column corresponding to the video to be closed in an equal ratio until the video playing area is filled;
and if the position of the pane corresponding to the video to be closed in the video playing area is not an edge line and/or an edge column, or other videos to be played except the video to be closed exist in the edge line and/or the edge column corresponding to the video to be closed, closing the video to be closed.
In one implementation, the apparatus further includes a mobile video module 1006 to:
determining a video to be moved and a moving instruction for the video to be moved, wherein the video to be moved is one of a plurality of videos to be played;
determining a target position corresponding to a video to be moved according to the moving instruction;
judging whether the target position exceeds a video playing area, if so, adding row and/or column panes according to the target position, determining a third playing window corresponding to the video to be moved based on the added panes and the target position, and reducing all the panes in an equal ratio to fill the video playing area; if the video to be moved does not exceed the target position, determining a third playing window corresponding to the video to be moved based on the target position, and playing the video to be moved in the third playing window;
judging whether a video to be played currently exists in a pane corresponding to a third playing window, if so, taking the video to be played currently played in the pane corresponding to the third playing window as a video to be exchanged, determining a fourth playing window corresponding to the video to be exchanged, and playing the video to be exchanged in the fourth playing window, wherein the fourth playing window comprises at least one pane occupied by the video to be moved before the video to be moved moves;
judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and magnifying all the panes in an equal ratio until the video playing area is filled.
In one implementation, the apparatus further includes a zoom video module 1007 configured to:
determining a video to be zoomed and a zooming instruction aiming at the video to be zoomed, wherein the video to be zoomed is one or more of a plurality of videos to be played;
determining a zooming area corresponding to the video to be zoomed according to the zooming instruction, and judging whether other videos to be played except the video to be zoomed exist in the zooming area;
if not, judging whether the zooming area has a part exceeding the video playing area;
if yes, increasing row and/or column panes according to the position of the zooming area, playing the video to be zoomed in the pane corresponding to the zooming area, and zooming out all the panes in an equal ratio until the video playing area is filled;
if not, playing the video to be zoomed in the pane corresponding to the zooming area; judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and magnifying all the panes in an equal ratio until the video playing area is filled.
In one implementation, the apparatus further includes a drag video module 1008 to:
determining a video to be processed and a dragging instruction aiming at the video to be processed;
determining a fifth playing window corresponding to the video to be processed according to the dragging instruction;
under the condition that a window pane for playing the video to be played exists in the fifth playing window, closing the video to be played in the window pane in the fifth playing window;
judging whether the fifth playing window exceeds a video playing area or not;
if so, adding row and/or column panes according to the position of the fifth playing window, and playing the video to be processed in the pane corresponding to the fifth playing window; reducing all panes in equal proportion to fill a video playing area;
and if not, playing the video to be processed in a pane corresponding to a fifth playing window corresponding to the video to be processed.
In one implementation, the drag video module 1008 is further configured to:
for each video to be processed, sequentially playing the video to be processed in a fifth playing window according to a preset time interval; or the like, or, alternatively,
and aiming at each video to be processed, determining a sub-playing window corresponding to the video to be processed, wherein the sub-playing window comprises at least one pane corresponding to a fifth playing window, the video to be processed is played in the corresponding sub-playing window, and the sub-playing windows corresponding to the videos to be processed are not overlapped.
In one implementation, the apparatus further includes a map window module 1009, configured to:
receiving a map window opening instruction;
dividing a video playing area into a plurality of panes according to a preset map display rule;
for each video to be played, determining a sixth playing window corresponding to the video to be played, and playing the video to be played in the corresponding sixth playing window, wherein the sixth playing window comprises at least one pane; and determining a pane corresponding to the map window, and displaying the map window.
In one implementation, the position and size change of the video played in the video playing area is displayed in an animation mode.
As can be seen from the above, the video playing device provided in the embodiment of the present invention can adjust the division condition of the video playing area in real time according to the number of the first panes that the video to be played needs to occupy, so that the method for adjusting the video window is more flexible, and the requirements of the user are met as much as possible.
An embodiment of the present invention further provides an electronic device, as shown in fig. 11, which includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114,
a memory 113 for storing a computer program;
the processor 111, when executing the program stored in the memory 113, implements the following steps:
determining the number of first panes occupied by a plurality of videos to be played;
dividing a video playing area into a plurality of panes according to the number of the first panes;
and aiming at each video to be played, determining a first playing window corresponding to the video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
As can be seen from the above, the video playing device provided in the embodiment of the present invention can adjust the division condition of the video playing area in real time according to the number of the first panes that the video to be played needs to occupy, so that the method for adjusting the video window is more flexible, and the requirements of the user are met as much as possible.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the video playing method described in any of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video playback method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device embodiment, the electronic device embodiment and the storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (14)
1. A video playback method, the method comprising:
determining the number of first panes occupied by a plurality of videos to be played;
determining a plurality of candidate segmentation types according to the number of the first panes;
selecting the segmentation type with the largest area of a single pane from the multiple candidate segmentation types as a target segmentation type;
dividing a video playing area into a plurality of panes according to the target division type;
and aiming at each video to be played, determining a first playing window corresponding to the video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane.
2. The method according to claim 1, wherein the determining the number of first panes that need to be occupied by the plurality of videos to be played comprises:
acquiring size information of a plurality of videos to be played;
and calculating the number of first panes occupied by the videos to be played according to the size information.
3. The method of claim 1, further comprising:
acquiring a newly added video, and determining the number of second panes required to be occupied by the newly added video and the corresponding pane layout;
judging whether the number of blank panes in the video playing area is smaller than the number of second panes, wherein the blank panes are panes for not playing the video currently;
if not, judging whether the layout of a blank pane in the video playing area is matched with the layout of the pane corresponding to the newly added video;
if the newly added videos are matched, sequentially determining newly added playing windows corresponding to the newly added videos according to a preset sequence, and playing the newly added videos in the corresponding newly added playing windows, wherein the newly added playing windows comprise at least one blank pane;
if the number of the blank panes in the video playing area is less than the number of the second panes, or the layout of the blank panes in the video playing area is not matched with the layout of the pane corresponding to the newly added video, according to the pane layout corresponding to the newly added video, the sum of the first pane number and the second pane number, dividing the video playing area into a plurality of panes, respectively determining second playing windows corresponding to the newly added video and the original video to be played, playing the new video in a second playing window corresponding to the new video, playing the original video to be played in a second playing window corresponding to the original video to be played, the second playing window comprises at least one pane, and the original video to be played is a video which is played in the video playing area before the newly added video is obtained.
4. The method according to claim 3, wherein the determining the second playing windows corresponding to the newly added video and the original video to be played respectively comprises:
determining a second playing window corresponding to an original video to be played by taking the number of rows and columns of panes in a first playing window originally corresponding to the original video to be played as the number of rows and columns of panes in a second playing window currently corresponding to the original video to be played;
and determining a second playing window corresponding to the newly added video based on a blank pane except for a pane contained in the second playing window corresponding to the original video to be played and the layout of the pane corresponding to the newly added video.
5. The method of claim 1, further comprising:
determining videos to be closed, wherein the videos to be closed are one or more of the videos to be played;
judging whether the position of the pane corresponding to the video to be closed in the video playing area comprises an edge line and/or an edge column;
if the video to be played comprises the edge row and/or the edge column, judging whether panes for playing other videos to be played except the video to be closed exist on the edge row and/or the edge column;
if the video does not exist, closing the video to be closed, deleting the edge row and/or edge column corresponding to the video to be closed, and amplifying other panes except the edge row and/or edge column corresponding to the video to be closed in an equal ratio until the video playing area is filled;
and if the position of the pane corresponding to the video to be closed in the video playing area does not include an edge row and/or an edge column, or other videos to be played except the video to be closed exist in the edge row and/or the edge column corresponding to the video to be closed, closing the video to be closed.
6. The method of claim 1, further comprising:
determining a video to be moved and a moving instruction for the video to be moved, wherein the video to be moved is one of the videos to be played;
determining a target position corresponding to the video to be moved according to the moving instruction;
judging whether the target position exceeds the video playing area, if so, adding row and/or column panes according to the target position, determining a third playing window corresponding to the video to be moved based on the added panes and the target position, and reducing all the panes in an equal ratio to fill the video playing area; if the video to be moved does not exceed the target position, determining a third playing window corresponding to the video to be moved based on the target position, and playing the video to be moved in the third playing window;
judging whether a video to be played currently exists in a pane corresponding to the third playing window, if so, taking the video to be played currently played in the pane corresponding to the third playing window as a video to be exchanged, determining a fourth playing window corresponding to the video to be exchanged, and playing the video to be exchanged in the fourth playing window, wherein the fourth playing window comprises at least one pane occupied by the video to be moved before moving;
judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and amplifying all panes in an equal ratio until the video playing area is filled.
7. The method of claim 1, further comprising:
determining a video to be zoomed and a zooming instruction aiming at the video to be zoomed, wherein the video to be zoomed is one or more of the videos to be played;
determining a zooming area corresponding to the video to be zoomed according to the zooming instruction, and judging whether other videos to be played except the video to be zoomed exist in the zooming area;
if not, judging whether the zooming area has a part exceeding the video playing area;
if yes, increasing row and/or column panes according to the position of the zooming area, playing the video to be zoomed in the pane corresponding to the zooming area, and zooming out all the panes in an equal ratio until the video playing area is filled;
if not, playing the video to be zoomed in a pane corresponding to the zooming area; judging whether blank edge lines and/or blank edge columns exist in the video playing area; and if the blank edge row and/or the blank edge column exist, deleting the blank edge row and/or the blank edge column, and amplifying all panes in an equal ratio until the video playing area is filled.
8. The method of claim 1, further comprising:
determining a video to be processed and a dragging instruction aiming at the video to be processed;
determining a fifth playing window corresponding to the video to be processed according to the dragging instruction;
under the condition that a pane in which the video to be played is played exists in the fifth playing window, closing the video to be played in the pane in the fifth playing window;
judging whether the fifth playing window exceeds the video playing area;
if so, adding row and/or column panes according to the position of the fifth playing window, and playing the video to be processed in the pane corresponding to the fifth playing window; reducing all panes in equal proportion to fill the video playing area;
and if not, playing the video to be processed in a pane corresponding to a fifth playing window corresponding to the video to be processed.
9. The method according to claim 8, wherein, in a case that there are a plurality of videos to be processed, playing the videos to be processed in the pane corresponding to the fifth playing window comprises:
for each video to be processed, sequentially playing the video to be processed in the fifth playing window according to a preset time interval; or the like, or, alternatively,
and aiming at each video to be processed, determining a sub-playing window corresponding to the video to be processed, wherein the sub-playing window comprises at least one pane corresponding to the fifth playing window, the video to be processed is played in the corresponding sub-playing window, and the sub-playing windows corresponding to the videos to be processed are not overlapped.
10. The method of claim 1, further comprising:
receiving a map window opening instruction;
according to a preset map display rule, dividing the video playing area into a plurality of panes;
for each video to be played, determining a sixth playing window corresponding to the video to be played, and playing the video to be played in the corresponding sixth playing window, wherein the sixth playing window comprises at least one pane; and determining a pane corresponding to the map window, and displaying the map window.
11. The method according to any one of claims 1 to 10, wherein the position and size of the played video in the video playing area are shown in an animation manner.
12. A video playback apparatus, comprising:
the device comprises a determining module, a display module and a display module, wherein the determining module is used for determining the number of first panes occupied by a plurality of videos to be played;
the segmentation module is used for determining a plurality of candidate segmentation types according to the number of the first panes; selecting the segmentation type with the largest area of a single pane from the multiple candidate segmentation types as a target segmentation type; dividing a video playing area into a plurality of panes according to the target division type;
the playing module is used for determining a first playing window corresponding to each video to be played, and playing the video to be played in the corresponding first playing window, wherein the first playing window comprises at least one pane.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program; a processor for implementing the method steps of any of claims 1 to 11 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-11.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910185375.2A CN111698548B (en) | 2019-03-12 | 2019-03-12 | Video playing method and device |
PCT/CN2020/074923 WO2020181946A1 (en) | 2019-03-12 | 2020-02-12 | Video playback method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910185375.2A CN111698548B (en) | 2019-03-12 | 2019-03-12 | Video playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111698548A CN111698548A (en) | 2020-09-22 |
CN111698548B true CN111698548B (en) | 2021-05-28 |
Family
ID=72426530
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910185375.2A Active CN111698548B (en) | 2019-03-12 | 2019-03-12 | Video playing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111698548B (en) |
WO (1) | WO2020181946A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438535A (en) * | 2021-06-23 | 2021-09-24 | 深圳康佳电子科技有限公司 | Multi-window display method and device, terminal equipment and storage medium |
CN114205538B (en) * | 2021-11-09 | 2024-02-27 | 图腾视界(广州)数字科技有限公司 | Picture display method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102780932A (en) * | 2011-05-13 | 2012-11-14 | 上海信颐电子科技有限公司 | Multi-window playing method and system |
CN105392065A (en) * | 2015-12-28 | 2016-03-09 | Tcl集团股份有限公司 | Method and system for arranging page content of intelligent television |
CN105847938A (en) * | 2016-04-19 | 2016-08-10 | 乐视控股(北京)有限公司 | Video display method and device |
CN106792197A (en) * | 2016-12-29 | 2017-05-31 | 山东鲁能智能技术有限公司 | The changing method and system of a kind of video playback area layout |
US9808716B2 (en) * | 2011-07-06 | 2017-11-07 | Sixense Entertainment, Inc. | Display grid for video game input on touchscreen display |
CN107948710A (en) * | 2017-12-11 | 2018-04-20 | 深圳市东微智能科技股份有限公司 | Source of media combination display methods, device, computer equipment and storage medium |
CN108196845A (en) * | 2017-12-28 | 2018-06-22 | 福建中金在线信息科技有限公司 | A kind of page layout method, device, electronic equipment and readable storage medium storing program for executing |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004223110A (en) * | 2003-01-27 | 2004-08-12 | Nintendo Co Ltd | Game apparatus, game system and game program |
CN102740155A (en) * | 2012-06-15 | 2012-10-17 | 宇龙计算机通信科技(深圳)有限公司 | Method for displaying images and electronic equipment |
CN104332153A (en) * | 2013-07-22 | 2015-02-04 | 浙江大华技术股份有限公司 | Video playing method and device |
CN204810449U (en) * | 2015-07-24 | 2015-11-25 | 广州冠品信电子科技有限公司 | Novel monitor system |
CN105611388A (en) * | 2015-12-29 | 2016-05-25 | 康佳集团股份有限公司 | Multi-image preview realization method and system |
JP6924079B2 (en) * | 2017-06-12 | 2021-08-25 | キヤノン株式会社 | Information processing equipment and methods and programs |
-
2019
- 2019-03-12 CN CN201910185375.2A patent/CN111698548B/en active Active
-
2020
- 2020-02-12 WO PCT/CN2020/074923 patent/WO2020181946A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102780932A (en) * | 2011-05-13 | 2012-11-14 | 上海信颐电子科技有限公司 | Multi-window playing method and system |
US9808716B2 (en) * | 2011-07-06 | 2017-11-07 | Sixense Entertainment, Inc. | Display grid for video game input on touchscreen display |
CN105392065A (en) * | 2015-12-28 | 2016-03-09 | Tcl集团股份有限公司 | Method and system for arranging page content of intelligent television |
CN105847938A (en) * | 2016-04-19 | 2016-08-10 | 乐视控股(北京)有限公司 | Video display method and device |
CN106792197A (en) * | 2016-12-29 | 2017-05-31 | 山东鲁能智能技术有限公司 | The changing method and system of a kind of video playback area layout |
CN107948710A (en) * | 2017-12-11 | 2018-04-20 | 深圳市东微智能科技股份有限公司 | Source of media combination display methods, device, computer equipment and storage medium |
CN108196845A (en) * | 2017-12-28 | 2018-06-22 | 福建中金在线信息科技有限公司 | A kind of page layout method, device, electronic equipment and readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN111698548A (en) | 2020-09-22 |
WO2020181946A1 (en) | 2020-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9383917B2 (en) | Predictive tiling | |
US9569004B2 (en) | Swipe toolbar to switch tabs | |
US20140075290A1 (en) | Window switching method and apparatus | |
CN111698548B (en) | Video playing method and device | |
CN113190781A (en) | Page layout method, device, equipment and storage medium | |
CN109240591B (en) | Interface display method and device | |
CN110046175B (en) | Cache updating and data returning method and device | |
TW201504920A (en) | System and method for displaying floating icon of electronic device | |
CN114579912A (en) | Page layout method, device, equipment and medium | |
CN103501468A (en) | Method and device for detecting whether network video playing address is effective | |
KR20180117619A (en) | Object management and visualization using computing devices | |
CN111131812A (en) | Broadcast time testing method and device and computer readable storage medium | |
US20180088785A1 (en) | Navigating a set of selectable items in a user interface | |
KR101775775B1 (en) | Method for distributing contents based on bitcoin through user interface | |
CN114168019A (en) | Multi-application window level management method and device | |
CN111970570B (en) | Method and device for prompting video content interaction position | |
CN110110260B (en) | Page rendering method and device and electronic equipment | |
CN110019492B (en) | Information display method and device | |
CN112987992B (en) | Navigation element display method and device and electronic equipment | |
CN114518815B (en) | Method, device, equipment, medium and program product for displaying building drawing | |
CN112306336A (en) | Document content display method and device | |
KR101820657B1 (en) | System and Method for Auto-Scrolling Webtoon Screen Image | |
US20160231903A1 (en) | Method and device for magnifying webpage on mobile terminal browser | |
CN110688185B (en) | Page display method and device and electronic equipment | |
JP7323775B2 (en) | Display program, display method and display device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |