CN1614590A - Method and system for realizing sound stream playing based on BREW platform - Google Patents

Method and system for realizing sound stream playing based on BREW platform Download PDF

Info

Publication number
CN1614590A
CN1614590A CN 200410009806 CN200410009806A CN1614590A CN 1614590 A CN1614590 A CN 1614590A CN 200410009806 CN200410009806 CN 200410009806 CN 200410009806 A CN200410009806 A CN 200410009806A CN 1614590 A CN1614590 A CN 1614590A
Authority
CN
China
Prior art keywords
data
voice data
audio
play
playing
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.)
Granted
Application number
CN 200410009806
Other languages
Chinese (zh)
Other versions
CN100375091C (en
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CNB2004100098063A priority Critical patent/CN100375091C/en
Publication of CN1614590A publication Critical patent/CN1614590A/en
Application granted granted Critical
Publication of CN100375091C publication Critical patent/CN100375091C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Circuits Of Receivers In General (AREA)

Abstract

A method for realizing sound broadcast stream based on BREW platform includes setting up a module for receiving data stream, storing the receiving audio data in assigned audio data area including data baffer area setting up a module for broadcasting audio data, setting up an internal memory area for copying audio data from data baffer area, realizing sound stream broadcast on BREW platform by copying audio data from buffer area on internal memory continuously or by directly broadcasting audio data on internal memory.

Description

A kind of method and system that realize the sound stream broadcast based on binary runtime environment for wireless
Technical field
The present invention relates to the multi-media communication technical field, relate in particular to a kind of method and system that sound stream is play that in based on the portable terminal of binary runtime environment for wireless, realize.
Background technology
BREW is the abbreviation of Binary Runtime Environment for Wireless, is the general-purpose platform that provides for wireless data application program development and execution.
The BREW runtime environment is thin software interface layer, is positioned on the wireless device between chip system software and application program, makes the final user can the wireless downloading program and move enabling on the equipment of BREW.BREW has higher flash memory and RAM service efficiency (that is, its shared flash memory is less), and when application program is moved dynamic assignment RAM.BREW provides efficient, low-cost, as can to expand and a be familiar with application execution environment (AEE), one highly integrated chipset function, system software of cover and the plug-in unit that is used to realize senior Internet function and multimedia function, the application program that exploitation can any actual handheld device of seamless implantation emphatically.The function environment that BREW provides is just as the operating system on the PC, can use by application program or recreation that the service provider downloads specified type.Simultaneously, by the BREW interface function, supplier may be provided in cover complete information, commercial affairs, amusement function.BREW is mainly used in moving communicating field, the free PC operating system of the similar opening of BREW, and manufacturer can design every application on this platform.
Because the BREW environment is not supported the singularity of streaming audio plays and platform own, the mode that realizes the streaming audio plays under windows or Linux environment can't realize in the BREW environment, play for the streaming that realizes audio frequency, must use the technology that cushions and increase a playing audio-fequency data amount.Method and system of the present invention can be used for the mobile terminal device based on binary runtime environment for wireless, mobile phone especially, and it can improve the fluency that plays sound greatly in the CDMA mobile phone.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of method and system of playing based on the realization sound stream of binary runtime environment for wireless, by a data stream receiver module and an audio playing module are set, utilize a large amount of internal memories or the audio file that stored energy is play the voice data of long period that be used for of data buffer or primary distribution, realize that the streaming of BREW environment audio frequency is play.
The invention provides a kind of method of playing based on binary runtime environment for wireless realization sound stream, be applicable to the portable terminal that adopts binary runtime environment for wireless, wherein, comprise the steps:
One data stream receiver module is set, is used for triggering receiving network flow media data, and the voice data in the Streaming Media that is received is deposited in the audio data region of appointment by system event; Described audio data region is an audio data buffer or is a large amount of internal memories or the audio file of the primary distribution created that described a large amount of internal memories or audio file comprise the voice data header and can play the voice data of long period;
One audio playing module is set, the voice data that is used for the playing audio data district, when described audio data region is described audio data buffer, comprise the steps: to create a memory field again, enough broadcast conditions of time that the voice data of described memory field storage can be play; Voice data in the described audio data buffer is copied in the described memory field; Play the voice data in the described memory field; By being stored in the sound stream broadcast that the voice data of having play in the described memory field is implemented in binary runtime environment for wireless with the new voice data continual renovation that receives in the described audio data buffer in the interval at a fixed time; Perhaps, when described audio data region is a large amount of internal memories of described primary distribution or audio file, play-over the voice data that is stored in described internal memory or the file, by constantly replenishing the sound stream broadcast that the voice data of having play that upgrades in described internal memory or the audio file is implemented in binary runtime environment for wireless with the new voice data that receives on the network.
The described method of playing based on binary runtime environment for wireless realization sound stream, wherein, described system event triggers and realizes by a Data Receiving trigger event is set.
Describedly realize the method that sound stream is play based on binary runtime environment for wireless, wherein, whether enough described audio playing module further comprises the data judged in the described audio data region step of broadcast; If not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
Describedly realize the method that sound stream is play based on binary runtime environment for wireless, wherein, described be used to check described voice data whether enough trigger conditions of playing be Event triggered or timer trigger.
The described method of playing based on binary runtime environment for wireless realization sound stream wherein, further comprises the step of judging whether described voice data is play for the first time;
Wherein, when described audio data region is described audio data buffer,, then specify the voice data of playing in the internal memory, and create the memory field of the voice data of the described time that comprises voice data header and enough broadcast conditions if play for the first time; If not playing for the first time, then copy the memory field of data behind the described voice data header in the described audio buffer;
Wherein, when described audio data region is a large amount of internal memories of described primary distribution or audio file,, then specify the voice data of playing in internal memory or the file, and the audio data region or the audio file of broadcast are set if play for the first time; If not, then play-over the voice data in described audio data region or the audio file.
The described method of playing based on binary runtime environment for wireless realization sound stream wherein, in the step that an audio playing module is set, further comprises the step that recurrent event triggers is set, and is used to upgrade the timestamp of voice playing.
Describedly realize the method that sound stream is play, wherein, after described recurrent event triggers, check the poor of the preservation position of current voice data and play position, see whether it surpasses the time of setting based on binary runtime environment for wireless; As exceed audio plays then; As not exceeding, then play and suspend.
The described method that realizes the sound stream broadcast based on binary runtime environment for wireless, wherein, when described audio data region was a large amount of internal memories of described primary distribution or audio file, the voice data of having play in described renewal audio data region and the audio file further comprised the steps:
Check that the current data length L1 that has preserved adds that just the voice data length L that receives from network 2 is whether smaller or equal to the length L 0 of the voice data of setting that can play the long period;
In this way, after then the firm voice data that receives from network of copy is the voice data of L1 to described length of having preserved, and upgrade the data length L1=L1+L2 that has preserved;
As denying, then make L3=L0-L1, L4=L1+L2-L0, and copy is after just the voice data of L3 length has been the data of L1 to described length of having preserved from the voice data that network receives, and then copy just from the voice data that network receives from the L3 position begins, length is L4 data to the audio frequency internal memory or file that can play the long period set, 0 begins to preserve from the position, and upgrades the data length L1=L4 that has preserved.
The invention provides a kind of method of playing based on binary runtime environment for wireless realization sound stream, be applicable to the portable terminal that adopts binary runtime environment for wireless, wherein, comprise the steps:
Step 1 is provided with the Data Receiving trigger event;
Step 2, portable terminal receives network flow media data, and deposits the voice data in the stream medium data in audio data buffer;
Step 3, calling system voice playing function;
Step 4 checks whether described voice data is enough play, if not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
Step 5 copies voice data in the described audio data buffer in the memory field of the broadcast of being created, and plays.
The described method of playing based on binary runtime environment for wireless realization sound stream wherein, further comprises the step of judging whether described voice data is play for the first time; If then specify the voice data of playing in the internal memory, and create the memory field that comprises voice data header and the voice data of the time that can enough play condition; If not playing for the first time, then copy the memory field of data behind the described voice data header in the described audio buffer.
The invention provides a kind of method of playing based on binary runtime environment for wireless realization sound stream, wherein, comprise the steps:
Steps A is provided with the Data Receiving trigger event;
Step B creates one and comprises voice data header and a large amount of internal memories or the audio file that can play the voice data of long period;
Step C, the portable terminal receiving network data, and deposit data in memory field or audio file that step B is created;
Step D judges whether described voice data is enough play, if not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
Step e, memory field that broadcast is created or the data in the audio file.
The described method of playing based on binary runtime environment for wireless realization sound stream wherein, further comprises the step of judging whether described voice data is play for the first time; If then specify to play voice data in the internal memory or the voice data in the played file, and the audio data region or the audio file of broadcast be set; If not, then play-over the voice data in described audio data region or the audio file.
The invention provides and a kind ofly realize the sound stream playing system, be applicable to the portable terminal that adopts binary runtime environment for wireless, wherein, comprise a data stream receiver module and an audio playing module based on binary runtime environment for wireless; Described data stream receiver module is used for triggering by system event receiving network flow media data, and the voice data in the Streaming Media that is received is deposited in the audio data region of appointment; Described audio data region is an audio data buffer or is a large amount of internal memories of the primary distribution created or the audio file of primary distribution; Described a large amount of internal memory or audio file comprise the voice data header and can play the voice data of long period;
Described audio playing module, comprise that one is used for an audio data buffer and a memory field of playing audio-fequency data, described audio data buffer is used for the temporary voice data that receives, described memory field is used to store the voice data of enough broadcast conditions of time of broadcast, by the voice data in the described audio data buffer being copied to the broadcast that realizes voice data in the described memory field with the voice data in the broadcast memory field, by being stored in the sound stream broadcast that the voice data of having play in the described memory field is implemented in binary runtime environment for wireless with the new voice data continual renovation that receives in the described audio data buffer in the interval at a fixed time; Perhaps, comprise that one is used for the audio data region of playing audio-fequency data, described audio data region is a large amount of internal memories or the audio file of primary distribution, realize the broadcast of voice data by play-overing the voice data that is stored in described internal memory or the file, by constantly replenishing the sound stream broadcast that the voice data of having play that upgrades in described internal memory or the audio file is implemented in binary runtime environment for wireless with the new voice data that receives on the network.
Described based on binary runtime environment for wireless realization sound stream playing system, wherein, described system event triggers and realizes by a Data Receiving trigger event is set.
Described based on binary runtime environment for wireless realization sound stream playing system, wherein, described audio playing module further comprises a judge module, be used for judging whether the data of described audio data region are enough play, if not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
Describedly realize the sound stream playing system based on binary runtime environment for wireless, wherein, described be used to judge described voice data whether enough trigger conditions of playing be Event triggered or timer trigger.
Described based on binary runtime environment for wireless realization sound stream playing system, wherein, in described audio playing module, comprise that further one is provided with the module that recurrent event triggers, be used to upgrade the timestamp of voice playing, after described recurrent event triggers, check the poor of the preservation position of current voice data and play position, see whether it surpasses the time of setting, as exceed, then audio plays as not exceeding, is then play and is suspended.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is provided with the process flow diagram that network data receives trigger event for the present invention;
The process flow diagram that data stream received when Fig. 2 adopted first kind of mode to realize that streaming is play method for the present invention;
The process flow diagram that voice data was play when Fig. 3 adopted first kind of mode to realize that streaming is play for the present invention;
The process flow diagram that Fig. 4 triggers for audio frequency timer of the present invention;
Fig. 5 realizes that for the present invention adopts the second way streaming is provided with the process flow diagram of audio data region when playing;
The process flow diagram that data stream received when Fig. 6 adopted the second way to realize that streaming is play for the present invention;
The process flow diagram that voice data was play when Fig. 7 adopted the second way to realize that streaming is play for the present invention;
When Fig. 8 adopts the second way to realize that streaming is play for the present invention, the process flow diagram after recurrent event triggers in playing process;
Fig. 9 realizes that for the present invention adopts the third mode streaming is provided with the process flow diagram of audio file when playing;
The process flow diagram that data stream received when Figure 10 adopted the third mode to realize that streaming is play for the present invention;
The process flow diagram that voice data was play when Figure 11 adopted the third mode to realize that streaming is play for the present invention;
When Figure 12 adopts the third mode to realize that streaming is play for the present invention, the process flow diagram after recurrent event triggers in playing process.
When Figure 13 adopts first kind of mode to realize that streaming is play for the present invention, the process flow diagram the when starting point of voice playing is A shown in Figure 2.
Embodiment
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Because binary runtime environment for wireless does not support streaming to play, to realize that at binary runtime environment for wireless the streaming broadcast of audio frequency and video will use the technology of incident, buffering and a playing audio-fequency data amount of increase to realize.The present invention realizes the streaming audio plays in the BREW environment, and guarantees that the fluency of its audio frequency realizes by data stream receiver module and this two big module of audio playing module.
The data stream receiver module, the main data of being responsible for receiving automatic network.Its function comprises: network data is set receives trigger event; With after having data to arrive, system produces the Data Receiving trigger event, begins to receive data subsequently, and the voice data in the Streaming Media that receives is kept in the audio data region.Audio playing module is responsible for the voice data in the playing audio-fequency data district.Based on this method, the present invention provides the concrete mode of three kinds of different realization data stream receiver modules and audio playing module, promptly realizes three kinds of concrete modes that streaming is play at binary runtime environment for wireless.
First kind of mode, utilization be that the streaming of the technology of the data buffering sound that is implemented in binary runtime environment for wireless is play.After coming voice data in the Streaming Media of automatic network to receive, be temporarily stored in the audio data buffer, when playing audio-fequency data, create a memory field again, the memory field of being created is used to deposit the voice data of enough broadcast condition time, said enough broadcast conditions promptly are meant can play time enough, this time can be set, such as 3 seconds.Usually, this memory field is not too large.During broadcast, the copying data in the data buffer is play in this memory field.When playing, the data buffer is still receiving data, wait data playback in the memory field to finish after, the new voice data that receives in the data buffer is copied in the memory field play again, realize that thus the streaming of data is play.
Fig. 1 is provided with the process flow diagram that network data receives trigger event for the data stream receiver module.
In step 101, be connected with server by binary runtime environment for wireless.
In step 102, the Data Receiving trigger event is set.
The process flow diagram that data stream received when Fig. 2 adopted first kind of mode to realize that streaming is play for the present invention.
In step 201, there are data to arrive binary runtime environment for wireless.
In step 202, system produces the Data Receiving trigger event.
In step 203, begin from network receiving stream media data.
In step 204, the voice data in the data stream that receives is put in the audio data region, promptly in the audio data buffer.
Step 205 is the starting point of voice playing.
When new data arrived, binary runtime environment for wireless can produce new Data Receiving trigger event automatically, repeats Data Receiving step as shown in Figure 2, as shown in figure 13.
The process flow diagram that voice data was play when Fig. 3 adopted first kind of mode to realize that streaming is play for the present invention.
In process flow diagram shown in Figure 3, step 301, promptly the starting point of voice data playing flow can be the position A of Data Receiving flow chart step 205 shown in Figure 2, can begin to carry out audio playing module after data are promptly arranged in the audio data region.
In step 302, create the example of audio plays.
In step 303, check whether the data of audio data region are enough play.The condition of whether enough playing is how many voice datas in audio data district has, or how long the data of audio data region can be play.This value user can set up on their own, as enough playing for 3 seconds.If the voice data of audio data region is play inadequately, jump to step 304 so, wait for again and triggering; If enough playing, data jump to step 305.
In step 304, the arrival of system wait trigger event.After trigger condition satisfies, jump to step 303, continue to check whether the data of audio data region are enough play.The condition that triggers can be an Event triggered, as the Data Receiving trigger event in the data stream receiver module, also can be that timer triggers.Figure 4 shows that the process flow diagram that audio frequency timer of the present invention triggers.
In step 305, judge whether audio plays for the first time, then jump to step 306 if play for the first time, if not then jumping to step 308.
In step 306, specify audio frequency to play by the internal memory mode, promptly specify the voice data of playing in the internal memory.
In step 307, create the memory field that comprises voice data header and the audio frequency of the time that can enough play condition.
In step 308, the memory field of copy voice data behind the voice data header.
In step 309, playing audio-fequency data.
In step 310, after voice data finishes playing, jump to step 303 and continue to check whether voice data is enough play.
The process flow diagram that Fig. 4 triggers for audio frequency timer of the present invention.In Fig. 4, audio frequency waiting timer (step 401) at first is set, after the audio frequency waiting timer time arrives (step 402), go again to check whether enough data (step 303) are arranged in the audio data region.
The second way, the streaming that is implemented in the sound of binary runtime environment for wireless by a large amount of internal memory of creating a primary distribution in the memory field is play.After coming voice data in the Streaming Media of automatic network to receive, be stored in this big memory field, this big memory field is used for stored energy and plays the voice data of long period.This long time can be set, such as is 3 minutes time.The memory field of creating when playing in the relative first kind of implementation in this memory field is bigger usually.During broadcast, play-over and be stored in the voice data that receives in the big memory field.Usually, the said long period of time ratio front of the broadcast condition of setting when playing will lack, for example, the time of the broadcast condition of setting be 3 seconds, and the time that the voice data of storing in the big memory field can be play is 3 minutes.Therefore play by constantly receiving new data and deposit the streaming that can realize voice data the big memory field in from network.
Adopt the second way to realize that streaming plays, when realizing the data stream receiver module, it is provided with process flow diagram that network data receives trigger event as shown in Figure 1, also includes the step that audio data region is set in its data stream receiver module.Fig. 5 realizes that for the present invention adopts the second way streaming is provided with the process flow diagram of audio data region when playing.Begin to be provided with audio data region (step 501), create an audio data region (step 502) that comprises the voice data header and can play the long period audio frequency, the audio frequency that wherein can play the long period is meant that audio frequency can play long period of time for example 3 minutes.After having data to arrive, system produces the Data Receiving trigger event, begins to receive data subsequently then.
The process flow diagram that data stream received when Fig. 6 adopted the second way to realize that streaming is play for the present invention.
In step 601, there are data to arrive binary runtime environment for wireless.
In step 602, system produces the Data Receiving trigger event.
In step 603, begin from network receiving stream media data.
In step 604, the voice data in the data stream that receives is put in the audio data region.Its detailed process is as follows: check that the current data length L1 that has preserved adds that " the voice data length that receives from network just " L2 is whether smaller or equal to the length L 0 of " playing the audio frequency of long period ", in this way, after then copy " voice data that receives from the network just " length of having preserved to " playing the audio frequency of long period " is the data of L1, and the data length L1=L1+L2 that preserved of renewal; As denying, L3=L0-L1 then, L4=L1+L2-L0, behind the data length L1 that the data of L3 length have been preserved to " audio frequency of broadcast long period " the copy " the voice data length that receives from network just ", begin from the L3 position the copy " the voice data length that receives from network just " then, length be L4 data to " play the long period audio frequency " from the position 0, and the data length L1=L4 that preserved of renewal.
Step 605 is the starting point of voice playing.
After having new data to arrive, can produce new Data Receiving trigger event automatically subsequently, carry out above step equally.
The process flow diagram that voice data was play when Fig. 7 adopted the second way to realize that streaming is play for the present invention.
In process flow diagram shown in Figure 7, step 701, the starting point of voice data playing flow can be the position A of Data Receiving flow chart step 605 shown in Figure 6, can begin to carry out audio playing module after data are promptly arranged.
In step 702, begin to create the example of audio plays.
In step 703, the recurrent event that the voice playing time can be set triggers, and just triggers an incident as the voice data of 500 milliseconds of every broadcasts.Trigger if the recurrent event of voice playing time is set, then the voice data of 1000 milliseconds of every broadcasts of system default just triggers an incident.In the process of voice playing, the timestamp of voice playing since periodic Event triggered by regular renewal.For example, the current time stamp is 1000 milliseconds, and the voice data of crossing 500 milliseconds just triggers an incident, and update of time stamp is 1500 milliseconds after the Event triggered.
In step 704, check whether the data of audio data region are enough play.The condition of whether enough playing is how many voice datas in audio data district has, or how long the data of audio data region can be play.This value user can set up on their own, as enough playing for 5 seconds.If the voice data of audio data region is play inadequately, jump to step 705 so, wait for again and triggering; If enough playing, data jump to step 706.
In step 705, the arrival of system wait trigger event.After trigger condition satisfies, jump to step 704, continue to check whether the data of audio data region are enough play.The condition that triggers can be an Event triggered, as the Data Receiving trigger event in the data stream receiver module, also can be that timer triggers.Figure 4 shows that the process flow diagram that audio frequency timer of the present invention triggers.Trigger condition removes to check the voice data whether enough broadcasts are arranged in the audio data region after satisfying again.
In step 706, for the first time whether inspection audio plays, then jumps to step 707 if play for the first time, if not then jumping to step 709.
In step 707, specify the voice data of playing in the internal memory.
In step 708, the audio data region of broadcast is set.
In step 709, playing audio-fequency data.
In step 710, after voice data finishes playing, jump to step 704 and continue to check whether voice data is enough play.
When Fig. 8 adopts the second way to realize that streaming is play for the present invention, the process flow diagram after recurrent event triggers in playing process.As shown in Figure 8, when recurrent event triggers in playing process (step 801), check the poor of current preservation position and play position, see whether it surpasses certain hour (step 802), if exceeded then playing audio-fequency data (step 803), if do not exceed then play time-out (step 804).Wherein, whether to exceed the certain hour of indication in the certain hour can be 3 seconds to the difference of checking current preservation position and play position.
The third mode realizes that the difference that the streaming of voice data is play with the second way is, what be used for storing voice data from the Streaming Media that network receives is the audio file that the stored energy of primary distribution is play the voice data of long period.During audio plays, play-over the voice data in the audio file.Play by constantly receiving new data and deposit the streaming that realizes voice data the audio file in from network.
Adopt the third mode to realize that streaming plays, when realizing the data stream receiver module, it is provided with process flow diagram that network data receives trigger event as shown in Figure 1, also includes the step that audio file is set in its data stream receiver module.Fig. 9 realizes that for the present invention adopts the third mode streaming is provided with the process flow diagram of audio file when playing.Begin to be provided with audio file (step 901), create an audio file (step 902) that comprises the voice data header and can play the long period audio frequency, the audio frequency that wherein can play the long period is meant that audio frequency can play long period of time, for example is 3 minutes.After having data to arrive, system produces the Data Receiving trigger event, begins to receive data subsequently then.
The process flow diagram that data stream received when Figure 10 adopted the third mode to realize that streaming is play for the present invention.
In step 1001, there are data to arrive binary runtime environment for wireless.
In step 1002, system produces the Data Receiving trigger event.
In step 1003, begin from network receiving stream media data.
In step 1004, the voice data in the data stream that receives is put in the audio file of establishment.Its detailed process is as follows: check that the current data length L1 that has preserved adds that " the voice data length that receives from network just " L2 is whether smaller or equal to the length L 0 of " playing the audio frequency of long period ", in this way, after then copy " voice data that receives from the network just " length of having preserved to " playing the audio frequency of long period " is the data of L1, and the data length L1=L1+L2 that preserved of renewal; As denying, L3=L0-L1 then, L4=L1+L2-L0, behind the data length L1 that the data of L3 length have been preserved to " audio frequency of broadcast long period " the copy " the voice data length that receives from network just ", begin from the L3 position the copy " the voice data length that receives from network just " then, length be L4 data to " play the long period audio frequency " from the position 0, and the data length L1=L4 that preserved of renewal.
Step 1005 is the starting point of voice playing.After having new data to arrive, can produce new Data Receiving trigger event automatically subsequently, carry out above step equally.
The process flow diagram that voice data was play when Figure 11 adopted the third mode to realize that streaming is play for the present invention.
Step 1101 in process flow diagram shown in Figure 11, starting point that can the voice data playing flow can be the position A of Data Receiving flow chart step 1005 shown in Figure 10, can begin to carry out audio playing module after data are promptly arranged.
In step 1102, begin to create the example of audio plays.
In step 1103, the recurrent event that the voice playing time can be set triggers, and just triggers an incident as the voice data of 500 milliseconds of every broadcasts.Trigger if the recurrent event of voice playing time is set, then the voice data of 1000 milliseconds of every broadcasts of system default just triggers an incident.In the process of voice playing, the timestamp of voice playing since periodic Event triggered by regular renewal.For example, the current time stamp is 1000 milliseconds, and the voice data of crossing 500 milliseconds just triggers an incident, and update of time stamp is 1500 milliseconds after the Event triggered.
In step 1104, check whether the data of audio data region are enough play.The condition of whether enough playing is how many voice datas in audio data district has, or how long the data of audio data region can be play.This value user can set up on their own, as enough playing for 5 seconds.If the voice data of audio data region is play inadequately, jump to step 1105 so, wait for again and triggering; If enough playing, data jump to step 1106.
In step 1105, the arrival of system wait trigger event.After trigger condition satisfies, jump to step 1104, continue to check whether the data of audio data region are enough play.The condition that triggers can be an Event triggered, as the Data Receiving trigger event in the data stream receiver module, also can be that timer triggers.Figure 4 shows that the process flow diagram that audio frequency timer of the present invention triggers.
In step 1106, for the first time whether inspection audio plays, then jumps to step 1107 if play for the first time, if not then jumping to step 1109.
In step 1107, specify audio frequency to press file mode and play, promptly specify displaying audio file.
In step 1108, the audio file of broadcast is set.
In step 1109, playing audio-fequency data.
In step 1110, after voice data finishes playing, jump to step 1104 and continue to check whether voice data is enough play.
When Figure 12 adopts the third mode to realize that streaming is play for the present invention, the process flow diagram after recurrent event triggers in playing process.As shown in figure 12, when recurrent event triggers in playing process (step 1201), check the poor of current preservation position and play position, see whether it surpasses certain hour (step 1202), if exceeded then playing audio-fequency data (step 1203), if do not exceed then play time-out (step 1204).Wherein, whether to exceed the certain hour of indication in the certain hour can be 3 seconds to the difference of checking current preservation position and play position.
When Figure 13 adopts first kind of mode to realize that streaming is play for the present invention, the process flow diagram the when starting point of voice playing is A shown in Figure 2.Figure 13 clearly show that voice data is from receiving the process of broadcast.Figure 13 is the combination of Fig. 2 and Fig. 3 in fact, and the same Fig. 2 of related step, Fig. 3 are described.At this repeated description no longer.
Be below on mobile phone, use another embodiment that method of the present invention realizes that streaming is play based on binary runtime environment for wireless.
Wherein, employing mode 1 realizes that the specific embodiment of streaming broadcast is as follows:
Connection Service device at first, the calling system function is provided with network data and receives trigger event then.When flow to from data in server reach the Brew terminal after, system can produce the Data Receiving trigger event, begins to receive data subsequently.Voice data in the data stream that receives is put in the audio data region.Audio playing module will obtain data and broadcast from audio data region.At first create the voice playing example, check then whether the data of audio data region are enough play, such as whether playing continuously for 5 seconds.Such as finding that data only enough play for 3 seconds, 2 seconds of audio frequency waiting timer just are set.After 2 seconds, go again to check whether data are enough.In order to know the position of current voice playing, need the timestamp of regular renewal voice playing.The recurrent event that we can be provided with the voice playing time triggers, and just triggers an incident as the voice data of 500 milliseconds of every broadcasts.Check whether be to play for the first time, in this way, the voice data in the voice playing internal memory is set then, creates the memory field that comprises voice data header and the audio frequency of the time that can enough play condition then, the memory field of copy voice data behind the voice data header, audio plays; As not being for the first time, then to copying the memory field of voice data behind the voice data head, audio plays.Audio plays, voice playing is finished, and continues then to check whether audio data region has enough voice datas.After finishing above step, return beginning, continue to check the situation of audio data region.
Wherein, employing mode 2 realizes that the specific embodiment of streaming broadcast is as follows:
Connection Service device at first, the calling system function is provided with network data and receives trigger event then.Create an audio data region that comprises the voice data header and can play 3 minutes audio frequency.When flow to from data in server reach the Brew terminal after, system can produce the Data Receiving trigger event, begins to receive data subsequently.Voice data in the data stream that receives is copied in the audio data region.Audio playing module will obtain data and broadcast from audio data region.At first create the voice playing example, audio frequency periodic triggers incident can be set then, check whether the data of audio data region are enough play, such as whether playing continuously for 5 seconds.Such as finding that data only enough play for 3 seconds, 2 seconds of audio frequency waiting timer just are set.After 2 seconds, go again to check whether data are enough.In order to know the position of current voice playing, need the timestamp of regular renewal voice playing.Check whether be to play for the first time, in this way, the voice data in the voice playing internal memory is set then, the audio data region of broadcast is set then, audio plays; As not being the first time, then audio plays.After finishing above step, return beginning, continue to check the situation of audio data region.Periodic triggers incident in playing process is checked the poor of current preservation position and play position, whether surpasses certain hour, in this way, then checks current whether the time-out, as paused, then continues to play; As otherwise suspend to play.
Wherein, employing mode 3 realizes that the specific embodiment of streaming broadcast is as follows:
Connection Service device at first, the calling system function is provided with network data and receives trigger event then.Create an audio file, file comprises the voice data header and can play 3 minutes voice data.When flow to from data in server reach the Brew terminal after, system can produce the Data Receiving trigger event, begins to receive data subsequently.Voice data in the data stream that receives is copied in the audio file.Audio playing module will obtain data and broadcast from audio data region.At first create the voice playing example, audio frequency periodic triggers incident can be set then, check whether the data of audio data region are enough play, such as whether playing continuously for 5 seconds.Such as finding that data only enough play for 3 seconds, 2 seconds of audio frequency waiting timer just are set.After 2 seconds, go again to check whether data are enough.In order to know the position of current voice playing, need the timestamp of regular renewal voice playing.Check whether be to play for the first time, in this way, the voice data in the voice playing audio file is set then, the audio file of broadcast is set then, audio plays; As not being the first time, then audio plays.After finishing above step, return beginning, continue to check the situation of audio data region.Periodic triggers incident in playing process is checked the poor of current preservation position and play position, whether surpasses certain hour, in this way, then checks current whether the time-out, as paused, then continues to play; As otherwise suspend to play.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (17)

1, a kind of method of playing based on binary runtime environment for wireless realization sound stream is applicable to the portable terminal that adopts binary runtime environment for wireless, it is characterized in that, comprises the steps:
One data stream receiver module is set, is used for triggering receiving network flow media data, and the voice data in the Streaming Media that is received is deposited in the audio data region of appointment by system event; Described audio data region is an audio data buffer or is a large amount of internal memories or the audio file of the primary distribution created; Described a large amount of internal memory or audio file comprise the voice data header and can play the voice data of long period;
One audio playing module is set, the voice data that is used for the playing audio data district, when described audio data region is described audio data buffer, comprise the steps: to create a memory field again, enough broadcast conditions of time that the voice data of described memory field storage can be play; Voice data in the described audio data buffer is copied in the described memory field; Play the voice data in the described memory field; By being stored in the sound stream broadcast that the voice data of having play in the described memory field is implemented in binary runtime environment for wireless with the new voice data continual renovation that receives in the described audio data buffer in the interval at a fixed time; Perhaps, when described audio data region is a large amount of internal memories of described primary distribution or audio file, play-over the voice data that is stored in described internal memory or the file, by constantly replenishing the sound stream broadcast that the voice data of having play that upgrades in described internal memory or the audio file is implemented in binary runtime environment for wireless with the new voice data that receives on the network.
2, the method for playing based on binary runtime environment for wireless realization sound stream according to claim 1 is characterized in that described system event triggers and realizes by a Data Receiving trigger event is set.
3, according to claim 1ly realize the method that sound stream is play, it is characterized in that whether enough described audio playing module further comprises the data judged in the described audio data region step of broadcast based on binary runtime environment for wireless; If not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
4, according to claim 3ly realize the method that sound stream is play, it is characterized in that based on binary runtime environment for wireless, described be used to check described voice data whether enough trigger conditions of playing be Event triggered or timer trigger.
5, the method for playing based on binary runtime environment for wireless realization sound stream according to claim 1 is characterized in that, further comprises the step of judging whether described voice data is play for the first time;
Wherein, when described audio data region is described audio data buffer,, then specify the voice data of playing in the internal memory, and create the memory field of the voice data of the described time that comprises voice data header and enough broadcast conditions if play for the first time; If not playing for the first time, then copy the memory field of data behind the described voice data header in the described audio buffer;
Wherein, when described audio data region is a large amount of internal memories of described primary distribution or audio file,, then specify the voice data of playing in internal memory or the file, and the audio data region or the audio file of broadcast are set if play for the first time; If not, then play-over the voice data in described audio data region or the audio file.
6, according to claim 1,2,3, the 4 or 5 described methods that realize the sound stream broadcast based on binary runtime environment for wireless, it is characterized in that, in the step that an audio playing module is set, further comprise the step that recurrent event triggers is set, be used to upgrade the timestamp of voice playing.
7, according to claim 6ly realize the method that sound stream is play, it is characterized in that, after described recurrent event triggers, check the poor of the preservation position of current voice data and play position, see whether it surpasses the time of setting based on binary runtime environment for wireless; As exceed audio plays then; As not exceeding, then play and suspend.
8, according to claim 1 or the 7 described methods that realize the sound stream broadcast based on binary runtime environment for wireless, it is characterized in that, when described audio data region was a large amount of internal memories of described primary distribution or audio file, the voice data of having play in described renewal audio data region and the audio file further comprised the steps:
Check that the current data length L1 that has preserved adds that just the voice data length L that receives from network 2 is whether smaller or equal to the length L 0 of the voice data of setting that can play the long period;
In this way, after then the firm voice data that receives from network of copy is the voice data of L1 to described length of having preserved, and upgrade the data length L1=L1+L2 that has preserved;
As denying, then make L3=L0-L1, L4=L1+L2-L0, and copy is after just the voice data of L3 length has been the data of L1 to described length of having preserved from the voice data that network receives, and then copy just from the voice data that network receives from the L3 position begins, length is L4 data to the audio frequency internal memory or file that can play the long period set, 0 begins to preserve from the position, and upgrades the data length L1=L4 that has preserved.
9, a kind of method of playing based on binary runtime environment for wireless realization sound stream is applicable to the portable terminal that adopts binary runtime environment for wireless, it is characterized in that, comprises the steps:
Step 1 is provided with the Data Receiving trigger event;
Step 2, portable terminal receives network flow media data, and deposits the voice data in the stream medium data in audio data buffer;
Step 3, calling system voice playing function;
Step 4 checks whether described voice data is enough play, if not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
Step 5 copies voice data in the described audio data buffer in the memory field of the broadcast of being created, and plays.
10, the method for playing based on binary runtime environment for wireless realization sound stream according to claim 9 is characterized in that, further comprises the step of judging whether described voice data is play for the first time; If then specify the voice data of playing in the internal memory, and create the memory field that comprises voice data header and the voice data of the time that can enough play condition; If not playing for the first time, then copy the memory field of data behind the described voice data header in the described audio buffer.
11, a kind of method of playing based on binary runtime environment for wireless realization sound stream is characterized in that, comprises the steps:
Steps A is provided with the Data Receiving trigger event;
Step B creates one and comprises voice data header and a large amount of internal memories or the audio file that can play the voice data of long period;
Step C, the portable terminal receiving network data, and deposit data in memory field or audio file that step B is created;
Step D judges whether described voice data is enough play, if not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
Step e, memory field that broadcast is created or the data in the audio file.
12, the method for playing based on binary runtime environment for wireless realization sound stream according to claim 11 is characterized in that, further comprises the step of judging whether described voice data is play for the first time; If then specify to play voice data in the internal memory or the voice data in the played file, and the audio data region or the audio file of broadcast be set; If not, then play-over the voice data in described audio data region or the audio file.
13, a kind of based on binary runtime environment for wireless realization sound stream playing system, be applicable to the portable terminal of employing binary runtime environment for wireless, it is characterized in that, comprise a data stream receiver module and an audio playing module; Described data stream receiver module is used for triggering by system event receiving network flow media data, and the voice data in the Streaming Media that is received is deposited in the audio data region of appointment; Described audio data region is an audio data buffer or is a large amount of internal memories of the primary distribution created or the audio file of primary distribution; Described a large amount of internal memory or audio file comprise the voice data header and can play the voice data of long period;
Described audio playing module, comprise that one is used for an audio data buffer and a memory field of playing audio-fequency data, described audio data buffer is used for the temporary voice data that receives, described memory field is used to store the voice data of enough broadcast conditions of time of broadcast, by the voice data in the described audio data buffer being copied to the broadcast that realizes voice data in the described memory field with the voice data in the broadcast memory field, by being stored in the sound stream broadcast that the voice data of having play in the described memory field is implemented in binary runtime environment for wireless with the new voice data continual renovation that receives in the described audio data buffer in the interval at a fixed time; Perhaps, comprise that one is used for the audio data region of playing audio-fequency data, described audio data region is a large amount of internal memories or the audio file of primary distribution, realize the broadcast of voice data by play-overing the voice data that is stored in described internal memory or the file, by constantly replenishing the sound stream broadcast that the voice data of having play that upgrades in described internal memory or the audio file is implemented in binary runtime environment for wireless with the new voice data that receives on the network.
14, according to claim 13 based on binary runtime environment for wireless realization sound stream playing system, it is characterized in that described system event triggers and realizes by a Data Receiving trigger event is set.
15, according to claim 13 based on binary runtime environment for wireless realization sound stream playing system, it is characterized in that, described audio playing module further comprises a judge module, be used for judging whether the data of described audio data region are enough play, if not enough just the wait triggered, trigger condition satisfies the back and continues to check whether described voice data is enough play, and enough plays up to data.
16, according to claim 15ly realize the sound stream playing system, it is characterized in that based on binary runtime environment for wireless, described be used to judge described voice data whether enough trigger conditions of playing be Event triggered or timer trigger.
17, describedly realize the sound stream playing system according to claim 13,14,15 or 16 based on binary runtime environment for wireless, it is characterized in that, in described audio playing module, comprise that further one is provided with the module that recurrent event triggers, be used to upgrade the timestamp of voice playing, after described recurrent event triggers, check the poor of the preservation position of current voice data and play position, see whether it surpasses the time of setting, as exceed, then audio plays as not exceeding, is then play and is suspended.
CNB2004100098063A 2004-11-16 2004-11-16 Method and system for realizing sound stream playing based on BREW platform Expired - Fee Related CN100375091C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100098063A CN100375091C (en) 2004-11-16 2004-11-16 Method and system for realizing sound stream playing based on BREW platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100098063A CN100375091C (en) 2004-11-16 2004-11-16 Method and system for realizing sound stream playing based on BREW platform

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100797409A Division CN101018366A (en) 2004-11-16 2004-11-16 A method and system for the sound stream playing based on the BREW platform

Publications (2)

Publication Number Publication Date
CN1614590A true CN1614590A (en) 2005-05-11
CN100375091C CN100375091C (en) 2008-03-12

Family

ID=34763100

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100098063A Expired - Fee Related CN100375091C (en) 2004-11-16 2004-11-16 Method and system for realizing sound stream playing based on BREW platform

Country Status (1)

Country Link
CN (1) CN100375091C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339789B (en) * 2008-08-13 2010-08-18 中兴通讯股份有限公司 Implementing method of multimedia engine
CN101335799B (en) * 2008-08-04 2010-12-08 捷开通讯(深圳)有限公司 Method for BREW platform mobile phone environment abnormal alarm and equipment thereof
CN105872696A (en) * 2016-03-29 2016-08-17 杭州施强网络科技有限公司 Method for transmitting, decompressing and playing audio data in stream media direct broadcast
CN105955702A (en) * 2016-06-28 2016-09-21 广州三星通信技术研究有限公司 Wireless audio equipment and method for playing music in same
CN106782576A (en) * 2017-02-15 2017-05-31 合网络技术(北京)有限公司 audio mixing method and device
CN108401194A (en) * 2018-04-27 2018-08-14 广州酷狗计算机科技有限公司 Timestamp determines method, apparatus and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1370009A (en) * 2001-02-13 2002-09-18 上海大正(集团)有限公司 System and method for video broadcast on demand over unidirectional cable TV network
US20040181611A1 (en) * 2003-03-14 2004-09-16 Viresh Ratnakar Multimedia streaming system for wireless handheld devices

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335799B (en) * 2008-08-04 2010-12-08 捷开通讯(深圳)有限公司 Method for BREW platform mobile phone environment abnormal alarm and equipment thereof
CN101339789B (en) * 2008-08-13 2010-08-18 中兴通讯股份有限公司 Implementing method of multimedia engine
CN105872696A (en) * 2016-03-29 2016-08-17 杭州施强网络科技有限公司 Method for transmitting, decompressing and playing audio data in stream media direct broadcast
CN105955702A (en) * 2016-06-28 2016-09-21 广州三星通信技术研究有限公司 Wireless audio equipment and method for playing music in same
CN105955702B (en) * 2016-06-28 2019-03-26 广州三星通信技术研究有限公司 Wireless audio devices and the method that music is played in wireless audio devices
CN106782576A (en) * 2017-02-15 2017-05-31 合网络技术(北京)有限公司 audio mixing method and device
CN106782576B (en) * 2017-02-15 2020-05-22 合一网络技术(北京)有限公司 Audio mixing method and device
CN108401194A (en) * 2018-04-27 2018-08-14 广州酷狗计算机科技有限公司 Timestamp determines method, apparatus and computer readable storage medium
CN108401194B (en) * 2018-04-27 2020-06-30 广州酷狗计算机科技有限公司 Time stamp determination method, apparatus and computer-readable storage medium

Also Published As

Publication number Publication date
CN100375091C (en) 2008-03-12

Similar Documents

Publication Publication Date Title
CN1292345C (en) Method and system for synchronous playing audio-video at BREW platform
CN1969560A (en) Method and apparatus for programming blackout and retune
CN1829345A (en) Method and system for realizing data share between mobile terminals
CN1930871A (en) Portable terminal device
CN1852101A (en) Parallel downloading method and terminal
CN1291333C (en) Synchronization message processing method
CN101030873A (en) Method and system for downloading data
CN1522023A (en) Operation limiting technique for a camera-equipped mobile communication terminal
CN1661966A (en) Network conference system, conference server, record server, and conference terminal
CN1783133A (en) Portable-type communication terminal device, distribution server and contents supply system and method
CN101030869A (en) Method and device for downloading network resources
CN1731802A (en) CRBT copying method
CN1859197A (en) Method for determining QoS strategy
CN1540948A (en) Data receiving and reproducing appts., method and processing program
CN1893716A (en) Method and corresponding device for realizing network service providing trader's discover
CN1859526A (en) Method for realizing stream media aualogue live telecast
CN1614590A (en) Method and system for realizing sound stream playing based on BREW platform
CN1901666A (en) Mobile communication terminal and method of video communications thereof
CN1749887A (en) Method for realizing multipoint alarm clock in electronic equipment
CN1787611A (en) Portable electronic apparatus, information processing method, and program
CN1794721A (en) Method and device of unloading medium object at appointed time
CN1136675C (en) Method for establishing call in honeycomb system
CN1917618A (en) Method of transmitting video data, and transmission system
CN1859103A (en) Down loading system and down loading method
CN1581782A (en) Method for realizing charging and charging 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
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080312

Termination date: 20121116