The seamless play method of multistage Media Stream
Technical field
The present invention relates to a kind of media play technology, relate in particular to and a kind ofly play continuously and, belong to medium digital processing technology field in vision and the zero seamless play technology of being interrupted acoustically to the relatively independent Media Stream of multistage.
Background technology
As the making rapid progress of multimedia audiovisual technology, various films and television programs full-blown flowers brilliances leapt to people's eyes.Except that various cinematographic works of producing extensively, most collection of dramas or variety, serial, documentary film all are that the media stream file form with hundreds of million exists.Playing continuously according to the playlist layout, particularly when different section Media Streams switch, almost invariably staying and dodged disconnected sensation, " card " that promptly is commonly called as to people.Its reason is that prior art is when each section Media Stream switches; Need be with the used separator of last Media Stream section, decoder and renderer are all over, and then reinitialize separator according to back one Media Stream section again; Decoder and renderer, this certainly will cause tangible switching time at interval.
Summary of the invention
The objective of the invention is to propose a kind of seamless play method of multistage Media Stream, eliminate interval switching time between adjacent two sections Media Streams, realize vision and acoustically zero seamless play at interval.
The purpose of seamless play of the present invention, its realization comprises step:
I, the i section that prestores Media Stream, said i section Media Stream is the i local data flow or has accomplished one of i network data flow of partial buffer;
II, establishment i separator; Analyze i section Media Stream and obtain file type and audio/video coded message, and create polymorphic type compatible audio decoder, audio frequency renderer, Video Decoder and video renderer according to the file type and the audio/video coded message of the 1st section Media Stream;
III, i separator read voice data and video data from i section Media Stream; Be sent to audio decoder and Video Decoder respectively; Decoded voice data and video data are sent to audio frequency renderer and video renderer more respectively, play to present i section Media Stream;
IV, before i section Media Stream play to finish, accomplish and prepare i+1 section Media Stream and create the i+1 separator; And analyze said i+1 section Media Stream, wherein said i+1 section Media Stream is the i+1 local data flow or has accomplished one of i+1 network data flow of partial buffer;
V, i separator are accomplished the disengaging time of i section Media Stream are play the concluding time early than it; Data buffering space based on two decoders and two renderers; After the i separator is accomplished the separation to i section Media Stream; Adopt the i+1 separator to replace the i separator, send voice data and the video data that reads from i+1 section Media Stream respectively, seamless play i section, i+1 section Media Stream to zero two decoders that are interrupted running; I=1 in step I to the step V, 2 ... N, N+1 are the Media Stream hop count.
Preferably, said i+1 separator is created in advance, with the i separator be created in the lump i section Media Stream ready after.
Preferably, said multistage Media Stream is that local data flow mixes broadcast with network data flow, and Media Stream to be broadcast is when being network data flow, and the beginning part that adopts buffer download of network data stream is with the completion Media Stream that prestores.
The application of the inventive method is implemented; Its significant technique effect is embodied in: the feasible program that this seamless play method provides multistage Media Stream continuous seamless to play; And do not have at the player hardware environment under the condition of increase, greatly improved the performance and the user experience of multimedia player.
Following constipation closes accompanying drawing, and specific embodiments of the invention is done further to detail, so that technical scheme of the present invention is easier to understand, grasp.
Description of drawings
Fig. 1 is the functional block diagram that seamless play method of the present invention is applied to first process status of network multistage Media Stream embodiment;
Fig. 2 is the functional block diagram of second process status embodiment illustrated in fig. 1;
Fig. 3 is the functional block diagram of the 3rd process status embodiment illustrated in fig. 1;
Fig. 4 is a realization functional integrity flow chart embodiment illustrated in fig. 1.
Embodiment
For satisfying the multimedia audiovisual requirement that day by day promotes, eliminate the switching interval in the continuous playing process of multistage Media Stream.Creator of the present invention has carried out research targetedly to this, innovation has proposed a kind of seamless play method of multistage Media Stream, can realize vision and acoustically real zero seamless play at interval.
The enforcement of this seamless play method can be in local media stream and the compatible broadcast of network media stream.Spread to put with the network media and be example.To shown in Figure 3, roughly illustrated this each process status of network multistage Media Stream (wherein two neighboring sections) player method like Fig. 1.Visible from illustrating: its first process status is for playing the process of the 1st section Media Stream.Corresponding the 1st section Media Stream, that participates in broadcast work comprises buffer 1, the 1 separator (being separator 1), audio decoder, audio frequency renderer, Video Decoder and video renderer.This process status and the general media method of putting identical (for known prior art) of spreading.Different is relative first process status of second process status as shown in Figure 2 when playing the 1st section Media Stream, and buffer 2 carries out the download buffering of the 2nd section Media Stream simultaneously.And the 3rd process status as shown in Figure 3 is visible: the 1st section Media Stream do not play end (still be in the work and can know from two renderers) yet; And under the situation of sound, Video Decoder and renderer continuous firing; Former the 1st separator has been replaced for the 2nd separator (being separator 2), stops using or treats that follow-up other Media Stream separates subsequent use and buffer 1 and separator 1 are shelved a side.
More than three process status generality showed the flesh and blood of seamless play method of the present invention, for the embodiment of this seamless play method is described more intuitively,, specify playing process below in conjunction with entire flow figure shown in Figure 4.
Be the beginning of this entire flow with the 1st section Media Stream broadcast; The 1st section, the 2nd section Media Stream is network data flow in this example, thus need utilize buffer 1 to cushion download from Internet resources, and for the 1st network data flow of accomplishing the beginning part buffering; Just creating separator 1 analyzes it; So-called here separator has general versatility, is used for file type and the audio/video coded message of analyzing medium stream etc., is not its type of special qualification.According to 1 pair of the 1st section Voice & Video coded message that the Media Stream analysis obtains of separator; Create audio decoder, audio frequency renderer, Video Decoder and video renderer; Conventional method by media play decodes, play up, play and appear; And each decoder and the renderer created have the compatibility to the polymorphic type Media Stream, and have certain data buffering space separately, need not to create repeatedly or initialization.Wherein decoding respectively and play up for voice data and video data is well known to those skilled in the art, and also non-the application's key technology is so will not give unnecessary details.
The main points of this seamless play method of the present invention are convenient to begin this moment, the 1st section Media Stream play finish before, the 2nd section Media Stream of just expection being play cushions download, and creates separator 2 it is analyzed.In this example, the zero-time that begins to cushion, create separator 2 for the 2nd section Media Stream is judged to be the 1st section Media Stream of distance and finishes playing preceding two minutes.Generally, be enough to during this period of time accomplish the 2nd section Media Stream (perhaps subsequent segment Media Stream) preparatory buffering, create separator, analyze preparations such as separation.This zero-time can arbitrarily define under the actual conditions; Can be to remain nM on the 1st section media stream data amount size (n is 2; 5; 10 etc.) time, in addition the 1st section Media Stream separate accomplish or with the 1st section Media Stream ready after, only need satisfy the last period Media Stream play to accomplish before finishing and getting final product.For ease of follow-up explanation, defining this step is the preparation starting point step 100 of back one section Media Stream.
Behind the mask work that separator 1 is accomplished the 1st section Media Stream, just directly with separator 2 replacement separators 1, continuing provides data to each decoder.Generally; Separator 1 is accomplished the broadcast concluding time of the time of mask work early than the 1st section Media Stream; And data buffering space based on two decoders and two renderers; The separator replacement is switched the back and is separated voice data and the video data that extracts to zero two decoders transmissions that are interrupted running, can realize the seamless continuous broadcast of the 1st section, the 2nd section Media Stream.
The above is the seamless play of continuous two sections Media Streams, the whole playing process of terminates after the 2nd section Media Stream finishes playing.When Media Stream is the N+1 section (N>2); Above playing process can circulate to carry out from step 100 backward and get final product by each section Media Stream.
More than specify for the embodiment of multistage network media stream, be intended to the clear innovation essence of understanding technical scheme of the present invention, it is equally applicable to the seamless play of multistage local media stream certainly, has just removed the flow process of buffering from.
To sum up the embodiment for the seamless play method of multistage Media Stream of the present invention details, and can make much of the substantive distinguishing features and significant technique effect of this method.It provides the feasible program of multistage Media Stream continuous seamless broadcast, and does not have under the condition of any variation at the player hardware environment, has greatly improved the performance and the user experience of multimedia player.