Channel switching method, device, equipment, system and storage medium
By disconnecting the association with the previous channel in the video terminal device, establishing association with the target channel, and using the one-way rendering component for rendering processing, the problem of difficult to improve the channel switching speed and duration is solved, faster channel switching and lower resource consumption are achieved, and users' video viewing experience is improved.
Patent Information
- Application Number
- CN202010430907.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-20
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2040-05-20
AI Technical Summary
In the 5G era, video content has grown explosively, users' requirements for video quality and viewing experience have increased, and channel switching speed and duration are difficult to improve, resulting in delayed video viewing.
By undoing the association relationship between the display window and the image texture of the previous channel, establishing the association relationship between the image texture of the target channel and the display window, and using the pre-created one-way rendering component to render the image texture associated with the display window, sending the image screen of the target channel obtained by the rendering process to the display window.
It improves channel switching speed, reduces channel switching time, reduces the use of rendering components, reduces the resource use of system CPU and GPU, saves system resources, and improves user viewing experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a channel switching method, device, equipment, system and storage medium. Background Art
[0002] With the advent of the 5th Generation Wireless Systems (5G) era, multimedia technology is developing rapidly, social entertainment is accelerating, and users' requirements for video entertainment are increasing. In particular, video content will explode in the 5G era, and users' requirements for live and on-demand video quality and video viewing experience will increase. Therefore, multimedia terminals need to optimize video viewing delay to improve viewing experience.
[0003] The speed of channel switching is one of the parameters to measure the quality of viewing experience. During channel switching, a black screen, slow channel loading or failure may occur, which will greatly increase the video viewing delay. Therefore, it is necessary to increase the channel switching speed and reduce the switching time. Summary of the invention
[0004] The present application provides a channel switching method, apparatus, device, system and storage medium, which can increase the channel switching speed and reduce the channel switching time.
[0005] An embodiment of the present application provides a channel switching method, comprising: in response to a channel switching signal, releasing the association between a display window and an image texture corresponding to a preset player of a previous channel, wherein the channel switching signal carries information of a target channel to which the previous channel is expected to be switched; establishing an association between the image texture corresponding to the preset player of the target channel and the display window; rendering the image texture associated with the display window using a pre-created rendering component; sending an image of the target channel obtained by the rendering process to the display window to switch to the target channel; wherein the image texture corresponding to the preset player of the previous channel and the image texture corresponding to the preset player of the target channel are image textures pre-generated by a texture component in the rendering component.
[0006] An embodiment of the present application provides a channel switching device, including: an association release module, used to respond to a channel switching signal to release the association between a display window and an image texture corresponding to a preset player of a previous channel, wherein the channel switching signal carries information of a target channel to be switched from the previous channel; an association establishment module, used to establish an association between the image texture corresponding to the preset player of the target channel and the display window; a rendering processing module, used to use a pre-created rendering component to render the image texture associated with the display window; and a picture sending module, used to send the image picture of the target channel obtained by the rendering process to the display window, so as to switch to the target channel; wherein the image texture corresponding to the preset player of the previous channel and the image texture corresponding to the preset player of the target channel are image textures pre-generated by a texture component in the rendering component.
[0007] An embodiment of the present invention provides a terminal device, including: a processor and a display; the processor is used to receive a channel switching signal and execute the above-mentioned channel switching method; the display is used to display an image screen after the channel is switched.
[0008] An embodiment of the present invention provides a channel switching system, comprising: a memory and a processor; the memory is used to store programs; the processor is used to read executable program codes stored in the memory to execute the above-mentioned channel switching method.
[0009] An embodiment of the present invention provides a computer-readable storage medium, in which program instructions are stored. When the program instructions are executed on a device, the device executes the channel switching methods of the above aspects.
[0010] According to the channel switching method, apparatus, device, system and storage medium of the embodiments of the present invention, when a user selects a channel, the association relationship between the display window and the image texture corresponding to the player of the previous channel is released, an association relationship between the display window and the image texture associated with the selected channel is established, and the image texture associated with the display window is rendered to the window for display, so as to switch the previous channel to the target channel.
[0011] In the channel switching method, when switching channels, only the association between the image texture corresponding to the preset player of the channel and the display window is switched, and the rendering component only renders the image texture associated with the display window, thereby improving the channel switching speed and reducing the channel switching time; and because the channel switching method of the present application reduces the use of rendering components, undisplayed windows and player objects will not generate CPU and GPU occupancy and performance consumption due to image processing during rendering, thereby reducing the resource usage of the system CPU and GPU and saving system resources.
[0012] With regard to the above embodiments and other aspects of the present application and their implementation, further description is provided in the accompanying drawings, detailed description and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flow chart showing a channel switching method according to an embodiment of the present invention;
[0014] Figure 2 A schematic diagram showing the architecture of a channel switching method according to an embodiment of the present application;
[0015] Figure 3 A flow chart showing a channel switching method according to an exemplary embodiment of the present application;
[0016] Figure 4 A timing diagram showing a channel switching method according to another exemplary embodiment of the present application;
[0017] Figure 5 The channel switching process of another exemplary embodiment of the present application is shown;
[0018] Figure 6 A schematic diagram showing the structure of a channel switching device provided according to an embodiment of the present invention is shown;
[0019] Figure 7 A schematic diagram showing the structure of a terminal device according to an embodiment of the present application;
[0020] Figure 8 A structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the channel switching method and apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.
[0022] Figure 1 is a flow chart showing a channel switching method according to an embodiment of the present invention. Figure 1 As shown, the channel switching method in the embodiment of the present invention has the following steps.
[0023] Step S110, in response to a channel switching signal, releasing the association between the display window and the image texture corresponding to the preset player of the previous channel, wherein the channel switching signal carries information of a target channel to which the previous channel is to be switched.
[0024] Step S120: establishing an association relationship between the image texture corresponding to the preset player of the target channel and the display window.
[0025] Step S130, using a pre-created rendering component, rendering the image texture associated with the display window.
[0026] Step S140: sending the image frame of the target channel obtained by rendering to the display window to switch to the target channel.
[0027] The image texture corresponding to the preset player of the previous channel and the image texture corresponding to the preset player of the target channel are image textures generated in advance by the texture component in the rendering component.
[0028] In one embodiment, the channel address includes a target channel and multiple adjacent channel addresses. The previous channel and the target channel can be two adjacent channel addresses or two non-adjacent channel addresses, as long as the image texture corresponding to the player of the target channel exists when switching from the previous channel to the target channel.
[0029] According to the channel switching method of an embodiment of the present invention, when the user selects a target channel, the unique association between the display window and the image texture corresponding to the player of the previous channel is released, a unique association between the display window and the image texture associated with the selected channel is established, and the uniquely associated image texture is rendered to the window for display, so as to switch the previous channel to the target channel.
[0030] In the embodiment of the present application, the player of the previous channel and the player of the target channel are respectively associated with texture components, and when the image texture obtained by the associated texture components is uniquely associated with the display window, the rendering to the display window is performed. That is to say, in the channel switching method of the embodiment of the present application, when a channel is selected, the image texture associated with the selected channel is rendered and displayed, and the image texture not associated with the window is not subjected to image rendering processing and drawing to the window, thereby improving the channel switching speed and reducing the channel switching time.
[0031] Furthermore, according to the channel switching method of the present application, for image textures that are not associated with the display window, there will be no CPU and GPU occupancy and performance consumption due to image processing during rendering, thereby reducing the resource usage of the system CPU and GPU.
[0032] In one embodiment, the channel switching method further includes the following steps.
[0033] S21, using a pre-created multi-channel player to decode the image data of multiple channels to obtain decoded data of each channel player.
[0034] In the embodiment of the present application, the player may be an application object having a function of playing multimedia data, and the player may parse, decode, render and prepare multimedia data in the channel. The multimedia data in the embodiment of the present application at least includes video stream data. For example, the multimedia data may include not only video stream data, but also at least one of audio stream data and image data.
[0035] S22, creating multiple texture components in the pre-created rendering component, and establishing an association relationship between each player and one of the multiple texture components.
[0036] In the embodiment of the present application, the image texture is an internal image processing object based on the Open Graphics Library (OpenGL), including vertex coordinate information and color depth information, etc. The texture component can be understood as a container for caching image data (such as decoded data of a player). The player is associated with one of the pre-created multiple texture components, and the decoded data of the player is buffered in the associated texture component. The texture component can render the decoded data of the associated player into a corresponding image texture.
[0037] S23, processing the decoded data of each player in the associated texture component to obtain the image texture corresponding to the player of each channel.
[0038] In this embodiment, before entering a channel, multiple players can be created first, and each player is configured with a channel address for playback. Create a rendering component and multiple texture components (Surface Texture), associate the player with the texture component, and the decoded data of the player will be transmitted to the internal buffer of the texture component to obtain the image texture corresponding to the player. When the user selects a channel, the image texture corresponding to the player of the channel will be associated with the display window, and the image texture will be rendered and displayed in the window. The renderer in the embodiment of the present invention, also called a rendering component, is used to render the image texture corresponding to the player.
[0039] For ease of understanding, the following Figure 2-Figure 4 , describing a channel switching method of an exemplary embodiment of the present application. Figure 2 A schematic diagram showing the architecture of a channel switching method according to an embodiment of the present application.
[0040] like Figure 2 As shown, the architecture may include: multiple players pre-created in the application 10, such as player 1, player 2,..., player n, multiple texture components 20 pre-created in the rendering component 20, such as texture component 1, texture component 2,..., texture component n, and a display window 30.
[0041] exist Figure 2 In the embodiment, each player can decode the multimedia data in the corresponding channel according to the configured channel address to obtain the decoded data of each player.
[0042] Continue to refer Figure 2 Before entering the channel, you can create multiple players, each of which can be configured with a channel address for playback. Create a rendering component and multiple texture components. The rendering component 20 can be used to render the image texture corresponding to the player.
[0043] In the embodiment of the present invention, each player is associated with a texture component, and the decoded data of the player is transmitted to the internal buffer of the texture component to obtain the image texture corresponding to the player, such as image texture 1, image texture 2, ..., image texture n. When the user selects a channel, the image texture corresponding to the player of the channel is associated with the display window, and the image texture is rendered and displayed in the window.
[0044] Figure 3 FIG. 1 is a flow chart showing a channel switching method according to an exemplary embodiment of the present application. Figure 3 As shown, the channel switching method in this embodiment may include the following steps.
[0045] S301, the user enters the terminal application.
[0046] After entering the terminal application, you can create an image display window, which can be used to display the video screen.
[0047] S302, creating a multi-channel player.
[0048] In this step, each player decodes the audio and video streams of the default channel and adjacent channels.
[0049] S303, creating a multi-channel texture component.
[0050] In this step, a multi-pass texture component can be created using a rendering component.
[0051] S304, associating the player with the texture component.
[0052] In this step, each player can be uniquely associated with a texture component, and the decoded data of the player will be transmitted to the corresponding texture component for buffering. The obtained image texture corresponding to the player can be used for subsequent rendering processing.
[0053] S305, associating the current image texture with the window.
[0054] In this step, the image texture corresponding to the player of the current playing channel is associated with the window, an association relationship is established, and a rendering operation is performed on the image texture associated with the window to obtain rendering information corresponding to each image texture.
[0055] S306, rendering the image to the window.
[0056] In this step, the display window is refreshed periodically, and the rendering information corresponding to the image texture currently associated with the display window is drawn to the display window for display.
[0057] S307, the user switches channels.
[0058] In this step, in response to the channel being switched, the window is disassociated from the original image texture after switching to the new channel, and is associated with the image texture corresponding to the new channel.
[0059] S308: The display window is disassociated from the original image texture and associated with a new image texture.
[0060] In this step, the image texture that is no longer associated with the display window is no longer rendered, and only the image texture newly associated with the display window is rendered.
[0061] S309, rendering the image to the window.
[0062] In this step, the display window is refreshed periodically, and the rendering information in the new image texture associated with the display window is drawn to the window for display.
[0063] In this embodiment, a model of multiple players and one rendering component is adopted, which can reduce the use of rendering components. For undisplayed windows and player objects, CPU and GPU occupancy and performance consumption caused by image processing during rendering will not be generated, thereby greatly reducing the resource usage of the system CPU and GPU.
[0064] Figure 4 A timing diagram of a channel switching method according to another exemplary embodiment of the present application is shown. For the convenience of description, player 1 and player 2 among multiple players are taken as examples to introduce the specific steps of switching from player 1 to player 2. It should be understood that the players in the embodiment of the present application are not limited to player 1 and player 2. In a multi-channel player, the channel switching method can be used in the scheme of switching from the previous player to the current player, and the embodiment of the present application will not be repeated.
[0065] like Figure 4 As shown, in this embodiment, the channel switching method may include the following steps.
[0066] S401, such as Figure 4As shown in "Creating Playback Channel 1", create player 1, configure the address of channel 1, and decode the multimedia data in channel 1.
[0067] In an embodiment of the present application, if channel 1 is the first channel selected by the user after entering the application, multiple players are pre-created before entering the channel.
[0068] S402, such as Figure 4 As shown in “Creating Playback Channel 2”, create player 2, configure the address of channel 2, and decode the multimedia data in channel 2.
[0069] Through the above steps S401 and S402, multiple players are created for playing multiple channels, and each player is used to play one of the channels. Specifically, each player can decode the multimedia data in one channel to obtain the decoded data of each player.
[0070] S403, such as Figure 4 As shown in "Creating Texture 1 and Texture 2", create texture component 1 and texture component 2. Among them, multiple texture components can be created in the rendering component for screen rendering.
[0071] S404, such as Figure 4 As shown in “Associating Texture Component 1”, a unique association relationship between player 1 and texture component 1 is established.
[0072] S405, such as Figure 4 As shown in “Associating Texture Component 2”, a unique association relationship between player 2 and texture component 2 is established.
[0073] Through the above steps S404 and S405, the decoded data of each player will be transmitted to the associated texture component for buffering, and the image texture corresponding to the player playing each channel will be obtained.
[0074] S406, such as Figure 4 As shown in the "Image Texture 1 Association Window", when channel 1 is selected, image texture 1 corresponding to the player of channel 1 is associated with the display window.
[0075] S407, such as Figure 4 As shown in "Window Refresh Display", when the display window is refreshed, the image texture 1 corresponding to the player of channel 1 is rendered, and the rendering data obtained by the rendering process is drawn to the display window for display.
[0076] In this step, the image texture corresponding to the target channel is associated with the window, and the image texture associated with the display window is rendered and displayed.
[0077] S408, such as Figure 4As shown in “Select Image Texture 2”, when the user selects channel 2, texture component 2 associated with player 2 of channel 2 is determined.
[0078] S409, such as Figure 4 As shown in the "Image Texture 2 Association Window", when channel 2 is selected, the display window and the image texture corresponding to the player of channel 1 are disassociated, and an association relationship is established between the display window and the image texture corresponding to the player of channel 2.
[0079] In this step, the association relationship between the original image texture and the display window is released, and the association relationship between the image texture corresponding to the switched channel and the display window is established.
[0080] S410, such as Figure 4 As shown in "Window Refresh Display", when the display window is refreshed, the image texture 2 corresponding to the player of channel 2 is rendered, and the rendering data obtained by the rendering process is drawn to the display window for display.
[0081] In this embodiment, the video application can create multiple players for decoding the video of the channel, configure adjacent channels for playback, and create a display window for displaying the current playback channel screen, establish an association relationship between each player and a texture component, and transmit the image texture corresponding to the player of the target channel to the window for rendering and display. The image textures of the remaining channels are not associated with the display window. When switching to an adjacent channel for playback, the image texture corresponding to the player of the original channel is disassociated from the window, and the image texture corresponding to the player of the channel is rendered and displayed through the associated window. Since the image texture that is not associated with the window does not perform image rendering processing and drawing operations, the resource consumption of the CPU and GPU can be reduced.
[0082] In one embodiment, the player of the previous channel and the player of the target channel are two players in a pre-created multi-channel player.
[0083] In this embodiment, if the number of multiple players reaches a player number threshold, after releasing the unique association between the display window and the image texture corresponding to the player of the previous channel, the channel switching method may further include the following steps.
[0084] S51, releasing the player of the previous channel, and canceling the association between the player of the previous channel and the texture component corresponding to the player of the previous channel.
[0085] S52, creating a new player, and using the new player to decode the image data of the designated channel to obtain decoded data of the new player, wherein the designated channel is a channel of the preset multiple channels whose image data has not been decoded.
[0086] S53, establishing an association relationship between the new player and the disassociated texture component.
[0087] S54, processing the decoded data of the new player in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the new player.
[0088] In this embodiment, due to the performance constraints of the terminal device, the number of pre-created players is limited. When the number of pre-created players reaches the player number threshold, when the user switches channels, after releasing the unique association between the display window and the image texture corresponding to the player of the previous channel, it is also necessary to remove the corresponding player and add a new player to achieve switching between multiple channels under performance constraints.
[0089] In one embodiment, the previous channel and the target channel are adjacent channels in a preset plurality of channels, and the plurality of channels have a predetermined first order; the player of the previous channel and the player of the target channel are two players in a pre-created multi-channel player, and the multi-channel player has a predetermined second order.
[0090] In this embodiment, the playing channels in the application can generally be presented as a channel list, and the channel list display can be exemplarily displayed in a queue manner. Accordingly, since each channel can be configured with a player, the player can be added or removed in a queue manner, and the predetermined queue order of the pre-created multi-channel players is used as the second sorting.
[0091] In one embodiment, when the number of pre-created multi-channel players is greater than the player number threshold, and the target channel is adjacent to the previous channel, when the channel is positively selected according to the first sorting, after step S110, the channel switching method may further include the following steps.
[0092] S61, according to the predetermined second order, releasing the first player in the multiple players, and releasing the association between the first player and the associated texture component.
[0093] S62, creating a new player, and using the new player as the last player in the multi-channel player according to the predetermined second sorting.
[0094] S63, establishing an association relationship between the last player and the disassociated texture component.
[0095] S64, processing the decoded data of the last player in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the last player.
[0096] In this embodiment, when the channel switching is forward switching according to the predetermined first order, the head player can be released, the association with the corresponding texture can be cancelled, and a newly created player can be added from the end of the team, and the texture component that was cancelled from the previous head player can be associated.
[0097] In another embodiment, when the number of pre-created multi-channel players is greater than the player number threshold, and the target channel is adjacent to the previous channel, when the channel is reversely selected according to the first sorting, after step S110, the channel switching method may further include the following steps.
[0098] S71, according to the predetermined second sorting, releasing the last player in the multi-channel players, and disassociating the last player from the associated texture component.
[0099] S72, creating a new player, and using the new player as the first player in the multi-channel player according to the predetermined second order.
[0100] S73, establishing an association relationship between the first player and the disassociated texture component.
[0101] S74, processing the decoded data of the first player in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the first player.
[0102] In this embodiment, when the channel switching is reversed according to the predetermined first order, the tail player can be released, the association with the corresponding texture can be cancelled, and the newly created player can be added from the head position and associated with the image texture that was previously cancelled from the tail player.
[0103] For ease of understanding, the following Figure 5 , describing the schematic diagram of the release and creation process of the player during the channel switching process when the number of playback channels reaches the upper limit. Figure 5 The channel switching process of another exemplary embodiment of the present application is shown.
[0104] In this embodiment, the channel switching method may specifically include the following steps.
[0105] S81, pre-create multiple players.
[0106] In this step, the number of the multiple players is less than or equal to the predetermined player data threshold. In practical applications, the number of the multiple players can be set according to actual conditions, and the embodiment of the present application does not make a specific limitation.
[0107] S82, pre-create multiple texture components, associate each player with a texture component, and use the texture component to process the decoded data of the associated player to obtain the image texture corresponding to the player of each channel.
[0108] In this step, the same number of texture components can be created according to the number of created players. Taking 4-way players as an example, through the above steps S81 and S82, a player queue is pre-created, and the player queue can include 4-way players, and 4-way texture components are pre-created, and each texture component is associated with one player.
[0109] As an example, in the queue sorting of the channel list, the first sorting of the channels in the forward direction may be, for example, the order from channel 1, channel 2, channel 3 to channel 4, and the first sorting of the channels in the reverse direction may be the order from channel 4, channel 3, channel 2 to channel 1. Figure 5 In the embodiment, the channels are switched in a positive direction according to the first sequence, for example, they may be switched from top to bottom.
[0110] S83, select player 2.
[0111] S84, establishing an association relationship between the display window and the image texture 2 from the texture component 2, thereby rendering the image texture corresponding to the player 2, obtaining and displaying the playback picture of the channel 2 in the display window.
[0112] S85, selecting player 3, that is, when switching from player 2 to player 3, the unique association between the display window and image texture 2 is released, and the association between player 1 and texture component 1 is released.
[0113] S86, add the newly created player 5 from the end of the player queue, and establish an association relationship between player 5 and texture component 1.
[0114] In this step, player 5 is a newly created player, and texture component 1 is a texture component that is disassociated from the display window and is not associated with the player.
[0115] S87, establishing an association relationship between the display window and the image texture 3 from the texture component 3, rendering the image texture corresponding to the player 3, obtaining and displaying the playback picture of the channel 3 in the display window.
[0116] In this embodiment, if the number of pre-created playback channels reaches the device upper limit, a queue method can be used to add and remove players to achieve switching between multiple channels under performance constraints, improve channel switching speed, and reduce CPU and GPU occupancy and performance consumption by reducing the number of rendering times.
[0117] Usually, when switching channels, if you recreate the player and optimize the player start-up speed to improve the channel switching effect, you need to switch to a new player to switch channels. Since the player start-up time is mostly more than 500ms, during the channel switching process, users can clearly see the black screen. If the network quality is poor, the channel start-up time will be extended, and the viewing experience will be significantly reduced.
[0118] If multiple players and multiple rendering components are created in advance and channels are switched by directly switching the display and hiding of the players and corresponding display windows, a large amount of CPU and GPU resources will be consumed due to the creation of multiple players, and the device may easily heat up due to a large amount of calculations.
[0119] In the description of the above embodiments, the player, rendering component, texture component and display window involved can all be implemented in the form of software code.
[0120] According to the channel switching method of the embodiment of the present application, multiple players are created in advance, channel addresses are configured for decoding, and a rendering component and multiple texture components are created. Each player can be associated with a texture component, and the decoded data of the player will be transmitted to the internal buffer of the associated texture component. When the user selects a channel, the image texture corresponding to the player of the channel is associated with the display window, and the image texture associated with the display window is rendered and displayed in the window.
[0121] This method adopts a model of multiple players and one rendering component, reducing the use of rendering components. Undisplayed windows and player objects will not generate CPU and GPU occupancy and performance consumption due to image processing during rendering, greatly reducing the resource usage of the system CPU and GPU. After testing, this method reduces the CPU occupancy by at least 30% compared with the original N-channel playback and N-channel rendering, thereby reducing CPU consumption, improving system resource utilization, shortening the user's switching time, and realizing frame-level channel switching, thereby improving the user's viewing experience.
[0122] The channel switching device according to the embodiment of the present invention will be described in detail below with reference to the accompanying drawings. Figure 6 FIG. 2 shows a schematic diagram of the structure of a channel switching device provided according to an embodiment of the present invention. Figure 6 As shown, the channel switching device may include the following modules.
[0123] The disassociating module 210 is used to disassociate the display window from the image texture corresponding to the preset player of the previous channel in response to a channel switching signal, wherein the channel switching signal carries information of a target channel to be switched from the previous channel.
[0124] The association module 220 is used to establish an association relationship between the image texture corresponding to the preset player of the target channel and the display window.
[0125] The rendering processing module 230 is used to use a pre-created rendering component to perform rendering processing on the image texture associated with the display window.
[0126] The image display module 240 is used to send the image of the target channel obtained by rendering to the display window to switch to the target channel.
[0127] The image texture corresponding to the preset player of the previous channel and the image texture corresponding to the preset player of the target channel are image textures generated in advance by the texture component in the rendering component.
[0128] In one embodiment, the channel switching device may further include the following modules.
[0129] The channel decoding module is used to decode the image data of multiple channels by using the pre-created multi-channel players to obtain the decoded data of each channel player.
[0130] The texture association module is used to create multiple texture components in a pre-created rendering component and establish an association relationship between each player and one of the multiple texture components.
[0131] The texture processing module is used to process the decoded data of each player in the associated texture component to obtain the image texture corresponding to the player of each channel.
[0132] In one embodiment, the player of the previous channel and the player of the target channel are two players in a pre-created multi-channel player. The channel switching device may further include the following modules.
[0133] The player release module is used to release the player of the previous channel if the number of multiple players reaches a player number threshold, after releasing the unique association between the display window and the image texture corresponding to the player of the previous channel, and to release the association between the player of the previous channel and the image texture corresponding to the player of the previous channel.
[0134] The player creation module is used to create a new player and use the new player to decode the image data of the specified channel to obtain the decoded data of the new player. The specified channel is a channel with undecoded image data among the preset multiple channels.
[0135] The texture association module is also used to establish an association relationship between the image texture corresponding to the new player and the player of the previous channel;
[0136] The texture processing module is also used to process the decoded data of the new player in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the new player.
[0137] In one embodiment, the previous channel and the target channel are adjacent channels in a preset plurality of channels, and the plurality of channels have a predetermined first order; the player of the previous channel and the player of the target channel are two players in a pre-created multi-channel player, and the multi-channel player has a predetermined second order.
[0138] In one embodiment, the number of pre-created multi-channel players is greater than the player number threshold, and the target channel is adjacent to the previous channel. When the channel is positively selected according to the first sorting, the channel switching device may further include the following modules.
[0139] The player release module is specifically used to release the first player in the multi-channel players according to the predetermined second sorting after releasing the unique association between the display window and the image texture corresponding to the player of the previous channel, and to release the association between the first player and the associated image texture.
[0140] The player creation module is specifically used to create a new player and use the new player as the last player in the multi-channel player according to the predetermined second sorting.
[0141] The texture association module is specifically used to establish an association relationship between the last player and the disassociated image texture.
[0142] The texture processing module is specifically used to process the decoded data of the end player in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the end player.
[0143] In one embodiment, the number of pre-created multi-channel players is greater than the player number threshold, and the target channel is adjacent to the previous channel. When the channel is reversely selected according to the first sorting, the channel switching device may further include the following modules.
[0144] A player release module, specifically used to release the last player in the multi-channel players according to the predetermined second order, and to release the association between the last player and the associated image texture;
[0145] A player creation module, specifically used to create a new player, and use the new player as the first player in the multi-channel player according to the predetermined second order;
[0146] A texture association module, specifically used to establish an association relationship between the first player and the disassociated image texture;
[0147] The texture processing module is specifically used to process the decoded data of the first player in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the first player.
[0148] According to the channel switching device of the present application, multiple players and one rendering component are created to optimize the speed and smoothness of channel switching, which can greatly reduce the switching speed and achieve frame-level switching speed; since the use of rendering components is reduced, the channel windows and player objects that are not displayed will not generate CPU and GPU occupancy and performance consumption due to image processing during rendering, thereby reducing the resource usage of the system CPU and GPU and saving system resources.
[0149] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.
[0150] Figure 7 A schematic diagram showing the structure of a terminal device according to an embodiment of the present application is shown. Figure 7 As shown, the terminal device may include a processor 310 and a display 320 .
[0151] The processor 310 is used to execute any one of the channel switching methods in the above embodiments when receiving a channel switching signal; the display 320 is used to display an image after the channel is switched.
[0152] According to the terminal device of the present application, the multimedia data in the configured channel is decoded through a pre-created multi-channel player, and the player is associated with the image texture, and the decoded data of the player is transmitted to the internal buffer of the image texture. When the user selects a channel, the image texture corresponding to the channel is associated with the display window, and the image texture is rendered and displayed in the window. Through this channel switching method, while achieving frame-level channel switching, it can reduce the resource consumption of the CPU and GPU, and improve a better user experience.
[0153] Figure 8 is a structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the channel switching method and apparatus according to an embodiment of the present invention.
[0154] like Figure 8As shown, the computing device 400 includes an input device 401, an input interface 402, a central processing unit 403, a memory 404, an output interface 405, and an output device 406. The input interface 402, the central processing unit 403, the memory 404, and the output interface 405 are connected to each other via a bus 410, and the input device 401 and the output device 406 are connected to the bus 410 via the input interface 402 and the output interface 405, respectively, and then connected to other components of the computing device 400.
[0155] Specifically, the input device 401 receives input information from the outside and transmits the input information to the central processing unit 403 through the input interface 402; the central processing unit 403 processes the input information based on the computer executable instructions stored in the memory 404 to generate output information, temporarily or permanently stores the output information in the memory 404, and then transmits the output information to the output device 406 through the output interface 405; the output device 406 outputs the output information to the outside of the computing device 400 for user use.
[0156] In one embodiment, Figure 8 The computing device 400 shown may be implemented as a channel switching system, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the channel switching method described in the above embodiment.
[0157] According to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed from a removable storage medium.
[0158] The above is only an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application. In general, various embodiments of the present application can be implemented in hardware or special circuits, software, logic or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, a microprocessor or other computing device, although the present application is not limited thereto.
[0159] Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.
[0160] The block diagram of any logic flow in the accompanying drawings of the present application can represent program steps, or can represent interconnected logic circuits, modules and functions, or can represent a combination of program steps and logic circuits, modules and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory device and system (digital versatile disc DVD or CD disc), etc. Computer-readable media may include non-transient storage media. The data processor can be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FGPA) and a processor based on a multi-core processor architecture.
[0161] By way of exemplary and non-limiting examples, a detailed description of exemplary embodiments of the present application has been provided above. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, but will not depart from the scope of the present invention. Therefore, the proper scope of the present invention will be determined according to the claims.
Claims
1. A channel switching method, comprising: In response to a channel switching signal, releasing the association between the display window and the image texture corresponding to the preset player of the previous channel, wherein the channel switching signal carries information of a target channel to be switched from the previous channel; Establishing an association relationship between the image texture corresponding to the preset player of the target channel and the display window; Utilizing a pre-created rendering component, rendering the image texture associated with the display window; Sending the image of the target channel obtained by rendering to the display window to switch to the target channel; The image texture corresponding to the preset player of the previous channel and the image texture corresponding to the preset player of the target channel are image textures generated in advance by the texture component in the rendering component; Before responding to the channel switching signal, the method further includes: Decoding the image data of multiple channels using the pre-created multi-channel player to obtain the decoded data of each channel player; Creating a plurality of texture components in a pre-created rendering component, and establishing an association relationship between each of the players and a texture component in the plurality of texture components; The decoded data of each player is processed in the associated texture component to obtain the image texture corresponding to the player of each channel.
2. The method according to claim 1, wherein: The preset player of the previous channel and the preset player of the target channel are two players in the pre-created multi-channel player; If the number of the multiple players reaches the player number threshold, then after releasing the association between the display window and the image texture corresponding to the preset player of the previous channel, the method further includes: Release the preset player of the previous channel, and cancel the association between the preset player of the previous channel and the corresponding image texture; Creating a new player, and using the new player to decode image data of a specified channel to obtain decoded data of the new player, wherein the specified channel is a channel of the preset multiple channels whose image data has not been decoded; Establishing an association relationship between the new player and the image texture whose association relationship is released; The decoded data of the new player is processed in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the new player.
3. The method according to claim 1, wherein: The previous channel and the target channel are adjacent channels in a preset plurality of channels, and the plurality of channels have a predetermined first order; The preset player of the previous channel and the preset player of the target channel are two players in a pre-created multi-channel player, and the multi-channel player has a predetermined second order.
4. The method according to claim 3, wherein: The number of the multiple players is greater than the player number threshold, and the target channel is adjacent to the previous channel; When a channel is selected in the forward direction according to the first sorting, after releasing the association between the display window and the image texture corresponding to the preset player of the previous channel, the method further includes: According to the predetermined second order, releasing a first player in the multiple players, and releasing the association between the first player and the associated image texture; Creating a new player, and using the new player as the last player in the multi-channel player according to the predetermined second sorting; Establishing an association relationship between the last player and the disassociated image texture; The decoded data of the end player is processed in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the end player.
5. The method according to claim 3, wherein: The number of the multiple players is greater than the player number threshold, and the target channel is adjacent to the previous channel; When the channels are reversely selected according to the first sorting, after releasing the association between the display window and the image texture corresponding to the preset player of the previous channel, the method further includes: According to the predetermined second order, releasing the last player in the multiple players, and releasing the association between the last player and the associated image texture; Creating a new player, and using the new player as the first player in the multiple players according to the predetermined second order; Establishing an association relationship between the first player and the disassociated image texture; The decoded data of the first player is processed in the associated texture component to obtain the image texture corresponding to the player of the channel corresponding to the first player.
6. A channel switching device, comprising: an association removal module, configured to remove the association between the display window and the image texture corresponding to the preset player of the previous channel in response to a channel switching signal, wherein the channel switching signal carries information of a target channel to be switched from the previous channel; An association establishing module, used for establishing an association relationship between the image texture corresponding to the preset player of the target channel and the display window; A rendering processing module, used for rendering the image texture associated with the display window using a pre-created rendering component; A picture sending module, used for sending the image picture of the target channel obtained by rendering to the display window, so as to switch to the target channel; The image texture corresponding to the preset player of the previous channel and the image texture corresponding to the preset player of the target channel are image textures generated in advance by the texture component in the rendering component; The channel switching device also includes: A channel decoding module is used to decode the image data of multiple channels using the pre-created multi-channel players to obtain the decoded data of each player; A texture association module, used for creating multiple texture components in a pre-created rendering component, and establishing an association relationship between each player and one of the multiple texture components; The texture processing module is used to process the decoded data of each player in the associated texture component to obtain the image texture corresponding to the player of each channel.
7. A terminal device comprising a processor and a display; The processor is configured to execute the channel switching method according to any one of claims 1 to 5 upon receiving a channel switching signal; The display is used to display the image after the channel is switched.
8. A channel switching system, characterized in that: including memory and processor; The memory is used to store executable program codes; The processor is used to read the executable program code stored in the memory to execute the channel switching method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes program instructions, and when the program instructions are executed on a device, the device executes the channel switching method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Android-based multi-channel video playing method
CN108882038A