Method, device and medium for partial playing of a multi-network signal video stream

By implementing real-time decoding and counter management, the problems of computational latency and resource waste in partial playback of multi-network signal video streams are solved, achieving efficient interface trimming and resource saving.

CN116996728BActive Publication Date: 2026-03-20ZEN-AI TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as computational latency, interface rendering latency, excessive CPU computational power consumption, and a limited number of signal sources that can be played simultaneously by the device when performing partial playback of multi-network signal video streams.

Method used

By receiving and decoding video stream data in real time and responding to user selection operations, the center point and scale of the selected area are calculated, and the center point, scaling ratio and translation distance of the playback component are set to achieve local playback. At the same time, a counter is used to manage memory resources to avoid repeated decoding and memory consumption.

Benefits of technology

While achieving the desired interface cropping effect, it significantly reduces program performance overhead and minimizes waste of computing and memory resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116996728B_ABST
    Figure CN116996728B_ABST
Patent Text Reader

Abstract

The application relates to a method for local playing of a video stream, comprising the following steps: receiving video stream data in real time and decoding; playing the decoded image through a playing component; in response to a frame selection operation of a user on a target image, calculating the center point of the frame selection area and the ratio of the frame selection area to the playing component; setting the center point of the playing component, the zooming ratio and the x-axis and y-axis translation distance according to the calculation result; and playing the target image under the set playing component. Through the application, the interface cutting effect can be met while the performance cost of the program is greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video playing, in particular to a method, device and medium for playing a part of a multi-network signal video stream. BACKGROUND

[0002] In the prior art, when there is only one display, there are usually two display modes for multiple video signal source pictures: one is that one signal source picture corresponds to one playing component for playing, and the other is that multiple signal source pictures are combined into one whole picture (one source), which is commonly known as multi-network signal. In this case, if only one signal source picture or some regions of one signal source picture in the multi-network signal is to be focused on, a signal source picture cropping technology needs to be used. For the signal source picture cropping, a traditional technical solution is to crop and remove the source picture data at a data processing layer, and then render the interface by a video playing component after completion.

[0003] Since the received picture data is cropped and removed at the data processing layer, the source picture data is cropped and removed, and then the interface is rendered by the video playing component after completion. Since the source picture is collected and played in real time, for example, the source picture is of 1080p picture quality and the frame rate is 25, which means that 25 frames of picture need to be processed per second, and each frame of picture corresponds to 1080 picture data. The data processing layer needs to analyze, traverse and calculate each received frame of data, and perform cropping. In this way, the picture data transmission part will cause a certain calculation delay, the interface rendering layer gets the data late, and ultimately causes further delay in the visual picture. Meanwhile, the data processing layer also consumes too much cpu calculation capacity, which is difficult on some low-end processors, causing overheating and lag phenomenon. Moreover, without considering the network, the number of signal sources that can be played simultaneously by the same device will also be reduced. SUMMARY

[0004] In view of the defects or deficiencies in the prior art, the present application proposes the following:

[0005] A method for playing a part of a video stream, comprising:

[0006] receiving video stream data in real time and decoding;

[0007] playing the decoded image by a playing component;

[0008] in response to a framing operation of a user on a target image, calculating a center point of the framed region and a ratio of the framed region to the playing component;

[0009] setting the center point of the playing component, the scaling ratio and the x-axis and y-axis translation distance according to the calculation result;

[0010] play the target image under the set playing component.

[0011] The application also provides a method for playing a video stream partially, comprising:

[0012] receiving video stream data in real time, decoding, and setting a counter value for each decoded image, the counter value corresponding to the number of times the image needs to be played currently;

[0013] playing the decoded image through a playing component;

[0014] updating the counter value corresponding to a target image in response to a user's frame selection operation on the target image so that the counter value increases by one for each frame selection operation, and calculating the center point of the frame selection region and the ratio of the frame selection region to the playing component in response to a user's frame selection operation on the played image, and setting the center point, scaling ratio, and x-axis and y-axis translation distance of the playing component according to the calculation result;

[0015] playing the target image under the set playing component, and reducing the counter value corresponding to the target image by one when the target image is played once by the set playing component;

[0016] reclaiming the memory resource occupied by the image with the counter value of 0 when the counter value is determined to be 0.

[0017] According to some embodiments of the application, the frame selection operation comprises partial frame selection and overall frame selection.

[0018] According to some embodiments of the application, setting the center point, scaling ratio, and x-axis and y-axis translation distance of the playing component comprises adding a playing component and setting the center point, scaling ratio, and x-axis and y-axis translation distance of the new playing component, or setting the center point, scaling ratio, and x-axis and y-axis translation distance of the playing component comprises setting the center point, scaling ratio, and x-axis and y-axis translation distance of the existing playing component.

[0019] According to some embodiments of the application, calculating the center point of the frame selection region and the ratio of the frame selection region to the playing component comprises calculating:

[0020] the center point: x-axis center point = width of the cropped region / 2, y-axis center point = height of the cropped region / 2;

[0021] the scaling ratio: x-axis scaling ratio = width of the playing component / width of the cropped region, y-axis scaling ratio = height of the playing component / height of the cropped region;

[0022] the translation value: x-axis translation value = width of the playing component / 2-x-axis center point, y-axis translation value = height of the playing component / 2-y-axis center point.

[0023] According to some embodiments of the present application, the recycling of the memory resource occupied by the image with the counter value of 0 comprises putting it into the modifiable queue.

[0024] According to some embodiments of the present application, the real-time receiving of the video stream data, the decoding, and the setting of the counter value for each decoded image comprises: initializing a fixed number of image instances into the available list; decoding the video frame; taking an image object from the available list; storing the video frame data into the image object; setting the counter value; judging whether the playing is ended; if yes, ending the decoding process, if not, continuing to decode the video frame.

[0025] According to some embodiments of the present application, the playing of the target image under the set playing component, and the monitoring of the playing of the target image by the set playing component once, the decrementing of the counter value corresponding to the target image by one, the taking of the target image from the to-be-played queue, the displaying of the target image, the decrementing of the counter value corresponding to the image by one, the judging of whether the counter value is not 0, the putting of the image back to the available list if yes, the judging of whether the playing is ended if not, the ending of the displaying process if yes, and the continuing of the taking of the target image from the to-be-played queue if not.

[0026] The present application further provides a device for locally playing a video stream, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for locally playing a video stream based on the computer program stored in the memory.

[0027] The present application further provides a computer readable storage medium storing a computer program, wherein the computer program is executable by a processor to execute the method for locally playing a video stream.

[0028] Through the above embodiments of the present application, the interface clipping effect can be met while the performance overhead of the program is greatly saved. BRIEF DESCRIPTION OF DRAWINGS

[0029] Other features, objects, and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments with reference to the attached drawings:

[0030] Figure 1 A schematic flow chart of a method for locally playing a video stream according to some embodiments of the present application is shown.

[0031] Figure 2 A schematic flow chart of a method for locally playing a video stream according to further embodiments of the present application is shown.

[0032] Figure 3 Fig. 1 shows a schematic structural block diagram of an apparatus for locally playing a video stream according to some embodiments of the present application.

[0033] Figure 4 Fig. 2 shows a schematic structural block diagram of an apparatus for locally playing a video stream according to further embodiments of the present application.

[0034] Figure 5 Fig. 3 shows a schematic structural diagram of an apparatus for locally playing a video stream according to some embodiments of the present application. DETAILED DESCRIPTION

[0035] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application.

[0036] It should be explained that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0037] Figure 1 Fig. 4 shows a schematic flow chart of a method for locally playing a video stream according to some embodiments of the present application. As shown in Fig. 4, the method for locally playing a video stream comprises steps S110-S150. Figure 1

[0038] S110, receiving video stream data in real time and decoding;

[0039] S120, playing the decoded image by a playing component;

[0040] S130, in response to a frame selection operation of a user on a target image, calculating a center point of the frame selection region and a scale ratio of the frame selection region to the playing component;

[0041] The calculation of the center point of the frame selection region and the scale ratio of the frame selection region to the playing component comprises calculation of:

[0042] The center point: x-axis center point = width of the cropped region / 2, y-axis center point = height of the cropped region / 2;

[0043] The scale ratio: x-axis scale ratio = width of the playing component / width of the cropped region, y-axis scale ratio = height of the playing component / height of the cropped region;

[0044] The translation value: x-axis translation value = width of the playing component / 2-x-axis center point, y-axis translation value = height of the playing component / 2-y-axis center point;

[0045] ​S140, setting the center point of the playing component, the zooming ratio, and the x-axis and y-axis translation distance according to the calculation result;

[0046] S150, playing the target image under the set playing component.

[0047] Figure 2 A schematic flow chart of a method for local playing of a video stream according to some embodiments of the present application is shown. As shown, the method for local playing of a video stream comprises steps S210-S260: Figure 2

[0048] S210, receiving video stream data in real time, decoding, and setting a counter value for each decoded image, the counter value corresponding to the number of times the image needs to be played.

[0049] Setting a counter value for each decoded image comprises designing a data structure and binding a counter to the image data. After decoding the image, the counter of the image is set to the number of times the image needs to be used.

[0050] The number of times the image needs to be used may, for example, include the number of playing components that need to play the image at present. If there are n playing components that need to play the image at present, the counter is set to n. In addition to playing the image, other ways of using the image may also be included.

[0051] According to some embodiments of the present application, the playing components of the existing playing image can be closed at any time or new playing components can be opened to play the image, and therefore, the number of the playing components can be real-time dynamic, and therefore, the counter value can also be real-time dynamic, which can be adjusted by real-time monitoring of the number of playing components that need to use the image.

[0052] S220, playing the decoded image through the playing component.

[0053] S230, updating the counter value corresponding to a target image in response to a box selection operation of the user on the target image so that the counter value is increased by one for each box selection operation, and calculating the center point of the box selection region and the ratio of the box selection region to the playing component in response to a box selection operation of the user on the playing image.

[0054] When the user performs a box selection operation on a target image being played at present, for example, selects a part of the region to view or play the region, the counter value corresponding to the target image is increased by one.

[0055] Calculating the center point of the box selection region and the ratio of the box selection region to the playing component comprises calculating:

[0056] ​Center point: x-axis center point = width of the clipping area / 2, y-axis center point = height of the clipping area / 2;

[0057] Scaling ratio: x-axis scaling ratio = width of the playing component / width of the clipping area, y-axis scaling ratio = height of the playing component / height of the clipping area;

[0058] Translation value: x-axis translation value = width of the playing component / 2 - x-axis center point, y-axis translation value = height of the playing component / 2 - y-axis center point;

[0059] S240, according to the calculation result, setting the center point of the playing component, the scaling ratio and the x-axis and y-axis translation distance.

[0060] According to some embodiments of the present application, setting the center point of the playing component, the scaling ratio and the x-axis and y-axis translation distance includes adding a new playing component and setting the center point, the scaling ratio and the x-axis and y-axis translation distance of the new playing component.

[0061] The various default settings of the added playing component are the same as those of the existing playing component.

[0062] According to some embodiments of the present application, setting the center point of the playing component, the scaling ratio and the x-axis and y-axis translation distance includes setting the center point, the scaling ratio and the x-axis and y-axis translation distance of the existing playing component.

[0063] The existing playing component includes a playing component that has been used to play an image, for example, a playing component that plays the entire original target image. When the user selects a part of the original image, the existing playing component can be re-set.

[0064] S250, playing the target image under the set playing component, and when the target image is played once by the set playing component, the counter value corresponding to the target image is reduced by one.

[0065] As known from step 240, the target image is played by the set playing component, and the part outside the selected area in the target image will overflow outside the playing component, and the selected part will fall within the display area of the playing component. The image underlying data is not subjected to clipping processing, but the entire display effect shows that only the selected part is presented by the playing component, thereby achieving the purpose of clipping display.

[0066] S260, when the counter value is determined to be 0, the memory resources occupied by the image with the counter value of 0 are recycled.

[0067] When the counter value is 0, it means that the image will not be used by anyone, and the memory resource occupied by the image with the counter value of 0 can be recycled, and the memory resource is reused when decoding the frame next time, so that the memory resource is saved in real time. Recycling the memory resource occupied by the image with the counter value of 0 includes putting it into the modifiable queue. By setting the counter, the waste of computing resources and memory consumption caused by decoding the same video multiple times or copying multiple times in the prior art can be avoided, and the computing resources and memory resources are greatly saved.

[0068] Through the above embodiment of the application, the performance overhead of the program can be greatly saved while the interface clipping effect is met.

[0069] According to some embodiments of the application, the real-time receiving of the video stream data, the decoding, and the setting of the counter value for each decoded image include: initializing a fixed number of image instances into an available list; decoding a video frame; taking an image object from the available list; storing the video frame data into the image object; setting the counter value; judging whether the playing is ended; if yes, ending the decoding process, and if not, continuing to decode the video frame.

[0070] The fixed number of image instances can be determined according to an empirical value, and is related to the decoding speed of the computer and the image playing speed. The counter value is set as the number of times that the image needs to be used, and the specific process is as described above.

[0071] According to some embodiments of the application, the playing of the target image under the set playing component, and the monitoring of the playing of the target image by the set playing component once, the counter value corresponding to the target image is reduced by one, which includes: obtaining the target image from the to-be-played queue; displaying the target image; reducing the counter value corresponding to the image by one; judging whether the counter value is not 0, if yes, putting the image back to the available list, if not, judging whether the playing is ended; if yes, ending the displaying process, and if not, continuing to obtain the target image from the to-be-played queue.

[0072] Figure 3 A schematic structural block diagram of an apparatus for playing a video stream partially according to some embodiments of the application is shown. As shown in Figure 3 The apparatus 400 can include a receiving unit 410, a playing unit 420, and a computing unit 430.

[0073] The receiving unit is configured to receive video stream data in real time, and decode the video stream data;

[0074] The playing unit is configured to play the decoded image through a playing component;

[0075] The computing unit is configured to calculate the center point of the framed region and the ratio of the framed region to the playing component in response to the user's framing operation on a target image, and set the center point of the playing component, the scaling ratio, and the x-axis and y-axis translation distance according to the calculation result.

[0076] The foregoing reference Figures 1-2 The corresponding detailed description made by reference is included herein and will not be repeated here.

[0077] Through the above embodiments of the present application, the interface clipping effect can be met while greatly saving the performance overhead of the program.

[0078] Figure 4 A schematic structural block diagram of an apparatus for locally playing a video stream according to some embodiments of the present application is shown. As Figure 4 shown, the apparatus 400' can include:

[0079] a receiving unit 410', a playing unit 420', a computing unit 430', and a counting unit 440';

[0080] The receiving unit is configured to receive video stream data in real time, decode, and set a counter value for each decoded image, the counter value corresponding to the number of times the current image needs to be played;

[0081] The playing unit is configured to play the decoded image through a playing component;

[0082] The computing unit is configured to update the counter value corresponding to the target image to make the counter value increase by one for each framing operation in response to the user's framing operation on the target image, and calculate the center point of the framed region and the ratio of the framed region to the playing component in response to the user's framing operation on the played image, and set the center point of the playing component, the scaling ratio, and the x-axis and y-axis translation distance according to the calculation result.

[0083] The counting unit is configured to play the target image through the set playing component, and when the target image is played once through the set playing component, decrease the counter value corresponding to the target image by one, and when the counter value is determined to be 0, recycle the memory resources occupied by the image with the counter value of 0.

[0084] When the counter value is 0, it means that no one will use this image, and the memory resources occupied by the image with the counter value of 0 can be recycled for reuse next time the frame is decoded, thereby saving memory resources in real time. By setting the counter, the waste of computing resources and memory consumption caused by decoding or copying the same video multiple times in the prior art can be avoided, and computing resources and memory resources can be greatly saved.

[0085] The foregoing referenceFigures 1-2 The corresponding detailed description made by reference is included herein and will not be repeated here.

[0086] Through the above embodiments of the present application, the performance overhead of the program can be greatly saved while meeting the interface clipping effect.

[0087] Figure 5 A schematic structural diagram of a device 500 for locally playing a video stream according to some embodiments of the present application is shown. As shown, the device includes a processor 51, a memory 52 and a bus 53. Figure 5

[0088] In some examples, the device can also include an input device 501, an input port 502, an output port 503 and an output device 504. Among them, the input port 502, the processor 51, the memory 52 and the output port 503 are connected to each other through the bus 53, and the input device 501 and the output device 504 are connected to the bus 53 through the input port 502 and the output port 503 respectively, and then connected to other components of the multi-signal source scheduling device. It should be noted that the output interface and the input interface here can also be represented by an I / O interface. Specifically, the input device 501 receives input information from the outside and transmits the input information to the processor 51 through the input port 502; the processor 51 processes the input information based on the computer executable instructions stored in the memory 52 to generate output information, temporarily or permanently stores the output information in the memory 52, and then transmits the output information to the output device 504 through the output port 503; the output port 503 outputs the output information to the outside of the device.

[0089] The above-mentioned memory 52 includes a mass storage for data or instructions. By way of example and not limitation, the memory 52 can include an HDD, a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape or a universal serial bus (USB) drive, or a combination of two or more of these. The memory 52 can include removable or non-removable (or fixed) media, as appropriate. The memory 52 can be internal or external to the device, as appropriate. In a particular embodiment, the memory 52 is a non-volatile solid-state memory. In a particular embodiment, the memory 52 includes a read-only memory (ROM). The ROM can be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory, or a combination of two or more of these, as appropriate.

[0090] ​Bus 53 includes hardware, software, or both, to couple components of the multi-signal source scheduling device to each other in a known manner. For example, but not by way of limitation, bus 53 can include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (ISA) bus, an infiniband interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards association local (VLB) bus, or another suitable bus or a combination of two or more of these. Although specific buses are described and illustrated, the application contemplates any suitable bus or interconnect.

[0091] The processor 51 receives video stream data in real time, decodes based on the computer program stored in the memory 52;

[0092] The decoded image is played by the playing component;

[0093] In response to the user's framing operation on a target image, the center point of the framed area and the ratio of the framed area to the playing component are calculated;

[0094] According to the calculation result, the center point of the playing component, the scaling ratio, and the x-axis and y-axis translation distance are set;

[0095] The target image is played under the set playing component.

[0096] According to some embodiments of the application, the processor 51 receives video stream data in real time, decodes based on the computer program stored in the memory 52, and sets a counter value for each decoded image, which corresponds to the number of times the current image needs to be played;

[0097] The decoded image is played by the playing component;

[0098] In response to the user's framing operation on a target image, the center point of the framed area and the ratio of the framed area to the playing component are calculated;

[0099] According to the calculation result, the center point of the playing component, the scaling ratio, and the x-axis and y-axis translation distance are set;

[0100] When the counter value is determined to be 0, the memory resources occupied by the image with a counter value of 0 are reclaimed.

[0101] Previous reference Figures 1-2 The relevant details are included here by reference and will not be repeated here.

[0102] According to further embodiments of the present invention, the computer program may be divided into one or more units in various ways and stored in the memory, and executed by the processor to perform the present invention. The one or more units may be a series of computer program instruction segments capable of performing a specific function, the instruction segments describing the execution process of the computer program in the device. The computer program may be based on the foregoing reference... Figure 4 The functions of each unit in the various embodiments described are used to divide the system into multiple units, or include those referenced above. Figure 4 The various units in the described embodiments are not repeated here for the sake of simplicity.

[0103] The processor referred to may be a Central Processing Unit (CPU), or other general-purpose processors, 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, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, connecting various parts of the device via various interfaces and lines. The device may be a desktop computer, laptop, handheld computer, cloud server, or other computing devices or a part thereof. The device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagrams are merely examples of the device and do not constitute a limitation on the device.

[0104] Previous reference Figures 1-2 The relevant details are included here by reference and will not be repeated here.

[0105] This application also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps:

[0106] It receives video stream data in real time and decodes it;

[0107] playing the decoded image through the playing component;

[0108] in response to a user's frame selection operation on a target image, calculating the center point of the frame selection region and the ratio of the frame selection region to the playing component;

[0109] according to the calculation result, setting the center point of the playing component, the scaling ratio, and the x-axis and y-axis translation distance;

[0110] playing the target image under the set playing component.

[0111] According to some embodiments of the present application, the computer program, when executed by a processor, implements the following steps: receiving video stream data in real time, decoding, and setting a counter value for each decoded image, the counter value corresponding to the number of times the current image needs to be played;

[0112] playing the decoded image through the playing component;

[0113] in response to a user's frame selection operation on a target image, updating the counter value corresponding to the target image so that the counter value increases by one for each frame selection operation, and in response to a user's frame selection operation on a played image, calculating the center point of the frame selection region and the ratio of the frame selection region to the playing component, and according to the calculation result, setting the center point of the playing component, the scaling ratio, and the x-axis and y-axis translation distance;

[0114] playing the target image under the set playing component, and when the target image is played once by the set playing component, reducing the counter value corresponding to the target image by one;

[0115] when it is determined that the counter value is 0, recycling the memory resources occupied by the image with the counter value of 0.

[0116] The foregoing reference Figures 1-2 is incorporated herein by reference, and will not be repeated here.

[0117] The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0118] Through the above-mentioned embodiments of the present application, the performance overhead of the program can be greatly saved while the interface clipping effect is met.

[0119] It should be noted that, although the structure of the device of the present application and the method of its operation are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all of the shown operations must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step execution, and / or one step can be broken down into multiple steps.

[0120] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for partial playback of a multi-network signal video stream, wherein the multi-network signal includes multiple signal sources, the method comprising: It receives video stream data from multiple networks in real time, decodes it, and sets a counter value for each decoded image. The counter value corresponds to the number of times the image needs to be played. The counter value is adjusted by monitoring in real time the number of playback components that require the image; The decoded image is played using the playback component; In response to a user's selection operation to play a portion of a target image, the system updates the counter value corresponding to the target image so that the counter value increments by one for each additional selection operation. It also responds to the user's selection operation on the image to be played by calculating the center point of the selected area and the ratio of the selected area to the playback component. Based on the calculation results, it sets the center point, scaling ratio, and x-axis and y-axis translation distances of the playback component. Specifically, the center point is calculated as follows: x-axis center point = cropping area width / 2, y-axis center point = cropping area height / 2; scaling ratio is calculated as follows: x-axis scaling ratio = playback component width / cropping area width, y-axis scaling ratio = playback component height / cropping area height; and translation values ​​are calculated as follows: x-axis translation value = playback component width / 2 - x-axis center point, y-axis translation value = playback component height / 2 - y-axis center point. Based on the calculation results, the center point, scaling ratio, and x-axis and y-axis translation distance of the playback component are set; setting the center point, scaling ratio, and x-axis and y-axis translation distance of the playback component includes adding a new playback component and setting the center point, scaling ratio, and x-axis and y-axis translation distance of the new playback component, or setting the center point, scaling ratio, and x-axis and y-axis translation distance of the playback component includes setting the center point, scaling ratio, and x-axis and y-axis translation distance of an existing playback component; When the target image is played under the configured playback component, the portion of the target image outside the selected area will overflow outside the playback component, while the selected portion will fall within the display area of ​​the playback component; and when the target image is detected to have been played once by the configured playback component, the counter value corresponding to the target image will be decremented by one. When the counter value is determined to be 0, the memory resources occupied by the image with a counter value of 0 are reclaimed.

2. The method according to claim 1, wherein the selection operation includes local selection and overall selection of the target image.

3. The method according to claim 1, reclaiming the memory resources occupied by the image with a counter value of 0 includes placing it in a modifiable queue.

4. The method according to claim 1, wherein receiving video stream data in real time, decoding it, and setting a counter value for each decoded image includes: First, initialize a fixed number of image instances and add them to the available list; Decode video frames; Take an image object from the available list; Store video frame data into an image object; Set the counter value; determine if playback has ended; if yes, end the decoding process; otherwise, continue decoding video frames.

5. The method according to claim 4, wherein playing the target image under the set playback component, and decrementing the counter value corresponding to the target image by one when the set playback component plays the target image once, includes: Retrieve the target image from the queue to be played; Display the target image; Decrement the counter value corresponding to the image by one; Check if the counter value is not 0. If it is, put the image back into the available list. If not, check if playback has ended. If it has ended, end the display process. If it has not ended, continue to retrieve the target image from the queue to be played.

6. A device for partial playback of multi-network signal video streams, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the method of any one of claims 1-5 based on a computer program stored in memory.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the method of any one of claims 1-5.

Citation Information

Patent Citations

  • High-definition video playing method and device, equipment and storage medium

    CN111757162A

  • Video coding and decoding method and device, computer equipment and storage medium

    CN113347432A