Method and device for performing multi-window layout on screen and readable storage medium
Technical Field
The invention relates to a method and a device for multi-window layout on a screen and a readable storage medium.
Background
Many products for conference collaboration (e.g., video conferencing, presentation switchers), etc. support multi-window functionality, i.e., displaying content from multiple video sources simultaneously through multiple windows on the same screen. In some multi-window layouts of the screen, the sub-windows are not equally positioned, for example, a sub-window occupies a larger area, or a sub-window is superimposed in front of the rest of the sub-windows, and we refer to the sub-window positioned more prominently as the main window.
Currently, there are two methods for displaying the main window: 1. presetting, namely presetting that a main picture is fixedly matched with a certain video signal; 2. and manually selecting, wherein the user matches the main window to a required certain video signal through manual selection. The two methods are not flexible enough or complicated to operate, and the video signal which is accessed emergently cannot be played on the main window immediately.
Disclosure of Invention
In order to solve the above-mentioned deficiencies of the prior art, the present invention provides a method, an apparatus and a readable storage medium for performing multi-window layout on a screen, which can immediately play an emergency access video signal on a main window.
The technical problem to be solved by the invention is realized by the following technical scheme:
a method for multi-window layout on a screen, comprising the steps of:
defining the video signal with the nearest access time as a key video signal in at least two paths of input video signals;
and playing the key video signal in a main window of a screen.
Before playing the key video signal in the main window of the screen, the method further comprises the following steps: the main window is defined in at least two sub-windows of the screen.
Furthermore, a plurality of window definition modes are preset, and the window definition modes are used for defining the main window in at least two sub-windows of the screen according to respective preset rules; before defining the main window, the method further comprises the following steps: the window definition mode is selected.
Further, the step of selecting the window definition mode comprises:
receiving a window mode instruction;
and switching the corresponding window definition mode according to the window mode instruction.
Further, at least one of a first window definition mode, a second window definition mode and a third window definition mode is preset, wherein
In a first window definition mode, defining a sub-window with the largest window area as the main window in at least two sub-windows of a screen;
in a second window definition mode, defining a sub-window with a preset number as the main window in at least two sub-windows of the screen;
in the third window defining mode, among at least two sub-windows of the screen, a sub-window at a predetermined window position is defined as the main window.
Furthermore, a plurality of video definition modes are preset, and the video definition modes are used for defining the key video signals in at least two paths of input video signals according to respective preset rules; before defining the key video signal, further comprising: selecting the video definition mode.
Further, the step of selecting the video definition mode comprises:
receiving a video mode instruction;
and switching the corresponding video definition mode according to the video mode instruction.
Further, a first video definition mode and a second window definition mode are preset, wherein
In the first video definition mode, in at least two paths of input video signals, defining the video signal with the latest access time as a key video signal;
in the second video definition mode, among the at least two paths of input video signals, a video signal of a predetermined input interface is defined as a key video signal.
The device for performing multi-window layout on the screen comprises a processor and a memory connected with the processor, wherein a computer program for the processor to execute is stored in the memory, and the method for performing multi-window layout on the screen is performed when the processor executes the computer program.
A readable storage medium storing a computer program for execution by a processor, wherein the processor executes the computer program to perform the method for performing multi-window layout on a screen.
The invention has the following beneficial effects: the method has various window definition modes and various video definition modes, can automatically define the main window and the key video signals according to respective preset rules, is flexible in collocation and simple in operation, can define the video signal with the latest access time as the key video signal to be played on the main window, and can immediately play the video signal which is accessed emergently on the main window.
Drawings
FIG. 1 is a block diagram of the steps of a method provided by the present invention;
fig. 2 is a schematic diagram illustrating a plurality of window definition modes and a plurality of video definition modes.
Fig. 3 is a schematic block diagram of the apparatus provided by the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
Example one
A method for performing multi-window layout on a screen is preset with a plurality of window definition modes and a plurality of video definition modes, as shown in FIG. 2.
The window definition mode is used for defining a main window in at least two sub-windows of a screen according to respective preset rules;
the video definition mode is used for defining key video signals in at least two paths of input video signals according to respective preset rules.
Specifically, the preset window definition mode includes at least one of a first window definition mode, a second window definition mode, and a third window definition mode.
In the first window definition mode, among at least two sub-windows of the screen, a sub-window having a largest window area is defined as the main window. In the first window definition mode, firstly, identifying each sub-window in the whole picture of the screen, then calculating the corresponding window area according to the number of pixel points occupied by each sub-window, then comparing the window areas of the sub-windows, screening out the sub-window with the largest window area, and then defining the sub-window with the largest window area as the main window.
In the second window definition mode, among at least two sub-windows of the screen, a sub-window of a predetermined number is defined as the main window. In the second window definition mode, numbering each sub-window on the screen according to a preset rule, comparing the numbers of each sub-window, screening out the sub-windows with preset numbers, and defining the sub-windows as the main window.
In the third window defining mode, among at least two sub-windows of the screen, a sub-window at a predetermined window position is defined as the main window. In the third window definition mode, each sub-window is firstly identified in the whole picture of the screen, the corresponding window position is calculated according to the pixel point coordinates occupied by each sub-window, then the window positions of each sub-window are compared, and the sub-window on the preset window position is screened out and then defined as the main window.
Specifically, the preset video definition mode includes at least one of a first video definition mode and a second video definition mode.
In the first video definition mode, among the at least two paths of input video signals, a video signal with the nearest access time is defined as a key video signal. In the first video definition mode, an input interface of each path of input video signals is monitored to obtain access time of each path of video signals, then the access time of each path of video signals is compared, and the video signal with the nearest access time is screened out and defined as the key video signal.
In the second video definition mode, among the at least two paths of input video signals, a video signal of a predetermined input interface is defined as a key video signal. In the second video definition mode, the input interfaces of the input video signals are monitored to obtain the video signals corresponding to the input interfaces, the input interfaces of the video signals are compared, and the video signals of the preset input interfaces are screened out and defined as the key video signals.
The method is applied to a device as shown in fig. 3, the device has at least two input interfaces for communicatively connecting at least two video source devices to obtain at least two video signals, wherein one video signal is defined as a key video signal; the device is provided with at least one output interface for communication connection with at least one screen; the same screen has at least two sub-windows to simultaneously display at least two paths of video signals, wherein one sub-window is defined as a main window.
As shown in fig. 1, the steps of the method include:
s101: receiving a window mode instruction and/or a video mode instruction;
in this step S101, the user performs a selection operation on the operation interface of the software to form the window mode instruction and the video mode instruction.
S102: switching a corresponding window definition mode according to the window mode instruction; and/or switching the corresponding video definition mode according to the video mode instruction;
in step S102, the window mode command is identified and determined, and if the window mode command is a first window mode command, the window mode command is switched to the first window definition mode, if the window mode command is a second window mode command, the window mode command is switched to the second window definition mode, and if the window mode command is a third window mode command, the window mode command is switched to the third window definition mode; similarly, the video mode instruction is identified and judged, if the video mode instruction is a first video mode instruction, the video mode instruction is switched to the first video definition mode, and if the video mode instruction is a second video mode instruction, the video mode instruction is switched to the second video definition mode.
S103: defining the main window in at least two sub-windows of the screen according to the switched window definition mode; and/or defining the key video signal in at least two paths of input video signals according to the switched video definition mode.
S104: and playing the key video signal in a main window of the screen.
The method has various window definition modes and various video definition modes, can automatically define the main window and the key video signals according to respective preset rules, is flexible in collocation and simple in operation, can define the video signal with the latest access time as the key video signal to be played on the main window, and can immediately play the video signal which is accessed emergently on the main window.
Example two
An apparatus for performing multi-window layout on a screen includes a processor and a memory connected to the processor, where the memory stores a computer program for the processor to execute, and when the processor executes the computer program, the method for performing multi-window layout on the screen according to the first embodiment is performed.
EXAMPLE III
A readable storage medium, which stores a computer program for being executed by a processor, wherein the processor executes the computer program to perform the method for performing multi-window layout on a screen according to the first embodiment.
The above-mentioned embodiments only express the embodiments of the present invention, and the description is more specific and detailed, but not understood as the limitation of the patent scope of the present invention, but all the technical solutions obtained by using the equivalent substitution or the equivalent transformation should fall within the protection scope of the present invention.