CN104093060A - Webpage video playing method and system - Google Patents

Webpage video playing method and system Download PDF

Info

Publication number
CN104093060A
CN104093060A CN201410341988.8A CN201410341988A CN104093060A CN 104093060 A CN104093060 A CN 104093060A CN 201410341988 A CN201410341988 A CN 201410341988A CN 104093060 A CN104093060 A CN 104093060A
Authority
CN
China
Prior art keywords
video
buffer
window
unit
playback
Prior art date
Application number
CN201410341988.8A
Other languages
Chinese (zh)
Inventor
宋章章
关翔
Original Assignee
可牛网络技术(北京)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 可牛网络技术(北京)有限公司 filed Critical 可牛网络技术(北京)有限公司
Priority to CN201410341988.8A priority Critical patent/CN104093060A/en
Publication of CN104093060A publication Critical patent/CN104093060A/en

Links

Abstract

The embodiment of the invention provides a webpage video playing method and system. An independent video playing window can be built on the upper layer of a webpage, and webpage videos can be played through the built video playing window. Accordingly, when the videos are played, a video frame does not need to be combined with webpage content. Calculation in the video playing process is reduced and operation pressure of a browser is reduced.

Description

网页视频播放方法及系统 Method and system for web video playback

技术领域 FIELD

[0001] 本发明涉及视频播放技术领域,特别是涉及网页视频播放方法及系统。 [0001] The present invention relates to a video playback technology, and particularly relates to a system and method for playing video page.

背景技术 Background technique

[0002] 随着科技的发展,互联网成为了人们生活中不可缺少的组成部分,用户通过浏览器访问互联网,在网页中观看各种视频。 [0002] With the development of science and technology, the Internet has become the people's lives indispensable part of users to access the Internet through a browser, watch a variety of video in a web page.

[0003] 现有的网页视频播放技术中,在用户打开一个带有视频的网页时,在观看该视频之前,需要接收视频流文件,并对视频流文件进行解码,获得视频帧。 [0003] The prior art web video playback, when the user opens a Web page with the video, before viewing the video, video stream file needs to receive, and decode the video stream file, a video frame is obtained. 获得视频帧后,再将视频帧和网页的其他内容(如图片、文字、表格等)进行合并,生成网页中所要进行展示的内容,然后展示该网页。 After obtaining a video frame, and then the video frames and other web content (such as images, text, tables, etc.) are combined to generate a web page to be content to show, and show that page. 由于不同视频帧的图案不同,因此现有的网页视频播放技术需要为每一个视频帧进行一次内容合并。 Due to the different patterns of different video frames, and therefore the conventional web techniques require a video player incorporated for each video frame.

[0004] 由于需要多次进行内容合并,因此现有的网页视频播放技术需要进行更多的运算,给浏览器造成的运行压力较大。 [0004] As the need for multiple content merge, so existing web video playback technology requires more computing, to run the browser caused by pressure.

发明内容 SUMMARY

[0005] 本发明实施例的目的在于提供一种网页视频播放方法及系统,以实现减少网页视频播放过程的运算量的目的。 [0005] The object of embodiments of the present invention to provide a method and system for playing the video on the page, in order to achieve the purpose of reducing the calculation amount during playback of the video page.

[0006] 为达到上述目的,本发明实施例公开了一种网页视频播放方法,包括: [0006] To achieve the above object, embodiments of the present invention discloses a web video playback method, comprising:

[0007] 接收网页视频播放指令; [0007] Video playback instruction received page;

[0008] 根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层; [0008] establishing a video playback window in accordance with the instruction, the video display window is located in the upper web;

[0009] 通过所建立的视频播放窗口播放网页视频。 [0009] web video player video playback window established.

[0010] 可选的,所述通过所建立的视频播放窗口播放网页视频,包括: [0010] Alternatively, the video play window video playback page created, comprising:

[0011] 接收视频流文件; [0011] receiving a video stream file;

[0012] 调用解码器对所述视频流文件进行解码,获得视频帧; [0012] Calling the decoder decodes the video stream file, obtain video frames;

[0013] 将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放。 [0013] The obtained video frames into the video display window corresponding to the buffer, the output of the video frame buffer to the video player play window.

[0014] 可选的,与所述视频播放窗口对应的缓冲区包括:第一缓冲区和第二缓冲区,其中,第一缓冲区处于前台状态时,第二缓冲区处于后台状态;第一缓冲区处于后台状态时, 第二缓冲区处于前台状态。 [0014] Optionally, the buffer corresponding to the video play window comprising: a first buffer and a second buffer, wherein the buffer is in the foreground of the first state, the second buffer is in the background state; a first when the buffer is in the background state, the second buffer is in the foreground state.

[0015] 可选的,所述将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放,包括: [0015] Optionally, the obtained video frames into the video display window corresponding to the buffer, the output of the video frame buffer to play the video playback window, comprising:

[0016] 将当前时刻获得的视频帧放入处于后台状态的第一/第二缓冲区中,将处于前台状态的第二/第一缓冲区中的视频帧输出到所述视频播放窗口进行播放,播放后删除处于前台状态的第二/第一缓冲区中的视频帧; Video frame output window to the video player to play a second / first buffer is a first / second buffer [0016] The video frame into the current time obtained in a background state, a state in the foreground in second / first buffer in the foreground state after deleting the playback video frame;

[0017] 切换所述第一缓冲区和第二缓冲区的前后台状态。 [0017] station before and after switching the state of the first buffer and the second buffer.

[0018] 可选的,所述根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层, 包括: [0018] Optionally, establishing the video display window according to the command, the video display window is located in the upper web, comprising:

[0019] 根据所述指令获得网页源代码; [0019] The obtained web page source code according to the instruction;

[0020] 从所获得的网页源代码中获得网页中视频播放区域的位置信息; [0020] webpage obtain position information from the video playback area web page source code obtained;

[0021] 根据所获得的视频播放区域的位置信息,在所述网页上层建立与所述视频播放区域位置相同的视频播放窗口。 [0021] The position information of the video playback area obtained by establishing the position of the same video playback area video playback window in the upper layer of the web.

[0022] 可选的,还包括: [0022] Optionally, further comprising:

[0023] 网页视频播放结束后关闭所建立的视频播放窗口。 After the [0023] web video player to close the video playback window established.

[0024] -种网页视频播放系统,包括:指令接收单元、窗口建立单元和视频播放单元,其中: [0024] - species web video playback system, comprising: instruction receiving unit, and a windowing unit video playing unit, wherein:

[0025] 所述指令接收单元,用于接收网页视频播放指令; [0025] The instruction receiving unit for receiving a video playback instruction pages;

[0026] 所述窗口建立单元,用于根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层; [0026] The window establishing means for establishing a video display window according to the command, the video display window is located in the upper web;

[0027] 所述视频播放单元,用于通过所建立的视频播放窗口播放网页视频。 The [0027] Video playback means for playing a video window video playback page over the established.

[0028] 可选的,所述视频播放单元,包括:视频流接收子单元、视频解码子单元和视频帧播放子单元,其中: [0028] Alternatively, the video playback unit, comprising: a receiving sub-unit video stream, the video decoding sub-unit and a video frame playback sub-unit, wherein:

[0029] 所述视频流接收子单元,用于接收视频流文件; [0029] The sub video stream receiving unit for receiving a video stream file;

[0030] 所述视频解码子单元,用于调用解码器对所述视频流文件进行解码,获得视频帧; [0030] The video decoding sub-unit, for invoking a decoder file to decode the video stream to obtain video frames;

[0031] 所述视频帧播放子单元,用于将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放。 [0031] The video frame playback sub-unit, configured to obtain video frames into the video display window of the corresponding buffer, the output of said video frame buffer to play the video playback window .

[0032] 可选的,与所述视频播放窗口对应的缓冲区包括:第一缓冲区和第二缓冲区,其中,第一缓冲区处于前台状态时,第二缓冲区处于后台状态;第一缓冲区处于后台状态时, 第二缓冲区处于前台状态。 [0032] Optionally, the buffer corresponding to the video play window comprising: a first buffer and a second buffer, wherein the buffer is in the foreground of the first state, the second buffer is in the background state; a first when the buffer is in the background state, the second buffer is in the foreground state.

[0033] 可选的,所述视频帧播放子单元,包括:后台处理子单元、前台处理子单元和切换子单元,其中: [0033] Alternatively, the video frame playback sub-unit, comprising: a background processing sub-unit, and a switching sub-unit foreground processing subunit, wherein:

[0034] 所述后台处理子单元,用于将当前时刻获得的视频帧放入处于后台状态的第一/ 第二缓冲区中; [0034] The background processing sub-unit, the time for the current video frame is put into a first / second in a background state of the buffer;

[0035] 所述前台处理子单元,用于将处于前台状态的第二/第一缓冲区中的视频帧输出到所述视频播放窗口进行播放,播放后删除处于前台状态的第二/第一缓冲区中的视频帧; [0035] The reception processing sub-unit, a second / first buffer area for the foreground in the state of the output video frames to the video playback window play, delete play in the foreground status after the second / first the video frame buffer;

[0036] 所述切换子单元,用于切换所述第一缓冲区和第二缓冲区的前后台状态。 [0036] The sub-switching unit for switching a state of the front and back of the first buffer and the second buffer.

[0037] 可选的,所述窗口建立单元,包括:源代码获得子单元、窗口位置获得子单元和窗口建立子单元,其中: [0037] Optionally, the windowing unit, comprising: obtaining source code subunit, obtaining sub-unit and window position windowing sub-unit, wherein:

[0038] 所述源代码获得子单元,用于根据所述指令获得网页源代码; [0038] The source code obtaining sub-unit, for obtaining a page source code according to the instruction;

[0039] 所述窗口位置获得子单元,用于从所获得的网页源代码中获得网页中视频播放区域的位置信息; [0039] The sub-window position obtaining unit for obtaining position information in the video playback area on the page from the web page source code obtained;

[0040] 所述窗口建立子单元,用于根据所获得的视频播放区域的位置信息,在所述网页上层建立与所述视频播放区域位置相同的视频播放窗口。 [0040] The windowing sub-unit, position information for the video playback area according to the obtained video play region establishing the same location of the video playback window in the upper web.

[0041] 可选的,还包括:窗口关闭单元,用于网页视频播放结束后关闭所建立的视频播放窗口。 [0041] Optionally, further comprising: a window closing means for closing the end of the video playback window video playback page created.

[0042] 本发明实施例提供的一种网页视频播放方法及系统,可以在网页上层建立独立的视频播放窗口,并通过所建立的视频播放窗口播放网页视频。 Embodiment [0042] The present invention provides a system and method for playing video page provided can be established independent video playback window in the upper web, and video play window video playback pages created. 因此进行视频播放时不再需要将视频帧与网页内容进行合并。 Eliminating the need to merge with the video frames during video playback page content. 本发明减少了视频播放过程中的运算量,减小了浏览器的运行压力。 The present invention reduces the amount of calculation during the video playback, the operating pressure is reduced in the browser.

附图说明 BRIEF DESCRIPTION

[0043] 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 [0043] In order to more clearly illustrate the technical solutions in the embodiments or the prior art embodiment of the present invention, briefly introduced hereinafter, embodiments are described below in the accompanying drawings or described in the prior art needed to be used in describing the embodiments the drawings are only some embodiments of the present invention, those of ordinary skill in the art is concerned, without creative efforts, can derive from these drawings other drawings.

[0044] 图1为本发明实施例提供的一种网页视频播放方法的流程图; [0044] FIG. 1 is a flowchart of a method for video playback page according to an embodiment of the present invention;

[0045] 图2为本发明实施例提供的另一种网页视频播放方法的流程图; [0045] FIG 2 a flowchart of another web video playback method according to an embodiment of the present invention;

[0046] 图3为本发明实施例提供的另一种网页视频播放方法的流程图; [0046] FIG 3 a flow chart of another web video playback method according to an embodiment of the present invention;

[0047] 图4为本发明实施例提供的另一种网页视频播放方法的流程图; [0047] FIG 4 a flowchart of another web video playback method according to an embodiment of the present invention;

[0048] 图5为本发明实施例提供的另一种网页视频播放方法的流程图; [0048] FIG. 5 a flowchart of another web video playback method according to an embodiment of the present invention;

[0049] 图6为本发明实施例提供的一种网页视频播放系统的结构示意图。 [0049] FIG. 6 is a schematic structure of a web video playback system according to an embodiment of the present invention.

具体实施方式 Detailed ways

[0050] 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。 [0050] below in conjunction with the present invention in the accompanying drawings, technical solutions of embodiments of the present invention are clearly and completely described, obviously, the described embodiments are merely part of embodiments of the present invention, but not all embodiments example. 基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, all other embodiments of ordinary skill in the art without any creative effort shall fall within the scope of the present invention.

[0051] 如图1所示,本发明实施例提供的一种网页视频播放方法,可以包括: [0051] As shown in FIG 1 A web video playback method according to an embodiment of the present invention, comprising:

[0052] S100、接收网页视频播放指令; [0052] S100, the video player receives the instruction pages;

[0053] 可选的,网页视频播放指令可以为用户对网页视频播放按键的点击指令。 [0053] Alternatively, the web video player can command the user clicks on the instruction page video playback buttons.

[0054] S200、根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层; [0054] S200, the establishment of the video playback window in accordance with the instruction, the video display window is located in the upper web;

[0055] 在本方的实施例中,S200建立的视频播放窗口位于浏览器所打开的网页上面,优选的,该视频播放窗口的位置可以和网页中原有的视频播放区域的位置相同,视频播放窗口和网页内容叠加后的显示效果就可以和通过网页中的视频播放区域播放视频的网页的显示效果一致。 [0055] In an embodiment of the present side, S200 establishing video display window is located in the web browser to open the above, preferably, the position of the video display window of the web page and may be any original same video playback area, video playback after the display of overlapping windows and web content you can display and video playback pages of video play region through the pages of the same.

[0056] S300、通过所建立的视频播放窗口播放网页视频。 [0056] S300, through the established video playback window video playback pages.

[0057] 由于视频播放窗口不在网页中,而位于网页上层,因此不属于网页的一部分,独立于网页,因此网页中内容的展示与视频播放窗口中视频帧的播放互不干扰。 [0057] Since the video playback window is not a web page, and the page located in the upper layer, and therefore not part of the page, independent of the page, so the window showing the video player play video frames interfering page content. 在通过所建立的视频播放窗口播放网页视频的过程中,网页内容仍可以正常进行展示,并且不再需要与视频帧进行合并。 During the video playback window video playback page through the established web content you can still display normal and no longer need to be combined with the video frame.

[0058] 可选的,如图2所示,上述S200可以包括: [0058] Alternatively, as shown in FIG 2, the S200 may include:

[0059] S210、根据所述指令获得网页源代码; [0059] S210, page source code is obtained according to the instruction;

[0060] S220、从所获得的网页源代码中获得网页中视频播放区域的位置信息; [0060] S220, the position information of the web page to obtain the video playback area from the web page source code obtained;

[0061] S230、根据所获得的视频播放区域的位置信息,在所述网页上层建立与所述视频播放区域位置相同的视频播放窗口。 [0061] S230, the position information obtained by the video playback area to establish the position of the same video playback area video playback window in the web upper layer.

[0062] 可选的,如图3所示,上述S300可以包括: [0062] Alternatively, as shown in FIG. 3, the S300 may include:

[0063] S310、接收视频流文件; [0063] S310, receiving a video stream file;

[0064] 在本发明的实施例中,视频播放窗口在建立时即可为其分配缓冲区。 [0064] In an embodiment of the present invention, the video playback window in the buffer assigned to the establishment.

[0065] S320、调用解码器对所述视频流文件进行解码,获得视频帧; [0065] S320, call decoder for decoding the video stream file, a video frame is obtained;

[0066] 调用解码器对视频流文件进行解码时,可以逐帧的进行解码。 [0066] When the call decoder decodes the video stream file can be decoded frame by frame.

[0067] S330、将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放。 [0067] S330, the obtained video frames into the video display window corresponding to the buffer, the output of the video frame buffer to the video player play window.

[0068] 可选的,在本发明其他实施例中,与所述视频播放窗口对应的缓冲区可以包括:第一缓冲区和第二缓冲区,其中,第一缓冲区处于前台状态时,第二缓冲区处于后台状态;第一缓冲区处于后台状态时,第二缓冲区处于前台状态。 [0068] Alternatively, in other embodiments of the present invention, the window corresponding to the video playback buffer may include: a first buffer and a second buffer, wherein the buffer is in the foreground of the first state, the first two buffers in the background status; the first buffer is in the background state, the second buffer is in the foreground status. 如图4所示,上述S330可以包括: As shown, it may include the above-described S330 4:

[0069] S330-1、将当前时刻获得的视频帧放入处于后台状态的第一/第二缓冲区中,将处于前台状态的第二/第一缓冲区中的视频帧输出到所述视频播放窗口进行播放,播放后删除处于前台状态的第二/第一缓冲区中的视频帧; A second / first buffer of the first / second buffer [0069] S330-1, the current video frame time is put into a state in the background, the foreground in the state of the video frames to the video output play playback window, a second / first buffer in the foreground state after deleting the playback video frame;

[0070] S330-2、切换所述第一缓冲区和第二缓冲区的前后台状态; [0070] S330-2, switching the first buffer and the second buffer stage before and after the state;

[0071] 在执行S330-2后,可以返回继续执行S330-1。 [0071] After performing S330-2, you can return to continue S330-1.

[0072] 通过上述缓冲区前后台状态的调换,就可以使得视频帧放入缓冲区和从缓冲区中提取视频帧互不影响,保证了视频的正常播放。 [0072] stations by exchanging a state before and after the above buffer such that the video frame can be placed independently of each video frame buffer and extracted from the buffer, to ensure the normal video.

[0073] 可选的,如图5所示,本发明实施例提供的另一种网页视频播放方法,还可以包括: [0073] Optionally, as shown in FIG. 5, another web video playback method according to an embodiment of the present invention, further comprising:

[0074] S400、网页视频播放结束后关闭所建立的视频播放窗口。 [0074] S400, after the web video player to close the established video playback window.

[0075] 可选的,在视频播放窗口关闭后,可以收回为其分配的缓冲区。 [0075] Optionally, after the video playback window is closed, you can recover the buffer assigned to it.

[0076] 本发明实施例提供的一种网页视频播放方法,可以在网页上层建立独立的视频播放窗口,并通过所建立的视频播放窗口播放网页视频。 One kind of web video playback method according to an embodiment of the [0076] present invention, can create separate video playback window in the upper web, and video play window video playback pages created. 因此进行视频播放时不再需要将视频帧与网页内容进行合并。 Eliminating the need to merge with the video frames during video playback page content. 本发明减少了视频播放过程中的运算量,减小了浏览器的运行压力。 The present invention reduces the amount of calculation during the video playback, the operating pressure is reduced in the browser.

[0077] 与上述方法实施例相对应,本发明还提供了一种网页视频播放系统。 [0077] Example embodiments of the method described above corresponds to, the present invention also provides a web video playback system.

[0078] 如图6所示,本发明实施例提供的一种网页视频播放系统,可以包括:指令接收单元100、窗口建立单元200和视频播放单元300,其中: [0078] FIG. 6 A web video playback system according to an embodiment of the present invention, comprising: an instruction receiving unit 100, a windowing unit 200 and the video play unit 300, wherein:

[0079] 指令接收单元100,用于接收网页视频播放指令; [0079] The instruction receiving unit 100, a video player instructions for receiving a web page;

[0080] 可选的,网页视频播放指令可以为用户对网页视频播放按键的点击指令。 [0080] Alternatively, the web video player can command the user clicks on the instruction page video playback buttons.

[0081] 窗口建立单元200,用于根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层; [0081] The windowing unit 200, for establishing a video display window according to the command, the video display window is located in the upper web;

[0082] 由于视频播放窗口不在网页中,而位于网页上层,因此不属于网页的一部分,独立于网页,因此网页中内容的展示与视频播放窗口中视频帧的播放互不干扰。 [0082] Since the video playback window is not a web page, and the page located in the upper layer, and therefore not part of the page, independent of the page, so the window showing the video player play video frames interfering page content. 在通过所建立的视频播放窗口播放网页视频的过程中,网页内容仍可以正常进行展示,并且不再需要与视频帧进行合并。 During the video playback window video playback page through the established web content you can still display normal and no longer need to be combined with the video frame.

[0083] 可选的,窗口建立单元200,可以包括:源代码获得子单元、窗口位置获得子单元和窗口建立子单元,其中: [0083] Alternatively, the windowing unit 200, may include: obtaining subunit source code, obtaining sub-unit and window position windowing subunit, wherein:

[0084] 所述源代码获得子单元,用于根据所述指令获得网页源代码; [0084] The source code obtaining sub-unit, for obtaining a page source code according to the instruction;

[0085] 所述窗口位置获得子单元,用于从所获得的网页源代码中获得网页中视频播放区域的位置信息; The [0085] sub-window position obtaining unit for obtaining position information in the video playback area on the page from the web page source code obtained;

[0086] 所述窗口建立子单元,用于根据所获得的视频播放区域的位置信息,在所述网页上层建立与所述视频播放区域位置相同的视频播放窗口。 The [0086] windowing sub-unit, according to the position information of the video playback area obtained by establishing the position of the same video playback area video playback window in the web upper layer.

[0087] 视频播放单元300,用于通过所建立的视频播放窗口播放网页视频。 [0087] The video playback unit 300 for playing the video window video playback page over the established.

[0088] 可选的,视频播放单元300可以包括:视频流接收子单元、视频解码子单元和视频帧播放子单元,其中: [0088] Alternatively, the video playback unit 300 may include: a video stream receiving sub-unit, the video decoding sub-unit and a video frame playback sub-unit, wherein:

[0089] 所述视频流接收子单元,用于接收视频流文件; [0089] The sub video stream receiving unit for receiving a video stream file;

[0090] 所述视频解码子单元,用于调用解码器对所述视频流文件进行解码,获得视频帧; [0090] The video decoding sub-unit, for invoking a decoder file to decode the video stream to obtain video frames;

[0091] 所述视频帧播放子单元,用于将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放。 [0091] The video frame playback sub-unit, configured to obtain video frames into the video display window of the corresponding buffer, the output of said video frame buffer to play the video playback window .

[0092] 可选的,在本发明其他实施例中,与所述视频播放窗口对应的缓冲区可以包括:第一缓冲区和第二缓冲区,其中,第一缓冲区处于前台状态时,第二缓冲区处于后台状态;第一缓冲区处于后台状态时,第二缓冲区处于前台状态。 [0092] Alternatively, in other embodiments of the present invention, the window corresponding to the video playback buffer may include: a first buffer and a second buffer, wherein the buffer is in the foreground of the first state, the first two buffers in the background status; the first buffer is in the background state, the second buffer is in the foreground status.

[0093] 所述视频帧播放子单元,可以包括:后台处理子单元、前台处理子单元和切换子单元,其中: [0093] The video frame playback sub-unit may comprise: a background sub-processing unit, the processing sub-unit and the switching front subunit, wherein:

[0094] 所述后台处理子单元,用于将当前时刻获得的视频帧放入处于后台状态的第一/ 第二缓冲区中; [0094] The background processing sub-unit, the time for the current video frame is put into a first / second in a background state of the buffer;

[0095] 所述前台处理子单元,用于将处于前台状态的第二/第一缓冲区中的视频帧输出到所述视频播放窗口进行播放,播放后删除处于前台状态的第二/第一缓冲区中的视频帧; [0095] The reception processing sub-unit, a second / first buffer area for the foreground in the state of the output video frames to the video playback window play, delete play in the foreground status after the second / first the video frame buffer;

[0096] 所述切换子单元,用于切换所述第一缓冲区和第二缓冲区的前后台状态。 [0096] The sub-switching unit for switching a state of the front and back of the first buffer and the second buffer.

[0097] 通过上述缓冲区前后台状态的调换,就可以使得视频帧放入缓冲区和从缓冲区中提取视频帧互不影响,保证了视频的正常播放。 [0097] stations by exchanging a state before and after the above buffer such that the video frame can be placed independently of each video frame buffer and extracted from the buffer, to ensure the normal video.

[0098] 可选的,本发明实施例提供的另一种网页视频播放系统,还可以包括:窗口关闭单元,用于网页视频播放结束后关闭所建立的视频播放窗口。 [0098] Alternatively, another web video playback system according to an embodiment of the present invention may further comprise: a window closing unit, for video playback window is closed after the video player page created.

[0099] 可选的,在视频播放窗口关闭后,可以收回为其分配的缓冲区。 [0099] Optionally, after the video playback window is closed, you can recover the buffer assigned to it.

[0100] 本发明实施例提供的一种网页视频播放系统,可以在网页上层建立独立的视频播放窗口,并通过所建立的视频播放窗口播放网页视频。 One kind of web video playback system according to an embodiment [0100] of the present invention, you can create separate video playback window in the upper web, and video play window video playback pages created. 因此进行视频播放时不再需要将视频帧与网页内容进行合并。 Eliminating the need to merge with the video frames during video playback page content. 本发明减少了视频播放过程中的运算量,减小了浏览器的运行压力。 The present invention reduces the amount of calculation during the video playback, the operating pressure is reduced in the browser.

[0101] 需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。 [0101] Incidentally, herein, relational terms such as first and second and the like are only used to distinguish one entity or operation from another entity or action without necessarily requiring or implying these entities the presence of any such actual relationship or order between or operations. 而且,术语"包括"、"包含"或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。 Further, the term "comprising", "containing" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, article, or apparatus not include only those elements but not expressly listed further comprising the other elements, or further comprising such process, method, article, or apparatus inherent elements. 在没有更多限制的情况下,由语句"包括一个……"限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。 Without more constraints, by the wording "include a ......" defined does not exclude the existence of additional identical elements in the element comprising a process, method, article, or apparatus.

[0102] 本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。 [0102] In the present specification, various embodiments are described by way of using correlation, similar portions of the same between the various embodiments refer to each other, are different from the embodiment and the other embodiments described each embodiment focus. 尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。 In particular, for embodiments of the system, since they are substantially similar to the method embodiments, the description is relatively simple, some embodiments of the methods see relevant point can be described.

[0103] 以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。 [0103] The foregoing is only preferred embodiments of the present invention but are not intended to limit the scope of the present invention. 凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。 Any modifications within the spirit and principle of the present invention, equivalent substitutions, improvements, etc., are included within the scope of the present invention.

Claims (12)

1. 一种网页视频播放方法,其特征在于,包括: 接收网页视频播放指令; 根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层; 通过所建立的视频播放窗口播放网页视频。 A web video playback method, comprising: receiving a web video playback instruction; establishing video display window according to the command, the video display window is located in the upper web; video display window displays the web page created by the video.
2. 根据权利要求1所述的方法,其特征在于,所述通过所建立的视频播放窗口播放网页视频,包括: 接收视频流文件; 调用解码器对所述视频流文件进行解码,获得视频帧; 将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放。 2. The method according to claim 1, characterized in that the video play window video playback page created, comprising: receiving a video stream file; call decoder file to decode the video stream to obtain video frames ; the obtained video frames into the video display window corresponding to the buffer, the output of the video frame buffer to the video player play window.
3. 根据权利要求2所述的方法,其特征在于,与所述视频播放窗口对应的缓冲区包括: 第一缓冲区和第二缓冲区,其中,第一缓冲区处于前台状态时,第二缓冲区处于后台状态; 第一缓冲区处于后台状态时,第二缓冲区处于前台状态。 3. The method according to claim 2, wherein the buffer corresponding to the video play window comprising: a first buffer and a second buffer, wherein the first buffer is in the foreground status, the second buffer in the background status; the first buffer is in the background state, the second buffer is in the foreground status.
4. 根据权利要求3所述的方法,其特征在于,所述将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放,包括: 将当前时刻获得的视频帧放入处于后台状态的第一/第二缓冲区中,将处于前台状态的第二/第一缓冲区中的视频帧输出到所述视频播放窗口进行播放,播放后删除处于前台状态的第二/第一缓冲区中的视频帧; 切换所述第一缓冲区和第二缓冲区的前后台状态。 4. The method according to claim 3, wherein said obtained video frames into the video display window corresponding to the buffer, the output of the video frame buffer to the video play playback window, comprising: a video frame of the current time obtained into a first / second buffer is in the background state of the video frame in the foreground status to the video output of the second / first buffer play playback window, a second / first buffer in the foreground state after deleting the playback video frame; station before and after switching state of the first buffer and the second buffer.
5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层,包括: 根据所述指令获得网页源代码; 从所获得的网页源代码中获得网页中视频播放区域的位置信息; 根据所获得的视频播放区域的位置信息,在所述网页上层建立与所述视频播放区域位置相同的视频播放窗口。 5. The method of any one of 1 to 4 claim, wherein said video display window established according to the instruction, the video display window is located in the upper web, comprising: obtaining a source page in accordance with the instructions Code; obtaining position information in the video playback area on the page from the web page source code obtained; the position information obtained by the video playback area to establish the position of the same video playback area video playback window in the upper layer of the web.
6. 根据权利要求1至5中任一项所述的方法,其特征在于,还包括: 网页视频播放结束后关闭所建立的视频播放窗口。 6. The method according to claim 5, characterized in that, further comprising: a video playback window to close after the end of the established web video playback.
7. -种网页视频播放系统,其特征在于,包括:指令接收单元、窗口建立单元和视频播放单元,其中: 所述指令接收单元,用于接收网页视频播放指令; 所述窗口建立单元,用于根据所述指令建立视频播放窗口,所述视频播放窗口位于网页上层; 所述视频播放单元,用于通过所建立的视频播放窗口播放网页视频。 7. - kind of web video playback system comprising: instruction receiving unit, and a windowing unit video playing unit, wherein: the instruction receiving unit for receiving a video playback instruction page; the windowing unit for establishing a video playback window in accordance with the instructions, the video display window is located in the upper web; the video play unit for playing the video window video playback page over the established.
8. 根据权利要求7所述的系统,其特征在于,所述视频播放单元,包括:视频流接收子单元、视频解码子单元和视频帧播放子单元,其中: 所述视频流接收子单元,用于接收视频流文件; 所述视频解码子单元,用于调用解码器对所述视频流文件进行解码,获得视频帧; 所述视频帧播放子单元,用于将所获得的视频帧放入所述视频播放窗口对应的缓冲区中,将所述缓冲区中的视频帧输出到所述视频播放窗口进行播放。 8. The system according to claim 7, wherein said video playback unit, comprising: a receiving sub-unit video stream, the video decoding sub-unit and a video frame playback sub-unit, wherein: the video stream receiving sub-unit, for receiving a video stream file; the video decoding sub-unit, for invoking a decoder for decoding the video stream file, a video frame is obtained; the video frame playback sub-unit, configured to obtain video frames placed corresponding to the video playback window in the buffer, the output of said video frame buffer to the video playback window playback.
9. 根据权利要求8所述的系统,其特征在于,与所述视频播放窗口对应的缓冲区包括: 第一缓冲区和第二缓冲区,其中,第一缓冲区处于前台状态时,第二缓冲区处于后台状态; 第一缓冲区处于后台状态时,第二缓冲区处于前台状态。 9. The system of claim 8, wherein the buffer corresponding to the video play window comprising: a first buffer and a second buffer, wherein the first buffer is in the foreground status, the second buffer in the background status; the first buffer is in the background state, the second buffer is in the foreground status.
10. 根据权利要求9所述的系统,其特征在于,所述视频帧播放子单元,包括:后台处理子单元、前台处理子单元和切换子单元,其中: 所述后台处理子单元,用于将当前时刻获得的视频帧放入处于后台状态的第一/第二缓冲区中; 所述前台处理子单元,用于将处于前台状态的第二/第一缓冲区中的视频帧输出到所述视频播放窗口进行播放,播放后删除处于前台状态的第二/第一缓冲区中的视频帧; 所述切换子单元,用于切换所述第一缓冲区和第二缓冲区的前后台状态。 10. The system according to claim 9, wherein the video frame playback sub-unit, comprising: a background processing sub-unit, and a switching sub-unit foreground processing subunit, wherein: said background processing sub-unit, for the current video frame time is put into a first / second state of the buffer in the background; the foreground video frame output processing sub-unit, in the foreground status for the second / first buffer to the a second / first buffer to play said video playback window in the foreground status deleted after playback in the video frame; the switching sub-unit for switching a state of said first longitudinal station and a second buffer buffer .
11. 根据权利要求7至10中任一项所述的系统,其特征在于,所述窗口建立单元,包括: 源代码获得子单元、窗口位置获得子单元和窗口建立子单元,其中: 所述源代码获得子单元,用于根据所述指令获得网页源代码; 所述窗口位置获得子单元,用于从所获得的网页源代码中获得网页中视频播放区域的位置信息; 所述窗口建立子单元,用于根据所获得的视频播放区域的位置信息,在所述网页上层建立与所述视频播放区域位置相同的视频播放窗口。 11. The system of any one of claims 7 to 10, wherein said windowing unit, comprising: obtaining source code subunit, obtaining sub-unit and window position windowing sub-unit, wherein: the subunit obtaining source code, the source code for obtaining the page according to the instruction; the window position obtaining sub-unit, position information for obtaining the video playback area page from the web page source code obtained; establishing a sub-window It means, according to the position information of the video playback area obtained by establishing the position of the same video playback area video playback window in the upper layer of the web.
12. 根据权利要求7至11中任一项所述的系统,其特征在于,还包括:窗口关闭单元, 用于网页视频播放结束后关闭所建立的视频播放窗口。 12. The system of 7 to 11 according to any one of the preceding claims, characterized in that, further comprising: a window closing means for closing the end of the video playback window video playback page created.
CN201410341988.8A 2014-07-17 2014-07-17 Webpage video playing method and system CN104093060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410341988.8A CN104093060A (en) 2014-07-17 2014-07-17 Webpage video playing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410341988.8A CN104093060A (en) 2014-07-17 2014-07-17 Webpage video playing method and system

Publications (1)

Publication Number Publication Date
CN104093060A true CN104093060A (en) 2014-10-08

Family

ID=51640733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410341988.8A CN104093060A (en) 2014-07-17 2014-07-17 Webpage video playing method and system

Country Status (1)

Country Link
CN (1) CN104093060A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847996A (en) * 2016-05-25 2016-08-10 腾讯科技(深圳)有限公司 Video playing method and apparatus
WO2019179264A1 (en) * 2018-03-22 2019-09-26 杭州海康威视数字技术股份有限公司 Video playing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616281A (en) * 2009-06-26 2009-12-30 中兴通讯股份有限公司南京分公司 Method for locally amplifying picture played by mobile TV and mobile terminal
CN101702764A (en) * 2009-10-26 2010-05-05 深圳市同洲电子股份有限公司 Method and system for playing video and corresponding set top box
US20110131622A1 (en) * 2006-02-27 2011-06-02 Cisco Technology, Inc. Method and apparatus for immediate display of multicast iptv over a bandwidth constrained network
CN102117290A (en) * 2009-12-30 2011-07-06 北京搜狗科技发展有限公司 Method and system used for showing page elements in webpage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131622A1 (en) * 2006-02-27 2011-06-02 Cisco Technology, Inc. Method and apparatus for immediate display of multicast iptv over a bandwidth constrained network
CN101616281A (en) * 2009-06-26 2009-12-30 中兴通讯股份有限公司南京分公司 Method for locally amplifying picture played by mobile TV and mobile terminal
CN101702764A (en) * 2009-10-26 2010-05-05 深圳市同洲电子股份有限公司 Method and system for playing video and corresponding set top box
CN102117290A (en) * 2009-12-30 2011-07-06 北京搜狗科技发展有限公司 Method and system used for showing page elements in webpage

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847996A (en) * 2016-05-25 2016-08-10 腾讯科技(深圳)有限公司 Video playing method and apparatus
WO2019179264A1 (en) * 2018-03-22 2019-09-26 杭州海康威视数字技术股份有限公司 Video playing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20130198634A1 (en) Video Object Behavior in a User Interface
KR101246976B1 (en) Aspects of media content rendering
US9110890B2 (en) Selecting a language encoding of a static communication in a virtual universe
US9281013B2 (en) Systems and methods for transmission of media content
CN101099147A (en) Dialogue supporting apparatus
US9363448B2 (en) System and method for providing and interacting with coordinated presentations
CN102253802A (en) Ink lag compensation technique
US20090287646A1 (en) System and method for presenting a contextual action for an indicator
CN102647634B (en) Multi-fragment video playing method and device based on hypertext markup language (HTML) 5 video
CN103297742A (en) Data processing method, microprocessor, communication terminal and server
CN103024063A (en) Data sharing method, clients and data sharing system
CN101311919A (en) Text data display device capable of appropriately displaying text data
CN101950578A (en) Method and device for adding video information and method and device for displaying video information
CN103067787B (en) An intelligent interactive television system and method
TWI502977B (en) Audio/video playing device, audio/video processing device, systems, and method thereof
WO2014078093A1 (en) Content composer for third-party applications
US20150104155A1 (en) Systems and methods for real-time pixel switching
US8874429B1 (en) Delay in video for language translation
CN104159151A (en) Device and method for intercepting and processing of videos on OTT box
CN101465953A (en) Method for displaying picture and system for browsing digital television picture as well as television set-top box
CN104838333B (en) Multimedia audio volume is adjusted when switching between multiple multimedia content
CN103096134B (en) Based on data processing method and apparatus for live video and games
CN101815199A (en) Video processing method and terminal
US9569097B2 (en) Video streaming in a web browser
CN103092466B (en) A method and apparatus for operating a mobile terminal

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
RJ01