Video broadcasting method and device
Technical field
The present invention relates to field of computer technology, more particularly, to a kind of video broadcasting method and device.
Background technology
In supporting the online video website play or videoconference client, positive and advertisement generally fall into two different
Film source.At present, after loading and play advertisement by a broadcast window, then loaded by another broadcast window and just play
Piece.This mode easily causes Caton phenomenon when commencing play out positive, and easily produces blank screen etc. between advertisement and positive
Significantly switching vestige, the viewing experience of impact user.
Content of the invention
Technical problem
In view of this, the technical problem to be solved in the present invention is, existing video display arts are easily just commencing play out
Cause Caton phenomenon during piece, and easily produce significantly switching vestige between advertisement and positive.
Solution
In order to solve above-mentioned technical problem, according to one embodiment of the invention, there is provided a kind of video broadcasting method, bag
Include:
In the case of receiving the request playing video, create broadcast window;
In the case of advertisement video before described video bag video containing positive and positive video, carrying advertisement video counts
According to positive video data;
Play the advertisement video data of loading, and the advertisement video in loading described in broadcasting by described broadcast window
During data, suspend and play described positive video data, and described positive video is set to hidden state;
Meet pre-conditioned in the case of, play the positive video data of loading by described broadcast window.
For said method, in a kind of possible implementation, in described video bag video containing positive and positive video
In the case of advertisement video before, carrying advertisement video data and positive video data, including:
In the case of advertisement video before described video bag video containing positive and positive video, create advertising process and
Positive process;
By described advertising process carrying advertisement video data, and positive video data is loaded by described positive process.
For said method, in a kind of possible implementation, meet pre-conditioned in the case of, broadcast by described
Put the positive video data that loading play by window, including:
Meet pre-conditioned in the case of, destroy described advertising process;
Described positive video is set to dispaly state, and plays the positive video counts of loading by described broadcast window
According to.
For said method, in a kind of possible implementation, meet pre-conditioned, including:
Described advertisement video finishes.
For said method, in a kind of possible implementation, meet pre-conditioned, including:
Described advertisement video plays error.
For said method, in a kind of possible implementation, methods described also includes:
In described video bag video containing positive, and in the case of not comprising the advertisement video before positive video, just load
Piece video data;
Play the positive video data of loading by described broadcast window.
In order to solve above-mentioned technical problem, according to another embodiment of the present invention, there is provided a kind of video play device, wrap
Include:
Broadcast window creation module, for, in the case of receiving the request playing video, creating broadcast window;
First load-on module, for the situation of the advertisement video before described video bag video containing positive and positive video
Under, carrying advertisement video data and positive video data;
First play control module, for being play the advertisement video data of loading by described broadcast window, and is being broadcast
Described in putting during the advertisement video data of loading, suspend and play described positive video data, and by described positive video
It is set to hidden state;
Second play control module, for meet pre-conditioned in the case of, by described broadcast window play plus
The positive video data carrying.
For said apparatus, in a kind of possible implementation, described first load-on module includes:
Process creation submodule, for the feelings of the advertisement video before described video bag video containing positive and positive video
Under condition, create advertising process and positive process;
Load submodule, for by described advertising process carrying advertisement video data, and added by described positive process
Carry positive video data.
For said apparatus, in a kind of possible implementation, described second play control module includes:
Process destroy submodule, for meet pre-conditioned in the case of, destroy described advertising process;
Play control submodule, for described positive video is set to dispaly state, and play by described broadcast window
The positive video data of loading.
For said apparatus, in a kind of possible implementation, meet pre-conditioned, including:
Described advertisement video finishes.
For said apparatus, in a kind of possible implementation, meet pre-conditioned, including:
Described advertisement video plays error.
For said apparatus, in a kind of possible implementation, described device also includes:
Second load-on module, in described video bag video containing positive, and the advertisement before not comprising positive video regards
In the case of frequency, load positive video data;
3rd play control module, for playing the positive video data of loading by described broadcast window.
Beneficial effect
In the case of the advertisement video before video bag video containing positive and positive video, carrying advertisement regards simultaneously
Frequency evidence and positive video data, and advertisement video and positive video are play by same broadcast window, real according to the present invention
Apply the video broadcasting method of example and in the case that device can have advertisement video before positive video, reduce in advertisement video
Finish and commence play out the probability producing Caton phenomenon during positive video, and between advertisement video and positive video no
Blank screen etc. significantly switches vestige such that it is able to improve the fluency of video playback, improves the viewing experience of user.
According to below with reference to the accompanying drawings, to detailed description of illustrative embodiments, the further feature of the present invention and aspect will become
Clear.
Brief description
Comprise in the description and constitute the accompanying drawing of a part of description and description together illustrates the present invention's
Exemplary embodiment, feature and aspect, and for explaining the principle of the present invention.
Fig. 1 illustrates the flowchart of video broadcasting method according to an embodiment of the invention;
Fig. 2 illustrates that the one of video broadcasting method step S102 according to an embodiment of the invention exemplary realizes flow process
Figure;
Fig. 3 illustrates that the one of video broadcasting method step S104 according to an embodiment of the invention exemplary realizes flow process
Figure;
Fig. 4 illustrates an exemplary flowchart of video broadcasting method according to an embodiment of the invention;
Fig. 5 illustrates the structured flowchart of video play device according to another embodiment of the present invention;
Fig. 6 illustrates an exemplary structured flowchart of video play device according to another embodiment of the present invention;
Fig. 7 shows a kind of structured flowchart of video playback apparatus of an alternative embodiment of the invention.
Specific embodiment
Describe various exemplary embodiments, feature and the aspect of the present invention below with reference to accompanying drawing in detail.Identical in accompanying drawing
Reference represent the same or analogous element of function.Although the various aspects of embodiment shown in the drawings, remove
Non-specifically points out it is not necessary to accompanying drawing drawn to scale.
Special word " exemplary " means " as example, embodiment or illustrative " here.Here as " exemplary "
Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, in order to better illustrate the present invention, giving numerous details in specific embodiment below.
It will be appreciated by those skilled in the art that not having some details, the present invention equally can be implemented.In some instances, for
Method well known to those skilled in the art, means, element and circuit are not described in detail, in order to highlight the purport of the present invention.
Embodiment 1
Fig. 1 illustrates the flowchart of video broadcasting method according to an embodiment of the invention.The execution master of the present embodiment
Body can be PC (Personal Computer, PC) or the mobile terminal such as mobile phone or panel computer, also
Can be other video play devices, be not limited thereto.The video broadcasting method that the present embodiment provides can apply to various
In videoconference client or video website, it is not limited thereto.As shown in figure 1, the method mainly includes:
In step S101, in the case of receiving the request playing video, create broadcast window.
As an example of the embodiment of the present invention, each receiving is play to the request of video, can only create
One broadcast window (handle).In the case of advertisement video before this video bag video containing positive and positive video, pass through
This broadcast window plays positive video and advertisement video.In this video bag video containing positive, and before not comprising positive video
In the case of advertisement video, positive video is play by this broadcast window.
In step s 102, in the case of the advertisement video before this video bag video containing positive and positive video, plus
Carry advertisement video data and positive video data.
Wherein, positive video can refer to the main contents in the video of user's request broadcasting.For example, user wants viewing electricity
Shadow A1, and ask play film A1 corresponding video A, video A include film A1 and film before advertisement A2, then in video A
Positive video is film A1, and the advertisement video in video A is advertisement A2.
Wherein, the advertisement video before positive video is signposted before being referred to as this positive video video.
As an example of the embodiment of the present invention, the advertisement before this video bag video containing positive and positive video regards
In the case of frequency, carrying advertisement video data and positive video data simultaneously.
In step s 103, play the advertisement video data of loading by broadcast window, and play the wide of loading
During accusing video data, suspend and play positive video data, and positive video is set to hidden state.Wherein, playing
During the advertisement video data of loading, continue to load positive video data.
In step S104, meet pre-conditioned in the case of, play the positive video of loading by broadcast window
Data.
In a kind of possible implementation, meet pre-conditioned, including:Advertisement video finishes.In this realization side
In formula, detecting in the case that advertisement video finishes, playing the video data of loading by broadcast window.
In alternatively possible implementation, meet pre-conditioned, including:Advertisement video plays error.In this realization
In mode, in the case of advertisement video broadcasting error is detected, play the video data of loading by broadcast window, thus
Avoid advertisement video to play the broadcasting of error impact positive video such that it is able to improve the viewing experience of user, and can improve
The viewing amount of this video and viewing duration.
In embodiments of the present invention, by receiving the request playing video and this video bag video containing positive and positive
In the case of advertisement video before video, carrying advertisement video and positive video simultaneously, can reduce and play in advertisement video
Finish and commence play out the probability producing Caton phenomenon during positive video, so that user is finished in advertisement video and start to broadcast
Put during positive video without waiting for loading positive video data such that it is able to improve viewing experience.Additionally, playing in advertisement video
When finishing and commence play out positive video, if user drags the progress bar of video it is also possible to relatively rapid respond user's request,
Reduce the user when advertisement video finishes and commences play out positive video and drag the probability that progress bar produces Caton phenomenon,
So as to improve viewing experience.Meanwhile, advertisement video and positive video are play by same broadcast window, it can be avoided that extensively
Accuse and the significantly switching vestige such as blank screen occurs between video and positive video, thus make the rank between advertisement video and positive video
Connect more smooth, smooth such that it is able to improve viewing experience further.
Fig. 2 illustrates that the one of video broadcasting method step S102 according to an embodiment of the invention exemplary realizes flow process
Figure.As shown in Fig. 2 in the case of advertisement video before this video bag video containing positive and positive video, carrying advertisement regards
Frequency evidence and positive video data, including:
In step s 201, in the case of the advertisement video before this video bag video containing positive and positive video, wound
Build advertising process and positive process.
As an example of the embodiment of the present invention, can be created wide by intermediate management dispatch layer (nplayer.dll)
Announcement process (such as ad.exe) and positive process (such as player.exe).In this example, advertising process and positive process can
Think process independent mutually.It is independent that the video broadcasting method that this example provides can apply to advertising process with positive process
In the online playing module of the videoconference client of process (independent process) form or video website etc., here
It is not construed as limiting.
In step S202, by advertising process carrying advertisement video data, and positive video is loaded by positive process
Data.
As an example of the embodiment of the present invention, advertising process and positive process are being created by intermediate management dispatch layer
Afterwards, intermediate management dispatch layer can start advertising process and positive process simultaneously, by advertising process carrying advertisement video counts
According to, and send prestrain (preload) order to positive process, positive video data is loaded by positive process.In intervalve
After reason dispatch layer starts advertising process and positive process, first broadcast window is taken by advertising process, play by broadcast window
The advertisement video data of loading, and playing during the advertisement video data of loading, positive process is set to time-out
And hidden state, that is, suspend broadcasting positive video data, and positive video is set to hidden state.
As an example of embodiments of the invention, intermediate management dispatch layer can be also used for receiving and is derived from broadcast interface
Operational order, and the operational order of reception is passed to broadcasting process (i.e. advertising process or positive process), with to broadcasting
Process plays out control.For example, intermediate management dispatch layer can be also used for receiving time-out (pause) life from broadcast interface
Order, and the pause command of reception is passed to broadcasting process, so that play process suspension playing.Additionally, intermediate management dispatch layer
Can be also used for receiving the output message coming from broadcasting process, and the output message of the process of broadcasting is passed to broadcast window.
For example, a management and dispatching layer can be also used for receiving the current play time coming from broadcasting process, and working as the process of broadcasting
Front reproduction time passes to broadcast window, so that broadcast window display current play time.
Fig. 3 illustrates that the one of video broadcasting method step S104 according to an embodiment of the invention exemplary realizes flow process
Figure.As shown in figure 3, meet pre-conditioned in the case of, play the positive video data of loading by broadcast window, bag
Include:
In step S301, meet pre-conditioned in the case of, destroy advertising process.
For example, it is possible in the case that advertisement video finishes or advertisement video plays error, destroy advertising process.
In step s 302, positive video is set to dispaly state, and is regarded by the positive that broadcast window plays loading
Frequency evidence.
In this example, after destroying advertising process, wake up positive process, positive video is set to dispaly state, and
Play the positive video data of loading by broadcast window.
Fig. 4 illustrates an exemplary flowchart of video broadcasting method according to an embodiment of the invention.As Fig. 4 institute
Show, the method includes:
In step S401, in the case of receiving the request playing video, create broadcast window.
In step S402, judge whether this video comprises the advertisement video before positive video, if so, then execution step
S403, otherwise execution step S406.
In step S403, carrying advertisement video data and positive video data.
In step s 404, play the advertisement video data of loading by broadcast window, and play the wide of loading
During accusing video data, suspend and play positive video data, and positive video is set to hidden state.
In step S405, judge whether to meet pre-conditioned, if so, then execution step S407, otherwise return to step
S404.
In step S406, load positive video data.
In step S 407, the positive video data of loading is play by broadcast window.
As an example of the embodiment of the present invention, do not comprise the situation of the advertisement video before positive video in this video
Under, positive process can be waken up by intermediate management dispatch layer, broadcast window be taken by positive process, is loaded by positive process
Positive video data, and the positive video data of loading is play by broadcast window.
As an example of the embodiment of the present invention, meet pre-conditioned in the case of, intermediate management dispatch layer is permissible
Detect and meet pre-conditioned message, and send wake command (such as pase_hide_0 order) to positive process, so that just
Piece process is waken up, and in other words, makes positive process take broadcast window, to play the positive video of loading by broadcast window
Data.
So, in the case of by the advertisement video before video bag video containing positive and positive video, load simultaneously
Advertisement video data and positive video data, and advertisement video and positive video are play by same broadcast window, according to this
In the case that the video broadcasting method of inventive embodiments can have advertisement video before positive video, reduce in advertisement video
Finish and commence play out the probability producing Caton phenomenon during positive video, and between advertisement video and positive video no
Blank screen etc. significantly switches vestige such that it is able to improve the fluency of video playback, improves the viewing experience of user.
Embodiment 2
Fig. 5 illustrates the structured flowchart of video play device according to another embodiment of the present invention.Device shown in Fig. 5 is permissible
For running the video broadcasting method shown in Fig. 1.For convenience of description, illustrate only in Figure 5 related to the embodiment of the present invention
Part.
As shown in figure 5, this device includes:Broadcast window creation module 51, for receiving the request playing video
In the case of, create broadcast window;First load-on module 52, for before described video bag video containing positive and positive video
In the case of advertisement video, carrying advertisement video data and positive video data;First play control module 53, for by institute
State the advertisement video data that broadcast window plays loading, and described in playing during the advertisement video data of loading,
Suspend and play described positive video data, and described positive video is set to hidden state;Second play control module 54, is used for
Meet pre-conditioned in the case of, play the positive video data of loading by described broadcast window.
Fig. 6 illustrates an exemplary structured flowchart of video play device according to another embodiment of the present invention.Shown in Fig. 6
Device can be used for run Fig. 1 to Fig. 4 shown in video broadcasting method.For convenience of description, illustrate only in figure 6 and this
The related part of inventive embodiments.In Fig. 6, label and Fig. 5 identical assembly have identical function, and for simplicity's sake, it is right to omit
The detailed description of these assemblies.
In a kind of possible implementation, described first load-on module 52 includes:Process creation submodule 521, is used for
In the case of advertisement video before described video bag video containing positive and positive video, create advertising process and positive enters
Journey;Load submodule 522, for by described advertising process carrying advertisement video data, and by the loading of described positive process
Positive video data.
In a kind of possible implementation, described second plays the 54 pieces of inclusions of control mould:Process destroys submodule 541,
For meet pre-conditioned in the case of, destroy described advertising process;Play control submodule 542, for by described positive
Video is set to dispaly state, and plays the positive video data of loading by described broadcast window.
In a kind of possible implementation, meet pre-conditioned, including:Described advertisement video finishes.
In a kind of possible implementation, meet pre-conditioned, including:Described advertisement video plays error.
In a kind of possible implementation, described device also includes:Second load-on module 55, in described video bag
Video containing positive, and in the case of not comprising the advertisement video before positive video, load positive video data;3rd plays control
Molding block 56, for playing the positive video data of loading by described broadcast window.
It should be noted that so, by the feelings of the advertisement video before video bag video containing positive and positive video
Under condition, carrying advertisement video data and positive video data simultaneously, and advertisement video and just is play by same broadcast window
Piece video, in the case of can there is advertisement video before positive video in video play device according to embodiments of the present invention,
Reduce when advertisement video finishes and commences play out positive video produce Caton phenomenon probability, and advertisement video with
Between positive video, no blank screen etc. significantly switches vestige such that it is able to improve the fluency of video playback, improves the sight of user
See experience.
Embodiment 3
Fig. 7 shows a kind of structured flowchart of video playback apparatus of an alternative embodiment of the invention.Described video is broadcast
Putting equipment 1100 can be host server, personal computer PC or the portable portable computing possessing computing capability
Machine or terminal etc..The specific embodiment of the invention does not limit to implementing of calculate node.
Described video playback apparatus 1100 include processor (processor) 1110, communication interface (Communications
Interface) 1120, memorizer (memory) 1130 and bus 1140.Wherein, processor 1110, communication interface 1120 and
Memorizer 1130 completes mutual communication by bus 1140.
Communication interface 1120 is used for and network device communications, and wherein the network equipment includes such as Virtual Machine Manager center, is total to
Enjoy storage etc..
Processor 1110 is used for configuration processor.Processor 1110 is probably a central processor CPU, or special collection
Become circuit ASIC (Application Specific Integrated Circuit), or be arranged to implement the present invention
One or more integrated circuits of embodiment.
Memorizer 1130 is used for depositing file.Memorizer 1130 may comprise high-speed RAM memorizer it is also possible to also include non-
Volatile memory (non-volatile memory), for example, at least one disk memory.Memorizer 1130 can also be deposited
Memory array.Memorizer 1130 is also possible to by piecemeal, and described piece can be combined into virtual volume by certain rule.
In a kind of possible embodiment, said procedure can be the program code including computer-managed instruction.This journey
Sequence is particularly used in:Realize the operation of each step in embodiment 1.
Those of ordinary skill in the art are it is to be appreciated that each exemplary cell in embodiment described herein and algorithm
Step, being capable of being implemented in combination in electronic hardware or computer software and electronic hardware.These functions are actually with hardware also
Being software form to realize, the application-specific depending on technical scheme and design constraint.Professional and technical personnel can be directed to
Specifically application selects different methods to realize described function, but this realization is it is not considered that exceed the model of the present invention
Enclose.
If to be realized using in the form of computer software described function and as independent production marketing or use when,
To a certain extent it is believed that all or part (part for example prior art being contributed) of technical scheme is
Embody in form of a computer software product.This computer software product is generally stored inside the non-volatile of embodied on computer readable
In storage medium, including some instructions with so that computer equipment (can be that personal computer, server or network set
Standby etc.) all or part of step of execution various embodiments of the present invention method.And aforesaid storage medium include USB flash disk, portable hard drive,
Read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic
Dish or CD etc. are various can be with the medium of store program codes.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by described scope of the claims.