WO2024255894A1 - 界面切换方法、装置、电子设备及存储介质 - Google Patents
界面切换方法、装置、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2024255894A1 WO2024255894A1 PCT/CN2024/099433 CN2024099433W WO2024255894A1 WO 2024255894 A1 WO2024255894 A1 WO 2024255894A1 CN 2024099433 W CN2024099433 W CN 2024099433W WO 2024255894 A1 WO2024255894 A1 WO 2024255894A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- interface
- live broadcast
- live
- video
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4331—Caching operations, e.g. of an advertisement for later insertion during playback
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8173—End-user applications, e.g. Web browser, game
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Definitions
- the embodiments of the present disclosure relate to the field of Internet technology, and in particular to an interface switching method, device, electronic device, and storage medium.
- a preview interface of the live video is formed in a specific area, so that the application can play the preview video of a specific live broadcast room while displaying the basic information within the application. Afterwards, the user can switch to the corresponding live broadcast room interface by triggering the live broadcast component, thereby realizing quick switching of the video interface.
- the embodiments of the present disclosure provide an interface switching method, device, electronic device and storage medium to overcome the problems of freeze and black screen during interface switching.
- an embodiment of the present disclosure provides an interface switching method, comprising: playing a preview video of a target live broadcast room in a first interface, and pulling live stream data of the target live broadcast room after receiving a trigger instruction for the preview video; obtaining a target frame image of the target live broadcast room through the live stream data of the target live broadcast room; displaying the target frame image in a second interface until the live video of the target live broadcast room is loaded, and then playing the live video of the target live broadcast room in the second interface.
- the present disclosure provides an interface switching method, comprising: in a target application program In the second interface of the target application, the live video of the target live room is played, and after receiving the exit instruction for the target live room, the live stream data of the target live room is pulled; the target frame image of the target live room is obtained through the live stream data of the target live room; the target frame image is displayed in the first interface of the target application until the preview video of the target live room is loaded, and the preview video of the target live room is played in the first interface.
- an embodiment of the present disclosure provides an interface switching device, comprising: a first playback unit, used to play a preview video of a target live broadcast room in a first interface, and pull the live stream data of the target live broadcast room after receiving a trigger instruction for the preview video; a first processing unit, used to obtain a target frame image of the target live broadcast room through the live stream data of the target live broadcast room; a second playback unit, used to display the target frame image in a second interface until the live video of the target live broadcast room is loaded, and then play the live video of the target live broadcast room in the second interface.
- an embodiment of the present disclosure provides an interface switching device, comprising: a third playback unit, which plays the live video of a target live room in a second interface of a target application, and pulls the live stream data of the target live room after receiving an exit instruction for the target live room; a second processing unit, which obtains a target frame image of the target live room through the live stream data of the target live room; a fourth playback unit, which displays the target frame image in a first interface of the target application until the preview video of the target live room is loaded, and then plays the preview video of the target live room in the first interface.
- an embodiment of the present disclosure provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the interface switching method described in the first aspect and various possible designs of the first aspect, or to implement the interface switching method described in the second aspect and various possible designs of the second aspect.
- an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions.
- the interface switching method described in the first aspect and various possible designs of the first aspect is implemented, or the interface switching method described in the second aspect and various possible designs of the second aspect is implemented.
- the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the interface switching method described in the first aspect and various possible designs of the first aspect, or implements the second aspect and various possible designs of the second aspect. Design the interface switching method.
- the interface switching method, device, electronic device and storage medium provided in this embodiment play the preview video of the target live broadcast room in the first interface, and pull the live streaming data of the target live broadcast room after receiving the trigger instruction for the preview video; obtain the target frame image of the target live broadcast room through the live streaming data of the target live broadcast room; display the target frame image in the second interface until the live video of the target live broadcast room is loaded, and then play the live video of the target live broadcast room in the second interface.
- the corresponding target frame image is obtained through the live streaming data, and the target frame image is displayed before the screen image cache is loaded in the second interface, thereby avoiding a black screen during the jump from the first interface to the second interface and increasing the smoothness of the interface switching process.
- FIG1 is a diagram of an application scenario of the interface switching method provided by an embodiment of the present disclosure.
- FIG2 is a flow chart of a method for switching interfaces according to an embodiment of the present disclosure
- FIG3 is a schematic diagram of a process of switching from a first interface to a second interface of a target application provided by an embodiment of the present disclosure
- FIG4 is a second flow chart of the interface switching method provided in an embodiment of the present disclosure.
- FIG5 is a schematic diagram of a process of generating a target frame image provided by an embodiment of the present disclosure
- FIG6 is a schematic diagram of another process of generating a target frame image provided by an embodiment of the present disclosure.
- FIG7 is a flowchart of a specific implementation method of step S206 in the embodiment shown in FIG4 ;
- FIG8 is a flowchart of a specific implementation method of step S209 in the embodiment shown in FIG4 ;
- FIG9 is a third flow chart of the interface switching method provided in an embodiment of the present disclosure.
- FIG10 is a structural block diagram of an interface switching device provided by an embodiment of the present disclosure.
- FIG11 is a structural block diagram of another interface switching device provided by an embodiment of the present disclosure.
- FIG12 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure.
- FIG. 13 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure.
- user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, displayed data, etc.
- user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, displayed data, etc.
- FIG. 1 is an application scenario diagram of the interface switching method provided by the embodiment of the present disclosure.
- the interface switching method provided by the embodiment of the present disclosure can be applied to the scene of entering and exiting the live broadcast room in the application. More specifically, the interface switching method provided by the present embodiment can be applied to the application scenario of entering and exiting the live broadcast room in the application based on the Android operating system.
- the method provided by the embodiment of the present disclosure can be applied to a terminal device, such as a smart phone, and the terminal device runs applications such as live broadcast and video. In the process of the terminal device running the above application, the preview interface 11 of the target live broadcast room will be displayed in the main interface of the application, and the preview video 12 of the target live broadcast room will be played through the preview interface 11.
- the terminal device jumps from the main interface of the application to the live broadcast room interface of the target live broadcast room, and plays the live video 13 in the live broadcast room interface of the target live broadcast room, thereby realizing the process of entering the live broadcast room interface from the preview interface in the main interface of the application.
- the terminal device returns from the live broadcast room interface to the main interface of the application, and can continue to play the preview interface of the target live broadcast room through the preview interface located in the main interface, thereby achieving seamless switching between the preview interface in the main interface and the live broadcast room interface, and realizing smooth entry and exit of the live broadcast room.
- the above process is executed by the main thread (UI thread) of the application, that is, the main thread is required to "switch” the two drawing surface views, but the "switching" process is time-consuming.
- the solution in the prior art due to the time-consuming “switching” process, will appear black screen and freeze in the process of entering the live room interface from the preview interface, affecting the fluency when entering and exiting the live room.
- the disclosed embodiment provides an interface switching method to solve the above problem.
- FIG. 2 is a flow chart of an interface switching method provided in an embodiment of the present disclosure.
- the method of this embodiment can be applied in a terminal device, and the interface switching method includes:
- Step S101 Play the preview video of the target live broadcast room in the first interface, and pull the live broadcast stream data of the target live broadcast room when a trigger instruction for the preview video is received.
- the execution subject of the interface switching method provided in this embodiment can be a terminal device, such as a smart phone.
- the terminal device is installed with a target application, such as a live broadcast software client, a video software client, etc.
- the interface switching method provided in this embodiment can be stored in the target application in the form of program code and function modules.
- the terminal device runs the above target application, it executes the interface switching solution provided in this embodiment. More specifically, the method provided in this embodiment is applied to the application scenario of entering the live broadcast room interface.
- the terminal device displays a first interface.
- the first interface can be the main interface or a lower-level functional interface of the target application, or it can be a video preview interface for playing videos in the main interface or a lower-level functional interface of the target application.
- the terminal device plays the preview video of the target live broadcast room through the first interface.
- the preview video has the same content as the live video currently being played in the target live broadcast room, and the video playback progress can be the same or delayed.
- the preview video and the live video played in the target live broadcast room are generated based on the same live stream data, that is, after decoding and rendering the live stream data of the target live broadcast room, the preview video is generated and played in the first interface.
- the function of the video preview is to provide users with a preview of the content of the live broadcast room while displaying the content in the main interface and the lower-level function interface of the target application. Therefore, the preview video usually has a lower bit rate and resolution than the live video in the live broadcast room, or only displays images without playing sound. Of course, the preview video can also be exactly the same as the live video in the live broadcast room as needed, which is not specifically limited here.
- the first interface in this embodiment implements the playback function of the preview video of the target live broadcast room based on the corresponding video playback component. Before playing the preview video of the target live broadcast, it also includes the initialization of the video playback component, obtaining the video stream of the target live broadcast room, and image rendering and caching. The specific implementation method of playing the preview video of the target live broadcast room in the first interface will not be repeated here.
- the terminal device After the preview video of the target live broadcast room is displayed, if the user is interested in the live broadcast content of the target live broadcast room based on the preview video, the user will trigger the interface jump by clicking or other operations, that is, input a trigger instruction for the preview video, so that the terminal device jumps to the live broadcast room interface corresponding to the target live broadcast room. Specifically, when the terminal device receives the trigger instruction for the preview video, it first pulls the live broadcast stream data of the target live broadcast room to perform a subsequent screenshot process based on the live broadcast stream data.
- the terminal device since the preview video of the target live broadcast room itself requires the corresponding live broadcast stream data to be played, therefore, in a possible implementation method, the terminal device always continuously obtains the live broadcast stream data of the target live broadcast room, and pulling the live broadcast stream data of the target live broadcast room means that when the terminal device receives the trigger instruction for the preview video, based on the identification of the target live broadcast room, it obtains the latest acquired live broadcast stream data, and takes the latest acquired live broadcast stream data as the object to perform a subsequent screenshot process.
- Step S102 Obtain a target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room.
- the live streaming data is processed, that is, the live streaming data is rendered into corresponding image frames and captured, and the latest image frame therein is acquired, that is, the target frame image.
- the live streaming data is decoded and rendered into a screen image cache, and accessed through a drawing surface (Surface).
- the specific implementation process is prior art and will not be repeated here.
- the image capture of the live streaming data is implemented through a target function built into the target application, thereby obtaining the current frame.
- the target function is a custom screenshot function, which includes a pixel copy (PixelCopy) function.
- the pixel copy function can be called a pixel copy (PixelCopy) interface, which is an official API interface provided by the Android system.
- the drawing surface is the input parameter, which can realize the screenshot of the screen image cache, that is, the screenshot of the SurfaceView rendering, that is, the target frame image, and its corresponding data format is a bitmap.
- the pixel copy function is implemented by passing the message handler object (handler) corresponding to the main thread, and using the message handler object to make a callback message (post) to execute the corresponding screenshot function.
- the specific implementation method of the pixel copy function is a prior art and will not be repeated here.
- Step S103 Display the target frame image in the second interface until the live video of the target live room is loaded, and then play the live video of the target live room in the second interface.
- the terminal device since the terminal device responds to the trigger instruction and jumps to the second interface, it is necessary to rebuild the loading screen image cache on the second interface to realize the display of the image content in the drawing surface view, that is, there is a "gap period" after the first interface disappears and before the live video is played on the second interface, which leads to the visual "black screen” phenomenon.
- the second interface of the target application completes loading the screen image cache, that is, before the live video of the target live broadcast room is loaded, the content of the live video cannot be displayed in the second interface. Therefore, the target frame image obtained in the previous step is temporarily displayed in the second interface, so that the second interface visually displays the content of the live video, avoiding the visual effect of a black screen.
- the live video of the corresponding target live broadcast room is played on the second interface, realizing the process of switching from the first interface to the second interface.
- FIG 3 is a schematic diagram of a process of switching from a first interface of a target application to a second interface provided by an embodiment of the present disclosure.
- a first interface is displayed based on a live broadcast control, and a preview video of the target live broadcast room is played in the first interface; after the user clicks on the first interface, the terminal device first jumps to the second interface, that is, the live broadcast room interface of the target live broadcast room, and displays the target frame image obtained through the live broadcast stream data of the target live broadcast room in the second interface, and loads the screen image cache of the target live broadcast room (shown in the figure as loading the screen image cache) at the same time, until the screen image cache is loaded, the live video of the target live broadcast room starts to be played in the second interface, thereby completing the process of switching from the first interface to the second interface.
- the preview video of the target live broadcast room is played in the first interface, and upon receiving a trigger instruction for the preview video, the live streaming data of the target live broadcast room is pulled; the target frame image of the target live broadcast room is obtained through the live streaming data of the target live broadcast room; the target frame image is displayed in the second interface of the target application until the live video of the target live broadcast room is loaded, and then the live video of the target live broadcast room is played in the second interface.
- the corresponding target frame image is obtained through the live stream data, and the target frame image is displayed before the screen image cache is loaded on the second interface, thereby avoiding a black screen during the jump from the first interface to the second interface and increasing the smoothness of the interface switching process.
- FIG4 is a second flow chart of the interface switching method provided by the embodiment of the present disclosure. Based on the embodiment shown in FIG2 , this embodiment further refines the process of obtaining the target frame image, and the interface switching method includes:
- Step S201 creating a first drawing surface in a first interface of a target application.
- Step S202 downsample the live streaming data of the target live broadcast room to generate downsampled video data.
- Step S203 Draw the downsampled video data on the first drawing surface to play the preview video of the target live broadcast room.
- a first drawing surface is first created for the first interface for playing the preview video of the target live room.
- the first drawing surface may refer to an object of a drawing surface view (SurfaceView object) located in the first interface.
- SurfaceView object The process of creating and initializing SurfaceView is a prior art known to those skilled in the art and will not be described in detail here.
- the acquired live stream data of the target live room is downsampled, for example, by reducing the image resolution, frame rate, or bit rate, to generate data suitable for video preview, i.e., downsampled video data.
- the downsampled video data is image drawn, and the drawn image is displayed in the preview interface, thereby realizing the playback of the preview video of the target live room.
- Step S204 when a trigger instruction for previewing a video is received, live streaming data of the target live broadcast room is pulled, and a second drawing surface is created in a second interface of the target application.
- Step S205 Create a renderer object through the main thread of the target application.
- Step S206 Execute the target function through the renderer object to process the live stream data and obtain the target frame image, wherein the target function includes a pixel copy function, and the pixel copy function realizes the immediate generation of the target frame image by receiving the rewritten target method.
- the terminal device when the terminal device receives a trigger instruction for previewing the video, triggering a jump to the live studio interface, that is, the second interface, first, the second interface of the target application is started, and a second drawing surface is created in the second interface.
- the second drawing surface is similar to the first drawing surface, and both are objects of the drawing surface view (SurfaceView object). This process can be performed by the main thread of the target application. Execute, and the specific process steps are described in detail.
- a renderer object (ThreadedRenderer) is created through the main thread of the target application, and the renderer object executes the corresponding target function to process the live stream data to obtain the target frame image.
- the target function is a custom function built into the target application, and the target function includes a pixel copy (PixelCopy) function.
- the pixel copy interface Through the pixel copy interface, with the drawing surface (Surface) as the input parameter, it is possible to take a screenshot of the screen image cache, that is, a screenshot of the SurfaceView rendering, so as to obtain the target frame image, and the data format corresponding to the target frame image is a bitmap.
- the pixel copy function is implemented by passing in the message handler object (handler) corresponding to the main thread, and using the message handler object to make a callback message (post) to execute the corresponding screenshot function.
- the target function includes a pixel copy function, and the pixel copy function realizes the immediate generation of the target frame image by receiving the overridden target method.
- the target method is, for example, a specific time message sending method (sendMessageAtTime method).
- the screenshot function can be executed immediately, even if the execution message (runnable) in the callback message is executed immediately, without the need to execute the screenshot function through the message queue (MessageQueue) as in the solution in the related art, thereby avoiding the above-mentioned callback message (post)
- the execution time becomes longer and uncontrollable, so that the target frame image can be generated in time, and the black screen state in the process of switching from the first interface to the second interface is blocked.
- FIG5 is a schematic diagram of a process of generating a target frame image provided by an embodiment of the present disclosure. As shown in FIG5 , in related technologies, the process of generating a target frame image includes:
- ThreadedRenderer is the renderer object, and copySurfaceInto is the target function. Further, in the target function, listenerThread.post is called, listenerThread is the daemon thread, and post is the callback message. Further, in the callback message, the sendMessageDelayed function is called, and sendMessageDelayed is a delayed sending function (interface). Through this delayed sending function, the execution message is inserted into the specified delayed position in the message queue. Further, the delayed sending function is based on the sendMessageAtTime function, that is, the specific time message sending method is implemented, and the specific time message sending method is used to send messages at a determined time. Afterwards, the enqueueMessage function in the sendMessageAtTime function is called.
- the enqueueMessage function is used to insert the message.
- the runnable execution message
- the screenshot function is executed to generate the target frame image.
- FIG6 is a schematic diagram of another process of generating a target frame image provided by an embodiment of the present disclosure. As shown in FIG5 , in this embodiment, the process of generating a target frame image includes:
- step S206 includes:
- Step S2061 calling the drawing surface access interface to obtain the screen image cache based on the drawing surface view corresponding to the live streaming data.
- Step S2062 Sending a message at a specific time using the screen image cache and the message processor object The method is used as input, and the pixel copy function is called to generate the target frame image. Among them, the specific time message sending method of the message processor object is overwritten, and the specific time message sending method is used to immediately execute the execution message corresponding to the pixel copy function.
- the drawing surface view is surfaceView
- the screen image cache based on the drawing surface view is the cached image rendered by surfaceView.
- the drawing surface access interface is surfaceHolder, which stores a reference to the Surface object.
- the screen image cache corresponding to the Surface can be obtained and accessed. That is, the screen image cache is obtained through surfaceHolder.
- the specific implementation method is to obtain the screen image cache by calling surfaceHolder.surface. Afterwards, the above-mentioned screen image cache and the specific time message sending method are input, and the pixel copy function (PixelCopy.request) is called.
- the specific time message sending method of the message processor object is overridden, and the specific time message sending method is used to immediately execute the execution message corresponding to the pixel copy function.
- the overriding method of the specific time message sending function includes:
- the rewritten specific moment message sending function implemented by the above exemplary code implementation method can realize the immediate execution of the execution message corresponding to the pixel copy function, so as to achieve the purpose of generating the target frame image.
- the code implementation in the above code lines conforms to the development language (such as Java) specification for developing Android applications, and the specific meanings are no longer repeated one by one.
- the rewritten specific moment message sending function can also include other implementation methods, which are no longer given examples here. Any implementation method that can realize the immediate execution of the execution message corresponding to the pixel copy function and the immediate execution of the screenshot function for SurfaceView is acceptable.
- Step S207 Displaying the target frame image in the second interface of the target application.
- Step S208 Obtain the screen image cache through the handle of the screen image cache.
- Step S209 Draw the screen image cache in the second drawing surface to play the live video of the target live broadcast room.
- the target frame image is displayed in the second interface, and at the same time, the handle of the screen image cache, that is, the surface, is obtained, and the live video data is obtained through the surface.
- the handle of the screen image cache can be called through the drawing surface access interface to obtain the screen image cache, that is, the live video data used to realize live video playback.
- the above process is loading The specific implementation of the screen image cache process has been introduced in the embodiment shown in Figure 2, and will not be repeated here. Afterwards, the screen image cache is drawn in the second drawing surface to achieve the purpose of playing the live video of the target live room.
- step S209 includes:
- Step S2091 Obtain the live video timestamp corresponding to the target frame image.
- Step S2092 According to the live video timestamp, obtain the corresponding target video frame from the screen image cache.
- Step S2093 Starting from the target video frame of the screen image cache, the screen image cache is drawn in the second drawing surface to play the live video of the target live broadcast room starting from the position of the target frame image.
- the screen image cache after obtaining the screen image cache, further obtain the video live broadcast timestamp corresponding to the target frame image, which can be obtained through the reference information in the live streaming data.
- the specific implementation steps are repeated.
- the video live broadcast timestamp corresponding to the target frame image find the video frame whose playback timestamp is the same or similar to the video live broadcast timestamp from the screen image cache, that is, the target video frame. Since the timestamps corresponding to the target video frame and the target frame image are the same or similar, it can ensure that the image content in the target video frame is the same or similar to the video content of the target frame image.
- the preview video and the live video can be seamlessly connected in the process of the terminal device switching from the first interface to the second interface, avoiding the skipping of part of the live content due to the time-consuming switching process, and improving the viewing effect.
- Step S301 In the second interface of the target application, the live video of the target live room is played, and after receiving an exit instruction for the target live room, the live stream data of the target live room is pulled.
- Step S302 Obtain a target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room.
- Step S303 Display the target frame image in the first interface until the preview video of the target live broadcast room is loaded, and then play the preview video of the target live broadcast room in the first interface.
- the interface switching method provided in this embodiment can be applied to the application scenario of launching a live broadcast room.
- the second interface is the live broadcast room in the target application.
- the terminal device receives the exit instruction for the target live broadcast room
- the terminal device pulls the live broadcast stream data of the target live broadcast room, and generates a target frame image based on the live broadcast stream data of the target live broadcast room, and then returns to the main page of the target application, and displays the target frame image in the first interface in the main page, that is, the live broadcast room preview interface, until the preview video of the target live broadcast room is loaded, and then plays the preview video of the target live broadcast room in the first interface, thereby completing the process of switching from displaying the second interface to displaying the first interface, that is, the process of exiting the live broadcast room.
- the target frame image of the target live broadcast room is obtained through the live broadcast stream data of the target live broadcast room, including: creating a renderer object through the main thread of the target application; executing the target function through the renderer object, processing the live broadcast stream data, and obtaining the target frame image, wherein the target function includes a pixel copy function, and the pixel copy function realizes the immediate generation of the target frame image by receiving the rewritten target method.
- the target method is a message sending method at a specific moment.
- the steps in step S302 execute the target function, process the live stream data, and obtain the target frame image
- its specific implementation method includes: calling the drawing surface access interface to obtain the screen image cache based on the drawing surface view corresponding to the live stream data; taking the screen image cache and the specific time message sending method of the message processor object as input, calling the pixel copy function to generate the target frame image, wherein the specific time message sending method of the message processor object is overwritten, and the specific time message sending method is used to immediately execute the execution message corresponding to the pixel copy function.
- the corresponding target frame image is obtained through the live streaming data, and the target frame image is displayed before the first interface has loaded the screen image cache, thereby avoiding the problem of a black screen in the first interface during the jump from the second interface to the first interface, and increasing the smoothness of the interface switching process.
- the process of generating the target frame image (step S302) involved in this embodiment is the same as the specific implementation method of generating the target frame image in the embodiment corresponding to Figures 2 to 8, that is, the method of generating the target frame image in the embodiment corresponding to Figures 2 to 8 can also be partially or completely applied to this embodiment.
- the specific implementation method can refer to the relevant introduction in the embodiment corresponding to Figures 2 to 8, which will not be repeated here.
- FIG. 10 is a structural block diagram of an interface switching device provided by an embodiment of the present disclosure.
- the interface switching device 4 includes:
- the first playback unit 41 is used to play the preview video of the target live broadcast room in the first interface, and pull the live broadcast stream data of the target live broadcast room when receiving a trigger instruction for the preview video;
- the first processing unit 42 is used to obtain a target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room;
- the second playback unit 43 is used to display the target frame image in the second interface of the target application until the live video of the target live room is loaded, and then play the live video of the target live room in the second interface.
- the first processing unit 42 is specifically used to: create a renderer object through the main thread of the target application; execute the target function through the renderer object, process the live stream data, and obtain the target frame image, wherein the target function includes a pixel copy function, and the pixel copy function realizes the immediate generation of the target frame image by receiving the rewritten target method.
- the target method is a message sending method at a specific moment.
- the first processing unit 42 when the first processing unit 42 executes the target function, processes the live stream data, and obtains the target frame image, it is specifically used to: call the drawing surface access interface to obtain the screen image cache based on the drawing surface view corresponding to the live stream data; take the screen image cache and the specific time message sending method of the message processor object as input, call the pixel copy function, and generate the target frame image, wherein the specific time message sending method of the message processor object is overwritten, and the specific time message sending method is used to immediately execute the execution message corresponding to the pixel copy function.
- the first playback unit 41 when the first playback unit 41 plays the preview video of the target live broadcast room in the first interface, it is specifically used to: create a first drawing surface in the first interface; downsample the live stream data of the target live broadcast room to generate downsampled video data; draw the downsampled video data on the first drawing surface to play the preview video of the target live broadcast room.
- the second playback unit 43 when a trigger instruction for a preview video is received, the second playback unit 43 is further used to: create a second drawing surface in the second interface of the target application; when the second playback unit 43 plays the live video of the target live room in the second interface, it is specifically used to: obtain the screen image cache through the handle of the screen image cache; draw the screen image cache in the second drawing surface to play the live video of the target live room.
- the second playback unit 43 when the second playback unit 43 draws the screen image cache in the second drawing surface to play the live video of the target live broadcast room, it is specifically used to: obtain the video live broadcast timestamp corresponding to the target frame image; obtain the corresponding target video frame from the screen image cache according to the video live broadcast timestamp; start from the target video frame of the screen image cache, draw the screen image cache in the second drawing surface to play the live video of the target live broadcast room from the position of the target frame image; frequency.
- the first playback unit 41, the first processing unit 42, and the second playback module 43 are connected in sequence.
- the interface switching device 4 provided in the embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
- FIG. 11 is a structural block diagram of another interface switching device provided by the embodiment of the present disclosure.
- the interface switching device 5 includes:
- the third playback unit 51 plays the live video of the target live room in the second interface of the target application, and pulls the live streaming data of the target live room after receiving the exit instruction for the target live room;
- the second processing unit 52 obtains a target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room;
- the fourth playback unit 53 displays the target frame image in the first interface until the preview video of the target live broadcast room is loaded, and then plays the preview video of the target live broadcast room in the first interface.
- the third playback unit 51, the second processing unit 52, and the fourth playback unit 53 are connected in sequence.
- the interface switching device 5 provided in the embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
- FIG12 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG12 , the electronic device 6 includes:
- a processor 61 and a memory 62 communicatively connected to the processor 61;
- the memory 62 stores computer executable instructions
- the processor 61 executes the computer-executable instructions stored in the memory 62 to implement the interface switching method in the embodiments shown in Figures 2 to 9.
- processor 61 and the memory 62 are connected via a bus 63 .
- An embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored.
- the computer execution instructions are executed by a processor, they are used to implement the interface switching method provided in any of the embodiments corresponding to Figures 2 to 9 of the present disclosure.
- the present disclosure provides a computer program product, including a computer program.
- the program is executed by the processor, the interface switching method in the embodiments shown in Figures 2 to 9 is implemented.
- FIG13 it shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure
- the electronic device 900 may be a terminal device or a server.
- the terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (Portable Media Players, PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
- PDAs personal digital assistants
- PMPs portable multimedia players
- vehicle terminals such as vehicle navigation terminals
- fixed terminals such as digital TVs, desktop computers, etc.
- the electronic device shown in FIG13 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
- the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903.
- a processing device e.g., a central processing unit, a graphics processing unit, etc.
- RAM random access memory
- Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903.
- the processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904.
- An input/output (I/O) interface 905 is also connected to the bus 904.
- the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909.
- the communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data.
- FIG. 13 shows an electronic device 900 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
- an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
- the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902.
- the processing device 901 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
- the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
- Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
- a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.
- a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier.
- This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
- the computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device.
- the program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
- the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
- the computer-readable medium carries one or more programs.
- the electronic device executes the method shown in the above embodiment.
- Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages.
- the program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server.
- the remote computer may be connected via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN).
- WAN Wide Area Network—connects to a user's computer, or it can connect to an external computer (for example, through the Internet using an Internet service provider).
- each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function.
- the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
- each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
- the units involved in the embodiments described in the present disclosure may be implemented by software or hardware.
- the name of a unit does not limit the unit itself in some cases.
- the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
- exemplary types of hardware logic components include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
- FPGAs field programmable gate arrays
- ASICs application specific integrated circuits
- ASSPs application specific standard products
- SOCs systems on chips
- CPLDs complex programmable logic devices
- a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment.
- a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing.
- a more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read-only memory
- EPROM or flash memory erasable programmable read-only memory
- CD-ROM portable compact disk read-only memory
- CD-ROM compact disk read-only memory
- magnetic storage device or any suitable combination of the foregoing.
- a method for switching interfaces includes:
- the method of acquiring the target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room includes: creating a renderer object through the main thread of the target application; executing a target function through the renderer object to process the live broadcast stream data to obtain the target frame image, wherein the target function includes a pixel copy function, and the pixel copy function realizes the immediate generation of the target frame image by receiving the rewritten target method.
- the target method is a method for sending a message at a specific moment.
- the execution target function processes the live stream data to obtain the target frame image, including: calling a drawing surface access interface to obtain a screen image cache based on a drawing surface view corresponding to the live stream data; taking the screen image cache and a specific time message sending method of a message processor object as input, calling a pixel copy function to generate a target frame image, wherein the specific time message sending method of the message processor object is overridden, and the specific time message sending method is used to immediately execute an execution message corresponding to the pixel copy function.
- playing the preview video of the target live broadcast room in the first interface includes: creating a first drawing surface in the first interface; downsampling the live stream data of the target live broadcast room to generate downsampled video data; drawing the downsampled video data on the first drawing surface to play the preview video of the target live broadcast room.
- after receiving a trigger instruction for the preview video it also includes: creating a second drawing surface in a second interface; playing the live video of the target live room in the second interface, including: obtaining the screen image cache through the handle of the screen image cache; drawing the screen image cache in the second drawing surface to play the live video of the target live room.
- the screen image buffer is drawn in the second The live video of the target live broadcast room is played in the drawing surface, including: obtaining the video live broadcast timestamp corresponding to the target frame image; obtaining the corresponding target video frame from the screen image cache according to the video live broadcast timestamp; starting from the target video frame of the screen image cache, drawing the screen image cache in the second drawing surface to play the live video of the target live broadcast room from the position of the target frame image.
- an interface switching method comprising:
- the live video of the target live room is played, and after receiving an exit instruction for the target live room, the live stream data of the target live room is pulled; the target frame image of the target live room is obtained through the live stream data of the target live room; the target frame image is displayed in the first interface of the target application until the preview video of the target live room is loaded, and then the preview video of the target live room is played in the first interface.
- an interface switching device comprising:
- a first playback unit is used to play the preview video of the target live broadcast room in the first interface, and after receiving a trigger instruction for the preview video, pull the live broadcast stream data of the target live broadcast room;
- a first processing unit is used to obtain a target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room;
- the second playback unit is used to display the target frame image in a second interface until the live video of the target live broadcast room is loaded, and then play the live video of the target live broadcast room in the second interface.
- the first processing unit is specifically used to: create a renderer object through the main thread of the target application; execute a target function through the renderer object to process the live stream data to obtain the target frame image, wherein the target function includes a pixel copy function, and the pixel copy function realizes the immediate generation of the target frame image by receiving the overwritten target method.
- the target method is a method for sending a message at a specific moment.
- the first processing unit when the first processing unit executes the target function and processes the live streaming data to obtain the target frame image, it is specifically used to: call the drawing A drawing surface access interface is used to obtain a screen image cache based on a drawing surface view corresponding to the live streaming data; a pixel copy function is called with the screen image cache and a specific time message sending method of a message processor object as input to generate a target frame image, wherein the specific time message sending method of the message processor object is overridden, and the specific time message sending method is used to immediately execute an execution message corresponding to the pixel copy function.
- the first playback unit when the first playback unit plays the preview video of the target live broadcast room in the first interface, it is specifically used to: create a first drawing surface in the first interface; downsample the live stream data of the target live broadcast room to generate downsampled video data; draw the downsampled video data on the first drawing surface to play the preview video of the target live broadcast room.
- the second playback unit after receiving a trigger instruction for the preview video, is further used to: create a second drawing surface in a second interface; when the second playback unit plays the live video of the target live room in the second interface, the second playback unit is specifically used to: obtain the screen image cache through the handle of the screen image cache; draw the screen image cache in the second drawing surface to play the live video of the target live room.
- the second playback unit when the second playback unit draws the screen image cache in the second drawing surface to play the live video of the target live room, it is specifically used to: obtain the video live timestamp corresponding to the target frame image; obtain the corresponding target video frame from the screen image cache according to the video live timestamp; starting from the target video frame of the screen image cache, draw the screen image cache in the second drawing surface to play the live video of the target live room from the position of the target frame image.
- an interface switching device comprising:
- a third playback unit plays the live video of the target live room in the second interface of the target application, and pulls the live streaming data of the target live room after receiving an exit instruction for the target live room;
- a second processing unit acquires a target frame image of the target live broadcast room through the live broadcast stream data of the target live broadcast room;
- the fourth playback unit displays the target frame image in the first interface of the target application until the preview video of the target live broadcast room is loaded, and then plays the preview video of the target live broadcast room in the first interface.
- an electronic device comprising: a processor, and a memory communicatively connected to the processor;
- the memory stores computer-executable instructions
- the processor executes the computer-executable instructions stored in the memory to implement the interface switching method described in the first aspect and various possible designs of the first aspect, or to implement the interface switching method described in the second aspect and various possible designs of the second aspect.
- a computer-readable storage medium stores computer execution instructions.
- the interface switching method described in the first aspect and various possible designs of the first aspect is implemented, or the interface switching method described in the second aspect and various possible designs of the second aspect is implemented.
- an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the interface switching method described in the first aspect and various possible designs of the first aspect, or implements the interface switching method described in the second aspect and various possible designs of the second aspect.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本公开实施例提供一种界面切换方法、装置、电子设备及存储介质,通过在第一界面内播放目标直播间的预览视频,并在接收到针对预览视频的触发指令的情况下,拉取目标直播间的直播流数据;通过目标直播间的直播流数据,获取目标直播间的目标帧图像;在目标应用程序的第二界面内显示目标帧图像,直至目标直播间的直播视频加载完成后,在第二界面内播放目标直播间的直播视频。在由预览视频所在的第一界面跳转至直播视频所在的第二界面的过程中,通过直播流数据获得对应的目标帧图像,并在第二界面未加载完屏幕图像缓存之前,显示该目标帧图像,从而避免由第一界面向第二界面跳转过程中的黑屏,增加界面切换过程的流畅度。
Description
本申请要求2023年6月14日递交的、标题为“界面切换方法、装置、电子设备及存储介质”、申请号为202310709132.0的中国发明专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本公开实施例涉及互联网技术领域,尤其涉及一种界面切换方法、装置、电子设备及存储介质。
在互联网应用中,通过在应用界面内设置直播组件,在特定区域内形成直播视频的预览界面,从而使应用程序在展示应用内的基础信息的同时,同时播放特定直播间的预览视频,之后,用户可以通过触发直播组件,来切换至对应的直播间界面,从而实现视频界面的快速切换。
然而,在实际应用过程中,当由预览界面切换至直播间界面的过程中,存在卡顿和黑屏的问题,影响界面切换过程的流畅度。
发明内容
本公开实施例提供一种界面切换方法、装置、电子设备及存储介质,以克服界面切换过程中存在卡顿和黑屏的问题。
第一方面,本公开实施例提供一种界面切换方法,包括:在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令后,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。
第二方面,本公开实施例提供一种界面切换方法,包括:在目标应用程
序的第二界面内,播放目标直播间的直播视频,并在接收到针对所述目标直播间的退出指令后,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在所述目标应用程序的第一界面内显示所述目标帧图像,直至所述目标直播间的预览视频加载完成后,在所述第一界面内播放目标直播间的预览视频。
第三方面,本公开实施例提供一种界面切换装置,包括:第一播放单元,用于在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令后,拉取所述目标直播间的直播流数据;第一处理单元,用于通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;第二播放单元,用于在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。
第四方面,本公开实施例提供一种界面切换装置,包括:第三播放单元,在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对所述目标直播间的退出指令后,拉取所述目标直播间的直播流数据;第二处理单元,通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;第四播放单元,在所述目标应用程序的第一界面内显示所述目标帧图像,直至所述目标直播间的预览视频加载完成后,在所述第一界面内播放目标直播间的预览视频。
第五方面,本公开实施例提供一种电子设备,包括:处理器,以及与所述处理器通信连接的存储器;所述存储器存储计算机执行指令;所述处理器执行所述存储器存储的计算机执行指令,以实现如上第一方面以及第一方面各种可能的设计所述的界面切换方法,或者,实现如上第二方面以及第二方面各种可能的设计所述的界面切换方法。
第六方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的界面切换方法,或者,实现如上第二方面以及第二方面各种可能的设计所述的界面切换方法。
第七方面,本公开实施例提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能的设计所述的界面切换方法,或者,实现如上第二方面以及第二方面各种可能的
设计所述的界面切换方法。
本实施例提供的界面切换方法、装置、电子设备及存储介质,通过在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令后,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。在由预览视频所在的第一界面跳转至直播视频所在的第二界面的过程中,通过直播流数据获得对应的目标帧图像,并在第二界面未加载完屏幕图像缓存之前,显示该目标帧图像,从而避免由第一界面向第二界面跳转过程中的黑屏,增加界面切换过程的流畅度。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的界面切换方法的一种应用场景图;
图2为本公开实施例提供的界面切换方法的流程示意图一;
图3为本公开实施例提供的一种由目标应用程序的第一界面切换至第二界面的过程示意图;
图4为本公开实施例提供的界面切换方法的流程示意图二;
图5为本公开实施例提供的一种生成目标帧图像的过程示意图;
图6为本公开实施例提供的另一种生成目标帧图像的过程示意图;
图7为图4所示实施例中步骤S206的具体实现方式的流程图;
图8为图4所示实施例中步骤S209的具体实现方式的流程图;
图9为本公开实施例提供的界面切换方法的流程示意图三;
图10为本公开实施例提供的一种界面切换装置的结构框图;
图11为本公开实施例提供的另一种界面切换装置的结构框图;
图12为本公开实施例提供的一种电子设备的结构示意图;
图13为本公开实施例提供的电子设备的硬件结构示意图。
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
需要说明的是,本公开所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。
下面对本公开实施例的应用场景进行解释:
图1为本公开实施例提供的界面切换方法的一种应用场景图,本公开实施例提供的界面切换方法,可以应用于应用程序中进入和退出直播间的场景。更具体地,本实施例提供的界面切换方法,可以适用于基于安卓(andriod)操作系统的应用程序中进入和退出直播间的应用场景。如图1所示,本公开实施例提供的方法,可以应用于终端设备,例如智能手机,终端设备上运行有例如直播、视频类的应用程序。在终端设备运行上述应用程序的过程中,会在应用程序的主界面内,显示目标直播间的预览界面11,并通过该预览界面11播放该目标直播间的预览视频12。之后,当用户点选该预览界面11后,终端设备从应用程序的主界面跳转至该目标直播间的直播间界面,并在该目标直播间的直播间界面内播放直播视频13,从而实现由应用程序主界面内的预览界面进入直播间界面的过程。类似地,当用户输入退出指令后(例如点击直播间界面内的退出控件),终端设备从直播间界面退回至应用程序的主界面,并可以通过位于主界面内的预览界面,继续播放该目标直播间的预览界面,从而实现主界面内的预览界面与直播间界面之间的无缝切换,实现直播间的流畅进出。
然而,在实际使用过程中,以安卓操作系统为例,在应用程序的主界面中显示直播间的预览视频的预览界面,需要激活预览界面所对应的绘图表面
视图(SurfaceView),之后将目标直播间对应的预览视频的图像数据缓存在该绘图表面视图对应的屏幕图像缓存中,并通过绘图表面(Surface)作为句柄来对屏幕图像缓存进行访问,从而基于实现预览视频的图像绘制;而在进入直播间界面后,需要关闭将该预览界面对应的绘图表面视图,并销毁预览界面所对应的绘图表面视图中的屏幕图像缓存,之后再激活直播间界面对应的绘图表面视图、将目标直播间对应的直播视频的图像数据缓存在该绘图表面视图对应的屏幕图像缓存中并进行绘制。上述过程由应用程序的主线程(UI线程)来执行,即需要主线程对两个绘图表面视图进行“切换”,但该“切换”过程存在一定耗时,现有技术中的方案,由于存在上述“切换”过程导致的耗时,因此在由预览界面进入直播间界面的过程中,会出现黑屏、卡顿的现象,影响进、退直播间时的流畅度。本公开实施例提供一种界面切换方法以解决上述问题。
参考图2,图2为本公开实施例提供的界面切换方法的流程示意图一。本实施例的方法可以应用在终端设备中,该界面切换方法包括:
步骤S101:在第一界面内播放目标直播间的预览视频,并在接收到针对预览视频的触发指令的情况下,拉取目标直播间的直播流数据。
示例性地,参考图1所示的应用场景示意图,本实施例所提供的界面切换方法的执行主体可以为终端设备,例如智能手机。终端设备内安装有目标应用程序,该目标应用程序例如为直播软件客户端、视频软件客户端等。本实施例提供的该界面切换方法可以以程序代码、功能模块的形式存储在目标应用程序中,终端设备在运行上述目标应用程序的过程中,执行本实施例提供的界面切换方案,更具体地,本实施例提供的方法,应用于进入直播间界面的应用场景。
具体地,终端设备在运行目标应用程序后,显示第一界面,第一界面可以为目标应用程序的主界面、下级功能界面,也可以为目标应用程序的主界面、下级功能界面中用于播放视频的视频预览界面。终端设备通过第一界面,播放目标直播间的预览视频。其中,预览视频与目标直播间当前播放的直播视频的内容相同、视频播放进度可以相同或延后。预览视频与目标直播间内播放的直播视频,基于相同的直播流数据生成,即通过对目标直播间的直播流数据进行解码、渲染等步骤后,生成预览视频在第一界面内播放。由于预
览视频的作用是在展示目标应用程序的主界面、下级功能界面中的内容的同时,向用户提供直播间内容的预览,因此,预览视频相比于直播间的直播视频通常码率、分辨率较低,或者仅显示图像而不播放声音,当然,根据需要预览视频也可以与直播间内直播视频完全相同,此处不具体限定。本实施例中的第一界面基于对应的视频播放组件实现目标直播间的预览视频的播放功能,在播放目标直播的预览视频前,还包括视频播放组件的初始化、获取目标直播间的视频流,以及图像渲染和缓存等步骤,此处不再对在第一界面内播放目标直播间的预览视频的具体实现方式进行赘述。
进一步地,在该目标直播间的预览视频被显示后,若用户根据该预览视频,对该目标直播间的直播内容感兴趣,会通过点击等操作方式,去触发界面跳转,即输入针对预览视频的触发指令,从而使终端设备跳转至该目标直播间对应的直播间界面。具体地,终端设备在接收到针对预览视频的触发指令的情况下,首先拉取目标直播间的直播流数据,以基于该直播流数据进行后续的截图过程。其中,由于目标直播间的预览视频本身需要对应的直播流数据才能播放,因此,一种可能的实现方式中,终端设备始终在不间断地获取目标直播间的直播流数据,拉取目标直播间的直播流数据是指,终端设备在接收到针对预览视频的触发指令的情况下,基于目标直播间的标识,获取最新获取的直播流数据,并以该最新获取的直播流数据为对象,进行后续的截图过程。
步骤S102:通过目标直播间的直播流数据,获取目标直播间的目标帧图像。
示例性地,在获取目标直播间的直播流数据后,针对该直播流数据进行处理,即将直播流数据渲染为对应的图像帧并进行截取,获取其中最新得到的图像帧,即目标帧图像。其中,对直播流数据进行解码并渲染屏幕图像缓存,并通过绘图表面(Surface)进行访问,具体实现过程为现有技术,此处不再赘述。在获得屏幕图像缓存后,在一种可能的实现方式中,通过目标应用程序中内置的目标函数,来实现对直播流数据的图像截取,从而得到当前帧截。具体地,该目标函数是一种自定义的截图函数,该目标函数中包含有像素拷贝(PixelCopy)函数。其中,像素拷贝函数可以称为像素拷贝(PixelCopy)接口,是安卓系统提供的官方API接口,通过像素拷贝接口,以绘图表面
(Surface)为输入参数,可以实现对屏幕图像缓存的截图,也即针对SurfaceView渲染的截图,即目标帧图像,其对应的数据格式为位图(bitmap)。其中,更具体地,像素拷贝函数的实现方式,是通过传入主线程对应的消息处理器对象(handler),并利用消息处理器对象做回调消息(post),来执行对应的截图功能。像素拷贝函数的具体实现方法为现有技术,此处不再对此进行赘述。
步骤S103:在第二界面内显示目标帧图像,直至目标直播间的直播视频加载完成后,在第二界面内播放目标直播间的直播视频。
示例性地,由于终端设备响应触发指令,跳转至第二界面后,需要在第二界面重建加载屏幕图像缓存,以实现绘图表面视图中图像内容的显示,也即,在将第一界面消失后、在第二界面播放直播视频前,存在一个“空档期”,导出视觉上出现“黑屏”的现象。在目标应用程序的第二界面加载完毕屏幕图像缓存前,即目标直播间的直播视频加载完成之前,该第二界面内无法显示直播视频的内容,因此,将之前步骤中得到的目标帧图像暂时显示在第二界面内,从而使第二界面在视觉上显示有直播视频中的内容,避免出现黑屏的视觉效果。直至当第二界面加载完毕屏幕图像缓存后,在第二界面播放对应的目标直播间的直播视频,实现由第一界面切换至第二界面的过程。
图3为本公开实施例提供的一种由目标应用程序的第一界面切换至第二界面的过程示意图,如图3所示,在目标应用程序的主界面内,基于直播控件显示第一界面,该第一界面内播放目标直播间的预览视频;在用户点击该第一界面后,终端设备首先跳转至第二界面,即目标直播间的直播间界面,并在该第二界面内显示经目标直播间的直播流数据得到的目标帧图像,同时加载目标直播间的屏幕图像缓存(图中示为加载屏幕图像缓存),直至屏幕图像缓存加载完毕后,在第二界面内开始播放目标直播间的直播视频,从而完成由第一界面切换至第二界面的过程。
在本实施例中,通过在第一界面内播放目标直播间的预览视频,并在接收到针对预览视频的触发指令的情况下,拉取目标直播间的直播流数据;通过目标直播间的直播流数据,获取目标直播间的目标帧图像;在目标应用程序的第二界面内显示目标帧图像,直至目标直播间的直播视频加载完成后,在第二界面内播放目标直播间的直播视频。在由预览视频所在的第一界面跳
转至直播视频所在的第二界面的过程中,通过直播流数据获得对应的目标帧图像,并在第二界面未加载完屏幕图像缓存之前,显示该目标帧图像,从而避免由第一界面向第二界面跳转过程中的黑屏,增加界面切换过程的流畅度。
参考图4,图4为本公开实施例提供的界面切换方法的流程示意图二。本实施例在图2所示实施例的基础上,进一步对获得目标帧图像的过程进行细化,该界面切换方法包括:
步骤S201:在目标应用程序的第一界面内,创建第一绘图表面。
步骤S202:对目标直播间的直播流数据进行降采样,生成降采样视频数据。
步骤S203:将降采样视频数据绘制在第一绘图表面,以播放目标直播间的预览视频。
示例性地,在目标应用程序运行后,首先针对用于播放目标直播间的预览视频的第一界面,创建第一绘图表面。具体地,第一绘图表面,可以是指位于第一界面内的一个绘图表面视图的对象(SurfaceView对象),创建SurfaceView并进行初始化的过程为本领域技术人员知晓的现有技术,此处不再赘述。之后,对获取的目标直播间的直播流数据进行降采样,例如降低图像分辨率、帧率,或者码率等方式,来生成适合于视频预览的数据,即降采样视频数据。之后,基于SurfaceView的具体实现方式,对降采样视频数据进行图像绘制,并将绘制好的图像显示在预览界面内,从而实现对目标直播间的预览视频的播放。
步骤S204:在接收到针对预览视频的触发指令的情况下,拉取目标直播间的直播流数据,并在目标应用程序的第二界面内,创建第二绘图表面。
步骤S205:通过目标应用程序的主线程,创建渲染器对象。
步骤S206:通过渲染器对象,执行目标函数,对直播流数据进行处理,得到目标帧图像。其中,目标函数中包括像素拷贝函数,像素拷贝函数通过接收重写后的目标方法来实现目标帧图像的立即生成。
示例性地,在终端设备接收到针对预览视频的触发指令,触发向直播间界面,即第二界面的跳转动作,首先,启动目标应用程序的第二界面,并在第二界面内创建第二绘图表面,第二绘图表面与第一绘图表面类似,均为绘图表面视图的对象(SurfaceView对象),该过程可以由目标应用程序的主线程
执行,具体过程步骤赘述。
之后,通过目标应用程序的主线程,创建渲染器对象(ThreadedRenderer),并由该渲染器对象执行对应的目标函数,对直播流数据进行处理,得到目标帧图像。其中,目标函数为目标应用程序内置的自定义函数,该目标函数中包含有像素拷贝(PixelCopy)函数。其中,通过像素拷贝接口,以绘图表面(Surface)为输入参数,可以实现对屏幕图像缓存的截图,也即针对SurfaceView渲染的截图,从而得到目标帧图像,目标帧图像对应的数据格式为位图(bitmap)。其中,更具体地,像素拷贝函数的实现方式,是通过传入主线程对应的消息处理器对象(handler),并利用消息处理器对象做回调消息(post),来执行对应的截图功能。
相关技术中,通过像素拷贝函数来实现针对绘图表面视图(SurfaceView)的截图,需要使用主线程的消息处理器对象(handler)作为输入参数,并利用消息处理器对象做回调消息(post)来实现截图功能。然而,在进、退直播间的场景下,很多复杂、耗时的逻辑和任务需要由主线程执行,因此,会导致回调消息(post)的执行时间变长,且无法控制。这进一步导致截图功能的实现会出现延迟,在目标应用程序由第一界面切换至第二界面的过程中,若截图功能出现延迟,则会导致无法及时生成目标帧图像并进行显示,无法实现对黑屏状态的及时遮挡,造成卡顿和流畅度下降的问题,影响用户使用体验。
针对上述问题,本实施例中,目标函数中包括像素拷贝函数,像素拷贝函数通过接收重写(override)后的目标方法来实现目标帧图像的立即生成。其中,目标方法例如为特定时刻消息发送方法(sendMessageAtTime方法)。通过重新该特定时刻消息发送方法,可以实现截图功能的即可执行,即使回调消息中的执行消息(runnable)立刻执行,而无需像相关技术中的方案,通过消息队列(MessageQueue)来执行截图功能,从而避免上述回调消息(post)的执行时间变长,且无法控制的问题,使目标帧图像能够及时生成,实现对第一界面切换至第二界面过程中的黑屏状态的遮挡。
图5为本公开实施例提供的一种生成目标帧图像的过程示意图,如图5所示,在相关技术中,生成目标帧图像的流程包括:
S01、执行ThreadedRenderer.copySurfaceInto。
S02、执行listenerThread.post。
S03、执行sendMessageDelayed。
S04、执行sendMessageAtTime。
S05、执行enqueueMessage。
S06、通过消息队列执行runnable,生成目标帧图像。
其中,ThreadedRenderer为渲染器对象,copySurfaceInto为目标函数。进一步地,在目标函数内,调用listenerThread.post,listenerThread为守护线程,post为回调消息。进一步地,在回调消息内,调用sendMessageDelayed函数,sendMessageDelayed为延迟发送函数(接口),通过这个延迟发送函数,将执行消息插入到消息队列中指定的延迟位置。进一步地,延迟发送函数内基于sendMessageAtTime函数,即特定时刻消息发送方法实现,该特定时刻消息发送方法用于在确定的时间发送消息。之后,调用sendMessageAtTime函数中的enqueueMessage函数,enqueueMessage函数用于插入消息,通过enqueueMessage函数,将runnable(执行消息)插入消息队列,等待执行。最后,在消息队列执行到runnable时,执行截图功能,生成目标帧图像。
图6为本公开实施例提供的另一种生成目标帧图像的过程示意图,如图5所示,本实施例中,生成目标帧图像的流程包括:
S01、执行ThreadedRenderer.copySurfaceInto。
S02、执行listenerThread.post。
S03、执行sendMessageDelayed。
S14、执行重写后的sendMessageAtTime。
S15、执行runnable,生成目标帧图像。
示例性地,结合对照图5所示的过程示意图,在执行完相同的步骤S01-S03后,执行重写后的sendMessageAtTime,并在sendMessageAtTime中直接执行runnable,立即生成目标帧图像,而无需进入消息队列进行等待,从而避免了上述相关技术中存在的生成目标帧图像的耗时过长和耗时不可控的问题。
在一种可能的实现方式中,如图7所示,步骤S206的具体实现方式包括:
步骤S2061:调用绘图表面访问接口,获得直播流数据对应的基于绘图表面视图的屏幕图像缓存。
步骤S2062:以屏幕图像缓存和消息处理器对象的特定时刻消息发送方
法为输入,调用像素拷贝函数,生成目标帧图像,其中,消息处理器对象的特定时刻消息发送方法被重写,特定时刻消息发送方法用于立即执行像素拷贝函数对应的执行消息。
示例性地,绘图表面视图即surfaceView,基于绘图表面视图的屏幕图像缓存,即通过surfaceView渲染的缓存图像。绘图表面访问接口即surfaceHolder,它里面保存了一个对Surface对象的引用,通过绘图表面访问接口,可以获取并访问Surface对应的屏幕图像缓存。即通过surfaceHolder获得屏幕图像缓存,具体实现方式为通过调用surfaceHolder.surface,获得屏幕图像缓存。之后,上述屏幕图像缓存和特定时刻消息发送方法为输入,调用像素拷贝函数(PixelCopy.request)。其中,消息处理器对象的特定时刻消息发送方法被重写,特定时刻消息发送方法用于立即执行像素拷贝函数对应的执行消息。其中,示例性地,特定时刻消息发送函数的重写方式包括:
override fun sendMessageAtTime(msg:Message?,uptimeMillis:Long
msg?.callback?.run()
return true)
通过上述示例性的代码实现方式实现的重新后的特定时刻消息发送函数,可以实现素拷贝函数对应的执行消息的立即执行,从而达到即可生成目标帧图像的目的。上述代码行中的代码实现符合开发安卓应用的开发语言(例如Java)规范,具体含义不再一一赘述,同时,需要说明的是,重写后的特定时刻消息发送函数,还可以包括其他的实现方式,此处不再一一举例赘述,凡可以实现立即执行像素拷贝函数对应的执行消息,以立即执行针对SurfaceView的截图功能的实现方式均可。
步骤S207:在目标应用程序的第二界面内显示目标帧图像。
步骤S208:通过屏幕图像缓存的句柄,获取屏幕图像缓存。
步骤S209:将屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频。
示例性地,在得到目标帧图像后,在第二界面内显示目标帧图像,同时,获得屏幕图像缓存的句柄,即surface,并通过surface获得直播视频数据。具体地,可以通过绘图表面访问接口来调用屏幕图像缓存的句柄,从而获得屏幕图像缓存,也即用于实现直播视频播放的视频直播数据,上述过程即加载
屏幕图像缓存的过程,具体实现方式在图2所示实施例中已进行介绍,此处不再赘述。之后,将屏幕图像缓存绘制在第二绘图表面内,即可实现播放目标直播间的直播视频的目的。
示例性地,如图8所示,步骤S209的具体实现方式包括:
步骤S2091:获取目标帧图像对应的视频直播时间戳。
步骤S2092:根据视频直播时间戳,从屏幕图像缓存中,获取对应的目标视频帧。
步骤S2093:从屏幕图像缓存的目标视频帧开始,在第二绘图表面内绘制屏幕图像缓存,以从目标帧图像所在位置开始播放目标直播间的直播视频。
示例性地,在获取屏幕图像缓存后,进一步获取目标帧图像对应的视频直播时间戳,该视频直播时间戳可以通过直播流数据中的参考信息获得,具体实现方式步骤赘述,之后,根据该目标帧图像对应的视频直播时间戳,从屏幕图像缓存中,找到播放时间戳与该视频直播时间戳相同或近似的视频帧,即目标视频帧,由于目标视频帧与目标帧图像对应的时间戳相同或进行,因此,能够保证目标视频帧中的图像内容与目标帧图像的视频内容相同或相近,之后,以目标视频帧开始为起点,在第二绘图表面内绘制屏幕图像缓存,从而实现从目标帧图像所在位置开始播放目标直播间的直播视频的效果。通过上述步骤,可以使终端设备由第一界面切换至第二界面的过程中,预览视频和直播视频之间形成无缝衔接,避免由于切换过程的耗时导致部分直播内容被跳过,提高观感效果。
参考图9,图9为本公开实施例提供的界面切换方法的流程示意图三。本实施例的方法可以应用在终端设备中,该界面切换方法包括:
步骤S301:在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对目标直播间的退出指令后,拉取目标直播间的直播流数据。
步骤S302:通过目标直播间的直播流数据,获取目标直播间的目标帧图像。
步骤S303:在第一界面内显示目标帧图像,直至目标直播间的预览视频加载完成后,在第一界面内播放目标直播间的预览视频。
示例性地,本实施例提供的界面切换方法,可以应用于推出直播间的应用场景,参考图1所示的应用场景示意图,第二界面即目标应用程序内的直
播间界面,当终端设备接收到针对目标直播间的退出指令后,终端设备拉取目标直播间的直播流数据,并基于目标直播间的直播流数据生成目标帧图像,之后退回到目标应用程序的主页面,并在主页面内的第一界面,即直播间预览界面内,显示该目标帧图像,直至目标直播间的预览视频加载完成后,在第一界面内播放目标直播间的预览视频,从而完成由显示第二界面切换至显示第一界面的过程,也即退出直播间的过程。
在一种可能的实现方式中,步骤S302中通过目标直播间的直播流数据,获取目标直播间的目标帧图像,包括:通过目标应用程序的主线程,创建渲染器对象;通过渲染器对象,执行目标函数,对直播流数据进行处理,得到目标帧图像,其中,目标函数中包括像素拷贝函数,像素拷贝函数通过接收重写后的目标方法来实现目标帧图像的立即生成。
在一种可能的实现方式中,目标方法为特定时刻消息发送方法。
在一种可能的实现方式中,步骤S302中的步骤:执行目标函数,对直播流数据进行处理,得到目标帧图像,其具体实现方式包括:调用绘图表面访问接口,获得直播流数据对应的基于绘图表面视图的屏幕图像缓存;以屏幕图像缓存和消息处理器对象的特定时刻消息发送方法为输入,调用像素拷贝函数,生成目标帧图像,其中,消息处理器对象的特定时刻消息发送方法被重写,特定时刻消息发送方法用于立即执行像素拷贝函数对应的执行消息。
本实施例中,通过直播流数据获得对应的目标帧图像,并在第一界面未加载完屏幕图像缓存之前,显示该目标帧图像,从而避免由第二界面向第一界面跳转过程中的第一界面出现黑屏的问题,增加界面切换过程的流畅度。其中,本实施例中涉及的生成目标帧图像(步骤S302)的过程,与图2-图8所对应实施例中生成目标帧图像的具体实现方式相同,即图2-图8所对应实施例中生成目标帧图像的方法,也可以部分或全部应用于本实施例中,具体实现方式可参考图2-图8所对应实施例中的相关介绍,此处不再赘述。
对应于上文图2-图8所对应的实施例的界面切换方法,图10为本公开实施例提供的一种界面切换装置的结构框图。为了便于说明,仅示出了与本公开实施例相关的部分。参照图10,界面切换装置4包括:
第一播放单元41,用于在第一界面内播放目标直播间的预览视频,并在接收到针对预览视频的触发指令的情况下,拉取目标直播间的直播流数据;
第一处理单元42,用于通过目标直播间的直播流数据,获取目标直播间的目标帧图像;
第二播放单元43,用于在目标应用程序的第二界面内显示目标帧图像,直至目标直播间的直播视频加载完成后,在第二界面内播放目标直播间的直播视频。
在本公开的一个实施例中,第一处理单元42,具体用于:通过目标应用程序的主线程,创建渲染器对象;通过渲染器对象,执行目标函数,对直播流数据进行处理,得到目标帧图像,其中,目标函数中包括像素拷贝函数,像素拷贝函数通过接收重写后的目标方法来实现目标帧图像的立即生成。
在本公开的一个实施例中,目标方法为特定时刻消息发送方法。
在本公开的一个实施例中,第一处理单元42在执行目标函数,对直播流数据进行处理,得到目标帧图像时,具体用于:调用绘图表面访问接口,获得直播流数据对应的基于绘图表面视图的屏幕图像缓存;以屏幕图像缓存和消息处理器对象的特定时刻消息发送方法为输入,调用像素拷贝函数,生成目标帧图像,其中,消息处理器对象的特定时刻消息发送方法被重写,特定时刻消息发送方法用于立即执行像素拷贝函数对应的执行消息。
在本公开的一个实施例中,第一播放单元41在第一界面内播放目标直播间的预览视频时,具体用于:在第一界面内创建第一绘图表面;对目标直播间的直播流数据进行降采样,生成降采样视频数据;将降采样视频数据绘制在第一绘图表面,以播放目标直播间的预览视频。
在本公开的一个实施例中,在接收到针对预览视频的触发指令的情况下,第二播放单元43,还用于:在目标应用程序的第二界面内,创建第二绘图表面;第二播放单元43在在第二界面内播放目标直播间的直播视频时,具体用于:通过屏幕图像缓存的句柄,获取屏幕图像缓存;将屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频。
在本公开的一个实施例中,第二播放单元43在将屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频时,具体用于:获取目标帧图像对应的视频直播时间戳;根据视频直播时间戳,从屏幕图像缓存中,获取对应的目标视频帧;从屏幕图像缓存的目标视频帧开始,在第二绘图表面内绘制屏幕图像缓存,以从目标帧图像所在位置开始播放目标直播间的直播视
频。
其中,第一播放单元41、第一处理单元42、第二播放模块43依次连接。实施例提供的界面切换装置4可以执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
对应于上文图9所对应的实施例的界面切换方法,图11为本公开实施例提供的另一种界面切换装置的结构框图。为了便于说明,仅示出了与本公开实施例相关的部分。参照图11,界面切换装置5包括:
第三播放单元51,在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对目标直播间的退出指令后,拉取目标直播间的直播流数据;
第二处理单元52,通过目标直播间的直播流数据,获取目标直播间的目标帧图像;
第四播放单元53,在第一界面内显示目标帧图像,直至目标直播间的预览视频加载完成后,在第一界面内播放目标直播间的预览视频。
其中,第三播放单元51、第二处理单元52、第四播放单元53依次连接。实施例提供的界面切换装置5可以执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
图12为本公开实施例提供的一种电子设备的结构示意图,如图12所示,该电子设备6包括:
处理器61,以及与处理器61通信连接的存储器62;
存储器62存储计算机执行指令;
处理器61执行存储器62存储的计算机执行指令,以实现如图2-图9所示实施例中的界面切换方法。
其中,可选地,处理器61和存储器62通过总线63连接。
相关说明可以对应参见图2-图9所对应的实施例中的步骤所对应的相关描述和效果进行理解,此处不做过多赘述。
本公开实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现本公开图2-图9所对应的实施例中任一实施例提供的界面切换方法。
本公开实施例提供一种计算机程序产品,包括计算机程序,该计算机程
序被处理器执行时实现如图2-图9所示实施例中的界面切换方法,
参考图13,其示出了适于用来实现本公开实施例的电子设备900的结构示意图,该电子设备900可以为终端设备或服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图13示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图13所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)901,其可以根据存储在只读存储器(Read Only Memory,简称ROM)902中的程序或者从存储装置908加载到随机访问存储器(Random Access Memory,简称RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有电子设备900操作所需的各种程序和数据。处理装置901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许电子设备900与其他设备进行无线或有线通信以交换数据。虽然图13示出了具有各种装置的电子设备900,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理装置901执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号。其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称
WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
第一方面,根据本公开的一个或多个实施例,提供了一种界面切换方法,
包括:
在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令后,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。
根据本公开的一个或多个实施例,所述通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像,包括:通过所述目标应用程序的主线程,创建渲染器对象;通过所述渲染器对象,执行目标函数,对所述直播流数据进行处理,得到所述目标帧图像,其中,所述目标函数中包括像素拷贝函数,所述像素拷贝函数通过接收重写后的目标方法来实现目标帧图像的立即生成。
根据本公开的一个或多个实施例,所述目标方法为特定时刻消息发送方法。
根据本公开的一个或多个实施例,所述执行目标函数,对所述直播流数据进行处理,得到所述目标帧图像,包括:调用绘图表面访问接口,获得所述直播流数据对应的基于绘图表面视图的屏幕图像缓存;以所述屏幕图像缓存和消息处理器对象的特定时刻消息发送方法为输入,调用像素拷贝函数,生成目标帧图像,其中,消息处理器对象的特定时刻消息发送方法被重写,所述特定时刻消息发送方法用于立即执行所述像素拷贝函数对应的执行消息。
根据本公开的一个或多个实施例,所述在第一界面内播放目标直播间的预览视频,包括:在第一界面内创建第一绘图表面;对所述目标直播间的直播流数据进行降采样,生成降采样视频数据;将所述降采样视频数据绘制在所述第一绘图表面,以播放目标直播间的预览视频。
根据本公开的一个或多个实施例,在接收到针对所述预览视频的触发指令后,还包括:在第二界面内,创建第二绘图表面;所述在所述第二界面内播放目标直播间的直播视频,包括:通过所述屏幕图像缓存的句柄,获取屏幕图像缓存;将所述屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频。
根据本公开的一个或多个实施例,所述将所述屏幕图像缓存绘制在第二
绘图表面内,以播放目标直播间的直播视频,包括:获取所述目标帧图像对应的视频直播时间戳;根据所述视频直播时间戳,从所述屏幕图像缓存中,获取对应的目标视频帧;从所述屏幕图像缓存的目标视频帧开始,在所述第二绘图表面内绘制所述屏幕图像缓存,以从所述目标帧图像所在位置开始播放目标直播间的直播视频。
第二方面,根据本公开的一个或多个实施例,提供了一种界面切换方法,包括:
在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对所述目标直播间的退出指令后,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在所述目标应用程序的第一界面内显示所述目标帧图像,直至所述目标直播间的预览视频加载完成后,在所述第一界面内播放目标直播间的预览视频。
第三方面,根据本公开的一个或多个实施例,提供了一种界面切换装置,包括:
第一播放单元,用于在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令后,拉取所述目标直播间的直播流数据;
第一处理单元,用于通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;
第二播放单元,用于在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。
根据本公开的一个或多个实施例,所述第一处理单元,具体用于:通过所述目标应用程序的主线程,创建渲染器对象;通过所述渲染器对象,执行目标函数,对所述直播流数据进行处理,得到所述目标帧图像,其中,所述目标函数中包括像素拷贝函数,所述像素拷贝函数通过接收重写后的目标方法来实现目标帧图像的立即生成。
根据本公开的一个或多个实施例,所述目标方法为特定时刻消息发送方法。
根据本公开的一个或多个实施例,所述第一处理单元在所述执行目标函数,对所述直播流数据进行处理,得到所述目标帧图像时,具体用于:调用绘
图表面访问接口,获得所述直播流数据对应的基于绘图表面视图的屏幕图像缓存;以所述屏幕图像缓存和消息处理器对象的特定时刻消息发送方法为输入,调用像素拷贝函数,生成目标帧图像,其中,消息处理器对象的特定时刻消息发送方法被重写,所述特定时刻消息发送方法用于立即执行所述像素拷贝函数对应的执行消息。
根据本公开的一个或多个实施例,所述第一播放单元在第一界面内播放目标直播间的预览视频时,具体用于:在第一界面内创建第一绘图表面;对所述目标直播间的直播流数据进行降采样,生成降采样视频数据;将所述降采样视频数据绘制在所述第一绘图表面,以播放目标直播间的预览视频。
根据本公开的一个或多个实施例,在接收到针对所述预览视频的触发指令后,所述第二播放单元,还用于:在第二界面内,创建第二绘图表面;所述第二播放单元在在所述第二界面内播放目标直播间的直播视频时,具体用于:通过所述屏幕图像缓存的句柄,获取屏幕图像缓存;将所述屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频。
根据本公开的一个或多个实施例,所述第二播放单元在将所述屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频时,具体用于:获取所述目标帧图像对应的视频直播时间戳;根据所述视频直播时间戳,从所述屏幕图像缓存中,获取对应的目标视频帧;从所述屏幕图像缓存的目标视频帧开始,在所述第二绘图表面内绘制所述屏幕图像缓存,以从所述目标帧图像所在位置开始播放目标直播间的直播视频。
第四方面,根据本公开的一个或多个实施例,提供了一种界面切换装置,包括:
第三播放单元,在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对所述目标直播间的退出指令后,拉取所述目标直播间的直播流数据;
第二处理单元,通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;
第四播放单元,在所述目标应用程序的第一界面内显示所述目标帧图像,直至所述目标直播间的预览视频加载完成后,在所述第一界面内播放目标直播间的预览视频。
第五方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:处理器,以及与所述处理器通信连接的存储器;
所述存储器存储计算机执行指令;
所述处理器执行所述存储器存储的计算机执行指令,以实现如上第一方面以及第一方面各种可能的设计所述的界面切换方法,或者,实现如上第二方面以及第二方面各种可能的设计所述的界面切换方法。
第六方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的界面切换方法,或者,实现如上第二方面以及第二方面各种可能的设计所述的界面切换方法。
第七方面,本公开实施例提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能的设计所述的界面切换方法,或者,实现如上第二方面以及第二方面各种可能的设计所述的界面切换方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特
征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。
Claims (13)
- 一种界面切换方法,包括:在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令的情况下,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。
- 根据权利要求1所述的方法,其中所述通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像,包括:通过目标应用程序的主线程,创建渲染器对象;通过所述渲染器对象,执行目标函数,对所述直播流数据进行处理,得到所述目标帧图像。
- 根据权利要求2所述的方法,其中所述目标函数通过接收重写后的目标方法来实现目标帧图像的立即生成,所述目标方法为特定时刻消息发送方法。
- 根据权利要求2所述的方法,其中所述执行目标函数,对所述直播流数据进行处理,得到所述目标帧图像,包括:调用绘图表面访问接口,获得所述直播流数据对应的基于绘图表面视图的屏幕图像缓存;以所述屏幕图像缓存和消息处理器对象的特定时刻消息发送方法为输入,调用所述目标函数,生成目标帧图像,其中,消息处理器对象的特定时刻消息发送方法被重写,所述特定时刻消息发送方法用于立即执行所述目标函数对应的执行消息。
- 根据权利要求1所述的方法,其中所述在第一界面内播放目标直播间的预览视频,包括:在第一界面内创建第一绘图表面;对所述目标直播间的直播流数据进行降采样,生成降采样视频数据;将所述降采样视频数据绘制在所述第一绘图表面,以播放目标直播间的预览视频。
- 根据权利要求1所述的方法,其中在接收到针对所述预览视频的触发 指令后,还包括:在第二界面内创建第二绘图表面;所述在所述第二界面内播放目标直播间的直播视频,包括:获取所述直播视频对应的屏幕图像缓存;将所述屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频。
- 根据权利要求6所述的方法,其中所述将所述屏幕图像缓存绘制在第二绘图表面内,以播放目标直播间的直播视频,包括:获取所述目标帧图像对应的视频直播时间戳;根据所述视频直播时间戳,从所述屏幕图像缓存中,获取对应的目标视频帧;从所述屏幕图像缓存的目标视频帧开始,在所述第二绘图表面内绘制所述屏幕图像缓存,以从所述目标帧图像所在位置开始播放目标直播间的直播视频。
- 一种界面切换方法,包括:在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对所述目标直播间的退出指令后,拉取所述目标直播间的直播流数据;通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;在所述目标应用程序的第一界面内显示所述目标帧图像,直至所述目标直播间的预览视频加载完成后,在所述第一界面内播放目标直播间的预览视频。
- 一种界面切换装置,包括:第一播放单元,用于在第一界面内播放目标直播间的预览视频,并在接收到针对所述预览视频的触发指令后,拉取所述目标直播间的直播流数据;第一处理单元,用于通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;第二播放单元,用于在第二界面内显示所述目标帧图像,直至所述目标直播间的直播视频加载完成后,在所述第二界面内播放目标直播间的直播视频。
- 一种界面切换装置,包括:第三播放单元,在目标应用程序的第二界面内,播放目标直播间的直播视频,并在接收到针对所述目标直播间的退出指令后,拉取所述目标直播间的直播流数据;第二处理单元,通过所述目标直播间的直播流数据,获取所述目标直播间的目标帧图像;第四播放单元,在所述目标应用程序的第一界面内显示所述目标帧图像,直至所述目标直播间的预览视频加载完成后,在所述第一界面内播放目标直播间的预览视频。
- 一种电子设备,包括:处理器,以及与所述处理器通信连接的存储器;所述存储器存储计算机执行指令;所述处理器执行所述存储器存储的计算机执行指令,以实现如权利要求1至8中任一项所述的方法。
- 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1至8任一项所述的界面切换方法。
- 一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现权利要求1至8中任一项所述的界面切换方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310709132.0A CN119155472A (zh) | 2023-06-14 | 2023-06-14 | 界面切换方法、装置、电子设备及存储介质 |
| CN202310709132.0 | 2023-06-14 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024255894A1 true WO2024255894A1 (zh) | 2024-12-19 |
Family
ID=93816102
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/099433 Ceased WO2024255894A1 (zh) | 2023-06-14 | 2024-06-14 | 界面切换方法、装置、电子设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119155472A (zh) |
| WO (1) | WO2024255894A1 (zh) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107911709A (zh) * | 2017-11-17 | 2018-04-13 | 广州酷狗计算机科技有限公司 | 直播界面显示方法、装置及终端 |
| CN108769727A (zh) * | 2018-06-15 | 2018-11-06 | 北京奇艺世纪科技有限公司 | 一种直播视频预加载方法及装置 |
| CN109309842A (zh) * | 2017-07-28 | 2019-02-05 | 腾讯科技(深圳)有限公司 | 直播数据处理方法和装置、计算机设备和存储介质 |
| CN109413483A (zh) * | 2018-11-29 | 2019-03-01 | 北京字节跳动网络技术有限公司 | 直播内容的预览方法、装置、设备和介质 |
| CN110858910A (zh) * | 2018-08-23 | 2020-03-03 | 广州虎牙信息科技有限公司 | 直播视频的显示方法、装置、设备及存储介质 |
-
2023
- 2023-06-14 CN CN202310709132.0A patent/CN119155472A/zh active Pending
-
2024
- 2024-06-14 WO PCT/CN2024/099433 patent/WO2024255894A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109309842A (zh) * | 2017-07-28 | 2019-02-05 | 腾讯科技(深圳)有限公司 | 直播数据处理方法和装置、计算机设备和存储介质 |
| CN107911709A (zh) * | 2017-11-17 | 2018-04-13 | 广州酷狗计算机科技有限公司 | 直播界面显示方法、装置及终端 |
| CN108769727A (zh) * | 2018-06-15 | 2018-11-06 | 北京奇艺世纪科技有限公司 | 一种直播视频预加载方法及装置 |
| CN110858910A (zh) * | 2018-08-23 | 2020-03-03 | 广州虎牙信息科技有限公司 | 直播视频的显示方法、装置、设备及存储介质 |
| CN109413483A (zh) * | 2018-11-29 | 2019-03-01 | 北京字节跳动网络技术有限公司 | 直播内容的预览方法、装置、设备和介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119155472A (zh) | 2024-12-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112165632B (zh) | 视频处理方法、装置及设备 | |
| US20250184563A1 (en) | Method, apparatus, device, readable storage medium and product for displaying live streaming content | |
| US20220159197A1 (en) | Image special effect processing method and apparatus, and electronic device and computer readable storage medium | |
| CN110611847B (zh) | 视频预览的方法、装置、存储介质及电子设备 | |
| US12167085B2 (en) | Video processing method and apparatus, storage medium, and electronic device | |
| CN113301424A (zh) | 播放控制方法、设备、存储介质及程序产品 | |
| CN115802104B (zh) | 视频跳转播放方法、装置、电子设备及存储介质 | |
| WO2024120177A1 (zh) | 应用程序运行控制方法、装置、设备及存储介质 | |
| WO2024104307A1 (zh) | 直播视频流渲染方法、装置、设备、存储介质及产品 | |
| WO2024139852A1 (zh) | 媒体播放方法及设备 | |
| CN113010300B (zh) | 图像效果的刷新方法、装置、电子设备及计算机可读存储介质 | |
| CN114445600B (zh) | 一种特效道具的展示方法、装置、设备及存储介质 | |
| WO2024094130A1 (zh) | 内容分享方法、装置、设备、计算机可读存储介质及产品 | |
| WO2025118949A1 (zh) | 特效处理方法、装置、电子设备及存储介质 | |
| CN109168027B (zh) | 即时视频展示方法、装置、终端设备及存储介质 | |
| CN115761090B (zh) | 特效渲染方法、装置、设备、计算机可读存储介质及产品 | |
| CN112351221B (zh) | 图像特效处理方法、装置、电子设备和计算机可读存储介质 | |
| JP7670853B2 (ja) | 特殊効果表示方法、装置、機器、記憶媒体及び製品 | |
| CN113535105B (zh) | 媒体文件处理方法、装置、设备、可读存储介质及产品 | |
| CN113837918B (zh) | 多进程实现渲染隔离的方法及装置 | |
| WO2024255894A1 (zh) | 界面切换方法、装置、电子设备及存储介质 | |
| CN113382293A (zh) | 内容显示的方法、装置、设备及计算机可读存储介质 | |
| CN119233013B (zh) | 视频处理方法、装置及电子设备 | |
| EP4645887A1 (en) | Online video editing method and apparatus, and electronic device and storage medium | |
| CN115720292B (zh) | 视频录制方法、设备、存储介质及程序产品 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24822841 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |