Optimization method and system for player channel switching, storage medium and player

文档序号:1315134 发布日期:2020-07-10 浏览:18次 中文

阅读说明:本技术 播放器频道切换的优化方法、系统、存储介质及播放器 (Optimization method and system for player channel switching, storage medium and player ) 是由 张超 肖友能 朱善宝 刘洋 张晓卫 于 2020-03-10 设计创作,主要内容包括:本发明提供一种播放器频道切换的优化方法、系统、存储介质及播放器,所述播放器频道切换的优化方法包括:创建单例播放器对象;调用预设视频流参数设置函数,以设置视频流的参数信息;当解析出所述视频流播放的第一帧为即时解码刷新帧时,输出启动播放器的启动指令,以启动所述播放器播放视频流。本发明所述播放器频道切换的优化方法、系统、存储介质及播放器解决了播放器在进行切换频道时常常出现的延迟感,对于播放HLS视频流有明显改观,使用户在切换频道时不存在延迟感觉,提高用户的使用度。(The invention provides an optimization method, a system, a storage medium and a player for player channel switching, wherein the optimization method for player channel switching comprises the steps of creating a single-case player object, calling a preset video stream parameter setting function to set parameter information of a video stream, and outputting a starting instruction for starting the player to start the player to play the video stream when a first frame played by the video stream is analyzed to be an instant decoding refresh frame.)

1. An optimization method for channel switching of a player, comprising:

creating a singleton player object;

calling a preset video stream parameter setting function to set parameter information of the video stream;

and when the first frame played by the video stream is analyzed to be the instant decoding refresh frame, outputting a starting instruction for starting a player to start the player to play the video stream.

2. The method for optimizing player channel switching according to claim 1, wherein said step of creating singleton player objects further comprises, before said step of creating singleton player objects: judging whether a singleton player object in the player is empty or not; if yes, switching to the step of creating a singleton player object; and if not, reconstructing the singleton player object.

3. The method for optimizing player channel switching according to claim 1, wherein said step of creating singleton player objects further comprises: and when the player is detected to switch channels, multiplexing the created singleton player object.

4. The method for optimizing player channel switching according to claim 2, wherein after the step of multiplexing the singleton player object, the method for optimizing player channel switching further comprises: initializing the singleton player object and changing the attribute information of the singleton player object.

5. The method for optimizing player channel switching according to claim 2, wherein said step of calling a preset video stream parameter setting function further comprises: and enabling the preset video stream parameter setting function to replace an information analysis function of an audio and video conversion tool of the player.

6. The method of claim 2, wherein the parameter information of the video stream is added to a list file for storing audio and video blocks.

7. The method of optimizing player channel change according to claim 6, wherein the parameter information of the video stream includes bandwidth, imaging limit resolution, coding format, audio format, video height, video width, and/or average frame rate.

8. A system for optimizing player channel switching, comprising:

the creating module is used for creating a singleton player object;

the parameter information setting module is used for calling a preset video stream parameter setting function so as to set the parameter information of the video stream;

and the starting module is used for outputting a starting instruction for starting a player to start the player to play the video stream when the first frame played by the video stream is analyzed to be the instant decoding refresh frame.

9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for optimizing channel change of a player according to any one of claims 1 to 7.

10. A player, comprising: a processor and a memory;

the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory to make the player execute the optimization method of the player channel switching according to any one of claims 1 to 7.

Technical Field

The invention belongs to the technical field of players, relates to an optimization method and an optimization system, and particularly relates to an optimization method and an optimization system for switching player channels, a storage medium and a player.

Background

The player is used as a final presentation end of the video stream, and many companies are currently developing the player. The players in the market are not good and bad, and besides smooth playing, another very important standard for judging the quality of one player is the speed of switching channels. The player with slow channel switching speed gives users a bad experience, and directly causes the users to suspect that the video stream has problems, but the player is not well processed when the player processes the channel switching.

Therefore, how to provide an optimization method, a system, a storage medium and a player for switching a player channel to solve the delay feeling often occurring when the existing player switches a channel, and the defect of obvious improvement on playing H L S video stream, etc., has become a technical problem to be solved by those skilled in the art.

Disclosure of Invention

In view of the above drawbacks of the prior art, an object of the present invention is to provide a method, a system, a storage medium, and a player for optimizing player channel switching, which are used to solve the problem that playing an H L S video stream is obviously changed due to the delay often occurring when the existing player switches channels.

To achieve the above and other related objects, an aspect of the present invention provides a method for optimizing channel switching of a player, including: creating a singleton player object; calling a preset video stream parameter setting function to set parameter information of the video stream; and when the first frame played by the video stream is analyzed to be the instant decoding refresh frame, outputting a starting instruction for starting a player to start the player to play the video stream.

In an embodiment of the present invention, before the step of creating the singleton player object, the step of creating the singleton player object further includes: judging whether a singleton player object in the player is empty or not; if yes, switching to the step of creating a singleton player object; and if not, reconstructing the singleton player object.

In an embodiment of the present invention, the step of creating the singleton player object further includes: and when the player is detected to switch channels, multiplexing the created singleton player object.

In an embodiment of the present invention, after the step of multiplexing the singleton player object, the method for optimizing player channel switching further includes: initializing the singleton player object and changing the attribute information of the singleton player object.

In an embodiment of the present invention, the step of calling the preset video stream parameter setting function further includes: and enabling the preset video stream parameter setting function to replace an information analysis function of an audio and video conversion tool of the player.

In an embodiment of the present invention, the parameter information of the video stream is added to a list file for storing audio and video blocks.

In an embodiment of the present invention, the parameter information of the video stream includes a bandwidth, an imaging limit resolution, an encoding format, an audio format, a video height, a video width, and/or an average frame rate.

Another aspect of the present invention provides an optimization system for switching channels of a player, including: the creating module is used for creating a singleton player object; the parameter information setting module is used for calling a preset video stream parameter setting function so as to set the parameter information of the video stream; and the starting module is used for outputting a starting instruction for starting a player to start the player to play the video stream when the first frame played by the video stream is analyzed to be the instant decoding refresh frame.

Yet another aspect of the present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the method for optimizing a channel change of a player.

A final aspect of the invention provides a player comprising: a processor and a memory; the memory is used for storing computer programs, and the processor is used for executing the computer programs stored by the memory so as to enable the player to execute the optimization method for switching the player channels.

As described above, the optimization method, system, storage medium and player for switching player channels according to the present invention have the following advantages:

the optimization method, the optimization system, the storage medium and the player solve the problem of delay feeling of the player frequently occurring when the player switches channels, obviously improve the playing of the H L S video stream, enable a user not to have delay feeling when the user switches channels, and improve the use degree of the user.

Drawings

Fig. 1 is a flowchart illustrating an optimization method for switching player channels according to an embodiment of the present invention.

Fig. 2 is a schematic flow chart of S12 in the method for optimizing player channel switching according to the present invention.

Fig. 3 is a schematic view showing a video stream playing process applicable to a parameter information method of a preset video stream according to the present invention.

Fig. 4 is a schematic structural diagram of an optimization system for switching player channels according to an embodiment of the present invention.

Description of the element reference numerals

Detailed Description

The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.

It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:动态生成音视频片段的处理方法、装置及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类