Video processing method and device, storage medium and electronic equipment

文档序号:1630902 发布日期:2020-01-14 浏览:6次 中文

阅读说明:本技术 视频处理方法、装置、存储介质及电子设备 (Video processing method and device, storage medium and electronic equipment ) 是由 李双洋 于 2019-10-16 设计创作,主要内容包括:本公开实施例公开了一种视频处理方法、装置、存储介质及电子设备,方法包括:检测预先加载第一视频元素的第一承载单元是否满足预定预览条件;当满足预定预览条件时,通过与第一承载单元绑定的第一播放器播放第一视频元素对应的视频流;当不满足预定预览条件时,停止播放第一播放器中的视频流;继续检测第一承载单元是否满足预定释放条件;在满足预定释放条件时,释放第一承载单元中的第一视频元素以及第一播放器中的视频流。本公开实施例为每个承载单元都绑定了一个播放器,承载单元在承载视频元素时使用与其绑定的播放器播放视频元素的视频流,不需要重新创建一个播放器,释放时也只是释放视频元素和播放器中的视频流,不会释放播放器。(The embodiment of the disclosure discloses a video processing method, a video processing device, a storage medium and an electronic device, wherein the method comprises the following steps: detecting whether a first bearing unit which is preloaded with a first video element meets a preset preview condition or not; when a preset preview condition is met, playing a video stream corresponding to a first video element through a first player bound with a first bearing unit; stopping playing the video stream in the first player when the preset preview condition is not met; continuously detecting whether the first bearing unit meets a preset release condition; and when a preset releasing condition is met, releasing the first video element in the first bearing unit and the video stream in the first player. The embodiment of the disclosure binds a player to each bearing unit, and the bearing unit plays the video stream of the video element by using the player bound with the bearing unit when bearing the video element without recreating a player, and only releases the video element and the video stream in the player when releasing, and does not release the player.)

1. A video processing method, comprising:

detecting whether a first bearing unit which is preloaded with a first video element meets a preset preview condition or not;

when the preset preview condition is met, playing a video stream corresponding to the first video element through a first player bound with the first bearing unit;

stopping playing the video stream in the first player when the predetermined preview condition is not satisfied;

continuously detecting whether the first bearing unit meets a preset release condition;

when the preset releasing condition is met, releasing the first video element in the first bearing unit and the video stream in the first player.

2. The method of claim 1, wherein before detecting whether the first bearer unit pre-loaded with the first video element satisfies the predetermined preview condition, further comprising:

detecting whether the first bearing unit meets a preset loading condition;

and when the preset loading condition is met, loading a first video element through the first bearing unit.

3. The method of claim 2, wherein after loading the first video element via the first bearer unit, further comprising:

continuously detecting whether the second bearing unit meets the preset loading condition;

and when the pre-preset loading condition is met, loading a second video element through the second bearing unit.

4. The method of claim 1, wherein after the releasing the first video element in the first bearer unit and the video stream in the first player, further comprising:

when the first bearing unit meets the preset loading condition again, loading a third video element through the first bearing unit;

and when the first bearing unit meets the preset preview condition again, playing the video stream corresponding to the third video element through the first player bound with the first bearing unit.

5. The method of any of claims 1 to 4, wherein said releasing the first video element in the first bearer unit and the video stream in the first player comprises:

and releasing the content of the first video element in the first bearing unit and the current last frame image of the video stream in the first player.

6. A video processing apparatus, comprising:

the first detection module is used for detecting whether a first bearing unit which is preloaded with a first video element meets a preset preview condition;

the first execution module is used for playing the video stream corresponding to the first video element through a first player bound with the first bearing unit when the preset preview condition is met;

a second execution module, configured to stop playing the video stream in the first player when the predetermined preview condition is not satisfied;

the second detection module is used for continuously detecting whether the first bearing unit meets a preset release condition;

a releasing module, configured to release the first video element in the first bearer unit and the video stream in the first player when the predetermined release condition is met.

7. The apparatus of claim 6, further comprising:

the third detection module is used for detecting whether the first bearing unit meets a preset loading condition;

and the first loading module is used for loading the first video element through the first bearing unit when the preset loading condition is met.

8. The apparatus of claim 7, further comprising:

the fourth detection module is used for continuously detecting whether the second bearing unit meets the preset loading condition;

and the second loading module is used for loading a second video element through the second bearing unit when the preset loading condition is met.

9. The apparatus of claim 6, further comprising:

a third loading module, configured to load a third video element through the first bearer unit when the first bearer unit satisfies the predetermined loading condition again;

the first executing module is further configured to play, by the first player bound to the first bearer unit, a video stream corresponding to the third video element when the first bearer unit satisfies the predetermined preview condition again.

10. The apparatus according to any one of claims 6 to 9,

the release module is specifically configured to: and releasing the content of the first video element in the first bearing unit and the current last frame image of the video stream in the first player.

11. A storage medium storing a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 5 when executed by a processor.

12. An electronic device comprising at least a memory, a processor, the memory having a computer program stored thereon, characterized in that the processor realizes the steps of the method of any of claims 1 to 5 when executing the computer program on the memory.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种5G信号覆盖一体化机柜

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类