CN105100874A - Multimedia play method and equipment - Google Patents

Multimedia play method and equipment Download PDF

Info

Publication number
CN105100874A
CN105100874A CN201510370264.0A CN201510370264A CN105100874A CN 105100874 A CN105100874 A CN 105100874A CN 201510370264 A CN201510370264 A CN 201510370264A CN 105100874 A CN105100874 A CN 105100874A
Authority
CN
China
Prior art keywords
buffer queue
queue
packet
data packet
buffer
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
CN201510370264.0A
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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510370264.0A priority Critical patent/CN105100874A/en
Publication of CN105100874A publication Critical patent/CN105100874A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention aims at providing a multimedia play method and equipment. The multimedia play method provided by the invention comprises: respectively introducing two buffering queues between an obtained stream media data packet and an analysis data packet and between the analysis data packet and a play data packet, so as to buffer the data packet to a media resource to be played. Compared with the prior art, two buffering queues are introduced in the multimedia play method provided by the invention, so as to solve such problems as play frame blockage or frame damage and the like caused by networks and encoding and decoding and solve such problems as multithreading deadlock, multithreading junk data and the like, improve the operation efficiency and play effect of the system, ensure better play stability, smoother voice or video streams and perfect user experience.

Description

A kind of method and apparatus for multimedia
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of technology for multimedia.
Background technology
Along with the development of stream media technology, increasing user habit is in the program request or live carrying out audio frequency and video on the net.But in the playing process of audio frequency and video, often there will be to play to block and time or play the problems such as discontinuous.
Fig. 1 shows a kind of system architecture schematic diagram for multimedia in prior art.Server is used for providing the multimedia transfer services such as audio frequency and video, and by network environment (as Virtual network operator), media stream is sent to client.Client comprises network-caching queue, stream analyzer and playing module, wherein, described network-caching queue is used for for the reception of data and transmission provide buffer memory, and initial data is then resolved to the audio, video data for playing by stream analyzer, is finally play by playing module.
But, because the method only comprises one deck buffer queue (i.e. network-caching queue), therefore, this buffer queue can only cushion the not smooth behavior caused because of network, and discontinuous for the pause broadcasting that causes of such as encoding and decoding card, or then cannot process with the broadcasting discontinuous problem that occurs in playing process resolving.In addition, Online Video is play, time especially live, higher to the ageing requirement of data; And in the art, due to only by directly abandoning up-to-date data in this network buffer queue or the oldest data realize synchronously, therefore, result of broadcast can be caused stiff, affecting Consumer's Experience.
Summary of the invention
The object of this invention is to provide a kind of method and apparatus for multimedia.
According to an aspect of the present invention, provide a kind of method for multimedia, wherein, the method comprises:
A obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played;
B cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet;
C resolves described first buffered data packet, to obtain one or more packet to be played;
D cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet;
E plays described second buffered data packet.
According to a further aspect in the invention, additionally provide a kind of playback equipment for multimedia, wherein, this equipment comprises:
Acquisition device, for obtaining one or more flow media data packet, wherein, described flow media data packet corresponds to multimedia resource to be played;
First buffer unit, for cushioning described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet;
Resolver, for resolving described first buffered data packet, to obtain one or more packet to be played;
Second buffer unit, for cushioning described packet to be played in the second buffer queue, to obtain one or more second buffered data packet;
Playing device, for playing described second buffered data packet.
Compared with prior art, the present invention introduces two buffer queues respectively between acquisition flow media data packet and resolution data bag, between resolution data bag and playback data, to cushion the packet of media resource to be played, thus solve the broadcasting card caused due to network and encoding and decoding and pause or the problem such as bad frame, also solve the problem such as multithreading deadlock and multithreading junk data simultaneously, improve running efficiency of system and result of broadcast, make to play stability better, voice or video flowing more smooth, improve Consumer's Experience.
And, the present invention can also based on various ways, determine the length of the first buffer queue and/or the second buffer queue, thus make described buffer queue more flexible when buffered data packet, meet current system processing needs, improve running efficiency of system and result of broadcast, make to play stability better, voice or video flowing more smooth, improve Consumer's Experience.
And, the present invention can also described first buffer queue and/or described second buffer queue completely time, abandon one or more packets in described first buffer queue and/or described second buffer queue according to abandoning rule; Further, can also determine corresponding with described first buffer queue and/or described second buffer queue to abandon rule according to predetermined condition; Thus adopt and multiplely abandon rule flexibly, solve the problem that result of broadcast in prior art is stiff, Consumer's Experience is not good, ensure that play quality and result of broadcast, make to play stability better, voice or video flowing more smooth, improve running efficiency of system, improve Consumer's Experience.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 shows a kind of system architecture schematic diagram for multimedia in prior art;
Fig. 2 shows a kind of system architecture schematic diagram for multimedia according to one aspect of the invention;
Fig. 3 illustrates a kind of playback equipment schematic diagram for multimedia according to one aspect of the invention;
Fig. 4 illustrates a kind of playback equipment schematic diagram for multimedia in accordance with a preferred embodiment of the present invention;
Fig. 5 illustrates a kind of method flow diagram for multimedia according to a further aspect of the present invention;
Fig. 6 illustrates a kind of method flow diagram for multimedia in accordance with a preferred embodiment of the present invention;
Fig. 7 (a) to Fig. 7 (d) show according to a preferred embodiment of the present invention abandon tactful schematic diagram for multimedia.
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Before in further detail exemplary embodiment being discussed, it should be mentioned that some exemplary embodiments are described as the process or method described as flow chart.Although operations is described as the process of order by flow chart, many operations wherein can be implemented concurrently, concomitantly or simultaneously.In addition, the order of operations can be rearranged.Described process can be terminated when its operations are completed, but can also have the additional step do not comprised in the accompanying drawings.Described process can correspond to method, function, code, subroutine, subprogram etc.
Within a context alleged " playback equipment ", be " computer equipment ", also referred to as " computer ", refer to the intelligent electronic device that can be performed the predetermined process such as numerical computations and/or logical calculated process by operation preset program or instruction, it can comprise processor and memory, performed the survival instruction that prestores in memory by processor to perform predetermined process process, or perform predetermined process process by hardware such as ASIC, FPGA, DSP, or combined by said two devices and realize.
Generally, described playback equipment is subscriber equipment, i.e. client.Wherein, described subscriber equipment includes but not limited to PC, notebook computer, panel computer, smart mobile phone, PDA etc.In addition, described playback equipment also can be mutually integrated and form by described subscriber equipment and other third party devices (as the network equipment); At this, the described network equipment includes but not limited to the server group that single network server, multiple webserver form or the cloud be made up of a large amount of computer or the webserver based on cloud computing (CloudComputing), wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computer collection.Wherein, described network includes but not limited to the Internet, wide area network, metropolitan area network, local area network (LAN), VPN etc.
It should be noted that; described subscriber equipment, the network equipment and network etc. are only citing; other subscriber equipment that is existing or that may occur from now on, the network equipment or networks, as being applicable to the present invention, within also should being included in scope, and are contained in this with way of reference.
Concrete structure disclosed herein and function detail are only representational, and are the objects for describing exemplary embodiment of the present invention.But the present invention can carry out specific implementation by many replacement forms, and should not be construed as only being limited to the embodiments set forth herein.
Should be understood that, although may have been used term " first ", " second " etc. here to describe unit, these unit should not limit by these terms.These terms are used to be only used to a unit and another unit to distinguish.For example, when not deviating from the scope of exemplary embodiment, first module can be called as second unit, and second unit can be called as first module similarly.Here used term "and/or" comprise one of them or more any and all combinations of listed associated item.
Here used term is only used to describe specific embodiment and be not intended to limit exemplary embodiment.Unless context refers else clearly, otherwise singulative used here " ", " one " are also intended to comprise plural number.It is to be further understood that, the existence of the feature that term used here " comprises " and/or " comprising " specifies to state, integer, step, operation, unit and/or assembly, and do not get rid of and there is or add other features one or more, integer, step, operation, unit, assembly and/or its combination.
Also it should be mentioned that and to replace in implementation at some, the function/action mentioned can according to being different from occurring in sequence of indicating in accompanying drawing.For example, depend on involved function/action, in fact the two width figure in succession illustrated can perform simultaneously or sometimes can perform according to contrary order substantially.
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 2 shows a kind of system architecture schematic diagram for multimedia according to one aspect of the invention.
Server is used for providing the multimedia transfer services such as audio frequency and video, and by network environment (as Virtual network operator), media stream is sent to client.Client comprises network data transceiver module, first buffer queue, video and audio coding, second buffer queue and playing module, wherein, described network data transceiver module is for carrying out reception and the transmission of data, described first buffer queue is used for for the reception of data and transmission provide buffer memory, initial data is then decoded into the audio, video data for playing by video and audio coding when serving as recipient, then data to be sent are encoded when serving as transmit leg, second buffer queue provides buffer memory to the audio, video data after decoding or before decoding, finally play by playing module.
Utilize described first buffer queue and described second buffer queue, described network data transceiver module, coding/decoding module corresponding to video and audio coding and playing module have been split into multiple thread, i.e. network receiving or sending thread, encoding and decoding thread and play thread.Described first buffer queue and described second buffer queue lay respectively between above-mentioned three modules, the acquisition of network data, parsing, broadcasting are not carried out on the same layer, thus solve the problems that multi-threaded parallel brings, as multithreading deadlock etc., meanwhile, the operational efficiency of whole system is also improved.
Fig. 3 illustrates a kind of playback equipment schematic diagram for multimedia according to one aspect of the invention.Wherein, described playback equipment comprises acquisition device 1, first buffer unit 2, resolver 3, second buffer unit 4, playing device 5.Particularly, described acquisition device 1 obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played; Described first buffer unit 2 cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet; Described first buffered data packet resolved by described resolver 3, to obtain one or more packet to be played; Described second buffer unit 4 cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet; Described playing device 5 plays described second buffered data packet.
Described acquisition device 1 obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played.
Particularly, described acquisition device 1, based on various communications protocols, by corresponding interface, obtains one or more flow media data packet that multimedia resource server sends via network, and wherein, described flow media data packet corresponds to multimedia resource to be played.Described multimedia resource can initiatively be sent to described playback equipment by described multimedia resource server; Also can be obtained the playing request of described playback equipment by described multimedia resource server, and provide corresponding multimedia resource according to described playing request.At this, the broadcasting of described multimedia resource can be direct-seeding or non-direct-seeding, and described multimedia resource includes but not limited to audio frequency and/or video etc.
Described first buffer unit 2 cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet.
Particularly, described first buffer unit 2 obtains one or more flow media data packet that described acquisition device 1 sends, and cushions described flow media data packet in the first buffer queue; At this, those skilled in the art will be understood that, one or more first buffered data packet described after buffering can be the whole flow media data packet without deleting or abandon operation, also may be through the part in the described flow media data packet after deleting or abandon process.Such as, if factors such as the network speed of enough, the described playback equipments of described first buffer queue length and/or the resolution speed of described resolver are applicable to, the speed of the first buffered data packet that the speed that described first buffer unit 2 obtains flow media data packet sends out with it is mutually balanced, then described after buffering one or more first buffered data packet can be the whole flow media data packet without deleting or abandon operation; Otherwise, if the network speed of shorter, the described playback equipment of the length of described first buffer queue is greater than the factors such as the resolution speed of described resolver, then described after buffering one or more first buffered data packet then may be through the part in the described flow media data packet after deleting or abandon process.
Preferably, described playback equipment also comprises the first queue determining device (not shown), and wherein, described first queue determining device determines the queue length of described first buffer queue; Described first buffer unit 2, according to the queue length of described first buffer queue, cushions described flow media data packet in described first buffer queue, to obtain one or more first buffered data packet.
Particularly, described first queue determining device based on default configuration, can determine the length of described first buffer queue; Or, described first queue determining device can based on predetermined buffered play duration, in conjunction with the size of described flow media data packet, determine the length of described first buffer queue, such as, if the predetermined buffered play duration of this queue is 2 seconds, then described first queue determining device is determined to need how many flow media data packet according to this length, and using the length of this length as described first buffer queue; Or described first queue determining device based on the dynamic change of packet in buffering course, can determine the queue length adapted with current state at any time by modes such as machine learning, and determines the length etc. of described first buffer queue in real time.
Then, described first buffer unit 2, according to the queue length of determined described first buffer queue, cushions described flow media data packet in described first buffer queue, to obtain one or more first buffered data packet.At this, described in described way to play for time and Fig. 3, the first buffer unit 2 is same or similar, therefore does not repeat them here, and is contained in this by way of reference.
More preferably, described first queue determining device can also be used for following at least any one:
-resource characteristic corresponding to described flow media data packet, determine the queue length of described first buffer queue: wherein, described resource characteristic includes but not limited at least any one etc. in the sample frequency of audio frequency and video, sampling resolution, sound channel/passage, wherein, described sample frequency represents sampling number per second, sampling resolution represents the figure place (as 8 or 16) of each sampling, passage includes but not limited to monophonic audio, stereo channel etc., if monophony, then at every turn sample a passage, if stereo channel, then the sound channel that sampling two is different at every turn.Such as, if the sample frequency of these audio frequency and video is higher or sensing range (i.e. sampling resolution+passage) is wider, then illustrate that the flow media data packet corresponding to it is more and numerous and diverse, what described first buffer queue can be arranged is longer, carries out complete broadcasting with the data of preserving in certain period; Otherwise if the sample frequency of audio frequency and video is lower or sensing range is narrower, then what described first buffer queue can be arranged is shorter;
-according to current broadcast mode, determine the queue length of described first buffer queue: such as, if current broadcast mode is live, then described first buffer queue can arrange shorter, if current broadcast mode is non-live, then described first buffer queue can arrange longer;
-according to the size of described flow media data packet, determine the queue length of described first buffer queue: such as, if described flow media data packet is less, then described queue length can correspondingly increase, otherwise if described flow media data packet is comparatively large, then described queue length can correspondingly reduce;
-according to the device-dependent message of current device, determine the queue length of described first buffer queue: such as, if the configuration of described current playback equipment is higher, the then better performances of this playback equipment, processing speed is faster, therefore, what described queue length can be arranged is shorter, to realize the timely process of streaming media packet;
-according to network speed and/or resolution speed, determine the queue length of described first buffer queue: such as, if network speed is very fast, then described queue length can arrange longer, to adapt to obtained a large amount of flow media data packet; If resolution speed is very fast, illustrate that obtained flow media data packet can be resolved in time, therefore described queue length can arrange shorter; In addition, described queue length can also be jointly determined based on described network speed and described resolution speed, as according to as described in network speed and as described in the ratio of resolution speed, if described network speed is greater than described resolution speed, what then described queue length arranged is longer, if described network speed is less than described resolution speed, then what described queue length arranged is shorter etc.
At this, those skilled in the art will be understood that, the method of the above-mentioned multiple queue length for determining described first buffer queue can be combined with each other, such as, can on the basis of the device-dependent message based on current device, in conjunction with current broadcast mode, determine the queue length stating the first buffer queue.Particularly, if current broadcast mode is live, and the configuration of current playback equipment is lower, then in order to the real-time broadcasting of balanced live TV stream and the disposal ability of described current playback equipment, what described queue length can be able to be arranged is shorter, realizes the synchronous of live TV stream by utilizing modes such as abandoning strategy; If current broadcast mode is non-live, and the configuration of current playback equipment is lower, then what described queue length can be able to be arranged is longer, namely plays after playback equipment is buffered to certain time length, to improve Consumer's Experience again.
At this; those skilled in the art will be understood that; above-mentionedly determine that the mode of described queue length is only citing; not limitation of the present invention; other modes that can be used in the queue length determining described first buffer queue are if be applicable to the present invention; be included in protection scope of the present invention equally, and be contained in this by reference.
Described first buffered data packet resolved by described resolver 3, to obtain one or more packet to be played.
Particularly, described resolver 3, by original described first buffered data packet without parsing, is resolved based on predefined analysis mode, thus obtains one or more packet to be played that can be used in playing.Such as, if described first buffered data packet to be resolved is audio A AC (AdvancedAudioCoding, Advanced Audio Coding) formatted data, then decode according to the decoding process of AAC.At this, described analysis mode is relevant to playing resource type, playing resource coded system etc., does not repeat them here, and is contained in this by way of reference.
Described second buffer unit 4 cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet.
Particularly, described second buffer unit 4 obtains the packet one or more to be played that described resolver 3 sends, and cushions described packet to be played in the second buffer queue; At this, those skilled in the art will be understood that, one or more second buffered data packet described after buffering can be the packets whole to be played without deleting or abandon operation, also may be through the part in the packet described to be played after deleting or abandon process.Such as, if factors such as the resolution speed of enough, the described resolvers of described second buffer queue length and/or the broadcasting speed of described playing device are applicable to, the speed of the second buffered data packet that the speed that described second buffer unit 4 obtains packet to be played sends out with it is mutually balanced, then described after buffering one or more second buffered data packet can be the packets whole to be played without deleting or abandon operation; Otherwise, if the broadcasting speed of shorter, the described playback equipment of the length of described second buffer queue is less than the factors such as the resolution speed of described resolver, then described after buffering one or more second buffered data packet then may be through the part in the packet described to be played after deleting or abandon process.
Preferably, described playback equipment also comprises the second queue determining device (not shown), and wherein, described second queue determining device determines the queue length of described second buffer queue; Described second buffer unit 4, according to the queue length of described second buffer queue, cushions described packet to be played in described second buffer queue, to obtain one or more second buffered data packet.
Particularly, described second queue determining device based on default configuration, can determine the length of described second buffer queue; Or, described second queue determining device can based on predetermined buffered play duration, in conjunction with the size of described packet to be played, determine the length of described second buffer queue, such as, if the predetermined buffered play duration of this queue is 2 seconds, then described second queue determining device is determined to need how many packets to be played according to this length, and using the length of this length as described second buffer queue; Or described second queue determining device based on the dynamic change of packet in buffering course, can determine the queue length adapted with current state at any time by modes such as machine learning, and determines the length etc. of described second buffer queue in real time.
Then, described second buffer unit 4, according to the queue length of determined described second buffer queue, cushions described packet to be played in described second buffer queue, to obtain one or more second buffered data packet.At this, described in described way to play for time and Fig. 3, the second buffer unit 4 is same or similar, therefore does not repeat them here, and is contained in this by way of reference.
More preferably, described second queue determining device is used for following at least any one:
-resource characteristic corresponding to described packet to be played, determine the queue length of described second buffer queue: wherein, described resource characteristic includes but not limited to the sample frequency of audio frequency and video, sampling resolution, sound channel, at least any one etc. in passage, wherein, described sample frequency represents sampling number per second, sampling resolution represents the figure place (as 8 or 16) of each sampling, passage includes but not limited to monophonic audio, stereo channel etc., if monophony, then at every turn sample a passage, if stereo channel, the sound channel that then sampling two is different at every turn.Such as, if the sample frequency of these audio frequency and video is higher or sensing range (i.e. sampling resolution+passage) is wider, then illustrate that the flow media data packet corresponding to it is more and numerous and diverse, what described second buffer queue can be arranged is longer, carries out complete broadcasting with the data of preserving in certain period; Otherwise if the sample frequency of audio frequency and video is lower or sensing range is narrower, then what described second buffer queue can be arranged is shorter;
-according to current broadcast mode, determine the queue length of described second buffer queue: such as, if current broadcast mode is live, then described second buffer queue can arrange shorter, if current broadcast mode is non-live, then described second buffer queue can arrange longer;
-according to the size of described packet to be played, determine the queue length of described second buffer queue: such as, if described packet to be played is less, then described queue length can correspondingly increase, otherwise if described packet to be played is comparatively large, then described queue length can correspondingly reduce;
-according to the device-dependent message of current device, determine the queue length of described second buffer queue: such as, if the configuration of described current playback equipment is higher, the then better performances of this playback equipment, processing speed is faster, therefore, what described queue length can be arranged is shorter, to realize the timely process treating playback data;
-according to broadcasting speed and/or resolution speed, determine the queue length of described second buffer queue: such as, if resolution speed is very fast, then described queue length can arrange longer, to adapt to obtained packet a large amount of to be played; If broadcasting speed is very fast, illustrate that obtained packet to be played can be play in time, therefore described queue length can arrange shorter; In addition, described queue length can also be jointly determined based on described broadcasting speed and described resolution speed, as according to as described in broadcasting speed and as described in the ratio of resolution speed, if described broadcasting speed is greater than described resolution speed, what then described queue length arranged is shorter, if described broadcasting speed is less than described resolution speed, then what described queue length arranged is longer etc.
At this, those skilled in the art will be understood that similar to determining the method for described first buffer queue, and the method for the above-mentioned multiple queue length for determining described second buffer queue can be combined with each other, do not repeat them here, and be contained in this by way of reference.
At this; those skilled in the art will be understood that; above-mentionedly determine that the mode of described queue length is only citing; not limitation of the present invention; other modes that can be used in the queue length determining described second buffer queue are if be applicable to the present invention; be included in protection scope of the present invention equally, and be contained in this by reference.
Described playing device 5 plays described second buffered data packet.
Particularly, described playing device 5 obtains described second buffered data packet from described second buffer unit 4, and the second buffered data packet as described in playing successively according to requirements such as predetermined broadcasting speeds (as number of pictures per second).
Fig. 4 illustrates a kind of playback equipment schematic diagram for multimedia in accordance with a preferred embodiment of the present invention.Wherein, described playback equipment comprises acquisition device 1, first buffer unit 2, resolver 3, second buffer unit 4, playing device 5, desertion device 6.Particularly, described acquisition device 1 obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played; Described first buffer unit 2 cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet; Described first buffered data packet resolved by described resolver 3, to obtain one or more packet to be played; Described second buffer unit 4 cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet; Described playing device 5 plays described second buffered data packet; At this, if described first buffer queue and/or described second buffer queue full, described desertion device 6 bases abandon rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue.
Wherein, acquisition device 1, first buffer unit 2 of described playback equipment, resolver 3, second buffer unit 4, playing device 5 are same or similar with corresponding intrument shown in Fig. 3, therefore do not repeat them here, and are contained in this by way of reference.
At this, those skilled in the art will be understood that, described desertion device 6 can with other device executed in parallel, namely described desertion device 6 in real time detects described first buffer queue and/or described second buffer queue, and above-mentioned buffer queue completely time carry out abandoning process.Preferably, if described first buffer queue and/or described second buffer queue full, then the first buffer queue and/or described second buffer queue described in described desertion device 6 priority treatment, then, other devices perform corresponding content of operation again, as the packet increasing packet in buffer queue as described in continuing as or in buffer queue as described in consuming.
If described first buffer queue and/or described second buffer queue full, described desertion device 6 bases abandon rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue.
Particularly, described desertion device 6 detects described first buffer queue and/or described second buffer queue in real time, if the packet in described buffer queue has exceeded the maximum queue length that this queue can carry, then described desertion device 6 abandons rule according to the mode such as predefine or machine learning is determined, from described first buffer queue and/or described second buffer queue, select one or more packet abandon, to ensure that above-mentioned buffer queue can normally perform.
At this, if those skilled in the art will be understood that the packet abandoned in described first buffer queue, then for abandoning the flow media data packet in described first buffer queue; If abandon the packet in described second buffer queue, then for abandoning the packet to be played in described first buffer queue.
Preferably, abandon rule described in and comprise following at least any one:
-one or more the packets being positioned at queue beginning and/or being positioned at queue end abandoning in described first buffer queue and/or described second buffer queue: Fig. 7 (a) shows a kind of schematic diagram abandoning the packet being positioned at queue end, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then abandon up-to-date data, thus the packet of up-to-date generation is dropped, could effect after playing module produces discard bag after certain hour.Fig. 7 (b) shows a kind of schematic diagram abandoning the packet being positioned at queue beginning, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then abandon the oldest data, thus most advanced enter the packet of queue be dropped, within a short period of time just can effect after playing module produces discard bag.
-abandoning multiple continuous print packets in described first buffer queue and/or described second buffer queue: Fig. 7 (c) shows a kind of schematic diagram of the multiple continuous print packets abandoned in buffer queue, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then can based on predetermined abandon position (as in the middle of queue beginning, queue, queue end) or other Stochastic choice abandon position, from this buffer queue, select continuous print two or more packet to abandon, thus more space can be reserved in order to buffered data again.This mode of abandoning can produce the effect that certain audio frequency and video jump in broadcasting, but can ensure follow-up play quality.
-based on predetermined packet interval, from described first buffer queue and/or described second buffer queue, extract one or more packet abandon: Fig. 7 (d) shows a kind of schematic diagram extracting one or more packet and carry out abandoning from buffer queue, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then from described buffer queue, extract a packet at interval of one or more packet to abandon, this mode of abandoning is owing to being abandon a packet every one piece of data bag, therefore less on the impact of result of broadcast, the overall continuity of data can be ensured.Wherein, described predefined packet interval can be configured according to default setting, as abandoned at interval of 5 packets, also can determine in real time according to the mode such as pre-defined rule or machine learning.
More preferably, when described rule of abandoning comprises based on predetermined packet interval, one or more packet is extracted when abandoning from described first buffer queue and/or described second buffer queue, described playback equipment also comprises spacer (not shown), wherein, described spacer is used for following at least any one:
-according to described first buffer queue and/or the queue length of described second buffer queue and the number of packet to be abandoned, determine described packet interval: such as, the number of packet to be abandoned can be utilized divided by described queue length, and using result as described packet interval etc.; At this, described in packet to be abandoned can according to predefined setting, as whenever as described in buffer queue full, then abandon N number of packet, or can cannot enter the quantity of the packet of buffer queue according to current and determine in real time.
-according to the minimum continuous data bag number play required for described multimedia, determine described packet interval: such as, if play this multimedia and the minimum continuous data bag number do not affected required for result of broadcast is 5, then described packet interval is 5.At this, described minimum continuous data bag data can resource characteristic corresponding to described data package size, broadcasting speed, packet (at least any one etc. as in the sample frequency of audio frequency and video, sampling resolution, sound channel, passage) etc. be determined.
At this, those skilled in the art will be understood that, the above-mentioned multiple method for discard bag from described first buffer queue and/or described second buffer queue can be combined with each other, such as, can will abandon multiple continuous print packet and abandon the packet being positioned at queue and starting and/or be positioned at queue end, or multiple continuous print packet will be abandoned carry out abandoning combining with the one or more packet of extraction, above-mentioned three can also be combined etc.At this, other combination is equally applicable to the present invention, and is contained in this by reference.
Preferably, described playback equipment also comprises regular determining device (not shown), and wherein, described regular determining device, according to predetermined condition, is determined corresponding with described first buffer queue and/or described second buffer queue to abandon rule; If described first buffer queue and/or described second buffer queue full, then described desertion device 6 abandons rule according to described, abandons the one or more packets in described first buffer queue and/or described second buffer queue.
Particularly, described regular determining device, by detecting based on the scheduled time, detecting in real time or trigger based on event modes such as detecting, detects one or more conditions be associated with described predetermined condition; If meet described predetermined condition, then based on described predetermined condition and the corresponding mapping relations abandoned between rule, determine corresponding with described first buffer queue and/or described second buffer queue to abandon rule, thus achieve automation and determine described predetermined condition.Then, described desertion device 6 can abandon rule according to determined, abandons the one or more packets in described first buffer queue and/or described second buffer queue.
Wherein, described predetermined condition comprises following at least any one:
-according to playing the broadcasting demand of user: such as, if demand playing fluency and can accept general result of broadcast, then extraction-type can be taked to abandon, if only accept high definition result of broadcast, then can take to abandon up-to-date/the oldest packet or abandon continuous data bag etc.; Further, can also determine to select up-to-date/the oldest packet still to abandon the method for continuous data bag based on the demand of different business scene;
-according to the resource type of described multimedia resource: wherein, described resource type includes but not limited to live, non-live, audio frequency, video etc.As the live moment adopts extraction-type to abandon, up-to-date/the oldest data are abandoned in non-straight employing at quarter sowing time;
-according to the data package size in described first buffer queue and/or described second buffer queue: such as, if packet is comparatively large, then adopt extraction-type to abandon, if packet is less, then adopts and abandon up-to-date/the oldest packet or abandon continuous data bag etc.;
-according to the queue length of described first buffer queue and/or described second buffer queue: such as, if the queue of described buffer queue is longer, extraction-type then can be adopted to abandon or abandon continuous data bag, if the queue of described buffer queue is shorter, then directly abandon up-to-date/the oldest packet;
-according to the resolution speed of described first buffered data packet and/or the broadcasting speed of described second buffered data packet: such as, if the broadcasting speed of very fast or described second buffered data packet of the resolution speed of described first buffered data packet is very fast, then can adopt and abandon up-to-date/the oldest packet, if the resolution speed of described first buffered data packet is slower or the broadcasting speed of described second buffered data packet is comparatively slow, then extraction-type can be adopted to abandon.
At this, those skilled in the art will be understood that the determination mode of above-mentioned predetermined condition is only example, and other for determining that the mode of described predetermined condition is equally applicable to the present invention, and are contained in this by reference.
Fig. 5 illustrates a kind of method flow diagram for multimedia according to a further aspect of the present invention.Particularly, in step sl, described playback equipment obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played; In step s 2, described playback equipment cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet; In step s3, described first buffered data packet resolved by described playback equipment, to obtain one or more packet to be played; In step s 4 which, described playback equipment cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet; In step s 5, described second buffered data packet play by described playback equipment.
In step sl, described playback equipment obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played.
Particularly, in step sl, described playback equipment is based on various communications protocols, by corresponding interface, obtain one or more flow media data packet that multimedia resource server sends via network, wherein, described flow media data packet corresponds to multimedia resource to be played.Described multimedia resource can initiatively be sent to described playback equipment by described multimedia resource server; Also can be obtained the playing request of described playback equipment by described multimedia resource server, and provide corresponding multimedia resource according to described playing request.At this, the broadcasting of described multimedia resource can be direct-seeding or non-direct-seeding, and described multimedia resource includes but not limited to audio frequency and/or video etc.
In step s 2, described playback equipment cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet.
Particularly, in step s 2, described playback equipment obtains one or more flow media data packet that described step S1 sends, and cushions described flow media data packet in the first buffer queue; At this, those skilled in the art will be understood that, one or more first buffered data packet described after buffering can be the whole flow media data packet without deleting or abandon operation, also may be through the part in the described flow media data packet after deleting or abandon process.Such as, if factors such as the network speed of enough, the described playback equipments of described first buffer queue length and/or the resolution speed of described step S3 are applicable to, in step s 2, the speed of the first buffered data packet that the speed that described playback equipment obtains flow media data packet sends out with it is mutually balanced, then described after buffering one or more first buffered data packet can be the whole flow media data packet without deleting or abandon operation; Otherwise, if the network speed of shorter, the described playback equipment of the length of described first buffer queue is greater than the factors such as the resolution speed of described step S3, then described after buffering one or more first buffered data packet then may be through the part in the described flow media data packet after deleting or abandon process.
Preferably, described method also comprises step S21 (not shown), and wherein, in the step s 21, the queue length of described first buffer queue determined by described playback equipment; In step s 2, described playback equipment, according to the queue length of described first buffer queue, cushions described flow media data packet in described first buffer queue, to obtain one or more first buffered data packet.
Particularly, in the step s 21, described playback equipment based on default configuration, can determine the length of described first buffer queue; Or, in the step s 21, described playback equipment can based on predetermined buffered play duration, in conjunction with the size of described flow media data packet, determine the length of described first buffer queue, such as, if the predetermined buffered play duration of this queue is 2 seconds, then in the step s 21, described playback equipment is determined to need how many flow media data packet according to this length, and using the length of this length as described first buffer queue; Or in the step s 21, described playback equipment based on the dynamic change of packet in buffering course, can determine the queue length adapted with current state at any time by modes such as machine learning, and determines the length etc. of described first buffer queue in real time.
Then, in step s 2, described playback equipment, according to the queue length of determined described first buffer queue, cushions described flow media data packet in described first buffer queue, to obtain one or more first buffered data packet.At this, described in described way to play for time and Fig. 5, step S2 is same or similar, therefore does not repeat them here, and is contained in this by way of reference.
More preferably, in the step s 21, described playback equipment can also be used for following at least any one:
-resource characteristic corresponding to described flow media data packet, determine the queue length of described first buffer queue: wherein, described resource characteristic includes but not limited to the sample frequency of audio frequency and video, sampling resolution, sound channel, at least any one etc. in passage, wherein, described sample frequency represents sampling number per second, sampling resolution represents the figure place (as 8 or 16) of each sampling, passage includes but not limited to monophonic audio, stereo channel etc., if monophony, then at every turn sample a passage, if stereo channel, the sound channel that then sampling two is different at every turn.Such as, if the sample frequency of these audio frequency and video is higher or sensing range (i.e. sampling resolution+passage) is wider, then illustrate that the flow media data packet corresponding to it is more and numerous and diverse, what described first buffer queue can be arranged is longer, carries out complete broadcasting with the data of preserving in certain period; Otherwise if the sample frequency of audio frequency and video is lower or sensing range is narrower, then what described first buffer queue can be arranged is shorter;
-according to current broadcast mode, determine the queue length of described first buffer queue: such as, if current broadcast mode is live, then described first buffer queue can arrange shorter, if current broadcast mode is non-live, then described first buffer queue can arrange longer;
-according to the size of described flow media data packet, determine the queue length of described first buffer queue: such as, if described flow media data packet is less, then described queue length can correspondingly increase, otherwise if described flow media data packet is comparatively large, then described queue length can correspondingly reduce;
-according to the device-dependent message of current device, determine the queue length of described first buffer queue: such as, if the configuration of described current playback equipment is higher, the then better performances of this playback equipment, processing speed is faster, therefore, what described queue length can be arranged is shorter, to realize the timely process of streaming media packet;
-according to network speed and/or resolution speed, determine the queue length of described first buffer queue: such as, if network speed is very fast, then described queue length can arrange longer, to adapt to obtained a large amount of flow media data packet; If resolution speed is very fast, illustrate that obtained flow media data packet can be resolved in time, therefore described queue length can arrange shorter; In addition, described queue length can also be jointly determined based on described network speed and described resolution speed, as according to as described in network speed and as described in the ratio of resolution speed, if described network speed is greater than described resolution speed, what then described queue length arranged is longer, if described network speed is less than described resolution speed, then what described queue length arranged is shorter etc.
At this, those skilled in the art will be understood that, the method of the above-mentioned multiple queue length for determining described first buffer queue can be combined with each other, such as, can on the basis of the device-dependent message based on current device, in conjunction with current broadcast mode, determine the queue length stating the first buffer queue.Particularly, if current broadcast mode is live, and the configuration of current playback equipment is lower, then in order to the real-time broadcasting of balanced live TV stream and the disposal ability of described current playback equipment, what described queue length can be able to be arranged is shorter, realizes the synchronous of live TV stream by utilizing modes such as abandoning strategy; If current broadcast mode is non-live, and the configuration of current playback equipment is lower, then what described queue length can be able to be arranged is longer, namely plays after playback equipment is buffered to certain time length, to improve Consumer's Experience again.
At this; those skilled in the art will be understood that; above-mentionedly determine that the mode of described queue length is only citing; not limitation of the present invention; other modes that can be used in the queue length determining described first buffer queue are if be applicable to the present invention; be included in protection scope of the present invention equally, and be contained in this by reference.
In step s3, described first buffered data packet resolved by described playback equipment, to obtain one or more packet to be played.
Particularly, in step s3, described playback equipment, by original described first buffered data packet without parsing, is resolved based on predefined analysis mode, thus obtains one or more packet to be played that can be used in playing.Such as, if described first buffered data packet to be resolved is audio A AC (AdvancedAudioCoding, Advanced Audio Coding) formatted data, then decode according to the decoding process of AAC.At this, described analysis mode is relevant to playing resource type, playing resource coded system etc., does not repeat them here, and is contained in this by way of reference.
In step s 4 which, described playback equipment cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet.
Particularly, in step s 4 which, described playback equipment obtains the packet one or more to be played that described step S3 sends, and cushions described packet to be played in the second buffer queue; At this, those skilled in the art will be understood that, one or more second buffered data packet described after buffering can be the packets whole to be played without deleting or abandon operation, also may be through the part in the packet described to be played after deleting or abandon process.Such as, if factors such as the resolution speed of enough, the described step S3 of described second buffer queue length and/or the broadcasting speed of described step S5 are applicable to, in step s 4 which, the speed of the second buffered data packet that the speed that described playback equipment obtains packet to be played sends out with it is mutually balanced, then described after buffering one or more second buffered data packet can be the packets whole to be played without deleting or abandon operation; Otherwise, if the broadcasting speed of shorter, the described playback equipment of the length of described second buffer queue is less than the factors such as the resolution speed of described step S3, then described after buffering one or more second buffered data packet then may be through the part in the packet described to be played after deleting or abandon process.
Preferably, described method also comprises step S41 (not shown), and wherein, in step S41, the queue length of described second buffer queue determined by described playback equipment; In step s 4 which, described playback equipment, according to the queue length of described second buffer queue, cushions described packet to be played in described second buffer queue, to obtain one or more second buffered data packet in institute.
Particularly, in step S41, described playback equipment based on default configuration, can determine the length of described second buffer queue; Or, in step S41, described playback equipment can based on predetermined buffered play duration, in conjunction with the size of described packet to be played, determine the length of described second buffer queue, such as, if the predetermined buffered play duration of this queue is 2 seconds, then in step S41, described playback equipment is determined to need how many packets to be played according to this length, and using the length of this length as described second buffer queue; Or in step S41, described playback equipment based on the dynamic change of packet in buffering course, can determine the queue length adapted with current state at any time by modes such as machine learning, and determines the length etc. of described second buffer queue in real time.
Then, in step s 4 which, described playback equipment, according to the queue length of determined described second buffer queue, cushions described packet to be played in described second buffer queue, to obtain one or more second buffered data packet.At this, described in described way to play for time and Fig. 5, step S4 is same or similar, therefore does not repeat them here, and is contained in this by way of reference.
More preferably, in step S41, described playback equipment is used for following at least any one:
-resource characteristic corresponding to described packet to be played, determine the queue length of described second buffer queue: wherein, described resource characteristic includes but not limited to the sample frequency of audio frequency and video, sampling resolution, sound channel, at least any one etc. in passage, wherein, described sample frequency represents sampling number per second, sampling resolution represents the figure place (as 8 or 16) of each sampling, passage includes but not limited to monophonic audio, stereo channel etc., if monophony, then at every turn sample a passage, if stereo channel, the sound channel that then sampling two is different at every turn.Such as, if the sample frequency of these audio frequency and video is higher or sensing range (i.e. sampling resolution+passage) is wider, then illustrate that the flow media data packet corresponding to it is more and numerous and diverse, what described second buffer queue can be arranged is longer, carries out complete broadcasting with the data of preserving in certain period; Otherwise if the sample frequency of audio frequency and video is lower or sensing range is narrower, then what described second buffer queue can be arranged is shorter;
-according to current broadcast mode, determine the queue length of described second buffer queue: such as, if current broadcast mode is live, then described second buffer queue can arrange shorter, if current broadcast mode is non-live, then described second buffer queue can arrange longer;
-according to the size of described packet to be played, determine the queue length of described second buffer queue: such as, if described packet to be played is less, then described queue length can correspondingly increase, otherwise if described packet to be played is comparatively large, then described queue length can correspondingly reduce;
-according to the device-dependent message of current device, determine the queue length of described second buffer queue: such as, if the configuration of described current playback equipment is higher, the then better performances of this playback equipment, processing speed is faster, therefore, what described queue length can be arranged is shorter, to realize the timely process treating playback data;
-according to broadcasting speed and/or resolution speed, determine the queue length of described second buffer queue: such as, if resolution speed is very fast, then described queue length can arrange longer, to adapt to obtained packet a large amount of to be played; If broadcasting speed is very fast, illustrate that obtained packet to be played can be play in time, therefore described queue length can arrange shorter; In addition, described queue length can also be jointly determined based on described broadcasting speed and described resolution speed, as according to as described in broadcasting speed and as described in the ratio of resolution speed, if described broadcasting speed is greater than described resolution speed, what then described queue length arranged is shorter, if described broadcasting speed is less than described resolution speed, then what described queue length arranged is longer etc.
At this, those skilled in the art will be understood that similar to determining the method for described first buffer queue, and the method for the above-mentioned multiple queue length for determining described second buffer queue can be combined with each other, do not repeat them here, and be contained in this by way of reference.
At this; those skilled in the art will be understood that; above-mentionedly determine that the mode of described queue length is only citing; not limitation of the present invention; other modes that can be used in the queue length determining described second buffer queue are if be applicable to the present invention; be included in protection scope of the present invention equally, and be contained in this by reference.
In step s 5, described second buffered data packet play by described playback equipment.
Particularly, in step s 5, described playback equipment obtains described second buffered data packet from described step S4, and the second buffered data packet as described in playing successively according to requirements such as predetermined broadcasting speeds (as number of pictures per second).
Fig. 6 illustrates a kind of method flow diagram for multimedia in accordance with a preferred embodiment of the present invention.Particularly, in step sl, described playback equipment obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played; In step s 2, described playback equipment cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet; In step s3, described first buffered data packet resolved by described playback equipment, to obtain one or more packet to be played; In step s 4 which, described playback equipment cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet; In step s 5, described second buffered data packet play by described playback equipment; At this, if described first buffer queue and/or described second buffer queue full, in step s 6, described playback equipment, then according to abandoning rule, abandons the one or more packets in described first buffer queue and/or described second buffer queue.
Wherein, shown in step S1, the step S2 of described method, step S3, step S4, step S5 and Fig. 5, corresponding step is same or similar, therefore does not repeat them here, and is contained in this by way of reference.
At this, those skilled in the art will be understood that described step S6 can with other step executed in parallel, namely described step S6 detects described first buffer queue and/or described second buffer queue in real time, and above-mentioned buffer queue completely time carry out abandoning process.Preferably, if described first buffer queue and/or described second buffer queue full, then the first buffer queue described in described step S6 priority treatment and/or described second buffer queue, then, other steps perform corresponding content of operation again, as the packet increasing packet in buffer queue as described in continuing as or in buffer queue as described in consuming.
If described first buffer queue and/or described second buffer queue full, in step s 6, described playback equipment, then according to abandoning rule, abandons the one or more packets in described first buffer queue and/or described second buffer queue.
Particularly, in step s 6, described playback equipment detects described first buffer queue and/or described second buffer queue in real time, if the packet in described buffer queue has exceeded the maximum queue length that this queue can carry, then described playback equipment abandons rule according to the mode such as predefine or machine learning is determined, from described first buffer queue and/or described second buffer queue, select one or more packet abandon, to ensure that above-mentioned buffer queue can normally perform.
At this, if those skilled in the art will be understood that the packet abandoned in described first buffer queue, then for abandoning the flow media data packet in described first buffer queue; If abandon the packet in described second buffer queue, then for abandoning the packet to be played in described first buffer queue.
Preferably, abandon rule described in and comprise following at least any one:
-one or more the packets being positioned at queue beginning and/or being positioned at queue end abandoning in described first buffer queue and/or described second buffer queue: Fig. 7 (a) shows a kind of schematic diagram abandoning the packet being positioned at queue end, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then abandon up-to-date data, thus the packet of up-to-date generation is dropped, could effect after playing module produces discard bag after certain hour.Fig. 7 (b) shows a kind of schematic diagram abandoning the packet being positioned at queue beginning, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then abandon the oldest data, thus most advanced enter the packet of queue be dropped, within a short period of time just can effect after playing module produces discard bag.
-abandoning multiple continuous print packets in described first buffer queue and/or described second buffer queue: Fig. 7 (c) shows a kind of schematic diagram of the multiple continuous print packets abandoned in buffer queue, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then can based on predetermined abandon position (as in the middle of queue beginning, queue, queue end) or other Stochastic choice abandon position, from this buffer queue, select continuous print two or more packet to abandon, thus more space can be reserved in order to buffered data again.This mode of abandoning can produce the effect that certain audio frequency and video jump in broadcasting, but can ensure follow-up play quality.
-based on predetermined packet interval, from described first buffer queue and/or described second buffer queue, extract one or more packet abandon: Fig. 7 (d) shows a kind of schematic diagram extracting one or more packet and carry out abandoning from buffer queue, namely fashionable when there being up-to-date packet to add, if described buffer queue is full, then from described buffer queue, extract a packet at interval of one or more packet to abandon, this mode of abandoning is owing to being abandon a packet every one piece of data bag, therefore less on the impact of result of broadcast, the overall continuity of data can be ensured.Wherein, described predefined packet interval can be configured according to default setting, as abandoned at interval of 5 packets, also can determine in real time according to the mode such as pre-defined rule or machine learning.
More preferably, when described rule of abandoning comprises based on predetermined packet interval, one or more packet is extracted when abandoning from described first buffer queue and/or described second buffer queue, described method also comprises step S61 (not shown), wherein, in step S61, described playback equipment is used for following at least any one:
-according to described first buffer queue and/or the queue length of described second buffer queue and the number of packet to be abandoned, determine described packet interval: such as, the number of packet to be abandoned can be utilized divided by described queue length, and using result as described packet interval etc.; At this, described in packet to be abandoned can according to predefined setting, as whenever as described in buffer queue full, then abandon N number of packet, or can cannot enter the quantity of the packet of buffer queue according to current and determine in real time.
-according to the minimum continuous data bag number play required for described multimedia, determine described packet interval: such as, if play this multimedia and the minimum continuous data bag number do not affected required for result of broadcast is 5, then described packet interval is 5.At this, described minimum continuous data bag data can resource characteristic corresponding to described data package size, broadcasting speed, packet (at least any one etc. as in the sample frequency of audio frequency and video, sampling resolution, sound channel, passage) etc. be determined.
At this, those skilled in the art will be understood that, the above-mentioned multiple method for discard bag from described first buffer queue and/or described second buffer queue can be combined with each other, such as, can will abandon multiple continuous print packet and abandon the packet being positioned at queue and starting and/or be positioned at queue end, or multiple continuous print packet will be abandoned carry out abandoning combining with the one or more packet of extraction, above-mentioned three can also be combined etc.At this, other combination is equally applicable to the present invention, and is contained in this by reference.
Preferably, described method also comprises step S7 (not shown), and wherein, in the step s 7, described playback equipment, according to predetermined condition, is determined corresponding with described first buffer queue and/or described second buffer queue to abandon rule; If described first buffer queue and/or described second buffer queue full, then in step s 6, described playback equipment according to described in abandon rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue.
Particularly, in the step s 7, described playback equipment, by detecting based on the scheduled time, detecting in real time or trigger based on event modes such as detecting, detects one or more conditions be associated with described predetermined condition; If meet described predetermined condition, then based on described predetermined condition and the corresponding mapping relations abandoned between rule, determine corresponding with described first buffer queue and/or described second buffer queue to abandon rule, thus achieve automation and determine described predetermined condition.Then, in step s 6, described playback equipment can abandon rule according to determined, abandons the one or more packets in described first buffer queue and/or described second buffer queue.
Wherein, described predetermined condition comprises following at least any one:
-according to playing the broadcasting demand of user: such as, if demand playing fluency and can accept general result of broadcast, then extraction-type can be taked to abandon, if only accept high definition result of broadcast, then can take to abandon up-to-date/the oldest packet or abandon continuous data bag etc.; Further, can also determine to select up-to-date/the oldest packet still to abandon the method for continuous data bag based on the demand of different business scene;
-according to the resource type of described multimedia resource: wherein, described resource type includes but not limited to live, non-live, audio frequency, video etc.As the live moment adopts extraction-type to abandon, up-to-date/the oldest data are abandoned in non-straight employing at quarter sowing time;
-according to the data package size in described first buffer queue and/or described second buffer queue: such as, if packet is comparatively large, then adopt extraction-type to abandon, if packet is less, then adopts and abandon up-to-date/the oldest packet or abandon continuous data bag etc.;
-according to the queue length of described first buffer queue and/or described second buffer queue: such as, if the queue of described buffer queue is longer, extraction-type then can be adopted to abandon or abandon continuous data bag, if the queue of described buffer queue is shorter, then directly abandon up-to-date/the oldest packet;
-according to the resolution speed of described first buffered data packet and/or the broadcasting speed of described second buffered data packet: such as, if the broadcasting speed of very fast or described second buffered data packet of the resolution speed of described first buffered data packet is very fast, then can adopt and abandon up-to-date/the oldest packet, if the resolution speed of described first buffered data packet is slower or the broadcasting speed of described second buffered data packet is comparatively slow, then extraction-type can be adopted to abandon.
At this, those skilled in the art will be understood that the determination mode of above-mentioned predetermined condition is only example, and other for determining that the mode of described predetermined condition is equally applicable to the present invention, and are contained in this by reference.
It should be noted that the present invention can be implemented in the assembly of software and/or software restraint, such as, application-specific integrated circuit (ASIC) (ASIC), general object computer or any other similar hardware device can be adopted to realize.In one embodiment, software program of the present invention can perform to realize step mentioned above or function by processor.Similarly, software program of the present invention (comprising relevant data structure) can be stored in computer readable recording medium storing program for performing, such as, and RAM memory, magnetic or CD-ROM driver or floppy disc and similar devices.In addition, steps more of the present invention or function can adopt hardware to realize, such as, as coordinating with processor thus performing the circuit of each step or function.
In addition, a part of the present invention can be applied to computer program, such as computer program instructions, when it is performed by computer, by the operation of this computer, can call or provide according to method of the present invention and/or technical scheme.And call the program command of method of the present invention, may be stored in fixing or moveable recording medium, and/or be transmitted by the data flow in broadcast or other signal bearing medias, and/or be stored in the working storage of the computer equipment run according to described program command.At this, comprise a device according to one embodiment of present invention, this device comprises the memory for storing computer program instructions and the processor for execution of program instructions, wherein, when this computer program instructions is performed by this processor, trigger this plant running based on the aforementioned method according to multiple embodiment of the present invention and/or technical scheme.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in device claim or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.

Claims (18)

1. for a method for multimedia, wherein, the method comprises:
A obtains one or more flow media data packet, and wherein, described flow media data packet corresponds to multimedia resource to be played;
B cushions described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet;
C resolves described first buffered data packet, to obtain one or more packet to be played;
D cushions described packet to be played in the second buffer queue, to obtain one or more second buffered data packet;
E plays described second buffered data packet.
2. method according to claim 1, wherein, the method also comprises:
X determines the queue length of described first buffer queue;
Wherein, described step b comprises:
-according to the queue length of described first buffer queue, in described first buffer queue, described flow media data packet is cushioned, to obtain one or more first buffered data packet.
3. method according to claim 2, wherein, described step x comprises following at least any one:
-resource characteristic corresponding to described flow media data packet, determines the queue length of described first buffer queue;
-according to current broadcast mode, determine the queue length of described first buffer queue;
-according to the size of described flow media data packet, determine the queue length of described first buffer queue;
-according to the device-dependent message of current device, determine the queue length of described first buffer queue;
-according to network speed and/or resolution speed, determine the queue length of described first buffer queue.
4. according to the method in any one of claims 1 to 3, wherein, the method also comprises:
Y determines the queue length of described second buffer queue;
Wherein, described steps d comprises:
-according to the queue length of described second buffer queue, in described second buffer queue, described packet to be played is cushioned, to obtain one or more second buffered data packet.
5. method according to claim 4, wherein, described step y comprises following at least any one:
-resource characteristic corresponding to described packet to be played, determines the queue length of described second buffer queue;
-according to current broadcast mode, determine the queue length of described second buffer queue;
-according to the size of described packet to be played, determine the queue length of described second buffer queue;
-according to the device-dependent message of current device, determine the queue length of described second buffer queue;
-according to broadcasting speed and/or resolution speed, determine the queue length of described second buffer queue.
6. method according to any one of claim 1 to 5, wherein, the method also comprises:
If described first buffer queue of r and/or described second buffer queue full, then according to abandoning rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue.
7. method according to claim 6, wherein, described in abandon rule and comprise following at least any one:
-one or more the packets being positioned at queue beginning and/or being positioned at queue end abandoning in described first buffer queue and/or described second buffer queue;
-abandon multiple continuous print packets in described first buffer queue and/or described second buffer queue;
-based on predetermined packet interval, from described first buffer queue and/or described second buffer queue, extract one or more packet abandon.
8. method according to claim 7, wherein, when described rule of abandoning comprises based on predetermined packet interval, from described first buffer queue and/or described second buffer queue, extract one or more packet when abandoning, the method also comprises following at least any one:
-according to described first buffer queue and/or the queue length of described second buffer queue and the number of packet to be abandoned, determine described packet interval;
-according to the minimum continuous data bag number play required for described multimedia, determine described packet interval.
9. the method according to any one of claim 6 to 8, wherein, the method also comprises:
-according to predetermined condition, determine corresponding with described first buffer queue and/or described second buffer queue to abandon rule;
Wherein, described step r comprises:
First buffer queue described in-Ruo and/or described second buffer queue full, then according to described in abandon rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue;
Wherein, described predetermined condition comprises following at least any one:
-according to the broadcasting demand playing user;
-according to the resource type of described multimedia resource;
-according to the data package size in described first buffer queue and/or described second buffer queue;
-according to the queue length of described first buffer queue and/or described second buffer queue;
-according to the resolution speed of described first buffered data packet and/or the broadcasting speed of described second buffered data packet.
10. for a playback equipment for multimedia, wherein, this equipment comprises:
Acquisition device, for obtaining one or more flow media data packet, wherein, described flow media data packet corresponds to multimedia resource to be played;
First buffer unit, for cushioning described flow media data packet in the first buffer queue, to obtain one or more first buffered data packet;
Resolver, for resolving described first buffered data packet, to obtain one or more packet to be played;
Second buffer unit, for cushioning described packet to be played in the second buffer queue, to obtain one or more second buffered data packet;
Playing device, for playing described second buffered data packet.
11. playback equipments according to claim 10, wherein, this equipment also comprises:
First queue determining device, for determining the queue length of described first buffer queue;
Wherein, described first buffer unit is used for:
-according to the queue length of described first buffer queue, in described first buffer queue, described flow media data packet is cushioned, to obtain one or more first buffered data packet.
12. playback equipments according to claim 11, wherein, described first queue determining device is used for following at least any one:
-resource characteristic corresponding to described flow media data packet, determines the queue length of described first buffer queue;
-according to current broadcast mode, determine the queue length of described first buffer queue;
-according to the size of described flow media data packet, determine the queue length of described first buffer queue;
-according to the device-dependent message of current device, determine the queue length of described first buffer queue;
-according to network speed and/or resolution speed, determine the queue length of described first buffer queue.
13. according to claim 10 to the playback equipment according to any one of 12, and wherein, the method also comprises:
Second queue determining device, for determining the queue length of described second buffer queue;
Wherein, described second buffer unit is used for:
-according to the queue length of described second buffer queue, in described second buffer queue, described packet to be played is cushioned, to obtain one or more second buffered data packet.
14. playback equipments according to claim 13, wherein, described second queue determining device is used for following at least any one:
-resource characteristic corresponding to described packet to be played, determines the queue length of described second buffer queue;
-according to current broadcast mode, determine the queue length of described second buffer queue;
-according to the size of described packet to be played, determine the queue length of described second buffer queue;
-according to the device-dependent message of current device, determine the queue length of described second buffer queue;
-according to broadcasting speed and/or resolution speed, determine the queue length of described second buffer queue.
15. according to claim 10 to the playback equipment according to any one of 14, and wherein, this equipment also comprises:
Desertion device, if for described first buffer queue and/or described second buffer queue full, then according to abandoning rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue.
16. playback equipments according to claim 15, wherein, described in abandon rule and comprise following at least any one:
-one or more the packets being positioned at queue beginning and/or being positioned at queue end abandoning in described first buffer queue and/or described second buffer queue;
-abandon multiple continuous print packets in described first buffer queue and/or described second buffer queue;
-based on predetermined packet interval, from described first buffer queue and/or described second buffer queue, extract one or more packet abandon.
17. playback equipments according to claim 16, wherein, when described rule of abandoning comprises based on predetermined packet interval, one or more packet is extracted when abandoning from described first buffer queue and/or described second buffer queue, this equipment also comprises spacer, and described spacer is used for following at least any one:
-according to described first buffer queue and/or the queue length of described second buffer queue and the number of packet to be abandoned, determine described packet interval;
-according to the minimum continuous data bag number play required for described multimedia, determine described packet interval.
18. according to claim 15 to the playback equipment according to any one of 17, and wherein, this equipment also comprises:
Rule determining device, for according to predetermined condition, determines corresponding with described first buffer queue and/or described second buffer queue to abandon rule;
Wherein, described desertion device is used for:
First buffer queue described in-Ruo and/or described second buffer queue full, then according to described in abandon rule, abandon the one or more packets in described first buffer queue and/or described second buffer queue;
Wherein, described predetermined condition comprises following at least any one:
-according to the broadcasting demand playing user;
-according to the resource type of described multimedia resource;
-according to the data package size in described first buffer queue and/or described second buffer queue;
-according to the queue length of described first buffer queue and/or described second buffer queue;
-according to the resolution speed of described first buffered data packet and/or the broadcasting speed of described second buffered data packet.
CN201510370264.0A 2015-06-29 2015-06-29 Multimedia play method and equipment Pending CN105100874A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510370264.0A CN105100874A (en) 2015-06-29 2015-06-29 Multimedia play method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510370264.0A CN105100874A (en) 2015-06-29 2015-06-29 Multimedia play method and equipment

Publications (1)

Publication Number Publication Date
CN105100874A true CN105100874A (en) 2015-11-25

Family

ID=54580266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510370264.0A Pending CN105100874A (en) 2015-06-29 2015-06-29 Multimedia play method and equipment

Country Status (1)

Country Link
CN (1) CN105100874A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111246284A (en) * 2020-03-09 2020-06-05 深圳创维-Rgb电子有限公司 Video stream playing method, system, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262610A (en) * 2008-03-27 2008-09-10 复旦大学 A playing system for AVS-TS programs at portable terminal
US20100316012A1 (en) * 2009-06-12 2010-12-16 Cygnus Broadband Systems and Methods for Intelligent Discard in a Communication Network
CN103686449A (en) * 2013-12-31 2014-03-26 大连文森特软件科技有限公司 Caching method of improving video fluency and image quality
CN104113777A (en) * 2014-08-01 2014-10-22 广州金山网络科技有限公司 Audio stream decoding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262610A (en) * 2008-03-27 2008-09-10 复旦大学 A playing system for AVS-TS programs at portable terminal
US20100316012A1 (en) * 2009-06-12 2010-12-16 Cygnus Broadband Systems and Methods for Intelligent Discard in a Communication Network
CN103686449A (en) * 2013-12-31 2014-03-26 大连文森特软件科技有限公司 Caching method of improving video fluency and image quality
CN104113777A (en) * 2014-08-01 2014-10-22 广州金山网络科技有限公司 Audio stream decoding method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111246284A (en) * 2020-03-09 2020-06-05 深圳创维-Rgb电子有限公司 Video stream playing method, system, terminal and storage medium

Similar Documents

Publication Publication Date Title
Petrangeli et al. An http/2-based adaptive streaming framework for 360 virtual reality videos
CN102256162B (en) Method and system for optimizing media-on-demand based on real-time file format conversion
CN105916058B (en) A kind of streaming media buffer playback method, device and display equipment
CN104967884B (en) A kind of bitstreams switching method and apparatus
CN107223334B (en) Method and apparatus for converting an MMTP stream to MPEG-2TS
US9787999B2 (en) Method for decreasing the bit rate needed to transmit videos over a network by dropping video frames
CN107197369B (en) Video streaming media parallel decoding method with cooperation of multiple sub-streams
CN108322775A (en) Switching method and apparatus during media flow transmission between adaptation is gathered
JP2009512330A (en) Multiple stream receiving apparatus and method in portable broadcasting system
CN113661692B (en) Method, apparatus and non-volatile computer-readable storage medium for receiving media data
CN105025351A (en) Streaming media player buffering method and apparatus
US8285886B1 (en) Live media playback adaptive buffer control
JP2010531512A (en) Method and apparatus for composing a scene using laser content
US20210076083A1 (en) Method and system for transmitting and reproducing video of dynamic bitrate with a plurality of channels
CN108307248B (en) Video broadcasting method, calculates equipment and storage medium at device
Abdullah et al. Survey of transportation of adaptive multimedia streaming service in internet
CN109889919A (en) A kind of video transcoding method, device, system and medium
US20120169929A1 (en) Method And Apparatus For Processing A Video Signal
CN103581741A (en) Special-effect playing device and method
CN110868610B (en) Streaming media transmission method, device, server and storage medium
CN105100874A (en) Multimedia play method and equipment
CN108989905B (en) Media stream control method and device, computing equipment and storage medium
Haiyan et al. Application of SVGA video real-time transmission technology in music education information communication
CN112153322B (en) Data distribution method, device, equipment and storage medium
CN105430533B (en) HLS videos on demand accelerated method and system

Legal Events

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

Application publication date: 20151125

RJ01 Rejection of invention patent application after publication