CN102521279A - Playing method, playing system and player of streaming media files - Google Patents

Playing method, playing system and player of streaming media files Download PDF

Info

Publication number
CN102521279A
CN102521279A CN2011103804449A CN201110380444A CN102521279A CN 102521279 A CN102521279 A CN 102521279A CN 2011103804449 A CN2011103804449 A CN 2011103804449A CN 201110380444 A CN201110380444 A CN 201110380444A CN 102521279 A CN102521279 A CN 102521279A
Authority
CN
China
Prior art keywords
address
formation
memory
data
broadcast
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN2011103804449A
Other languages
Chinese (zh)
Inventor
张世虎
朱二龙
陶婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN2011103804449A priority Critical patent/CN102521279A/en
Publication of CN102521279A publication Critical patent/CN102521279A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention is suitable for the technical field of computers and provides a playing method, a playing system and a player of streaming media files, which comprise receiving streaming media data playing request, searching data address of requested streaming media data in a played address array according to the streaming media data playing request, acquiring buffer zone internal memory block address that the streaming media data correspond to in the played address array when searching the data address in the played address array, acquiring streaming media data in the internal memory block corresponding to the buffer zone internal memory block address, playing the streaming media data and storing the buffer zone internal memory address in the played address array. The internal memory block of played streaming media data is not cancelled immediately and still stored in a buffer zone to respond to one more received playing request for playing the streaming media data. Accordingly, response time and playing smoothness of the streaming media playing request are effectively improved by optimizing buffer mechanism of the streaming media data.

Description

A kind of files in stream media player method, system and player
Technical field
The invention belongs to field of computer technology, relate in particular to a kind of files in stream media player method, system and player.
Background technology
Streaming Media is meant the media formats that the mode of employing stream transmission is play at Internet/Intranet, like audio frequency, video or multimedia file.Streaming Media is not downloaded whole file before broadcast, only will begin partial content deposits internal memory in, in computing machine, packet is carried out buffer memory and media data is correctly exported.
At present, when playing stream media,, and define a read pointer and write pointer normally through fixed allocation one block buffer, on one side in the buffer zone read data, write data in the buffer zone on one side.After read pointer pulls up to write pointer, then stop read data and wait for write data, and when write pointer pulls up to read pointer, then stop write data and wait for read data, thus the broadcast of realization Streaming Media.In addition, also can be through fixing buffer zone being divided into the data block of identical size, with array or to the mode of row write data on one side, on one side write data, run through and data block is returned formation after finishing.Yet, no matter adopt above-mentioned which kind of mode, when client asks to play these stream medium datas once more, all need from server, obtain this stream medium data once more, cause the response time of user command to be extended, reduced the fluency of streaming media playing.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of files in stream media player method; Prior art is intended to solve owing to can't provide a kind of effective files in stream media player method; Cause when asking play stream media data prolonging the response time, the problem that the fluency of streaming media playing reduces because of download stream media data again.
The embodiment of the invention is achieved in that a kind of files in stream media player method, and said method comprises the steps:
The request of receiving stream media data playback is according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation;
When in broadcast address formation, finding said data address, in the formation of said broadcast address, obtain said stream medium data corresponding cache district block address memory;
In the memory block corresponding, obtain said stream medium data, play said stream medium data with said buffer area block address memory.
Another purpose of the embodiment of the invention is to provide flow medium file playing system, and said system comprises:
The first address search unit is used for the request of receiving stream media data playback, according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation;
The first block address memory acquiring unit is used for when when the broadcast address formation finds said data address, in the formation of said broadcast address, obtains said stream medium data corresponding cache district block address memory; And
First-class media data broadcast unit is used for playing said stream medium data, and said buffer area memory address being saved in the formation of said broadcast address obtaining said stream medium data with the corresponding memory block of said buffer area block address memory.
Another purpose of the embodiment of the invention is to provide a kind of player that comprises above-mentioned flow medium file playing system.
The embodiment of the invention is passed through the data address according to the stream medium data of stream medium data playing request search request; When the broadcast address formation finds the data address of obtaining; Obtaining stream medium data corresponding cache district block address memory in the broadcast address formation, in the memory block corresponding, obtain stream medium data with the buffer area block address memory, play this stream medium data; And the buffer area memory address is saved in broadcast address formation; Need download played data again thereby overcome in the existing streaming media playing process, cause the request responding time lengthening, the problem that the fluency of streaming media playing reduces; Optimize the caching mechanism of stream medium data, improved the fluency of streaming media playing request responding speed and broadcast effectively.
Description of drawings
Fig. 1 is the realization flow figure of the files in stream media player method that provides of the embodiment of the invention one;
Fig. 2 is the realization flow figure of the files in stream media player method that provides of the embodiment of the invention two;
Fig. 3 is the realization flow figure of the files in stream media player method that provides of the embodiment of the invention three;
Fig. 4 is the realization flow figure of the files in stream media player method that provides of the embodiment of the invention four;
Fig. 5 is the structural drawing of the flow medium file playing system that provides of the embodiment of the invention six;
Fig. 6 is the structural drawing of the flow medium file playing system that provides of the embodiment of the invention seven.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Below in conjunction with specific embodiment concrete realization of the present invention is described in detail:
Embodiment one:
Fig. 1 shows the realization flow of the files in stream media player method that the embodiment of the invention one provides, and details are as follows:
In step S101, the request of receiving stream media data playback is according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation.
In embodiments of the present invention; The data address of stream medium data can be the offset address of the last relatively stream medium data piece of stream medium data that request is play in the playing request; Or relative address and other of stream medium data piece can be used for representing the address information of stream medium data piece in the same files in stream media, this do not limited here.In the practical implementation process, the playing request of the stream medium data that receives can be that the user plays tool bar or triggering generations such as input play position, reproduction time through pulling, and this is not limited equally here.After the data address that gets access to stream medium data, searching this data address in the broadcast address formation.
In step S102, when in broadcast address formation, finding said data address, obtaining block address memory in the broadcast address formation with said stream medium data corresponding cache district.
In embodiments of the present invention; Allocate a formation in advance, be used to store broadcast address, the memory address of the stream medium data of promptly having play in buffer area; In embodiments of the present invention; The memory block of the stream medium data that storage has been play is deletion immediately not, and still is retained in the buffer area, to be used to respond the playing request of this stream medium data of broadcast that receives once more.Particularly; When receiving the playing request of stream medium data; Obtain the data address of stream medium data according to playing request; In broadcast address formation,, and then obtain stream medium data corresponding cache district block address memory according to the node of this stored stream media data corresponding cache district, data address location block address memory.
In step S103, in the memory block corresponding, obtain said stream medium data with said buffer area block address memory, play this stream medium data, and said buffer area memory address is saved in the formation of said broadcast address.
In the practical implementation process, at first from broadcast address formation, obtain the data address of request, the data address of this moment is observed the principle of formation first in first out; Go out team successively from head of the queue; Put into the not tail of the queue of broadcast address formation, promptly join the team, all put into not broadcast address formation up to the data address (queue element (QE)) of request; The head of the queue of last broadcast address formation never goes out team's operation, plays out the corresponding multi-medium data of data address of team.
In the embodiment of the invention; The memory block of the stream medium data of having play is deletion immediately not; Still be retained in the buffer area, and allocate a formation in advance and be used for storing play stream media data at the block address memory of buffer area, to be used to respond the playing request of this stream medium data of broadcast that receives once more; Thereby, effectively improve the fluency of streaming media playing request responding time and broadcast through optimizing the caching mechanism of stream medium data.
Embodiment two:
Fig. 2 shows the realization flow of the files in stream media player method that the embodiment of the invention two provides, and details are as follows:
In step S201, the request of receiving stream media data playback, and according to the data address of said playing request stream medium data of search request in broadcast address formation.
In embodiments of the present invention; The data address of stream medium data can be the offset address of the last relatively stream medium data piece of stream medium data that request is play in the playing request; Or relative address and other of stream medium data piece can be used for representing the address information of stream medium data piece in the same files in stream media, this do not limited here.In the practical implementation process, the playing request of the stream medium data that receives can be that the user plays tool bar or triggering generations such as input play position, reproduction time through pulling, and this is not limited equally here.After the data address that gets access to stream medium data, searching this data address in the broadcast address formation.
In step S202, judge whether in broadcast address formation, to find the data address of the stream medium data of request, be execution in step S203 then, otherwise execution in step S205.
In step S203,, then forward step S204 to obtaining stream medium data corresponding cache district block address memory in the broadcast address formation.
In embodiments of the present invention, when when the broadcast address formation finds said data address, obtaining stream medium data corresponding cache district block address memory in the broadcast address formation.
In step S204; In the memory block corresponding, obtain stream medium data, play this stream medium data, and said buffer area memory address is saved in the formation of said broadcast address with the buffer area block address memory; In the present embodiment; Remove to obtain stream medium data according to said buffer area block address memory, play said stream medium data, afterwards said buffer area block address memory is saved in the formation of said broadcast address.
In step S205,, then forward step S206 to not searching said data address in the broadcast address formation.
In embodiments of the present invention, when when the broadcast address formation does not find the data address of obtaining, do not searching said data address in the broadcast address formation.
In step S206, judge whether not find the data address of obtaining in the formation said the broadcast, be execution in step S207 then, otherwise execution in step S209.
In embodiments of the present invention, allocate a formation in advance, be used to store not play stream media data address, the memory address of stream medium data in buffer area of promptly not playing.When said data address is not positioned at broadcast address formation, detects data address and whether be positioned at not broadcast address formation.
In step S207; Never the block address memory with said data address corresponding cache district is obtained in broadcast address formation; In the memory block corresponding, obtain stream medium data, play the stream medium data that is obtained, then forward step S208 to the buffer area block address memory.
In embodiments of the present invention; When the broadcast address formation does not find the data address of obtaining; Never the block address memory with said data address corresponding cache district is obtained in broadcast address formation; In the memory block corresponding, obtain stream medium data, play the stream medium data that is obtained with the buffer area block address memory.
In step S208, will be saved in broadcast address formation with said data address corresponding cache district block address memory.
In embodiments of the present invention; After play stream media data; Should the buffer area block address memory be saved in broadcast address formation, thereby when asking once more to play this stream medium data, need not to send the stream medium data download request to streaming media server again; And wait for its response, make that the broadcast of whole Streaming Media is smooth more.
In step S209, send the stream medium data download request to streaming media server.
In embodiments of the present invention, when when the broadcast address formation does not find the data address of obtaining, send the stream medium data download request to streaming media server.
In embodiments of the present invention; When neither there is broadcast address formation in the stream medium data of asking, when also not existing in the not broadcast address formation, send the stream medium data download request to streaming media server; Receive the stream medium data that server returns and store buffer area into, and play.
In embodiments of the present invention; After the stream medium data of request is play, its block address memory at buffer area is saved in broadcast address formation, thereby when asking once more to play this stream medium data; Need not to send the stream medium data download request to streaming media server once more; And wait for its response, and make that the broadcast of whole Streaming Media is smooth more, improved user's viewing experience.
Embodiment three:
Fig. 3 shows the realization flow of the files in stream media player method that the embodiment of the invention three provides, and details are as follows:
In step S301, the request of receiving stream media data playback, the data address according to said playing request stream medium data of search request in broadcast address formation then forwards step S302 to.
In embodiments of the present invention; The data address of stream medium data can be the offset address of the last relatively stream medium data piece of stream medium data that request is play in the playing request; Or relative address and other of stream medium data piece can be used for representing the address information of stream medium data piece in the same files in stream media, this do not limited here.In the practical implementation process, the playing request of the stream medium data that receives can be that the user plays tool bar or triggering generations such as input play position, reproduction time through pulling, and this is not limited equally here.After the data address that gets access to stream medium data, searching this data address in the broadcast address formation.
In step S302, judge whether in broadcast address formation, to find the data address of the stream medium data of request, be execution in step S303 then, otherwise execution in step S305.
In step S303,, then forward step S304 to obtaining stream medium data corresponding cache district block address memory in the broadcast address formation.
In embodiments of the present invention, when when the broadcast address formation finds said data address, obtaining stream medium data corresponding cache district block address memory in the broadcast address formation.
In step S304, in the memory block corresponding, obtain stream medium data with the buffer area block address memory, play this stream medium data, and said buffer area memory address is saved in the formation of said broadcast address.
In step S305,, then forward among the step S306 not searching the data address of obtaining in the broadcast address team.
In embodiments of the present invention, when when the broadcast address formation does not find the data address of obtaining, do not searching the data address of obtaining in the broadcast address team.
In step S306, judge whether do not finding said data address in the broadcast address team, be execution in step S307 then, otherwise execution in step S3012.
In embodiments of the present invention, allocate a formation in advance, be used to store not broadcast address, the memory address of stream medium data in buffer area of promptly not playing.When data address is not positioned at broadcast address formation, detects data address and whether be positioned at not broadcast address formation.
In step S307, data corresponding cache district block address memory is obtained in broadcast address formation never, then forwards step S308 to.
In embodiments of the present invention, when when the broadcast address formation does not find the data address of obtaining, data corresponding cache district block address memory is obtained in broadcast address formation never.
In step S308, in the memory block corresponding, obtain stream medium data with the buffer area block address memory, play this stream medium data, forward step S309 afterwards to.
In step S309, judge that whether the length of broadcast address formation surpass preset length, be execution in step S310 then, otherwise execution in step S313.
In embodiments of the present invention; In order effectively to utilize Installed System Memory; The length of tackling broadcast address formation should not surpass preset length; This length can be provided with according to the applied environment of system, the software and hardware configuration of system and the embodiment of this files in stream media player method, this is not limited here.
In step S310, obtain block address memory in the broadcast address formation team head, the memory block corresponding with the block address memory that is obtained of resetting then forwards step S311 to.
In embodiments of the present invention; When the length of broadcast address formation surpasses preset length; Can infer that then the existing certain hour Duan Wei of stream medium data in the memory block corresponding with block address memory in the broadcast address formation team head is used; Holding time is long, and has this moment new play stream media data to get into, in order effectively to utilize the memory block in the buffer area; Should be in time with the stream medium data deletion in the memory block that block address memory is corresponding in the untapped formation of the broadcast address team head; Make it to be in upstate, simultaneously its this block address memory is joined in the idle queues that free memory block is corresponding in the buffer zone that distributes into Streaming Media, be used for the new stream medium data of buffer memory.Like this, only keep in some scopes play stream media data at every turn, thereby when asking once more to play this stream medium data; Need not to send the stream medium data download request to streaming media server again; And wait for its response, make that the broadcast of whole Streaming Media is smooth more, in addition; Memory block after the replacement can be in order to the new stream medium data of buffer memory, thereby has improved the service efficiency of buffer area memory block.
In step S311, delete the block address memory in the broadcast address formation team head.
In embodiments of the present invention; Behind the memory block corresponding of resetting with the block address memory that is obtained; Block address memory in the broadcast address formation team head is invalid, should go out team's operation, with block address memory in timely deletion broadcast address formation team head; Be used to store new broadcast address, thus the save memory space.
In step S312, send the stream medium data download request to streaming media server.
In embodiments of the present invention, when in broadcast address formation not, not finding data address, send the stream medium data download request to streaming media server.In the practical implementation process, promptly neither there is broadcast address formation in the stream medium data when request, when also not existing in the not broadcast address formation, then sends the stream medium data download request to streaming media server.
In step S313, the buffer area block address memory is saved in broadcast address formation.
In embodiments of the present invention; After play stream media data; Should the buffer area block address memory be saved in broadcast address formation, thereby when asking once more to play this stream medium data, need not to send the stream medium data download request to streaming media server again; And wait for its response, make that the broadcast of whole Streaming Media is smooth more.
In embodiments of the present invention; Stream medium data deletion in the memory block corresponding with block address memory in time that the holding time is the long formation of the broadcast address team head makes the broadcast formation be in unsaturation, and then is in upstate; Simultaneously this block address memory is joined in the idle queues that free memory block is corresponding in the buffer zone that distributes into stream medium data; Be used for the new stream medium data of buffer memory, thereby improved the service efficiency of buffer area memory block, behind the memory block corresponding of resetting with the block address memory that is obtained; Go out team's operation; Delete the block address memory in the broadcast address formation team head in time, be used to store new broadcast address, thereby practiced thrift limited memory space.
Embodiment four:
Fig. 4 shows the realization flow of the files in stream media player method that the embodiment of the invention four provides, and details are as follows:
In the present embodiment, step S401 to S403 is consistent with the step S301 to S303 of the foregoing description three respectively, repeats no more here.In addition, step S405 is consistent with the step S405 to S413 of the foregoing description three respectively to step S413, repeats no more equally here, and the difference with the foregoing description three of present embodiment is step S404.
In step S404, in the memory block corresponding, obtain stream medium data with said buffer area block address memory, play this stream medium data, then forward step S409 to.
In embodiments of the present invention; Stream medium data deletion in the memory block corresponding with block address memory in time that the holding time is the long formation of the broadcast address team head makes the broadcast formation be in unsaturation, and then is in upstate; Simultaneously this block address memory is joined in the idle queues that free memory block is corresponding in the buffer zone that distributes into stream medium data; Be used for the new stream medium data of buffer memory, thereby improved the service efficiency of buffer area memory block, behind the memory block corresponding of resetting with the block address memory that is obtained; Go out team's operation; Delete the block address memory in the broadcast address formation team head in time, be used to store new broadcast address, thereby practiced thrift limited memory space.
Embodiment five:
In embodiments of the present invention; Preferably; In the playing request of receiving stream media data, obtain according to playing request before the step of data address of stream medium data, set up a round-robin queue; This round-robin queue comprises broadcast address formation and not broadcast address formation; Its length sum is to distribute in the buffer area to be used for the sum of all memory blocks of buffering data in stream media, and wherein address stored is the address of each memory block in the buffer area, thereby sets up the corresponding relation between the stream medium data in this formation and the buffer area.
After playing a stream medium data, this stream medium data corresponding address by in the formation not the broadcast address formation region enter into broadcast address formation region.The preset length of broadcast address formation can not be greater than the length of broadcast address formation not; But concrete length can be when playing different setting of form of stream medium data; Preferably, the preset length of broadcast address formation is set to the half the of buffer area memory block sum.In the present embodiment; Because the sum of memory block is fixed; When the preset length of playing formation equals not play the preset length of formation; When the stream medium data of search request, be identical not playing formation with playing the probability that formation searches, can improve the efficient and the user experience effect of streaming media playing to a certain extent.
In embodiments of the present invention,, realized the asynchronous process of stream medium data, particularly, the process of multithreading from network-side while reading of data be described for example at this through a plurality of address queues that exist:
(1) establishment and startup thread A and B, the length of each read block is 8K;
(2) thread A obtains block address memory from the idle address queue (enqueue_list) corresponding with the buffer area memory block, and the side-play amount (offset) of sending the application reading of data to the network terminal is 0, and the length of data block is the data of dur=8K;
(3) thread A to the memory block corresponding with the block address memory that obtains, simultaneously, puts into the metadata cache of being asked in the not broadcast address formation (dequeue_list) with the block address memory that obtains, at this moment the side-play amount offset=0 in the dequeue_list;
(4) thread B repeats the process of thread A; Thereby realize the multithreading operation that stream medium data obtains/downloads; If this moment, the offset of dequeue_list was 7; Because two threads carry out simultaneously, if thread A, B have obtained the stream medium data piece from network-side at this moment, and the stream medium data that thread B obtains should be the data of at first putting into the buffer area memory block; Then at first should put into the buffer area free memory block of distribution to the data that thread B obtains; To put into the not position of the offset=8 of broadcast address formation dequeue_list with this free memory block corresponding address again, the block address memory that will distribute for the stream medium data that thread A obtains then deposits the not position of the offset=9 of broadcast address formation dequeue_list in, thereby has guaranteed the correctness of media stream data order.
Multithreading can be simultaneously from network terminal reading of data, but storage address needs ordering when putting into dequeue_list, to guarantee the played in order of stream medium data.
Illustrate when receiving the stream medium data playing request playing process of stream medium data below:
(1) receiving stream media data playback request; Data address according to said playing request stream medium data of search request in broadcast address formation; Data address described herein can be the offset address with respect to last playing request, also can be specific address;
(2) when in broadcast address formation (backup_list), finding data address, in the said formation of broadcast address backup_list, obtain said stream medium data corresponding cache district block address memory;
(3) in the memory block corresponding, obtain said stream medium data with said buffer area block address memory; Play said stream medium data; And, the buffer area memory address of the stream medium data of playing is saved in the said formation of broadcast address backup_list in the operation of joining the team of the tail of the queue of broadcast address formation backup_list.
In the practical implementation process; When the length of broadcast address formation backup_list surpasses preset length; Need go out team's operation; And the corresponding memory block of memory address in the replacement team head, the operation of joining the team again afterwards is saved in the said formation of broadcast address backup_list with the block address memory of the buffer area of the stream medium data of broadcast.
In the practical implementation process, broadcast address formation backup_list and not broadcast address formation dequeue_list can be arranged in same round-robin queue, thereby effectively utilize memory headroom.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium; Described storage medium is like ROM/RAM, disk, CD etc.
Embodiment six:
Fig. 5 shows the structure of the flow medium file playing system that the embodiment of the invention six provides, and for the ease of explanation, only shows the part relevant with the embodiment of the invention.
This flow medium file playing system can be used to have the player of stream media playing function, can be used as independent parts and uses, or be integrated in the corresponding streaming media playing platform as assembly.
In the present embodiment, particularly, this flow medium file playing system comprises: the first address search unit 51, the first block address memory acquiring unit 52 and first-class media data broadcast unit 53.
At first, the 51 receiving stream media data playback requests of the first address search unit are according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation.
In embodiments of the present invention; The data address of stream medium data can be the offset address of the last relatively stream medium data piece of stream medium data that request is play in the playing request; Or relative address and other of stream medium data piece can be used for representing the address information of stream medium data piece in the same files in stream media, this do not limited here.In the practical implementation process, the playing request of the stream medium data that receives can be that the user plays tool bar or triggering generations such as input play position, reproduction time through pulling, and this is not limited equally here.After the data address that gets access to stream medium data, searching data address in the broadcast address formation.
When in broadcast address formation, finding said data address, the first block address memory acquiring unit 52 obtains said stream medium data corresponding cache district block address memory in the formation of said broadcast address.
In embodiments of the present invention; Allocate a formation in advance, be used to store broadcast address, the memory address of the stream medium data of promptly having play in buffer area; In embodiments of the present invention; The memory block of the stream medium data that storage has been play is deletion immediately not, still is retained in the buffer area, to be used to respond the playing request of this stream medium data of broadcast that receives once more.Particularly; When receiving the playing request of stream medium data; Obtain the data address of stream medium data according to playing request; In broadcast address formation,, and then obtain stream medium data corresponding cache district block address memory according to the node of this stored stream media data corresponding cache district, data address location block address memory.
The block address memory that first-class media data broadcast unit 53 obtains according to the first block address memory acquiring unit 52; In the memory block corresponding, obtain said stream medium data with said buffer area block address memory; Play said stream medium data, and said buffer area memory address is saved in the formation of said broadcast address.
In the embodiment of the invention; The memory block of the stream medium data of having play is deletion immediately not; Still be retained in the buffer area, and allocate a formation in advance and be used for storing play stream media data at the block address memory of buffer area, to be used to respond the playing request of this stream medium data of broadcast that receives once more; Thereby, effectively improve the fluency of streaming media playing request responding time and broadcast through optimizing the caching mechanism of stream medium data.Particularly, present embodiment is corresponding with the method for the foregoing description one.
Embodiment seven:
Fig. 6 shows the structure of the flow medium file playing system that the embodiment of the invention seven provides, and for the ease of explanation, only shows the part relevant with the embodiment of the invention, and present embodiment is corresponding with the above embodiments one to six phase.In the present embodiment, said system comprises:
Round-robin queue's allocation units 61, the first address search unit 62, the first block address memory acquiring unit 63, first-class media data broadcast unit 64, second block address memory are searched unit 65, the second block address memory acquiring unit 66, the second stream medium data broadcast unit 67, length judging unit 68, replacement and delete cells 69 and download request transmitting element 70.
Round-robin queue's allocation units 61 are allocated a round-robin queue in advance, and this round-robin queue is used for the address of each memory block of stored stream media data buffer area.
The 62 receiving stream media data playback requests of the first address search unit are according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation.
When in broadcast address formation, finding said data address, the first block address memory acquiring unit 63 obtains said stream medium data corresponding cache district block address memory in the formation of said broadcast address.
First-class media data broadcast unit 64 is according to the block address memory that is obtained; In the memory block corresponding, obtain said stream medium data with said buffer area block address memory; Play said stream medium data, and said buffer area memory address is saved in the formation of said broadcast address.
At this moment, said first-class media data broadcast unit 64 can not preserved this buffer area memory address earlier yet, and judges the length of broadcast address formation earlier; Whether the length of being judged broadcast address formation by said length judging unit 68 surpasses preset length; Particularly, this preset length can be provided with as required, this is not limited here; Preferably, the size of said preset length is the half the of memory block quantity in the said buffer area.If judged result is when being; Then need rearrange broadcast address formation; Reset this moment and delete cells 69 obtains block address memory in the broadcast address formation team head, the memory block corresponding of resetting with the block address memory that obtains, and delete the block address memory in the broadcast address formation team head.Then trigger said first-class media data broadcast unit 64 said buffer area memory address is saved in the formation of said broadcast address.If judged result is not for the time, the then said first data playback unit 64 directly is saved in the formation of said broadcast address with said buffer area block address memory.
When in broadcast address formation, not finding said data address; The said first address search unit 62 sends the signal that does not find said data address to the said second address search unit 65, and said data address is not being searched in the broadcast address formation in the second address search unit 65.When the said second address search unit 65 finds said data address in broadcast address formation not; The second block address memory acquiring unit 66 obtains the block address memory with said data address corresponding cache district from the formation of said not broadcast address; The said second data playback unit 67 is according to the block address memory that is obtained; In the memory block corresponding, obtain said stream medium data, play said stream medium data with said buffer area block address memory.
At this moment, the said second stream medium data broadcast unit 67 can not preserved this buffer area memory address earlier yet, and judges the length of broadcast address formation earlier; Whether the length of being judged broadcast address formation by said length judging unit 68 surpasses preset length; Particularly, this preset length can be provided with as required, this is not limited here; Preferably, the size of said preset length is the half the of memory block quantity in the said buffer area.If judged result is when being; Then need rearrange broadcast address formation; Reset this moment and delete cells 69 obtains block address memory in the broadcast address formation team head, the memory block corresponding of resetting with the block address memory that obtains, and delete the block address memory in the broadcast address formation team head.Then trigger the said second stream medium data broadcast unit 67 said buffer area memory address is saved in the formation of said broadcast address.If judged result for not the time, then directly triggers the said second data playback unit 67 said buffer area block address memory is saved in the formation of said broadcast address.
When the said second address search unit 65 not when the formation of said not broadcast address finds said data address; The stream medium data of then representing required broadcast does not exist in the buffer zone; Then need download this stream medium data, so said download request transmitting element 70 sends the stream medium data download request to streaming media server.
In the embodiment of the invention; Set up a round-robin queue in advance, this round-robin queue comprises broadcast address formation and not broadcast address formation, is used for the address of each memory block of memory buffers district; Preferably, the formation of said broadcast address and not the broadcast address formation be arranged in same round-robin queue.When play stream media data, the memory block of the stream medium data of having play is deletion immediately not, still is retained in the buffer area; To be used to respond the playing request of this stream medium data of broadcast that receives once more; Thereby through optimizing the caching mechanism of stream medium data, effectively improve the fluency of streaming media playing request responding time and broadcast, when the stream medium data sum of having play surpasses preset length; In time will be untapped stream medium data in block address memory is corresponding in the formation of the broadcast address team head the memory block delete; Make it to be in upstate, be used for the new stream medium data of buffer memory, thereby improved the service efficiency of buffer area memory block.
The present invention also provides a kind of stream player, comprises the foregoing description six or embodiment seven described flow medium file playing systems.
In the embodiment of the invention, set up a round-robin queue in advance, this round-robin queue comprises broadcast address formation and not broadcast address formation; The address that is used for each memory block of memory buffers district; When play stream media data, the memory block of the stream medium data of having play is deletion immediately not, still is retained in the buffer area; To be used to respond the playing request of this stream medium data of broadcast that receives once more; Thereby through optimizing the caching mechanism of stream medium data, effectively improve the fluency of streaming media playing request responding time and broadcast, when the stream medium data sum of having play surpasses preset length; In time will be untapped stream medium data in block address memory is corresponding in the formation of the broadcast address team head the memory block delete; Make it to be in upstate, be used for the new stream medium data of buffer memory, thereby improved the service efficiency of buffer area memory block.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a files in stream media player method is characterized in that, said method comprises the steps:
The request of receiving stream media data playback is according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation;
When in broadcast address formation, finding said data address, in the formation of said broadcast address, obtain said stream medium data corresponding cache district block address memory;
In the memory block corresponding, obtain said stream medium data, play said stream medium data, and said buffer area memory address is saved in the formation of said broadcast address with said buffer area block address memory.
2. the method for claim 1 is characterized in that, said method also comprises step:
When in broadcast address formation, not finding said data address, do not searching said data address in the broadcast address formation;
When in broadcast address formation not, finding said data address; Obtain block address memory from the formation of said not broadcast address with said data address corresponding cache district; In the memory block corresponding, obtain said stream medium data with said buffer area block address memory; Play said stream medium data, and said buffer area block address memory is saved in the formation of said broadcast address;
When the broadcast address formation does not find said data address, send the stream medium data download request to streaming media server.
3. method as claimed in claim 2 is characterized in that, said buffer area block address memory is saved in before the step of said broadcast address formation, and said method also comprises step:
Whether the length of judging the formation of said broadcast address surpasses preset length;
When the length of said broadcast address formation surpasses preset length; Obtain block address memory in the said formation of the broadcast address team head; The memory block corresponding of resetting with the block address memory that obtains; Delete the block address memory in the broadcast address formation team head, and carry out the said step that said buffer area block address memory is saved in the formation of said broadcast address;
When the length of said broadcast address formation does not surpass preset length, carry out the said step that said buffer area block address memory is saved in the formation of said broadcast address.
4. method as claimed in claim 3 is characterized in that, the size of said preset length is memory block quantity half the of said buffer area;
The formation of said broadcast address and not the broadcast address formation be arranged in same round-robin queue.
5. like any described method of claim 1 to 4, it is characterized in that before the said step according to said stream medium data playing request data address of the stream medium data of search request in broadcast address formation, said method also comprises:
Allocate a round-robin queue in advance, said round-robin queue is used for the address of each memory block of stored stream media data buffer area.
6. a flow medium file playing system is characterized in that, said system comprises:
The first address search unit is used for the request of receiving stream media data playback, according to the data address of said stream medium data playing request stream medium data of search request in broadcast address formation;
The first block address memory acquiring unit is used for when when the broadcast address formation finds said data address, in the formation of said broadcast address, obtains said stream medium data corresponding cache district block address memory; And
First-class media data broadcast unit is used for playing said stream medium data, and said buffer area memory address being saved in the formation of said broadcast address obtaining said stream medium data with the corresponding memory block of said buffer area block address memory.
7. system as claimed in claim 6 is characterized in that, said system also comprises:
The second address search unit when in broadcast address formation, not finding said data address, is used for searching said data address in broadcast address formation not;
The second block address memory acquiring unit when in broadcast address formation not, finding said data address, is used for obtaining the block address memory with said data address corresponding cache district from the formation of said not broadcast address;
The second stream medium data broadcast unit is used for playing said stream medium data, and said buffer area block address memory being saved in the formation of said broadcast address obtaining said stream medium data with the corresponding memory block of said buffer area block address memory; And
The download request transmitting element when when the broadcast address formation does not find said data address, is used for sending the stream medium data download request to streaming media server.
8. system as claimed in claim 7 is characterized in that, said system also comprises:
The length judging unit is used to judge whether the length of said broadcast address formation surpasses preset length; And
Reset and delete cells; When the length of said broadcast address formation surpasses preset length; Be used for obtaining the said formation of broadcast address team head block address memory; The memory block corresponding with the block address memory that obtains of resetting deleted the block address memory in the broadcast address formation team head, and triggered the said first or second stream medium data broadcast unit and carry out the step that said buffer area memory address is saved in the formation of said broadcast address.
9. system as claimed in claim 8 is characterized in that, the size of said preset length is the half the of memory block quantity in the said buffer area;
The formation of said broadcast address and not the broadcast address formation be arranged in same round-robin queue, said circulation lines up to allocate in advance, is used for the address of each memory block of stored stream media data buffer area.
10. a player is characterized in that, said player comprises the arbitrary described flow medium file playing system of claim 6 to 9.
CN2011103804449A 2011-11-25 2011-11-25 Playing method, playing system and player of streaming media files Pending CN102521279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103804449A CN102521279A (en) 2011-11-25 2011-11-25 Playing method, playing system and player of streaming media files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103804449A CN102521279A (en) 2011-11-25 2011-11-25 Playing method, playing system and player of streaming media files

Publications (1)

Publication Number Publication Date
CN102521279A true CN102521279A (en) 2012-06-27

Family

ID=46292200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103804449A Pending CN102521279A (en) 2011-11-25 2011-11-25 Playing method, playing system and player of streaming media files

Country Status (1)

Country Link
CN (1) CN102521279A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595694A (en) * 2012-08-14 2014-02-19 腾讯科技(深圳)有限公司 A stream media playing method, a stream media playing system, and an internal memory server
CN104581404A (en) * 2013-10-21 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for processing multimedia data
CN105409230A (en) * 2014-05-27 2016-03-16 华为技术有限公司 Media file processing method and device
CN106028157A (en) * 2015-09-16 2016-10-12 展视网(北京)科技有限公司 Data address related stream media file play method and device
CN106559704A (en) * 2015-09-28 2017-04-05 青岛海信电器股份有限公司 A kind of processing method of voice data, device and system
CN106559705A (en) * 2015-09-28 2017-04-05 青岛海信电器股份有限公司 A kind of processing method of voice data, device and system
CN106598736A (en) * 2016-12-13 2017-04-26 深圳中科讯联科技股份有限公司 Memory block calling method and memory block releasing method for memory pool and server
CN106791949A (en) * 2017-01-05 2017-05-31 珠海全志科技股份有限公司 The processing method and its device of stream medium data
CN107038021A (en) * 2017-04-05 2017-08-11 华为技术有限公司 Methods, devices and systems for accessing random access memory ram
CN107071535A (en) * 2017-03-22 2017-08-18 百视通网络电视技术发展有限责任公司 The Android players and its automation check system and method downloaded based on multiple spot
CN108156474A (en) * 2017-12-29 2018-06-12 北京搜狐新媒体信息技术有限公司 A kind of video broadcasting method and device
CN110545461A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Resolution switching method and device of media file and storage medium
CN112104879A (en) * 2020-11-13 2020-12-18 腾讯科技(深圳)有限公司 Video coding method and device, electronic equipment and storage medium
WO2023078228A1 (en) * 2021-11-04 2023-05-11 中兴通讯股份有限公司 Memory management method and apparatus for media file, and computer device and readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1431844A (en) * 2002-01-09 2003-07-23 英业达集团(南京)电子技术有限公司 Method for playing back music on-line
US20070260743A1 (en) * 2006-05-03 2007-11-08 Sony Ericsson Mobile Communications Ab Adaptive streaming buffering
CN101917327A (en) * 2009-12-17 2010-12-15 新奥特(北京)视频技术有限公司 Streaming media recording method and player
CN102006368A (en) * 2010-12-03 2011-04-06 重庆新媒农信科技有限公司 Streaming media audio file play method based on mobile terminal memory card cache technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1431844A (en) * 2002-01-09 2003-07-23 英业达集团(南京)电子技术有限公司 Method for playing back music on-line
US20070260743A1 (en) * 2006-05-03 2007-11-08 Sony Ericsson Mobile Communications Ab Adaptive streaming buffering
CN101917327A (en) * 2009-12-17 2010-12-15 新奥特(北京)视频技术有限公司 Streaming media recording method and player
CN102006368A (en) * 2010-12-03 2011-04-06 重庆新媒农信科技有限公司 Streaming media audio file play method based on mobile terminal memory card cache technology

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595694A (en) * 2012-08-14 2014-02-19 腾讯科技(深圳)有限公司 A stream media playing method, a stream media playing system, and an internal memory server
CN104581404A (en) * 2013-10-21 2015-04-29 腾讯科技(深圳)有限公司 Method, device and system for processing multimedia data
CN105409230A (en) * 2014-05-27 2016-03-16 华为技术有限公司 Media file processing method and device
CN106028157A (en) * 2015-09-16 2016-10-12 展视网(北京)科技有限公司 Data address related stream media file play method and device
CN106559704A (en) * 2015-09-28 2017-04-05 青岛海信电器股份有限公司 A kind of processing method of voice data, device and system
CN106559705A (en) * 2015-09-28 2017-04-05 青岛海信电器股份有限公司 A kind of processing method of voice data, device and system
CN106559704B (en) * 2015-09-28 2019-07-12 青岛海信电器股份有限公司 A kind of processing method of audio data, device and system
CN106559705B (en) * 2015-09-28 2019-07-12 青岛海信电器股份有限公司 A kind of processing method of audio data, device and system
CN106598736A (en) * 2016-12-13 2017-04-26 深圳中科讯联科技股份有限公司 Memory block calling method and memory block releasing method for memory pool and server
CN106791949A (en) * 2017-01-05 2017-05-31 珠海全志科技股份有限公司 The processing method and its device of stream medium data
CN107071535A (en) * 2017-03-22 2017-08-18 百视通网络电视技术发展有限责任公司 The Android players and its automation check system and method downloaded based on multiple spot
CN107071535B (en) * 2017-03-22 2019-11-12 百视通网络电视技术发展有限责任公司 Android player and its automation check system and method based on multiple spot downloading
CN107038021A (en) * 2017-04-05 2017-08-11 华为技术有限公司 Methods, devices and systems for accessing random access memory ram
CN107038021B (en) * 2017-04-05 2019-05-24 华为技术有限公司 For accessing the methods, devices and systems of random access memory ram
CN108156474A (en) * 2017-12-29 2018-06-12 北京搜狐新媒体信息技术有限公司 A kind of video broadcasting method and device
CN110545461A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Resolution switching method and device of media file and storage medium
CN112104879A (en) * 2020-11-13 2020-12-18 腾讯科技(深圳)有限公司 Video coding method and device, electronic equipment and storage medium
WO2022100522A1 (en) * 2020-11-13 2022-05-19 腾讯科技(深圳)有限公司 Video encoding method, video decoding method, apparatus, electronic device, storage medium, and computer program product
US11909984B2 (en) 2020-11-13 2024-02-20 Tencent Technology (Shenzhen) Company Limited Video encoding and decoding for cloud gaming
WO2023078228A1 (en) * 2021-11-04 2023-05-11 中兴通讯股份有限公司 Memory management method and apparatus for media file, and computer device and readable medium

Similar Documents

Publication Publication Date Title
CN102521279A (en) Playing method, playing system and player of streaming media files
US7640274B2 (en) Distributed storage architecture based on block map caching and VFS stackable file system modules
CN104850358B (en) A kind of magneto-optic electricity mixing storage system and its data acquisition and storage method
EP3131265B1 (en) Data prefetching method for distributed hash table dht storage system, node, and system
US9641638B2 (en) Application-guided bandwidth-managed caching
US20080201341A1 (en) Contents management method
JP2007317183A (en) Network data storage system
US20050086386A1 (en) Shared running-buffer-based caching system
CN103116552A (en) Method and device for distributing storage space in distributed type storage system
CN110555001B (en) Data processing method, device, terminal and medium
US11132221B2 (en) Method, apparatus, and computer-readable medium for dynamic binding of tasks in a data exchange
CN104967873A (en) Streaming live scheduling method, system and scheduling server
CN101753936B (en) Configuration method of storage space and video server for video monitoring system
CN102262512A (en) System, device and method for realizing disk array cache partition management
KR101236477B1 (en) Method of processing data in asymetric cluster filesystem
JP4754585B2 (en) Data distribution and buffering
JP2010191774A (en) Content distribution system, content distribution device, content distribution method and program therefor, data storage device, and processing method and program therefor
JP5617712B2 (en) Content distribution server, content distribution system, content distribution program, and content distribution method
WO2018176804A1 (en) Data write-in method and apparatus
CN113127415B (en) Real-time stream file processing method, device, medium and electronic equipment
JP7073737B2 (en) Communication log recording device, communication log recording method, and communication log recording program
JP2013088920A (en) Computer system and data management method
CN102272710A (en) Method and apparatus for creating files in a file system
JP2000231776A (en) Media server system
JP2001346142A (en) Distribution system for digital video/audio data, video server and control method for buffer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120627