JP4600698B2 - Stream reproducing apparatus and program thereof - Google Patents

Stream reproducing apparatus and program thereof Download PDF

Info

Publication number
JP4600698B2
JP4600698B2 JP2008258212A JP2008258212A JP4600698B2 JP 4600698 B2 JP4600698 B2 JP 4600698B2 JP 2008258212 A JP2008258212 A JP 2008258212A JP 2008258212 A JP2008258212 A JP 2008258212A JP 4600698 B2 JP4600698 B2 JP 4600698B2
Authority
JP
Japan
Prior art keywords
buffer
data
frame
reference value
receiving
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.)
Expired - Fee Related
Application number
JP2008258212A
Other languages
Japanese (ja)
Other versions
JP2009258608A (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.)
Onkyo Corp
Original Assignee
Onkyo Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Onkyo Corp filed Critical Onkyo Corp
Priority to JP2008258212A priority Critical patent/JP4600698B2/en
Publication of JP2009258608A publication Critical patent/JP2009258608A/en
Application granted granted Critical
Publication of JP4600698B2 publication Critical patent/JP4600698B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、ネットワークを介してストリーミング配信されたデータストリームを再生するストリーム再生装置に関する。   The present invention relates to a stream playback device that plays back a data stream that is streamed via a network.

最近、地上波デジタル放送に代表されるように、放送施設からストリーミング配信される符号化データストリームを一般家庭内の受信装置で受信し、再生するシステムが提供されている。地上波デジタル放送は無線によるストリーミング配信を実現している。   Recently, as represented by terrestrial digital broadcasting, a system for receiving and reproducing an encoded data stream stream-distributed from a broadcasting facility by a receiving device in a general household has been provided. Terrestrial digital broadcasting realizes wireless streaming distribution.

一方、インターネット等のネットワークを介したリアルタイムストリーミング配信技術も開示されている。ネットワークを介したストリーミング配信では、データストリームを構成するパケットの到達レートが不安定になる、いわゆる遅延ゆらぎ(ジッタ)が発生する。受信装置がデータストリームを再生している最中に、遅延ゆらぎが生じてパケットの到達が遅れた場合、受信装置内にバッファリングされたデータストリームが枯渇する場合がある。このとき、再生中のコンテンツは途中で途切れてしまう。   On the other hand, a real-time streaming distribution technique via a network such as the Internet is also disclosed. In streaming delivery via a network, a so-called delay fluctuation (jitter) occurs in which the arrival rate of packets constituting a data stream becomes unstable. If the delay fluctuation occurs and the arrival of the packet is delayed while the receiving apparatus is reproducing the data stream, the data stream buffered in the receiving apparatus may be exhausted. At this time, the content being reproduced is interrupted.

このような再生中のコンテンツの途切れを防止するため、サンプルレートコンバータを利用したり、PLL(位相同期回路)の分周逓倍比を変更したりする方法がある。しかしながら、これらの方法は、コンテンツの再生レートを変更するため、再生音が聴感上変化してしまう。特に、複数の異なる曲を連続してストリーミング配信する場合、再生音が変化するのは好ましくない。   In order to prevent such interruption of the content being reproduced, there are methods of using a sample rate converter or changing a frequency division / multiplication ratio of a PLL (phase synchronization circuit). However, since these methods change the playback rate of the content, the playback sound changes audibly. In particular, when a plurality of different songs are continuously streamed, it is not preferable that the playback sound changes.

また、バッファの基準値を比較的大きく設定することによって、バッファ内のデータストリームが枯渇する可能性を低くすることができる。しかし、バッファの基準値を比較的大きく設定すると、データストリームの最初のコンテンツを再生開始するまでに時間がかかってしまうという新たな問題が生じる。   In addition, by setting the buffer reference value to be relatively large, the possibility that the data stream in the buffer is exhausted can be reduced. However, if the buffer reference value is set to a relatively large value, there arises a new problem that it takes time to start reproduction of the first content of the data stream.

特開平10−285170号公報JP-A-10-285170 特開平2005−167414号公報JP-A-2005-167414

本発明の1つの目的は、複数のコンテンツが連結したデータストリームをストリーム再生するとき、最初のコンテンツを迅速に再生開始することができるストリーム再生装置を提供することである。   One object of the present invention is to provide a stream playback device capable of quickly starting playback of the first content when a data stream in which a plurality of contents are connected is stream-played.

本発明の別の目的は、複数のコンテンツが連結したデータストリームをストリーム再生するとき、各コンテンツの途中で再生が途切れるのを防止するストリーム再生装置を提供することである。   Another object of the present invention is to provide a stream reproducing apparatus that prevents a reproduction from being interrupted in the middle of each content when a data stream in which a plurality of contents are connected is reproduced.

本発明の好ましい実施形態によるストリーム再生装置は、複数のコンテンツが連結されたデータストリームを受信する受信手段と、前記受信されたデータストリームを前記コンテンツごとに区分する区分手段と、前記区分された各コンテンツを順次再生する再生手段と、前記受信されたデータストリームを受け取って一時的に保持し、前記データストリームのデータ量が基準値を超えた際に、前記再生手段に出力するバッファ手段と、前記データストリームのうち最初のコンテンツ以外のコンテンツについては前記基準値を第1基準値に設定し、前記データストリームのうち最初のコンテンツについては前記基準値を第1基準値よりも小さい第2基準値に設定する基準値設定手段とを備える。   A stream reproducing apparatus according to a preferred embodiment of the present invention includes a receiving unit that receives a data stream in which a plurality of contents are concatenated, a classifying unit that classifies the received data stream for each content, and each of the classified Playback means for sequentially playing back content, buffer means for receiving and temporarily holding the received data stream, and outputting to the playback means when the data amount of the data stream exceeds a reference value; and For content other than the first content in the data stream, the reference value is set to a first reference value, and for the first content in the data stream, the reference value is set to a second reference value that is smaller than the first reference value. Reference value setting means for setting.

最初のコンテンツについてはバッファ手段の基準値が第1基準値よりも小さい第2基準値に設定される。従って、データストリームの最初のコンテンツが再生開始される迄の時間を短縮することができ、迅速に再生開始することができる。一方、最初のコンテンツ以外のコンテンツについてはバッファ手段の基準値が第1基準値に設定されるので、最初のコンテンツ以外のコンテンツの再生途中で途切れる可能性を最初のコンテンツの場合と比較して低くすることができる。   For the first content, the reference value of the buffer means is set to a second reference value that is smaller than the first reference value. Accordingly, it is possible to shorten the time until the first content of the data stream is started to be played, and to start playback quickly. On the other hand, since the reference value of the buffer means is set to the first reference value for the content other than the first content, the possibility of interruption during the reproduction of the content other than the first content is lower than in the case of the first content. can do.

好ましくは、前記バッファ手段に保持されている前記データストリームのデータ量を検出する検出手段をさらに備え、前記最初のコンテンツを再生している際に、前記バッファ手段に保持されている前記データストリームのデータ量が0であることが検出されたとき、前記基準値設定手段が、前記基準値を第1基準値に設定する。   Preferably, the apparatus further comprises detection means for detecting a data amount of the data stream held in the buffer means, and when the first content is being reproduced, the data stream held in the buffer means When it is detected that the data amount is 0, the reference value setting means sets the reference value to the first reference value.

最初のコンテンツの再生時にバッファ手段に保持されているデータ量が0になるのは、バッファ手段に供給されるデータ量が、バッファ手段が再生手段に出力するデータ量よりも少ないからである。そのため、バッファ手段の基準値を第2基準値のままで最初のコンテンツを再生し続けると、再度バッファ手段のデータ量が枯渇する可能性がある。しかし、本例では、2つ目のコンテンツに移る前であっても、バッファ手段に保持されているデータ量が0になった時点で、バッファ手段の基準値を第1基準値に設定することによってこの問題を解決することができる。   The reason why the amount of data held in the buffer means at the time of reproduction of the first content is zero is that the amount of data supplied to the buffer means is smaller than the amount of data output from the buffer means to the reproduction means. For this reason, if the first content is continuously reproduced while the reference value of the buffer means remains the second reference value, the data amount of the buffer means may be exhausted again. However, in this example, the reference value of the buffer means is set to the first reference value when the amount of data held in the buffer means becomes zero even before moving to the second content. Can solve this problem.

本発明の別の好ましい実施形態によるストリーム再生装置は、複数のコンテンツが連結されたデータストリームを受信する受信手段と、前記受信されたデータストリームを前記コンテンツごとに区分する区分手段と、前記区分された各コンテンツを順次再生する再生手段と、前記受信されたデータストリームを受け取って一時的に保持し、前記データストリームのデータ量が基準値を超えた際に、前記再生手段に出力するバッファ手段と、前記バッファ手段に保持されている前記データストリームのデータ量を検出する検出手段と、最初、前記基準値を第1基準値よりも小さい第2基準値に設定し、前記バッファ手段に保持されている前記データストリームのデータ量が0であることが検出されたとき、前記基準値を第1基準値に設定する基準値設定手段とを備える。   According to another preferred embodiment of the present invention, there is provided a stream reproducing apparatus that receives a data stream in which a plurality of contents are concatenated, a classifying unit that classifies the received data stream for each content, and the classifying unit. Playback means for sequentially playing back each content, buffer means for receiving and temporarily holding the received data stream, and outputting to the playback means when the data amount of the data stream exceeds a reference value; Detecting means for detecting the data amount of the data stream held in the buffer means, and initially setting the reference value to a second reference value smaller than the first reference value and holding the data in the buffer means The reference value is set to the first reference value when it is detected that the data amount of the data stream is zero. And a value setting means.

最初はバッファ手段の基準値が第2基準値に設定される。従って、データストリームの最初のコンテンツが再生開始される迄の時間を短縮することができ、迅速に再生開始することができる。ここで、バッファ手段に保持されているデータ量が0になるのは、バッファ手段に供給されるデータ量が、バッファ手段が再生手段に出力するデータ量よりも少ないからである。そのため、バッファ手段の基準値を第2基準値のままでコンテンツを再生し続けると、再度バッファ手段のデータ量が枯渇する可能性がある。しかし、本例では、バッファ手段に保持されているデータ量が0になった時点で、バッファ手段の基準値を第1基準値に設定することによってこの問題を解決することができる。   Initially, the reference value of the buffer means is set to the second reference value. Accordingly, it is possible to shorten the time until the first content of the data stream is started to be played, and to start playback quickly. Here, the amount of data held in the buffer means becomes zero because the amount of data supplied to the buffer means is smaller than the amount of data output from the buffer means to the reproducing means. For this reason, if the content continues to be played with the reference value of the buffer means kept at the second reference value, the data amount of the buffer means may be exhausted again. However, in this example, this problem can be solved by setting the reference value of the buffer means to the first reference value when the amount of data held in the buffer means becomes zero.

好ましくは、前記バッファ手段に保持されている前記データストリームのデータ量を検出する検出手段と、前記検出手段の検出結果に基づいて、前記再生手段が前記各コンテンツを再生する間隔を調整する調整手段とをさらに備え、前記データストリーム内の各コンテンツは複数のフレームを含み、前記バッファ手段が、前記調整手段の指定に応じて前記複数のフレームを受け取り又は出力する複数のバッファを含み、前記区分手段が、前記受信手段が前記各コンテンツの先頭フレームを受信したか否かを判断し、前記調整手段が、前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記複数のバッファのうちフレームを出力中のバッファのデータ量が、所定の下限値未満であるか否かを判断する第1の判断手段と、前記フレームを出力中のバッファのデータ量が前記下限値未満であるとき、前記データを出力中のバッファと異なる他のバッファを、前記コンテンツの先頭フレーム及びそれ以降に受信されるフレームを受け取る受取バッファに指定する受取指定手段と、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量が、前記基準値または前記下限値を超えたとき、前記データを受け取り中のバッファを、前記フレームを前記再生手段に順次出力する出力バッファに指定する出力指定手段とを含む。   Preferably, detecting means for detecting the data amount of the data stream held in the buffer means, and adjusting means for adjusting the interval at which the reproducing means reproduces each content based on the detection result of the detecting means. Each content in the data stream includes a plurality of frames, and the buffer means includes a plurality of buffers for receiving or outputting the plurality of frames in accordance with designation of the adjusting means, and the sorting means Determines whether the receiving means has received the first frame of each content, and the adjustment means outputs a frame of the plurality of buffers when the receiving means has received the first frame of the content. First determination means for determining whether or not the data amount of the buffer in the buffer is less than a predetermined lower limit; When the amount of data in the buffer that is outputting is less than the lower limit value, another buffer different from the buffer that is outputting the data is designated as a receiving buffer that receives the first frame of the content and frames received thereafter. Receiving designation means, and when the data amount of the buffer receiving the frame among the plurality of buffers exceeds the reference value or the lower limit value, the buffer receiving the data is changed to the reproduction means. Output designating means for designating the output buffer to sequentially output.

フレームを出力中のバッファのデータ量が下限値未満である場合、ストリーム再生装置が受けるデータ量が、再生されるデータ量よりも少ない。そのため、ストリーム再生装置は、次のコンテンツの先頭フレーム及びそれ以降のフレームを、現在フレームを出力中のバッファと異なる他のバッファに入力する。そして、次のコンテンツの先頭フレーム以降のフレームを受け取って保持するバッファのデータ量が基準値又は下限値を超えるまで、フレームを出力しない。以上の構成により、コンテンツの再生が完了した後、次のコンテンツが再生されるまでの間、調整時間が挿入される。調整時間の挿入により、データの枯渇に起因してコンテンツが再生途中で途切れるのを防止できる。   When the data amount of the buffer that is outputting the frame is less than the lower limit value, the data amount received by the stream reproduction device is smaller than the data amount to be reproduced. Therefore, the stream playback device inputs the first frame of the next content and the subsequent frames to another buffer different from the buffer that is outputting the current frame. Then, no frame is output until the data amount of the buffer that receives and holds the frames after the first frame of the next content exceeds the reference value or the lower limit value. With the above configuration, the adjustment time is inserted after the content reproduction is completed until the next content is reproduced. By inserting the adjustment time, it is possible to prevent content from being interrupted during reproduction due to data depletion.

好ましくは、前記調整手段が、前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記フレームを出力中のバッファのデータ量が前記下限値よりも大きい所定の上限値を超えているか否かを判断する第2の判断手段をさらに含み、前記受取指定手段が、前記データ量が前記上限値を超えているとき、前記フレームを出力中のバッファと異なる他のバッファを、前記受取バッファに指定し、前記調整手段が、前記出力指示手段が出力バッファを指定したとき、出力バッファに指定されたバッファと異なる他のバッファが保持するフレームを消去する消去手段をさらに含む。   Preferably, when the receiving unit receives the first frame of the content, the adjusting unit determines whether the data amount of the buffer that is outputting the frame exceeds a predetermined upper limit value that is larger than the lower limit value. Second receiving means for determining, wherein when the amount of data exceeds the upper limit value, the receiving specifying means specifies another buffer different from the buffer that is outputting the frame as the receiving buffer. The adjusting means further includes an erasing means for erasing a frame held in another buffer different from the buffer designated as the output buffer when the output instruction means designates the output buffer.

フレームを出力中のバッファのデータ量が上限値を超える場合、ストリーム再生装置が受けるデータ量が、再生されるデータ量よりも多い。消去手段により、現在再生中のコンテンツの末尾のデータを削除した後、次のコンテンツを再生するため、バッファ手段がオーバーフローするのを抑制できる。また、コンテンツの末尾部分は、無音であったり無映像である場合が多いため、削除してもユーザに与える違和感は小さい。   When the data amount of the buffer that is outputting the frame exceeds the upper limit value, the data amount received by the stream reproduction device is larger than the data amount to be reproduced. Since the next content is reproduced after deleting the last data of the currently reproduced content by the erasing unit, the buffer unit can be prevented from overflowing. Further, since the end portion of the content is often silent or no video, even if it is deleted, the user feels uncomfortable.

本発明の別の好ましい実施形態によるストリーム再生装置は、複数のフレームを含む複数のコンテンツが連結されたデータストリームを受信する受信手段と、前記受信されたデータストリームを前記コンテンツごとに区分し、前記受信手段が前記各コンテンツの先頭フレームを受信したか否かを判断する区分手段と、前記区分された各コンテンツを順次再生する再生手段と、前記受信されたデータストリームを受け取って一時的に保持し、前記データストリームのデータ量が基準値を超えた際に、前記再生手段に出力する複数のバッファと、前記バッファに保持されている前記データストリームのデータ量を検出する検出手段と、前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記複数のバッファのうちフレームを出力中のバッファのデータ量が、下限値未満であるか否かを判断する第1の判断手段と、前記フレームを出力中のバッファのデータ量が前記下限値未満である判断されたとき、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量に所定増加量を加算して前記基準値を設定する基準値設定手段と、前記フレームを出力中のバッファのデータ量が前記下限値未満であると判断されたとき、前記データを出力中のバッファと異なる他のバッファを、前記コンテンツの先頭フレーム及びそれ以降に受信されるフレームを受け取る受取バッファに指定する受取指定手段と、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量が、前記基準値を超えたとき、前記データを受け取り中のバッファを、前記フレームを前記再生手段に順次出力する出力バッファに指定する出力指定手段とを備える。   According to another preferred embodiment of the present invention, there is provided a stream reproducing apparatus, receiving means for receiving a data stream in which a plurality of contents including a plurality of frames are concatenated, and classifying the received data stream for each of the contents, Sorting means for determining whether the receiving means has received the first frame of each content, playback means for sequentially playing back each sorted content, and receiving and temporarily holding the received data stream. A plurality of buffers to be output to the reproducing means when the data amount of the data stream exceeds a reference value; a detecting means for detecting the data amount of the data stream held in the buffer; and the receiving means Is receiving a frame of the plurality of buffers when receiving the first frame of the content. First judging means for judging whether or not the data amount of the buffer is less than a lower limit value; and when the data amount of the buffer that is outputting the frame is judged to be less than the lower limit value, the plurality of buffers A reference value setting means for setting the reference value by adding a predetermined increment to the data amount of the buffer receiving the frame, and determining that the data amount of the buffer outputting the frame is less than the lower limit value A receiving designation means for designating another buffer different from the buffer that is outputting the data as a receiving buffer for receiving the first frame of the content and a frame received after that; a frame of the plurality of buffers; When the amount of data in the buffer that is receiving the data exceeds the reference value, the buffer that is receiving the data And an output specifying means for specifying the output buffer sequentially outputs the.

この場合、新たな受取バッファが指定される毎に、基準値が前の受取バッファが保持するデータ量に応じて増加される。つまり、バッファのデータ量が多い場合には基準値の増加量が高くなり、バッファのデータ量が少ない場合には基準値の増加量が低くなる。バッファのデータ量が多いと基準値を高くしてもそのバッファのデータ量も多いために、新たな受取バッファのデータ量が基準値に達する前に出力バッファのデータがない時間を短くできる。従って、新たな受取バッファが出力バッファに指定されてコンテンツを再生する際に、コンテンツが再生されない時間が長時間挿入されることを防止することができる。   In this case, each time a new reception buffer is specified, the reference value is increased according to the amount of data held by the previous reception buffer. That is, when the amount of data in the buffer is large, the amount of increase in the reference value is high, and when the amount of data in the buffer is small, the amount of increase in the reference value is low. If the amount of data in the buffer is large, even if the reference value is increased, the amount of data in the buffer is also large. Therefore, the time when there is no data in the output buffer before the amount of data in the new receiving buffer reaches the reference value can be shortened. Therefore, when a new receiving buffer is designated as the output buffer and content is reproduced, it is possible to prevent a time during which the content is not reproduced from being inserted for a long time.

好ましい実施形態においては、前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記フレームを出力中のバッファのデータ量が前記下限値よりも大きい上限値を超えているか否かを判断する第2の判断手段をさらに備え、前記データ量が前記上限値を超えていると判断されたとき、前記基準値設定手段が、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量に所定増加量を加算して前記基準値を設定し、前記データ量が前記上限値を超えていると判断されたとき、前記受取指定手段が、前記フレームを出力中のバッファと異なる他のバッファを、前記受取バッファに指定する。   In a preferred embodiment, when the receiving means receives the first frame of the content, it is determined whether or not the data amount of the buffer that is outputting the frame exceeds an upper limit value that is larger than the lower limit value. And when the data amount is determined to exceed the upper limit value, the reference value setting unit is configured to increase the data amount of the buffer that is receiving frames among the plurality of buffers by a predetermined increase amount. Is added to set the reference value, and when it is determined that the amount of data exceeds the upper limit value, the reception specifying means receives another buffer different from the buffer that is outputting the frame. Specify in the buffer.

好ましい実施形態においては、前記基準値設定手段が、現在の前記基準値が前記下限値よりも大きいか否かを判断し、現在の前記基準値が前記下限値よりも大きい場合には、現在の前記基準値のまま維持し、現在の前記基準値が前記下限値以下である場合には、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量に所定増加量を加算して前記基準値を設定する。   In a preferred embodiment, the reference value setting means determines whether the current reference value is larger than the lower limit value, and if the current reference value is larger than the lower limit value, When the reference value is maintained and the current reference value is equal to or lower than the lower limit value, the reference value is obtained by adding a predetermined increase amount to the data amount of the buffer receiving the frame among the plurality of buffers. Set.

この場合、基準値が下限値よりも大きくなると、基準値の増加を停止させることができ、基準値がいつまでも増加し続けることを防止できる。   In this case, when the reference value becomes larger than the lower limit value, the increase of the reference value can be stopped, and the reference value can be prevented from increasing forever.

最初のコンテンツについてはバッファ手段の基準値が第1基準値よりも小さい第2基準値に設定される。従って、データストリームの最初のコンテンツが再生開始される迄の時間を短縮することができ、迅速に再生開始することができる。一方、最初のコンテンツ以外のコンテンツについてはバッファ手段の基準値が第1基準値に設定されるので、最初のコンテンツ以外のコンテンツの再生途中で途切れる可能性を最初のコンテンツの場合と比較して低くすることができる。   For the first content, the reference value of the buffer means is set to a second reference value that is smaller than the first reference value. Accordingly, it is possible to shorten the time until the first content of the data stream is started to be played, and to start playback quickly. On the other hand, since the reference value of the buffer means is set to the first reference value for the content other than the first content, the possibility of interruption during the reproduction of the content other than the first content is lower than in the case of the first content. can do.

以下、図面を参照し、本発明の実施の形態を詳しく説明する。図中同一又は相当部分には同一符号を付してその説明は繰り返さない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals and description thereof will not be repeated.

[第1の実施の形態]
[全体構成]
図1を参照して、本実施の形態によるストリーミングシステムは、ストリーム再生装置1と、ストリーミングサーバ2とを備える。ストリーミングサーバ2は、たとえば、放送施設に設置され、曲配信サービスを運営する会社で管理される。一方、ストリーム再生装置1は、たとえば、曲配信サービスの利用を契約したユーザの家庭内に設置される。
[First Embodiment]
[overall structure]
Referring to FIG. 1, the streaming system according to the present embodiment includes a stream playback device 1 and a streaming server 2. For example, the streaming server 2 is installed in a broadcasting facility and is managed by a company that operates a music distribution service. On the other hand, the stream reproduction apparatus 1 is installed in the home of a user who has contracted to use a music distribution service, for example.

ストリーミングサーバ2は、ハードディスクドライブ(HDD)21と、データストリーム生成部22と、配信部23とを備える。   The streaming server 2 includes a hard disk drive (HDD) 21, a data stream generation unit 22, and a distribution unit 23.

HDD21は、複数のコンテンツファイルを蓄積する。本実施の形態では、コンテンツファイルを曲ファイルとして説明する。なお、コンテンツは、曲であってもよいし、映像であってもよい。また映像と音声を含んでもよい。   The HDD 21 stores a plurality of content files. In the present embodiment, the content file is described as a music file. The content may be a song or a video. It may also include video and audio.

HDD21に蓄積された各曲ファイルは、MPEG2、MPEG4、MP3等の符号化されたファイルである。以降、符号化された曲ファイルを符号化曲ファイルという。符号化曲ファイルは、複数のフレームで構成される。符号化曲ファイル内の各フレームは、そのフレームをいつ再生すべきかを示す時刻管理情報(以下、タイムスタンプという)を含む。たとえば、タイムスタンプは、符号化曲ファイル内における当該フレームの再生時刻を示す。ストリーム再生装置1は、ストリーミングサーバ2から符号化曲ファイルを受信したとき、符号化曲ファイル内のフレームのタイムスタンプに基づいて、フレームを順次デコードして出力する。つまり、ストリーム再生装置1は、タイムスタンプに基づいてフレームを順次再生する。   Each music file stored in the HDD 21 is an encoded file such as MPEG2, MPEG4, or MP3. Hereinafter, the encoded music file is referred to as an encoded music file. The encoded music file is composed of a plurality of frames. Each frame in the encoded music file includes time management information (hereinafter referred to as a time stamp) indicating when the frame should be reproduced. For example, the time stamp indicates the playback time of the frame in the encoded music file. When receiving the encoded music file from the streaming server 2, the stream playback device 1 sequentially decodes and outputs the frames based on the time stamps of the frames in the encoded music file. That is, the stream reproduction device 1 sequentially reproduces the frames based on the time stamp.

ストリーミングサーバ2内のデータストリーム生成部22は、HDD21から複数の符号化曲ファイルを抽出し、抽出された複数の符号化曲ファイルを連結してデータストリームを作成する。図2に、データストリーム生成部22で生成されたデータストリームの一例を示す。図2に示すように、データストリームDSは、複数の符号化曲ファイルMFが連結して構成される。また、各符号化曲ファイルMFは、複数のフレームFRを含む。以降、複数のフレームFRのうち、先頭のフレームFRを先頭フレームとよぶ。   The data stream generation unit 22 in the streaming server 2 extracts a plurality of encoded music files from the HDD 21 and creates a data stream by concatenating the extracted encoded music files. FIG. 2 shows an example of the data stream generated by the data stream generation unit 22. As shown in FIG. 2, the data stream DS is configured by connecting a plurality of encoded music files MF. Each encoded music file MF includes a plurality of frames FR. Hereinafter, among the plurality of frames FR, the leading frame FR is referred to as a leading frame.

配信部23は、生成されたデータストリームをストリーミング配信する。上述のとおり、ストリーミングサーバ2が放送局に設置される場合、放送局は、曲のリクエストをストリーム再生装置1のユーザから受け付ける。そして、リクエストされた複数の曲ファイルがHDD21から抽出され、データストリーム生成部22により、データストリームが作成される。作成されたデータストリームは、ネットワーク3を介してストリーム再生装置1にストリーミング配信される。   The distribution unit 23 distributes the generated data stream in a streaming manner. As described above, when the streaming server 2 is installed in a broadcast station, the broadcast station accepts a song request from the user of the stream playback device 1. Then, the requested plurality of music files are extracted from the HDD 21, and a data stream is created by the data stream generation unit 22. The created data stream is streamed to the stream playback device 1 via the network 3.

ストリーム再生装置1は、ネットワーク3を介してストリーミングサーバ2に接続される。ストリーム再生装置1は、上述のとおり、たとえば、ユーザの家庭内に設置される。ストリーム再生装置1は、ストリーミングサーバ2からストリーミング配信されるデータストリームを受信し、ストリーム再生する。具体的には、ストリーム再生装置1は、配信されたデータストリームをバッファに一時的に保持し(バッファリング)、保持されたデータストリームを読み出して、データストリームを構成する各符号化曲ファイルを連続してデコードし、出力する。   The stream playback device 1 is connected to the streaming server 2 via the network 3. As described above, the stream reproduction device 1 is installed in a user's home, for example. The stream playback device 1 receives a data stream that is streamed from the streaming server 2 and plays back the stream. Specifically, the stream playback device 1 temporarily holds the distributed data stream in a buffer (buffering), reads the held data stream, and continuously plays the encoded music files constituting the data stream. To decode and output.

ストリーム再生装置1はさらに、バッファリングされたデータストリームが枯渇しないように、または、バッファが溢れない(オーバーフローしない)ように、再生される曲ファイルの再生間隔(曲間)を調整する。   Further, the stream playback device 1 adjusts the playback interval (song interval) of the music file to be played back so that the buffered data stream does not run out or the buffer does not overflow (overflow).

図3を参照して、ストリーム再生装置1は、受信部10と、受信バッファ11と、区分部12と、検出部13と、調整部17と、再生部18とを備える。   With reference to FIG. 3, the stream reproduction device 1 includes a reception unit 10, a reception buffer 11, a sorting unit 12, a detection unit 13, an adjustment unit 17, and a reproduction unit 18.

受信部10は、ストリーミングサーバ2からストリーム配信されるデータストリームを受信する。より具体的には、データストリームを構成する複数のフレームを順次受信する。受信バッファ11は、受信されたデータストリームを受信部10から受け取り、一時的に保持する。つまり、受信バッファ11は、受信されたデータストリームをバッファリングする。そして、受信バッファ11は、保持しているデータストリーム内の複数のフレームを、区分部12を介して再生部18に順次出力する。   The receiving unit 10 receives a data stream that is stream-distributed from the streaming server 2. More specifically, a plurality of frames constituting the data stream are sequentially received. The reception buffer 11 receives the received data stream from the reception unit 10 and temporarily holds it. That is, the reception buffer 11 buffers the received data stream. Then, the reception buffer 11 sequentially outputs a plurality of frames in the held data stream to the reproduction unit 18 via the sorting unit 12.

再生部18は、デコーダ14と、デコードバッファ15と、データ編集部16とを備える。デコーダ14は、第1デコーダ141と第2デコーダ142とを含む。第1デコーダ141及び第2デコーダ142は、符号化曲ファイルをデコードする。   The playback unit 18 includes a decoder 14, a decode buffer 15, and a data editing unit 16. The decoder 14 includes a first decoder 141 and a second decoder 142. The first decoder 141 and the second decoder 142 decode the encoded music file.

区分部12は、受信バッファ11から連続して出力される複数のフレームを符号化曲ファイルごとに区分する。具体的には、区分部12は、フレーム内のタイムスタンプを読み出す。そして、読み出されたタイムスタンプに基づいて、符号化曲ファイルの先頭フレームを特定する。要するに、区分部12は、受信バッファ11から連続して出力されるフレームのうち、各コンテンツの先頭フレームを特定することにより、コンテンツを区分する。   The sorting unit 12 sorts a plurality of frames continuously output from the reception buffer 11 for each encoded music file. Specifically, the sorting unit 12 reads a time stamp in the frame. Then, the first frame of the encoded music file is specified based on the read time stamp. In short, the sorting unit 12 sorts the content by specifying the first frame of each content among the frames output continuously from the reception buffer 11.

区分部12はさらに、符号化曲ファイルの先頭フレームを特定したとき、先頭フレームから、出力先のデコーダを変更する。たとえば、区分部12が、受信バッファ11から出力されたフレームを第1デコーダ141に出力している最中に、新たな符号化曲ファイルの先頭フレームを特定したとき、区分部12は、フレームの出力先を第1デコーダ141から第2デコーダ142に切り替える。そして、特定された先頭フレーム及び先頭フレーム以降に受信バッファ11にバッファリングされたフレームを第2デコーダ142に順次出力する。要するに、区分部12は、符号化曲ファイルごとに、出力先のデコーダを切り替える。   Further, when the sorting unit 12 specifies the first frame of the encoded music file, the sorting unit 12 changes the output destination decoder from the first frame. For example, when the sorting unit 12 specifies the first frame of a new encoded music file while outputting the frame output from the reception buffer 11 to the first decoder 141, the sorting unit 12 The output destination is switched from the first decoder 141 to the second decoder 142. Then, the specified first frame and frames buffered in the reception buffer 11 after the first frame are sequentially output to the second decoder 142. In short, the sorting unit 12 switches the output destination decoder for each encoded music file.

再生部18内のデコードバッファ15は、第1デコードバッファ151と第2デコードバッファ152とを含む。第1デコードバッファ151は、第1デコーダ141によりデコードされた曲ファイルをバッファリングする。第2デコードバッファ152は、第2デコーダ142によりデコードされた曲ファイルをバッファリングする。   The decode buffer 15 in the reproduction unit 18 includes a first decode buffer 151 and a second decode buffer 152. The first decoding buffer 151 buffers the music file decoded by the first decoder 141. The second decoding buffer 152 buffers the music file decoded by the second decoder 142.

第1及び第2デコードバッファは、順番に、バッファリングされた曲ファイルを出力する。具体的には、第1デコードバッファ151が曲ファイルを出力した後、第2デコードバッファ152が曲ファイルを出力する。曲ファイルの出力のタイミングは、調整部17により決定される。   The first and second decode buffers sequentially output buffered music files. Specifically, after the first decode buffer 151 outputs the music file, the second decode buffer 152 outputs the music file. The timing of outputting the music file is determined by the adjusting unit 17.

検出部13は、受信バッファ11にバッファリングされたデータストリーム(複数のフレーム)のデータ量を、所定期間ごとに検出する。   The detection unit 13 detects the data amount of the data stream (a plurality of frames) buffered in the reception buffer 11 every predetermined period.

調整部17は、検出部13の検出結果に基づいて、再生部18から出力される曲ファイルの曲間を調整する。具体的には、調整部17は、検出部13により検出されたデータ量(以下、検出データ量という)を基準データ量Vref1と比較する。ここで、基準データ量Vrefは、通常再生時に、再生される曲が再生途中で途切れたり、受信バッファ11が溢れたり(オーバーフロー)しない、理想的なデータ量である。   The adjustment unit 17 adjusts the interval between the song files output from the reproduction unit 18 based on the detection result of the detection unit 13. Specifically, the adjustment unit 17 compares the data amount detected by the detection unit 13 (hereinafter referred to as a detected data amount) with the reference data amount Vref1. Here, the reference data amount Vref is an ideal data amount that does not cause the music to be reproduced to be interrupted during reproduction or to overflow the reception buffer 11 (overflow) during normal reproduction.

検出データ量が基準データ量Vref1未満である場合、ストリーム再生装置1がストリーミングサーバ2から受信するデータ量よりも、ストリーム再生装置1が再生するデータ量の方が多い。以降、この状態を「受信データ過少状態」という。この場合、調整部17は、再生される曲の曲間を調整する。具体的には、調整部17は、検出データ量と基準データ量Vrefとの差分に基づいて調整時間を決定する。そして、データ編集部16に決定された調整時間分の曲間を設けるよう指示する。   When the detected data amount is less than the reference data amount Vref1, the data amount that the stream reproducing device 1 reproduces is larger than the data amount that the stream reproducing device 1 receives from the streaming server 2. Hereinafter, this state is referred to as “reception data insufficient state”. In this case, the adjustment unit 17 adjusts the interval between the reproduced songs. Specifically, the adjustment unit 17 determines the adjustment time based on the difference between the detected data amount and the reference data amount Vref. Then, the data editing unit 16 is instructed to provide a space between the determined adjustment times.

データ編集部16は、調整部17の指示に基づいて、曲ファイルの出力間隔(曲間)を調整する。具体的には、曲ファイルの出力を完了した後、決定された調整時間分の無音データを生成して出力する。そして、調整時間分の無音データを出力した後、次の曲ファイルを出力する。要するに、受信データ過少状態のときは、曲間を広く設けることで、受信バッファ11が枯渇するのを抑制する。そのため、再生中の曲の途中でフレームが枯渇し音切れ発生するのを防止できる。   The data editing unit 16 adjusts the music file output interval (between songs) based on the instruction from the adjusting unit 17. Specifically, after the output of the music file is completed, silence data for the determined adjustment time is generated and output. Then, after outputting the silence data for the adjustment time, the next music file is output. In short, when the reception data is in a low state, the reception buffer 11 is prevented from being depleted by providing a wide space between songs. For this reason, it is possible to prevent the sound from being cut out due to the frame being exhausted in the middle of the music being reproduced.

一方、検出データ量が基準データ量Vref1よりも多い場合、ストリーム再生装置1がストリーミングサーバ2から受信するデータ量が、ストリーム再生装置1が再生するデータ量よりも多い。この状態を「受信データ過多状態」という。この場合、調整部17は、検出データ量と基準データ量Vref1との差分に基づいてフレーム削除量を決定する。そして、再生部18に、各デコードバッファ151及び152にバッファリングされる曲ファイルの先頭又は末尾から決定されたフレーム削除量分のフレームを削除して曲を再生するよう指示する。   On the other hand, when the detected data amount is larger than the reference data amount Vref1, the data amount received by the stream reproducing device 1 from the streaming server 2 is larger than the data amount reproduced by the stream reproducing device 1. This state is called “reception data excessive state”. In this case, the adjustment unit 17 determines the frame deletion amount based on the difference between the detected data amount and the reference data amount Vref1. Then, the playback unit 18 is instructed to delete the frames corresponding to the frame deletion amount determined from the beginning or end of the music file buffered in each of the decode buffers 151 and 152 and play the music.

データ編集部16は、調整部17の指示に基づいて、各曲ファイルの先頭又は末尾からフレーム削除量分のフレームを除いて出力する。要するに、受信データ過多状態のときは、各曲ファイルの先頭又は末尾のフレームを除いて再生することで、受信バッファ11がオーバーフローするのを抑制する。曲ファイルの先頭及び末尾のフレームの多くは、無音データである。そのため、先頭又は末尾フレームを除いても、ユーザに違和感を与えにくい。   Based on the instruction from the adjustment unit 17, the data editing unit 16 outputs the music file by excluding frames corresponding to the frame deletion amount from the beginning or end of each music file. In short, when there is an excessive amount of received data, the reception buffer 11 is prevented from overflowing by reproducing the music file excluding the first or last frame. Many of the first and last frames of the music file are silent data. Therefore, even if the first or last frame is removed, it is difficult for the user to feel uncomfortable.

上述の各構成10〜18は、図4に示すハードウェア構成により実現される。ストリーム再生装置1は、CPU101と、メモリ102と、ハードディスクドライブ(HDD)103と、通信部104とを備え、これらはバス105で相互に接続される。たとえば、HDD103に格納されたストリーム再生プログラムをメモリ102に読み出し、読み出された曲再生プログラムをCPU101で実行することにより、ストリーム再生装置1の各構成10〜18が実現される。   Each of the above-described configurations 10 to 18 is realized by the hardware configuration illustrated in FIG. The stream playback device 1 includes a CPU 101, a memory 102, a hard disk drive (HDD) 103, and a communication unit 104, which are connected to each other via a bus 105. For example, the stream playback program stored in the HDD 103 is read into the memory 102, and the read music playback program is executed by the CPU 101, whereby the components 10 to 18 of the stream playback device 1 are realized.

[動作]
以下、フロー図を用いてストリーム再生装置1の動作を詳述する。
[Operation]
Hereinafter, the operation of the stream playback device 1 will be described in detail with reference to a flowchart.

ストリーム再生装置1の動作は、大きく次の3つに分けられる。1つ目は、区分部12が、受信部10で連続して受信されるフレームを曲ファイルごとに区分する動作(区分動作)である。2つ目は、受信バッファ11のデータ量に基づいて、調整部17が、再生曲の曲間の調整、又は、再生曲の一部の削除を指示する動作(調整指示動作)である。3つ目は、調整部17の指示に応じて、再生部18が曲を再生する動作(再生動作)である。以下、区分動作、調整指示動作及び再生動作について説明する。   The operation of the stream playback device 1 is roughly divided into the following three. The first is an operation (sorting operation) in which the sorting unit 12 sorts the frames continuously received by the receiving unit 10 for each music file. The second operation is an operation (adjustment instruction operation) in which the adjustment unit 17 instructs adjustment between music pieces of the reproduced music piece or deletion of a part of the reproduced music piece based on the data amount of the reception buffer 11. The third is an operation (playback operation) in which the playback unit 18 plays back a song in response to an instruction from the adjustment unit 17. Hereinafter, the sorting operation, the adjustment instruction operation, and the reproduction operation will be described.

[区分動作]
図5を参照して、ストリーム再生装置1内の区分部12は、受信バッファ11からフレームFR(n)を受信する(S1)。受信バッファ11は、受信部10から受けたフレーム順に、フレームFR(n)を出力する。続いて、区分部12は、フレームFR(n)に含まれるタイムスタンプT(n)を読み出す(S2)。そして、読み出されたタイムスタンプT(n)に基づいて、ステップS1で受信したフレームFR(n)が、新たな符号化曲ファイルの先頭フレームか否かを判断する(S3)。一般的に、曲ファイルの先頭フレームのタイムスタンプは、初期値の「0」である。そのため、区分部12は、タイムスタンプを参照することで、曲ファイルの先頭フレームを特定できる。
[Category operation]
Referring to FIG. 5, the sorting unit 12 in the stream playback device 1 receives the frame FR (n) from the reception buffer 11 (S1). The reception buffer 11 outputs the frame FR (n) in the order of frames received from the reception unit 10. Subsequently, the sorting unit 12 reads the time stamp T (n) included in the frame FR (n) (S2). Then, based on the read time stamp T (n), it is determined whether or not the frame FR (n) received in step S1 is the first frame of a new encoded music file (S3). Generally, the time stamp of the first frame of a music file is the initial value “0”. Therefore, the sorting unit 12 can specify the first frame of the music file by referring to the time stamp.

また、一般的に、あるフレームのタイムスタンプに、そのフレームの再生時間を加算すれば、次のフレームのタイムスタンプとなる。つまり、同じ曲ファイル内のフレームでは、先頭から順にタイムスタンプが徐々に増加する。そして、連続するフレームのタイムスタンプの差分は、所定の数値範囲内となる。一方、ある曲の末尾のフレームのタイムスタンプと、次の曲の先頭のフレームのタイムスタンプとの差分は、同一曲ファイル内の連続するフレームのタイムスタンプの差分よりもはるかに大きい。そのため、フレームFR(n)のタイムスタンプと、フレームFR(n−1)のタイムスタンプとの差分を算出し、算出された差分が所定値よりも大きい場合、フレームFR(n)を先頭フレームと判断してもよい。   In general, when the playback time of a frame is added to the time stamp of a certain frame, the time stamp of the next frame is obtained. In other words, the time stamps gradually increase from the beginning in the frames in the same music file. The difference between the time stamps of consecutive frames is within a predetermined numerical range. On the other hand, the difference between the time stamp of the last frame of one song and the time stamp of the first frame of the next song is much larger than the time stamp difference of consecutive frames in the same song file. Therefore, the difference between the time stamp of the frame FR (n) and the time stamp of the frame FR (n−1) is calculated, and when the calculated difference is larger than a predetermined value, the frame FR (n) is set as the first frame. You may judge.

ステップS3での判断の結果、フレームFR(n)が先頭フレームではない場合(S3でNO)、フレームFR(n)は、以前に区分部12を通過したフレームと同じ曲ファイルに属する。そのため、区分部12は、指定されているデコーダ(以下、指定デコーダという)にフレームFR(n)を出力する。指定デコーダの識別情報(指定デコーダ情報)は、メモリ102に格納されている。区分部12は、指定デコーダ情報に基づいて指定デコーダを特定し、特定された指定デコーダにフレームFR(n)を出力する(S5)。以下、指定デコーダを第1デコーダ141として、説明を続ける。   As a result of the determination in step S3, if the frame FR (n) is not the first frame (NO in S3), the frame FR (n) belongs to the same music file as the frame that has passed through the sorting unit 12 previously. Therefore, the sorting unit 12 outputs the frame FR (n) to a designated decoder (hereinafter referred to as a designated decoder). Identification information (designated decoder information) of the designated decoder is stored in the memory 102. The sorting unit 12 identifies the designated decoder based on the designated decoder information, and outputs the frame FR (n) to the identified designated decoder (S5). Hereinafter, the description will be continued assuming that the designated decoder is the first decoder 141.

ステップS3での判断の結果、フレームFR(n)が新たな曲ファイルの先頭フレームである場合(S3でYES)、区分部12は、指定デコーダを第1デコーダ141から第2デコーダ142に切り替える(S4)。具体的には、区分部12は、指定デコーダ情報を第1デコーダ141の識別情報から第2デコーダ142の識別情報に変更する。そして、変更された指定デコーダ情報に基づいて、第2デコーダ142に先頭フレームFR(n)を出力する(S5)。   If the result of determination in step S3 is that the frame FR (n) is the first frame of a new song file (YES in S3), the sorting unit 12 switches the designated decoder from the first decoder 141 to the second decoder 142 ( S4). Specifically, the sorting unit 12 changes the designated decoder information from the identification information of the first decoder 141 to the identification information of the second decoder 142. Then, based on the changed designated decoder information, the first frame FR (n) is output to the second decoder 142 (S5).

以上の工程により、区分部12は、ストリーム再生装置1が受信したデータストリームを、複数の符号化曲ファイルに区分する。区分部12は、さらに、ある符号化曲ファイルと、その符号化曲ファイルの次に受信した新たな符号化曲ファイルとを、それぞれ異なるデコーダ141及び142に出力する。各デコーダ141及び142は、それぞれ符号化曲ファイルをデコードし、デコードされた曲ファイルを別々のデコードバッファ(151及び152)に格納する。   Through the above steps, the sorting unit 12 sorts the data stream received by the stream playback device 1 into a plurality of encoded music files. Further, the sorting unit 12 outputs a certain encoded music file and a new encoded music file received next to the encoded music file to different decoders 141 and 142, respectively. Each of the decoders 141 and 142 decodes the encoded music file, and stores the decoded music file in separate decoding buffers (151 and 152).

[調整指示動作]
調整部17は、受信バッファ11が保持しているデータ量に基づいて、再生曲の曲間の調整を指示したり、再生曲の先頭又は末尾のフレームの削除を指示する。
[Adjustment instruction operation]
Based on the amount of data held in the reception buffer 11, the adjustment unit 17 instructs adjustment of the music pieces of the reproduction music piece or instructs the deletion of the first or last frame of the reproduction music piece.

図6を参照して、調整部17は、所定時間ΔTごとに、調整指示動作を実行する(S11)。所定時間ΔTが経過したとき(S11でYES)、調整部17は、検出部13に受信バッファ11が保持するデータ量を要求する(S12)。検出部13は、調整部17からの要求を受け、受信バッファ11のデータ量を検出する。そして、検出されたデータ量(検出データ量)Vdetを調整部17に通知する。   Referring to FIG. 6, adjustment unit 17 performs an adjustment instruction operation every predetermined time ΔT (S11). When the predetermined time ΔT has elapsed (YES in S11), the adjustment unit 17 requests the data amount held in the reception buffer 11 from the detection unit 13 (S12). The detection unit 13 receives the request from the adjustment unit 17 and detects the data amount of the reception buffer 11. Then, the adjustment unit 17 is notified of the detected data amount (detected data amount) Vdet.

調整部17は検出データ量Vdetを取得する(S13)。続いて、調整部17は、式(1)に基づいて、検出データ量Vdetと基準データ量Vref1との差分ΔVを求める(S14)。   The adjusting unit 17 acquires the detected data amount Vdet (S13). Subsequently, the adjusting unit 17 obtains a difference ΔV between the detected data amount Vdet and the reference data amount Vref1 based on Expression (1) (S14).

ΔV=Vdet−Vref1 (1)
なお、基準データ量Vref1は予めメモリ102に格納されている。
ΔV = Vdet−Vref1 (1)
The reference data amount Vref1 is stored in the memory 102 in advance.

調整部17はさらに、ステップS14で算出された差分ΔVを利用して、式(2)で示される調整時間ΔADJを算出する(S15)。   The adjustment unit 17 further calculates the adjustment time ΔADJ represented by the equation (2) using the difference ΔV calculated in step S14 (S15).

ΔADJ=ΔV(bit)/圧縮ビットレート(bps)/曲ファイル再生数 (2)
ここで、「曲ファイル再生数」とは、所定期間ΔT内に再生される曲ファイル数である。例えば、所定期間ΔTが60分であり、曲ファイルの平均再生時間が4分である場合、曲ファイル再生数を「15」とする。曲ファイル再生数は、予めメモリ102に格納されていてもよい。また、調整部17が、所定期間ΔT内で実際に再生された曲ファイル数をカウントしたものを用いてもよい。また、式(2)で求めた値に1以上の係数αを乗じたものを調整時間ΔADJとしてもよい。算出された調整時間ΔADJはメモリ102に格納される。
ΔADJ = ΔV (bit) / compression bit rate (bps) / number of song files played back (2)
Here, the “number of music file playbacks” is the number of music files played back within a predetermined period ΔT. For example, when the predetermined period ΔT is 60 minutes and the average reproduction time of the music file is 4 minutes, the music file reproduction number is set to “15”. The number of music file reproductions may be stored in the memory 102 in advance. Alternatively, the adjusting unit 17 may count the number of music files actually reproduced within a predetermined period ΔT. Alternatively, the adjustment time ΔADJ may be obtained by multiplying the value obtained by Expression (2) by one or more coefficient α. The calculated adjustment time ΔADJ is stored in the memory 102.

続いて、調整部17は、ステップS15で算出された調整時間ΔADJが0よりも大きいか否かを判断する(S16及びS17)。調整時間ΔADJが0よりも小さいとき(S16でYES)、調整部17は、データ編集部16に、曲間に調整時間ΔADJ分の無音データを挿入するよう指示する(S18)。具体的には、メモリ102内に格納されている指示情報を、挿入を示す指示(以下、挿入指示という)に設定する。調整時間ΔADJが0よりも小さい場合、検出データ量Vdetが基準データ量Vref1よりも少ない。つまり、ストリーム再生装置1は、受信データ過少状態である。そのため、調整部17は、再生曲に曲間を設けて、再生中の曲が途中で途切れないようにする。   Subsequently, the adjustment unit 17 determines whether or not the adjustment time ΔADJ calculated in step S15 is greater than 0 (S16 and S17). When the adjustment time ΔADJ is smaller than 0 (YES in S16), the adjustment unit 17 instructs the data editing unit 16 to insert silence data for the adjustment time ΔADJ between songs (S18). Specifically, the instruction information stored in the memory 102 is set to an instruction indicating insertion (hereinafter referred to as an insertion instruction). When the adjustment time ΔADJ is smaller than 0, the detected data amount Vdet is smaller than the reference data amount Vref1. That is, the stream reproduction device 1 is in a state where received data is insufficient. Therefore, the adjustment unit 17 provides a space between the reproduced songs so that the currently played song is not interrupted.

一方、調整時間ΔADJが0よりも大きい場合(S16でNO、S17でYES)、調整部17は、データ編集部16に、再生曲の先頭又は末尾を調整時間ΔADJ分だけ除いて出力するよう指示する(S19)。具体的には、メモリ102内に格納されている指示情報を、削除を示す指示(以下、削除指示という)に設定する。調整時間ΔADJが0よりも大きい場合、検出データ量Vdetが基準データ量Vref1よりも多い。つまり、ストリーム再生装置1は、受信データ過多状態である。そのため、調整部17は、曲の先頭又は末尾フレームを除いて再生することで、受信バッファ11がオーバーフローするのを抑制する。調整時間ΔADJが0である場合(S16及びS17でNO)、受信バッファのデータ量は、基準データ量Vref1と同じであり、理想的なデータ量である。そのため、調整部17は、メモリ102内の指示情報を、曲ファイルをそのまま再生することを示す指示(以下、通常再生指示)に設定する。   On the other hand, if the adjustment time ΔADJ is greater than 0 (NO in S16, YES in S17), the adjustment unit 17 instructs the data editing unit 16 to output the reproduction music piece with the adjustment time ΔADJ removed. (S19). Specifically, the instruction information stored in the memory 102 is set to an instruction indicating deletion (hereinafter referred to as a deletion instruction). When the adjustment time ΔADJ is larger than 0, the detected data amount Vdet is larger than the reference data amount Vref1. That is, the stream reproduction device 1 is in a reception data excessive state. Therefore, the adjustment unit 17 suppresses the overflow of the reception buffer 11 by reproducing the music except for the head or tail frame. When the adjustment time ΔADJ is 0 (NO in S16 and S17), the data amount of the reception buffer is the same as the reference data amount Vref1, and is an ideal data amount. Therefore, the adjustment unit 17 sets the instruction information in the memory 102 to an instruction (hereinafter referred to as normal reproduction instruction) indicating that the music file is reproduced as it is.

[再生動作]
再生部18は、調整部17の指示に応じて曲を再生する。
[Playback operation]
The reproduction unit 18 reproduces the music according to the instruction from the adjustment unit 17.

図7を参照して、再生部18内のデータ編集部16は、2つのデコードバッファ151及び152のうち、デコードされた曲ファイルを読み出すデコードバッファ(以下、出力バッファという)を特定する。ここでは、出力バッファが第1デコードバッファ151であるとして説明を続ける。データ編集部16は、第1デコードバッファ151からデコードされた曲ファイルを読み出す(S31)。出力バッファに関する情報(出力バッファ情報)は、メモリ102に格納されている。出力バッファが第1デコードバッファ151である場合、出力バッファ情報は第1デコードバッファ151を示す。   Referring to FIG. 7, the data editing unit 16 in the playback unit 18 identifies a decoding buffer (hereinafter referred to as an output buffer) from which the decoded music file is read out of the two decoding buffers 151 and 152. Here, the description will be continued assuming that the output buffer is the first decode buffer 151. The data editing unit 16 reads the decoded music file from the first decoding buffer 151 (S31). Information about the output buffer (output buffer information) is stored in the memory 102. When the output buffer is the first decode buffer 151, the output buffer information indicates the first decode buffer 151.

第1デコードバッファ151から曲ファイルのフレームを全て読み出し終えたとき(S32でYES)、データ編集部16は、出力バッファを第1デコードバッファ151から第2デコードバッファ152に切り替える(S33)。これにより、データ編集部16は、次の曲ファイルを出力する準備ができる。このとき、メモリ102内の出力バッファ情報は、第2デコードバッファ152に変更される。   When all the frames of the music file have been read from the first decode buffer 151 (YES in S32), the data editing unit 16 switches the output buffer from the first decode buffer 151 to the second decode buffer 152 (S33). As a result, the data editing unit 16 is ready to output the next music file. At this time, the output buffer information in the memory 102 is changed to the second decode buffer 152.

続いて、データ編集部16は、メモリ102から指示情報を読み出す(S34)。指示情報が挿入指示の場合(S35でYES)、データ編集部16は、調整時間ΔADJ分の長さの無音データを生成し、出力する(S36)。無音データを出力した後、データ編集部16は、ステップS31に戻って出力バッファ(ステップS33で新たに指定された第2デコードバッファ152)から曲ファイルを読み出して出力する。要するに、曲間に調整時間ADJ分の無音データを挿入する。これにより、再生部18は、曲ファイルの再生を完了してから調整時間ΔADJが経過した後に、次の曲ファイルの再生を開始する。   Subsequently, the data editing unit 16 reads the instruction information from the memory 102 (S34). When the instruction information is an insertion instruction (YES in S35), the data editing unit 16 generates and outputs silence data having a length corresponding to the adjustment time ΔADJ (S36). After outputting the silent data, the data editing unit 16 returns to step S31, reads out the music file from the output buffer (the second decoding buffer 152 newly designated in step S33), and outputs the music file. In short, silence data for adjustment time ADJ is inserted between songs. As a result, the playback unit 18 starts playback of the next song file after the adjustment time ΔADJ has elapsed since the playback of the song file has been completed.

一方、ステップS34で読み出した指示情報が削除指示の場合(S35でNO、S37でYES)、出力バッファ(ここでは第2デコードバッファ152)内の曲ファイルのうち、先頭から調整時間ΔADJ分の複数のフレーム又は末尾から調整時間ΔADJ分の複数のフレームを特定する(S38)。そして、ステップS31に戻って曲ファイルを読み出すとき、ステップS38で特定されたフレームを除いた部分を読み出して出力する(S31)。これにより、再生部18は、曲ファイルの先頭又は末尾の一部を除いて再生する。曲ファイルの先頭部分及び末尾部分は無音部分である場合が多い。そのため、先頭部分又は末尾部分のフレームを除いて再生しても、ユーザは違和感なく聴くことができる。また、受信バッファ11がオーバーフローするのを抑制できる。   On the other hand, if the instruction information read in step S34 is a deletion instruction (NO in S35, YES in S37), among the music files in the output buffer (here, the second decode buffer 152), a plurality of adjustment times ΔADJ from the beginning. A plurality of frames corresponding to the adjustment time ΔADJ from the frame or the end are specified (S38). Then, when returning to step S31 and reading the music file, the portion excluding the frame specified in step S38 is read and output (S31). Thereby, the reproducing unit 18 reproduces the music file by excluding a part at the beginning or the end of the music file. In many cases, the beginning part and the end part of a music file are silent parts. Therefore, the user can listen without feeling uncomfortable even if the frame is reproduced without the head portion or the tail portion. Moreover, it is possible to suppress the overflow of the reception buffer 11.

なお、指示情報が通常再生指示である場合(S35及びS37でNO)、データ編集部16は、無音データを挿入したり、曲ファイルの先頭又は末尾部分のうち調整時間ΔADJ分の複数のフレームを特定したりすることなく、出力デコーダから曲ファイルを読み出して外部に出力する(S31)。   When the instruction information is a normal reproduction instruction (NO in S35 and S37), the data editing unit 16 inserts silence data or selects a plurality of frames for the adjustment time ΔADJ from the beginning or end of the music file. Without specifying, the music file is read from the output decoder and output to the outside (S31).

以上、ストリーム再生装置1は、受信バッファ11のデータ量を所定期間ごとに検出し、検出されたデータ量Vdetと基準データ量Vref1との差分に基づいて、受信データ過少状態か受信データ過多状態かを判断する。そして、受信データ過少状態のとき、曲間に調整時間を挿入することで、再生曲が途中で途切れるのを防ぐ。一方、受信データ過多状態のとき、各曲の先頭又は末尾フレームの一部を除いて再生することをで、受信バッファ11がオーバーフローするのを防ぐ。   As described above, the stream reproduction device 1 detects the data amount of the reception buffer 11 for each predetermined period, and based on the difference between the detected data amount Vdet and the reference data amount Vref1, whether the reception data is in the insufficient state or the reception data is in the excessive state. Judging. Then, when the received data is insufficient, the playback music is prevented from being interrupted by inserting an adjustment time between the music. On the other hand, when the received data is in an excessive state, the reception buffer 11 is prevented from overflowing by reproducing a part of the beginning or end frame of each song.

なお、図6中のステップS16及び17では、調整部17は、調整時間ΔADJが0より大きいか否かに基づいて、指示内容を決定した。しかしながら、たとえば、調整時間ΔADJが0を含む所定の範囲内である場合、調整部17は指示情報を通常再生指示としてもよい。要するに、検出データ量Vdetが基準データ量Vref1から所定の範囲内であれば、無音時間の挿入及びフレームの削除を指示しなくてもよい。   In Steps S16 and S17 in FIG. 6, the adjustment unit 17 determines the instruction content based on whether or not the adjustment time ΔADJ is greater than zero. However, for example, when the adjustment time ΔADJ is within a predetermined range including 0, the adjustment unit 17 may use the instruction information as a normal reproduction instruction. In short, as long as the detected data amount Vdet is within a predetermined range from the reference data amount Vref1, it is not necessary to instruct the insertion of the silent time and the deletion of the frame.

[第2の実施の形態]
第1の実施の形態では、ストリーム再生装置1は、2つのデコーダ(第1デコーダ141、第2デコーダ)と2つのデコードバッファ(第1デコードバッファ151、第2デコードバッファ152)を備えたが、デコーダの処理能力が高い場合、デコーダ及びデコードバッファは1つでもよい。
[Second Embodiment]
In the first embodiment, the stream reproduction device 1 includes two decoders (first decoder 141 and second decoder) and two decode buffers (first decode buffer 151 and second decode buffer 152). When the processing capability of the decoder is high, there may be one decoder and one decoding buffer.

図8を参照して、第2の実施の形態によるストリーム再生装置20は、1つのデコーダ143と、1つのデコードバッファ153とを備える。その他の構成はストリーム再生装置1と同じである。   Referring to FIG. 8, the stream reproduction device 20 according to the second embodiment includes one decoder 143 and one decode buffer 153. Other configurations are the same as those of the stream playback device 1.

ストリーム再生装置20は、第1の実施の形態と同様に、区分動作と、調整指示動作と、再生動作とを実行する。このうち、調整指示動作は第1の実施の形態と同じである。また、再生動作は、図7中のステップS33を除いたステップを実行する。以下、区分動作について説明する。   As in the first embodiment, the stream playback device 20 performs a sorting operation, an adjustment instruction operation, and a playback operation. Among these, the adjustment instruction operation is the same as in the first embodiment. Further, the reproduction operation executes steps excluding step S33 in FIG. Hereinafter, the sorting operation will be described.

[区分動作]
図9を参照して、区分部12は、第1の実施の形態と同様に、受信バッファ11から出力されるデータストリームを符号化曲ファイルごとに区分する。ただし、ストリーム再生装置20のデコーダ及びデコードバッファは1つだけ(デコーダ143及びデコードバッファ153)である。そのため、区分部12は、デコードバッファ153が曲ファイルの出力を完了するまで、新たな符号化曲ファイルのフレームの出力を停止する。要するに、区分部12は、デコードバッファ153が曲ファイルの出力を完了するごとに、新たな符号化曲ファイルをデコーダ143に出力する。これにより、複数の曲ファイルのフレームがデコードバッファ153内に混在するのを防ぐ。
[Category operation]
Referring to FIG. 9, the sorting unit 12 sorts the data stream output from the reception buffer 11 for each encoded music file, as in the first embodiment. However, the stream reproduction device 20 has only one decoder and decode buffer (decoder 143 and decode buffer 153). Therefore, the sorting unit 12 stops outputting the frame of the new encoded music file until the decoding buffer 153 completes the output of the music file. In short, the sorting unit 12 outputs a new encoded music file to the decoder 143 every time the decode buffer 153 completes the output of the music file. This prevents a plurality of song file frames from being mixed in the decode buffer 153.

図9を参照して、ステップS1〜S3までの動作は図4と同じである。区分部12が、新たな符号化曲ファイルの先頭フレームを受けたとき(S3でYES)、区分部12は、そのフレームの出力を停止する(S7)。そして、デコードバッファ153が保持している曲ファイルのフレームを全て出力し終えた後(S8でYES)、ステップS7で止めていたフレームデータの出力を開始する(S6)。調整部17は、デコードバッファ153が全てのフレームを出力し終えたか否かを監視する。そして、デコードバッファ153が全てのフレームを出力し終えたとき、調整部17は、区分部12に出力完了通知を出力する。区分部12は、出力完了通知を受けたとき(S8でYES)、フレームの出力を開始する(S6)。以上の動作により、区分部12は、曲ファイルごとに区分することができる。   Referring to FIG. 9, the operations from step S1 to S3 are the same as those in FIG. When the sorting unit 12 receives the first frame of a new encoded music file (YES in S3), the sorting unit 12 stops outputting the frame (S7). Then, after outputting all the frames of the music file held in the decode buffer 153 (YES in S8), the output of the frame data stopped in step S7 is started (S6). The adjustment unit 17 monitors whether or not the decode buffer 153 has finished outputting all frames. Then, when the decode buffer 153 has finished outputting all the frames, the adjustment unit 17 outputs an output completion notification to the sorting unit 12. When receiving the output completion notification (YES in S8), the sorting unit 12 starts outputting the frame (S6). With the above operation, the sorting unit 12 can sort each music file.

[第3の実施の形態]
図10を参照して、第3の実施の形態によるストリーム再生装置30は、受信部31と、区分部32と、第1バッファ33と、第2バッファ34と、検出部35と、調整部36と、デコーダ37とを備える。
[Third Embodiment]
Referring to FIG. 10, the stream reproduction device 30 according to the third embodiment includes a receiving unit 31, a sorting unit 32, a first buffer 33, a second buffer 34, a detecting unit 35, and an adjusting unit 36. And a decoder 37.

本実施の形態では、2つのバッファ33及び34を配置する。検出部35は、第1バッファ33及び第2バッファ34が蓄積するデータ量を求め、求めたデータ量をメモリ102に格納する。   In the present embodiment, two buffers 33 and 34 are arranged. The detection unit 35 obtains the data amount accumulated in the first buffer 33 and the second buffer 34 and stores the obtained data amount in the memory 102.

調整部36は、メモリ102に格納されたデータ量に基づいて、区分部32から出力されたフレームの受け取り先となるバッファ(以下、受取バッファという)、及び、デコーダ37に出力されるデータの出力元となるバッファ(以下、出力バッファという)を指定する。   Based on the amount of data stored in the memory 102, the adjustment unit 36 outputs a data output to the buffer (hereinafter referred to as a reception buffer) that receives the frame output from the sorting unit 32 and the decoder 37. Specifies the original buffer (hereinafter referred to as output buffer).

調整部36は、制御部361と、受取指定部362と、出力指定部363とを含む。制御部361は、検出部35により検出された第1バッファ33及び第2バッファ34のデータ量が所定の基準値よりも大きいか否か判断し、判断結果に基づいて、受取指定部362及び出力指定部363に指示を出力する。   The adjustment unit 36 includes a control unit 361, a reception designation unit 362, and an output designation unit 363. The control unit 361 determines whether the data amounts of the first buffer 33 and the second buffer 34 detected by the detection unit 35 are larger than a predetermined reference value, and based on the determination result, the reception designation unit 362 and the output An instruction is output to the designation unit 363.

受取指定部362は、第1及び第2バッファ33、34のうち、受信部31が受けたフレームの受取先となるバッファ(受取バッファ)を指定する。出力指定部363は、第1及び第2バッファ33、34のうち、デコーダ37にフレームを出力するバッファ(出力バッファ)を指定する。   The reception designation unit 362 designates a buffer (reception buffer) that is a reception destination of the frame received by the reception unit 31 among the first and second buffers 33 and 34. The output designating unit 363 designates a buffer (output buffer) that outputs a frame to the decoder 37 among the first and second buffers 33 and 34.

[動作]
ストリーム再生装置30内の区分部32は、受信部31から受けたデータストリームを、曲ファイルごとに区分する(区分動作)。検出部35は、第1及び第2バッファ33、34のデータ量を検出する。調整部36は、検出されたデータ量に基づいて、区分部32から出力されるフレームを受け取って保持する受取バッファを指定する。また、検出されたデータ量に基づいて、フレームをデコーダ37に出力する出力バッファを指定する。このとき、調整部36は、デコーダによりデコードされて外部に出力される曲ファイルが、曲の途中で途切れないように、受取及び出力バッファを指定する(調整動作)。
[Operation]
The sorting unit 32 in the stream reproducing device 30 sorts the data stream received from the receiving unit 31 for each music file (sorting operation). The detection unit 35 detects the data amount of the first and second buffers 33 and 34. The adjustment unit 36 specifies a reception buffer that receives and holds the frame output from the sorting unit 32 based on the detected data amount. Further, an output buffer for outputting a frame to the decoder 37 is designated based on the detected data amount. At this time, the adjustment unit 36 designates a reception and output buffer so that the music file decoded by the decoder and output to the outside is not interrupted in the middle of the music (adjustment operation).

上述のストリーム再生装置30の動作を模式図を用いて説明する。図11を参照して、調整部36は、初めに、第1バッファ33を受取バッファに指定する。そのため、区分部32から出力されたフレームは第1バッファ33に入力され、保持される。第1バッファ33のデータ量は、検出部35により検出される。検出された第1バッファ33のデータ量が基準値Vref2を超えたとき、調整部36は、第1バッファ33を出力バッファに指定する。これにより、第1バッファ33は、保持しているフレームをデコーダ37に順次出力する(図11参照)。   The operation of the above-described stream reproduction device 30 will be described using a schematic diagram. Referring to FIG. 11, adjustment unit 36 first designates first buffer 33 as a reception buffer. Therefore, the frame output from the sorting unit 32 is input to the first buffer 33 and held. The amount of data in the first buffer 33 is detected by the detection unit 35. When the detected data amount of the first buffer 33 exceeds the reference value Vref2, the adjustment unit 36 designates the first buffer 33 as an output buffer. As a result, the first buffer 33 sequentially outputs the held frames to the decoder 37 (see FIG. 11).

[受信データ過少状態でのストリーム再生装置の動作]
区分部32が新たな符号化曲ファイルの先頭フレームを受けたとき、調整部36は、第1バッファ33のデータ量を確認する。このとき、図12に示すように、第1バッファ33のデータ量が下限値Vmin未満であると仮定する。このとき、調整部36は、受取バッファを第1バッファ33から第2バッファ34に切り替える。つまり、第2バッファ34を新たな受取バッファに指定する。
[Operation of stream playback device when reception data is too low]
When the sorting unit 32 receives the first frame of the new encoded music file, the adjustment unit 36 checks the data amount of the first buffer 33. At this time, as shown in FIG. 12, it is assumed that the data amount of the first buffer 33 is less than the lower limit value Vmin. At this time, the adjustment unit 36 switches the reception buffer from the first buffer 33 to the second buffer 34. That is, the second buffer 34 is designated as a new receiving buffer.

データ量が下限値Vmin未満である場合、ストリーム再生装置30が受けるデータ量よりも、再生されるデータ量の方が多い。つまり、ストリーム再生装置30は、受信データ過少状態である。この場合、第1バッファ33にフレームを継続してバッファリングし続ければ、デコーダ37に出力すべきフレームが、再生曲の途中で枯渇する。そのため、ストリーム再生装置30から出力される曲は、曲の途中で音切れする。このような再生曲の音切れを防止するため、調整部36は、受取バッファを切り替える。   When the data amount is less than the lower limit value Vmin, the amount of data to be reproduced is larger than the amount of data received by the stream reproduction device 30. That is, the stream reproducing device 30 is in a state where the received data is insufficient. In this case, if the frames are continuously buffered in the first buffer 33, the frames to be output to the decoder 37 are depleted in the middle of the reproduced music. Therefore, the music output from the stream playback device 30 is cut off in the middle of the music. In order to prevent such sound interruption of the reproduced music, the adjustment unit 36 switches the reception buffer.

新たな曲ファイルのフレームが第2バッファ34にバッファリングされている最中に、図13に示すように、第1バッファ33に保持されていた全てのフレームがデコーダ37に出力される。このとき、1曲分の曲ファイルの出力が完了する。   While the frames of the new music file are being buffered in the second buffer 34, all the frames held in the first buffer 33 are output to the decoder 37 as shown in FIG. At this time, the output of the music file for one music is completed.

調整部36はさらに、第2バッファ34のデータ量を所定期間ごとに確認し、第2バッファ34のデータ量が基準値Vref2を超えたか否かを判断する。そして、データ量が基準値Vref2を超えるまで、調整部36は、第2バッファ34からフレームを出力しない。調整部36が第2バッファ34からフレームを出力しない間、デコーダ37はデコード処理を行わない。そのため、この間、ストリーム再生装置30は無音状態となる。   The adjustment unit 36 further checks the data amount of the second buffer 34 every predetermined period, and determines whether or not the data amount of the second buffer 34 exceeds the reference value Vref2. The adjustment unit 36 does not output a frame from the second buffer 34 until the data amount exceeds the reference value Vref2. While the adjustment unit 36 does not output a frame from the second buffer 34, the decoder 37 does not perform the decoding process. Therefore, during this time, the stream playback device 30 is in a silent state.

図14に示すように、第2バッファ34のデータ量が基準値Vref2を超えたとき、調整部36は、第2バッファ34を出力バッファに指定する。出力バッファに指定された第2バッファ34は、デコーダ37にフレームを出力する。このとき、ストリーム再生装置30は、新たな曲を再生する。要するに、ストリーム再生装置30が、受信データ過少状態であるとき、曲の再生が完了してから次の曲が再生されるまでの間、無音の調整時間が挿入される。曲間に調整時間を設けることにより、再生曲が再生途中で途切れるのを防止できる。   As shown in FIG. 14, when the data amount of the second buffer 34 exceeds the reference value Vref2, the adjustment unit 36 designates the second buffer 34 as an output buffer. The second buffer 34 designated as the output buffer outputs the frame to the decoder 37. At this time, the stream playback device 30 plays back a new song. In short, when the stream playback device 30 is in a state where the received data is insufficient, a silent adjustment time is inserted after the playback of the music is completed until the next music is played back. By providing an adjustment time between songs, it is possible to prevent playback songs from being interrupted during playback.

[受信データ過多状態でのストリーム再生装置の動作]
受信データ過多状態の場合のストリーム再生装置30の動作は以下のとおりである。第1バッファ33がフレームを受信しながら、デコーダ37にフレームを出力している最中に、区分部32が新たな曲の先頭フレームを受信したと仮定する。このとき、調整部36は、第1バッファ33のデータ量を確認する。確認した結果、図15に示すように、データ量が上限値Vmaxを超えるとき、調整部36は、第2バッファ34を受取バッファに指定する。つまり、受取バッファを第1バッファ33から第2バッファ34に切り替える。これにより、第2バッファ34が先頭フレーム及びそれ以降のフレームを受け取って保持する。
[Operation of stream playback device when receiving data is excessive]
The operation of the stream playback device 30 when the received data is excessive is as follows. Assume that the sorting unit 32 receives the first frame of a new song while the first buffer 33 is receiving a frame and outputting the frame to the decoder 37. At this time, the adjustment unit 36 checks the data amount of the first buffer 33. As a result of the confirmation, as shown in FIG. 15, when the data amount exceeds the upper limit value Vmax, the adjustment unit 36 designates the second buffer 34 as a reception buffer. That is, the reception buffer is switched from the first buffer 33 to the second buffer 34. As a result, the second buffer 34 receives and holds the first frame and subsequent frames.

続いて、調整部36は、受取バッファである第2バッファ34のデータ量を監視する。図16に示すように、第2バッファ34のデータ量が基準値Vref2を超えたとき、調整部36は、第2バッファ34を出力バッファに指定する。その結果、図17に示すように、第2バッファ34は、保持しているフレームをデコーダ37に順次出力する。調整部36はさらに、第2バッファ34を出力バッファに指定したとき、他のバッファ(第1バッファ33)に残存するデータを削除する。たとえば、図16に示すように、第2バッファ34のデータ量が基準値Vrefを超えたとき、第1バッファ33にはまだデータが残存していると仮定する。この場合、調整部36は、第2バッファ34を出力バッファに指定するとともに、第1バッファ33に残存するデータを削除する(図17参照)。そのため、第1バッファ33に蓄積されていた曲ファイルの末尾部分のデータは出力されず、カットされる。この場合、曲の末尾部分は再生がカットされるが、曲の末尾部分は無音である場合が多い。そのため、再生曲の途中で音切れが発生するよりも、ユーザに与える違和感を抑えることができる。   Subsequently, the adjustment unit 36 monitors the data amount of the second buffer 34 that is a reception buffer. As shown in FIG. 16, when the data amount of the second buffer 34 exceeds the reference value Vref2, the adjustment unit 36 designates the second buffer 34 as an output buffer. As a result, as shown in FIG. 17, the second buffer 34 sequentially outputs the held frames to the decoder 37. Further, when the second buffer 34 is designated as the output buffer, the adjustment unit 36 deletes data remaining in the other buffer (first buffer 33). For example, as shown in FIG. 16, when the data amount of the second buffer 34 exceeds the reference value Vref, it is assumed that data still remains in the first buffer 33. In this case, the adjustment unit 36 designates the second buffer 34 as an output buffer and deletes data remaining in the first buffer 33 (see FIG. 17). Therefore, the data at the end of the music file stored in the first buffer 33 is not output but is cut. In this case, playback is cut at the end of the song, but the end of the song is often silent. Therefore, it is possible to suppress a sense of incongruity given to the user rather than a sound interruption occurring during the reproduction music.

以上のとおり、ストリーム再生装置30は、2つのバッファ33及び34のデータ量を所定の基準値(Vmax、Vref2、Vmin)と比較する。そして、比較結果に基づいて、受取バッファ及び出力バッファを指定する。これにより、ストリーム再生装置30は、受信データ過少状態の時には曲間に調整時間を挿入し、再生曲の途中で音切れが発生するのを抑制する。また、受信データ過多状態の時には曲ファイルの末尾データを削除して、再生曲の途中で音切れが発生するのを防止する。以下、フロー図を用いてストリーム再生装置30の動作の詳細を説明する。   As described above, the stream reproduction device 30 compares the data amounts of the two buffers 33 and 34 with predetermined reference values (Vmax, Vref2, Vmin). Based on the comparison result, the reception buffer and the output buffer are designated. As a result, the stream playback device 30 inserts an adjustment time between songs when the received data is in a low state, and suppresses breaks in the sound during playback. Further, when the received data is excessive, the end data of the music file is deleted to prevent the sound from being cut off during the playback music. Hereinafter, details of the operation of the stream playback device 30 will be described with reference to a flowchart.

[区分動作]
図18を参照して、ステップS1〜S3の動作は、図4と同じである。つまり、区分部32は、フレームFR(n)からタイムスタンプT(n)を読み出し、タイムスタンプT(n)に基づいて、新たな曲ファイルの先頭フレームを特定する。これにより、データストリームを曲ファイルごとに区分できる。
[Category operation]
Referring to FIG. 18, the operations in steps S1 to S3 are the same as those in FIG. That is, the sorting unit 32 reads the time stamp T (n) from the frame FR (n), and specifies the first frame of the new music file based on the time stamp T (n). Thereby, the data stream can be classified for each music file.

区分部32は、受信部31が受信したフレームが先頭フレームであると判断したとき(S3でYES)、調整部36に区分通知を出力する(S9)。   When the sorting unit 32 determines that the frame received by the receiving unit 31 is the first frame (YES in S3), the sorting unit 32 outputs a sorting notification to the adjusting unit 36 (S9).

[調整動作]
調整部36は、区分部32から区分通知を受けるごとに受取バッファの指定を判断する受取指定動作と、受取バッファのデータ量が基準値Vref2を超えるごとに出力バッファの指定を判断する出力指定動作とを実行する。以下、受取指定動作及び出力指定動作について説明する。
[Adjustment operation]
The adjustment unit 36 receives a designation of receiving buffer every time receiving a classification notification from the sorting unit 32, and an output specifying operation of judging designation of an output buffer every time the data amount of the receiving buffer exceeds the reference value Vref2. And execute. Hereinafter, the reception specifying operation and the output specifying operation will be described.

[受取指定動作]
調整部36は、区分部32から区分通知を受けるごとに、受取指定動作を実行する。図19を参照して、調整部36内の制御部361は、区分通知を受けたとき(S61でYES)、現在フレームをデコーダ37に出力している出力バッファのデータ量を読み出す(S62)。出力バッファを特定するための情報(出力バッファ特定情報)はメモリ102に格納されている。出力バッファが第1バッファ33である場合、出力バッファ特定情報は、第1バッファ33を示す。各バッファ33、34のデータ量は、検出部35により所定期間ごとに検出され、メモリ102に格納される。制御部361は、区分通知を受けたとき、出力バッファ特定情報に基づいて出力バッファを特定し、特定された出力バッファのデータ量をメモリ102から読み出す。以下、出力バッファを第1バッファ33と仮定して説明する。なお、調整部36が区分通知を受けるとき、通常は、出力バッファに指定されているバッファは、区分部32からフレームを受け取っている。つまり、出力バッファに指定されているバッファは、同時に受取バッファにも指定されている。そのため、第1バッファ33は、フレームを受け取って保持し、かつ、フレームをデコーダ37に出力している。
[Receive designation operation]
Each time the adjustment unit 36 receives a classification notification from the classification unit 32, the adjustment unit 36 performs a reception designation operation. Referring to FIG. 19, when receiving the segment notification (YES in S61), the control unit 361 in the adjustment unit 36 reads the data amount of the output buffer that is outputting the current frame to the decoder 37 (S62). Information for specifying the output buffer (output buffer specifying information) is stored in the memory 102. When the output buffer is the first buffer 33, the output buffer specifying information indicates the first buffer 33. The amount of data in each of the buffers 33 and 34 is detected every predetermined period by the detection unit 35 and stored in the memory 102. When the control unit 361 receives the classification notification, the control unit 361 specifies the output buffer based on the output buffer specifying information, and reads the data amount of the specified output buffer from the memory 102. Hereinafter, description will be made assuming that the output buffer is the first buffer 33. When the adjustment unit 36 receives the division notification, the buffer designated as the output buffer normally receives the frame from the division unit 32. That is, the buffer specified as the output buffer is also specified as the reception buffer at the same time. Therefore, the first buffer 33 receives and holds the frame, and outputs the frame to the decoder 37.

制御部361は、ステップS62で読み出した第1バッファ33のデータ量が所定範囲内の量か否かを判断する(S63及びS64)。   The control unit 361 determines whether or not the data amount of the first buffer 33 read in step S62 is within a predetermined range (S63 and S64).

ステップS63で判断の結果、データ量が下限値Vmin未満である場合(S63でYES)、ストリーム再生装置30は、受信データ過少状態である。そのため、調整部36は、受取バッファを切り替える(S65、図12参照)。具体的には、制御部361は、メモリ102に格納された受取バッファ特定情報を第2バッファ34に変更する。そして、受取指定部362に、区分部32から受けたフレームを第2バッファ34に出力するよう指示する。受取指定部362は、制御部361からの指示を受け、新たな曲ファイルの先頭フレーム及びそれ以降に受信部31で受信されたフレームを、第2バッファ34に出力する。これにより、第2バッファ34が受取バッファとして、新たな曲ファイルのフレームをバッファリングする。   If the result of determination in step S63 is that the amount of data is less than the lower limit value Vmin (YES in S63), the stream playback device 30 is in a state of insufficient received data. Therefore, the adjustment unit 36 switches the reception buffer (S65, see FIG. 12). Specifically, the control unit 361 changes the reception buffer specifying information stored in the memory 102 to the second buffer 34. Then, the reception designation unit 362 is instructed to output the frame received from the sorting unit 32 to the second buffer 34. In response to the instruction from the control unit 361, the reception designation unit 362 outputs the first frame of the new music file and the frames received by the receiving unit 31 thereafter to the second buffer 34. As a result, the second buffer 34 buffers the frame of the new music file as a receiving buffer.

一方、ステップS62で読み出された第1バッファ33のデータ量が上限値Vmaxを超えている場合(S63でNO、S64でYES)、ストリーム再生装置30は、受信データ過多状態である。そのため、調整部36は、受取バッファを切り替え(S65)、第2バッファ34に先頭フレーム及びそれ以降のフレームを出力する(S66)。   On the other hand, when the data amount of the first buffer 33 read in step S62 exceeds the upper limit value Vmax (NO in S63, YES in S64), the stream reproducing device 30 is in a reception data excessive state. Therefore, the adjustment unit 36 switches the reception buffer (S65), and outputs the first frame and subsequent frames to the second buffer 34 (S66).

要するに、調整部36は、ストリーム再生装置30が受信データ過少状態又は受信データ過多状態と判断したとき、受取バッファを切り替える。   In short, the adjustment unit 36 switches the reception buffer when the stream reproducing device 30 determines that the received data is in an insufficient state or an excessively received data state.

[出力指定動作]
続いて、調整部36の出力指定動作について説明する。図20を参照して、調整部36は、所定期間ごとに出力指定動作を実行する。調整部36内の制御部361は、まず、受取バッファ特定情報を用いて、受取バッファを特定する(S71)。特定された受取バッファが第2バッファ34であるとして説明を続ける。
[Output specification operation]
Next, the output designation operation of the adjustment unit 36 will be described. Referring to FIG. 20, adjustment unit 36 performs an output designation operation every predetermined period. First, the control unit 361 in the adjustment unit 36 specifies the reception buffer using the reception buffer specifying information (S71). The description will be continued assuming that the specified receiving buffer is the second buffer 34.

制御部361は、受取バッファである第2バッファ34のデータ量を読み出す(S72)。そして、読み出されたデータ量が基準値Vref2よりも大きいか否かを判断する(S73)。データ量が基準値Vref2よりも小さい場合(S73でNO)、調整部36は出力指定動作を終了する。つまりこの場合、出力バッファは切り替わらない。   The control unit 361 reads the data amount of the second buffer 34 that is a receiving buffer (S72). Then, it is determined whether or not the read data amount is larger than the reference value Vref2 (S73). If the data amount is smaller than the reference value Vref2 (NO in S73), the adjustment unit 36 ends the output specifying operation. That is, in this case, the output buffer is not switched.

一方、ステップS73での判断の結果、データ量が基準値Vref2を超えた場合(S73でYES)、制御部361は、出力バッファの指定を検討する(S74〜S76)。   On the other hand, as a result of the determination in step S73, when the data amount exceeds the reference value Vref2 (YES in S73), the control unit 361 examines designation of the output buffer (S74 to S76).

制御部361はまず、現在の出力バッファを特定する(S74)。ストリーム再生装置30は、出力バッファを特定するための情報(以下、出力バッファ特定情報という)を、受取バッファ特定情報と同様に、メモリ102に格納している。制御部361は、メモリ102から出力バッファ特定情報を読み出し、出力バッファを特定する。   First, the control unit 361 identifies the current output buffer (S74). The stream reproducing device 30 stores information for specifying an output buffer (hereinafter referred to as output buffer specifying information) in the memory 102 as well as the receiving buffer specifying information. The control unit 361 reads the output buffer specifying information from the memory 102 and specifies the output buffer.

出力バッファを特定した後、制御部361は、出力バッファが、受取バッファと同じ第2バッファ34か否かを判断する(S75)。ステップS74で特定された出力バッファが第1バッファ33である場合、出力バッファ(第1バッファ33)は、受取バッファ(第2バッファ34)と異なる(S75でNO)。そのため、制御部361は、出力バッファを第1バッファ33から第2バッファ34に切り替える(S76、図14及び図17参照)。換言すれば、制御部361は、出力バッファ特定情報を第1バッファ33から第2バッファ34に変更し、第2バッファ34を出力バッファに指定する。   After specifying the output buffer, the control unit 361 determines whether or not the output buffer is the second buffer 34 that is the same as the receiving buffer (S75). When the output buffer specified in step S74 is the first buffer 33, the output buffer (first buffer 33) is different from the reception buffer (second buffer 34) (NO in S75). Therefore, the control unit 361 switches the output buffer from the first buffer 33 to the second buffer 34 (see S76, FIG. 14 and FIG. 17). In other words, the control unit 361 changes the output buffer specifying information from the first buffer 33 to the second buffer 34, and designates the second buffer 34 as the output buffer.

制御部361は、出力バッファを第2バッファ34に指定するよう出力指定部363に指示する。出力指定部363は、第2バッファ34のデータを受け取り、デコーダ37に出力する。これにより、第2バッファ34が出力バッファとして、デコーダ37にフレームを出力する。   The control unit 361 instructs the output designation unit 363 to designate the output buffer as the second buffer 34. The output specifying unit 363 receives the data in the second buffer 34 and outputs it to the decoder 37. As a result, the second buffer 34 outputs the frame to the decoder 37 as an output buffer.

制御部361はさらに、出力バッファではないバッファ(ここでは、第1バッファ33)に残存する全てのフレームを削除する(S77)。ストリーム再生装置30が受信データ過多状態である場合、ステップS77の動作により、第1バッファ33に残存したフレームを消去する(図17参照)。   The control unit 361 further deletes all frames remaining in the buffer that is not the output buffer (here, the first buffer 33) (S77). When the stream reproduction device 30 is in the excessive reception data state, the frame remaining in the first buffer 33 is erased by the operation of step S77 (see FIG. 17).

以上の動作により、ストリーム再生装置30が受信データ過少状態である場合(図12)、調整部36は、第1バッファ33が蓄積された全てのフレームを出力し終えても、第2バッファ34にフレームが所定量(Vref2より多い量)バッファリングされるまでフレームをデコーダ37に出力しない。この間、デコーダ37はフレームを受け取らないため、デコード処理を停止する。その結果、無音期間が発生する。調整部36は、第2バッファ34が、再生曲の途中で音切れが発生しない程度に十分なデータ量(Vref2より多い量)を蓄積した後、第2バッファ34を出力バッファに指定して、第2バッファ34のデータをデコーダ37に出力する。要するに、ストリーム再生装置30が受信データ過少状態のとき、調整部36は、曲間に無音の調整時間を挿入することで、再生曲の途中で音切れが発生するのを抑制する。   As a result of the above operation, when the stream reproduction device 30 is in a state where the received data is insufficient (FIG. 12), the adjusting unit 36 stores the frames stored in the first buffer 33 in the second buffer 34 even after finishing outputting all the frames. The frame is not output to the decoder 37 until the frame is buffered by a predetermined amount (an amount larger than Vref2). During this time, since the decoder 37 does not receive a frame, the decoding process is stopped. As a result, a silent period occurs. The adjusting unit 36 designates the second buffer 34 as an output buffer after the second buffer 34 accumulates a sufficient amount of data (an amount larger than Vref2) so that no interruption of sound occurs in the middle of the reproduced music, The data in the second buffer 34 is output to the decoder 37. In short, when the stream playback device 30 is in a state where the received data is insufficient, the adjusting unit 36 inserts a silent adjustment time between songs, thereby suppressing the occurrence of sound interruption in the middle of the played song.

また、ストリーム再生装置30が受信データ過多状態である場合、ステップS77の動作により、先に出力された曲ファイルの末尾をカットして、次曲ファイルを出力する。これにより、バッファがオーバーフローするのを防ぐことができる。また、曲の末尾部分は無音である場合が多いため、曲の途中で音切れが発生するよりも、ユーザに与える違和感を抑えることができる。   If the stream playback device 30 is in a state of excessive reception data, the operation ends in step S77, and the end of the previously output music file is cut and the next music file is output. This prevents the buffer from overflowing. In addition, since the end portion of the music is often silent, it is possible to suppress a sense of discomfort given to the user rather than the occurrence of sound interruption in the middle of the music.

上述の第3の実施の形態では、下限値Vminと基準値Vref2とを異なる値としたが、下限値Vminと基準値Vref2とは同じ値であってもよい。より具体的には、図20に示す出力指定動作中のステップS73において、制御部361は、受取バッファのデータ量が下限値Vminを超えたか否かを判断し、その判断結果に基づいて、出力バッファを指定してもよい。要するに、下限値Vminと基準値Vref2とは、第1及び第2バッファ33、34のデータ量が、再生曲の再生途中で音切れが発生しない程度のデータ量となるような基準であればよい。   In the above-described third embodiment, the lower limit value Vmin and the reference value Vref2 are different from each other, but the lower limit value Vmin and the reference value Vref2 may be the same value. More specifically, in step S73 during the output designation operation shown in FIG. 20, the control unit 361 determines whether or not the data amount of the reception buffer exceeds the lower limit value Vmin, and outputs based on the determination result. You may specify a buffer. In short, the lower limit value Vmin and the reference value Vref2 only need to be a reference such that the data amount of the first and second buffers 33 and 34 is a data amount that does not cause interruption of sound during the reproduction of the reproduced music. .

なお、基準値Vref2が下限値Vminに近づくほど、バッファの切り替え回数(指定変更回数)が増加する。そのため、曲の再生が完了するごとに、曲間に調整時間が挿入される。基準値Vref2と下限値Vminとの差が大きいほど、バッファの切り替え回数は低減される。つまり、曲が連続再生される機会が増加し、曲が再生されるごとに曲間に調整時間が挿入されるのを抑制できる。   As the reference value Vref2 approaches the lower limit value Vmin, the number of times of buffer switching (number of designated changes) increases. For this reason, every time reproduction of a song is completed, an adjustment time is inserted between the songs. The greater the difference between the reference value Vref2 and the lower limit value Vmin, the smaller the number of buffer switching. That is, the chance that the music is continuously played increases, and it is possible to prevent the adjustment time from being inserted between the music every time the music is played.

また、第3の実施の形態では、受信データ過少状態のとき、バッファからフレームを出力しない間(すなわち、調整時間中)、デコーダ37はデコード処理を行わないとしたが、調整時間中に、無音データがデコーダ37に挿入されてもよい。   In the third embodiment, the decoder 37 does not perform the decoding process while the frame is not output from the buffer (that is, during the adjustment time) when the received data is insufficient. Data may be inserted into the decoder 37.

上述の実施の形態では、区分部は、タイムスタンプを用いて、曲ファイルの先頭フレームを判別したが、区分部は、他の方法により、曲ファイルを区分してもよい。たとえば、各フレームが曲ファイル固有の識別情報(ファイルID)を含むメタデータを有する場合、ファイルIDを用いて曲ファイルを区分してもよい。   In the above-described embodiment, the sorting unit discriminates the first frame of the song file using the time stamp, but the sorting unit may sort the song file by other methods. For example, when each frame has metadata including identification information (file ID) unique to a music file, the music file may be classified using the file ID.

[第4の実施形態]
本実施形態は第3の実施形態の変形例である。第3の実施形態では、最初に第1バッファ33が受取バッファに指定された場合、検出された第1バッファ33のデータ量が基準値Vref2を越えるまで、第1バッファ33が出力バッファに指定されず、第1バッファ33からデコーダ37にフレームが出力されない。その結果、ストリーム再生装置から音声が再生されるまでに時間がかかるという問題を有している。そこで、本実施形態では、制御部361が、最初のコンテンツ(1曲目の曲ファイル)については、第1バッファ33(及び必要に応じて第2バッファ34)の基準値を、Vref2よりも値の小さいVref2’に設定することによって、1曲目の音声の再生を迅速にする。そして、制御部361は、最初のコンテンツ以外のコンテンツ(2曲目以降の曲ファイル)については、基準値をVref2に設定する。つまり、区分部32が2曲目の先頭フレームを受信したときに、制御部361が第1バッファ33及び第2バッファ34の基準値をVref2に変更する。従って、最初のコンテンツについて迅速に再生開始することができ、かつ、最初のコンテンツ以外のコンテンツについてバッファ枯渇をより確実に防止することができる。
[Fourth Embodiment]
This embodiment is a modification of the third embodiment. In the third embodiment, when the first buffer 33 is first designated as the receiving buffer, the first buffer 33 is designated as the output buffer until the detected data amount of the first buffer 33 exceeds the reference value Vref2. Accordingly, no frame is output from the first buffer 33 to the decoder 37. As a result, there is a problem that it takes time until the sound is reproduced from the stream reproducing apparatus. Therefore, in the present embodiment, the control unit 361 sets the reference value of the first buffer 33 (and the second buffer 34 if necessary) for the first content (first music file) to a value that is higher than Vref2. By setting Vref2 ′ to a small value, the first song can be quickly played back. Then, the control unit 361 sets the reference value to Vref2 for content other than the first content (music files after the second music). That is, when the sorting unit 32 receives the first frame of the second song, the control unit 361 changes the reference value of the first buffer 33 and the second buffer 34 to Vref2. Accordingly, it is possible to quickly start reproduction of the first content, and it is possible to more surely prevent buffer depletion for content other than the first content.

[動作]
以下、本実施形態の動作を説明する。なお、第3実施形態と同じ処理については説明を援用する。以下では、区分部によって2曲目の先頭フレームが判別されたときに、第1バッファ33のデータ量が下限値Vmin未満である場合を例に説明するが、上限値Vmaxよりも大の際も、下限値Vminと上限値Vmaxとの間の際も同様である。
[Operation]
The operation of this embodiment will be described below. In addition, description is used about the same process as 3rd Embodiment. Hereinafter, a case where the data amount of the first buffer 33 is less than the lower limit value Vmin when the first frame of the second song is determined by the sorting unit will be described as an example. The same applies to the case between the lower limit value Vmin and the upper limit value Vmax.

[バッファの基準値の制御処理1]
図21は、制御部361による第1バッファ33(及び第2バッファ34)の基準値の設定処理を示す。制御部361は、第1バッファ33(及び第2バッファ34)の基準値を仮にVref2に設定する(S81)。制御部361は、ユーザ操作によって保持時間短縮モードがオン状態に設定されているか否かを判断する(S82)。保持時間短縮モードがオン状態に設定されていなければ(S82でNO)、処理を終了する。
[Control processing 1 of buffer reference value]
FIG. 21 shows a reference value setting process for the first buffer 33 (and the second buffer 34) by the control unit 361. The control unit 361 temporarily sets the reference value of the first buffer 33 (and the second buffer 34) to Vref2 (S81). The control unit 361 determines whether or not the holding time reduction mode is set to the on state by a user operation (S82). If the retention time reduction mode is not set to the on state (NO in S82), the process is terminated.

保持時間短縮モードがオン状態に設定されていれば(S82でYES)、制御部361は、図22に示すように、最初の曲ファイルを保持及び出力するために、第1バッファ33(及び第2バッファ34)の基準値をVref2’に設定する(S83)。Vref2’はVref2よりも小さい値であり、例えば、Vref2の1/2の値である。基準値がVref2’に変更されることにより、第1バッファ33に保持された1曲目の曲ファイルのデータ量が基準値を越えるまでの時間を短縮することでき、デコーダ37から音声が出力されるまでの時間を短縮することができる。例えば、Vref2’がVref2の1/2であれば、デコーダ37から音声が出力されるまでの時間を約1/2に短縮することができる。   If the retention time shortening mode is set to ON (YES in S82), the control unit 361 retains and outputs the first music file 33 (and the first buffer 33) as shown in FIG. The reference value of the second buffer 34) is set to Vref2 ′ (S83). Vref2 'is a value smaller than Vref2, and is, for example, a value half that of Vref2. By changing the reference value to Vref2 ′, the time until the data amount of the first music file held in the first buffer 33 exceeds the reference value can be shortened, and audio is output from the decoder 37. Can be shortened. For example, if Vref2 'is 1/2 of Vref2, the time until the sound is output from the decoder 37 can be reduced to about 1/2.

続いて、制御部361は、2曲目の曲ファイルについての区分通知を受信したか否かを監視している(S84)。図18に示すように、区分部32は2曲目の先頭フレームを判別し(S3でYES)、制御部36に区分通知を出力する(S9)。図21に戻り、制御部361は、区分通知を受信すると(S84でYES)、図23に示すように、2曲目以降の曲ファイルを保持及び出力するために、第1バッファ33(及び第2バッファ34)の基準値をVref2’からVref2に変更する(S85)。従って、2曲目以降については、図24に示すように、第1バッファ33又は第2バッファ34に保持されるデータ量が基準値Vref2を越えてから、第1バッファ33又は第2バッファ34がフレームをデコーダ37に出力するようになる。その結果、2曲目以降については、第1バッファ33又は第2バッファ34が保持するデータ量の枯渇をより確実に防止することができる。   Subsequently, the control unit 361 monitors whether or not a division notification for the second music file has been received (S84). As shown in FIG. 18, the sorting unit 32 determines the first frame of the second song (YES in S3), and outputs a sorting notification to the control unit 36 (S9). Returning to FIG. 21, when the control unit 361 receives the division notification (YES in S84), the first buffer 33 (and the second buffer 33) holds and outputs the second and subsequent music files as shown in FIG. The reference value of the buffer 34) is changed from Vref2 ′ to Vref2 (S85). Therefore, for the second and subsequent songs, as shown in FIG. 24, after the amount of data held in the first buffer 33 or the second buffer 34 exceeds the reference value Vref2, the first buffer 33 or the second buffer 34 Is output to the decoder 37. As a result, for the second and subsequent songs, it is possible to more reliably prevent the data amount held by the first buffer 33 or the second buffer 34 from being exhausted.

[バッファの基準値の制御処理2]
上記の通り、1曲目については、バッファの基準値をVref2’に設定しているので、第1バッファ33又は第2バッファ34に保持しているデータ量が枯渇する可能性がある。従って、制御部361は、第1バッファ33又は第2バッファ34に保持しているデータ量が枯渇した際にも、第1バッファ33又は第2バッファ34の基準値をVref2’からVref2に変更するようにしている。図25は、1曲目の曲ファイルのデータをデコーダ37に出力する際の制御部361の処理を示す。
[Buffer reference value control process 2]
As described above, since the buffer reference value is set to Vref2 ′ for the first song, the amount of data held in the first buffer 33 or the second buffer 34 may be exhausted. Accordingly, the control unit 361 changes the reference value of the first buffer 33 or the second buffer 34 from Vref2 ′ to Vref2 even when the amount of data held in the first buffer 33 or the second buffer 34 is exhausted. I am doing so. FIG. 25 shows the processing of the control unit 361 when outputting the data of the first song file to the decoder 37.

図25に示すように、制御部361は、1曲目の曲ファイルの出力バッファである第1バッファ33が保持するデータ量を読み出す(S91)。そして、制御部361は、第1バッファ33のデータ量が0である(すなわち、枯渇している)か否かを判断する(S92)。データ量が0でなければ(S92でNO)、制御部361は、基準値Vref2’を継続して、第1バッファ361にフレームをデコーダ37に出力させる(S93)。   As shown in FIG. 25, the control unit 361 reads the data amount held by the first buffer 33 that is the output buffer of the first music file (S91). Then, the control unit 361 determines whether or not the data amount of the first buffer 33 is 0 (that is, is depleted) (S92). If the data amount is not 0 (NO in S92), the control unit 361 continues the reference value Vref2 'and causes the first buffer 361 to output the frame to the decoder 37 (S93).

一方、図26に示すように、データ量が0であれば(S92でYES)、制御部361は、第1バッファ33及び第2バッファ34の基準値をVref2’からVref2に変更する(S94)。第1バッファ33のデータ量が0になるということは、受信データ過小状態であるので、第1バッファ33の基準値をVref2’のままで再生を続けると、1曲目の曲ファイルを再生している途中に今後も第1バッファ33のデータ量が枯渇する可能性がある。しかし、本例では、第1バッファ33の基準値をVref2に変更することにより、今後第1バッファ33のデータ量が枯渇する可能性を低くすることができる。   On the other hand, as shown in FIG. 26, if the data amount is 0 (YES in S92), the control unit 361 changes the reference value of the first buffer 33 and the second buffer 34 from Vref2 ′ to Vref2 (S94). . The fact that the data amount of the first buffer 33 becomes 0 means that the received data is too small. Therefore, if playback is continued with the reference value of the first buffer 33 being Vref2 ′, the first song file is played back. There is a possibility that the data amount of the first buffer 33 will be exhausted in the future. However, in this example, by changing the reference value of the first buffer 33 to Vref2, the possibility that the data amount of the first buffer 33 will be exhausted in the future can be reduced.

その後、図27に示すように、制御部361は、第1バッファ33のデータ量が基準値Vref2を越えるまで、第1バッファ33からデコーダ37にフレームが出力されることを待機させ、第1バッファ33のデータ量が基準値Vref2を越えたとき、第1バッファ33からデコーダ37にフレームを出力させる(S95)。   Thereafter, as shown in FIG. 27, the control unit 361 waits for the frame to be output from the first buffer 33 to the decoder 37 until the data amount of the first buffer 33 exceeds the reference value Vref2, and the first buffer 33 When the data amount 33 exceeds the reference value Vref2, a frame is output from the first buffer 33 to the decoder 37 (S95).

以上のように、本実施形態によると、1曲目の再生開始を迅速にすることができ、かつ、2曲目以降の再生時に音切れが生じすることを防止することができる。   As described above, according to the present embodiment, it is possible to quickly start the reproduction of the first song, and it is possible to prevent the sound from being cut off during the reproduction of the second and subsequent songs.

なお、上記の第4の実施形態では、2曲目の先頭フレームを検出した時点で第1バッファ33及び第2バッファ34の基準値をVref2に設定しているが、2曲目の先頭フレームを検出しても第1バッファ33及び第2バッファ34の基準値をVref2’に維持してもよい。そして、図25の処理によって、第1バッファ33及び第2バッファ34のデータ量が0になった時点ではじめて第1バッファ33及び第2バッファ34の基準値をVref2に設定するようにしてもよい。すなわち、第1バッファ33及び第2バッファ34が枯渇しない限り、第1バッファ33及び第2バッファ34の基準値をVref2’に維持してもよい。   In the fourth embodiment, the reference value of the first buffer 33 and the second buffer 34 is set to Vref2 when the first frame of the second music is detected. However, the first frame of the second music is detected. However, the reference values of the first buffer 33 and the second buffer 34 may be maintained at Vref2 ′. Then, the reference value of the first buffer 33 and the second buffer 34 may be set to Vref2 only when the data amount of the first buffer 33 and the second buffer 34 becomes 0 by the processing of FIG. . That is, as long as the first buffer 33 and the second buffer 34 are not exhausted, the reference values of the first buffer 33 and the second buffer 34 may be maintained at Vref2 '.

また、上記の第4の実施形態を第1の実施形態,第2の実施形態に適用してもよい。つまり、第4の実施形態は、バッファが1つの場合にも適用することができる。   Further, the above fourth embodiment may be applied to the first embodiment and the second embodiment. That is, the fourth embodiment can be applied to a case where there is one buffer.

[第5の実施形態]
本実施形態は第4実施形態の変形例である。第4実施形態では、最初のコンテンツに対して基準値をVref2よりも小さいVref2’に設定し、最初のコンテンツ以外のコンテンツに対して基準値をVref2に設定していたが、この場合、Vref2’とVrefとの差が大きい場合、2曲目の曲ファイルを再生開始するまでに無音が長く挿入される可能性がある。この問題を解決するために、本例では区分通知を受信し、受取バッファを切り換える際に、バッファに保持されているデータ量に所定増加量(例えば2秒分のデータ量)を加算して、新たな基準値Vref2を設定するようにしている。これにより、新たな基準値Vref2とバッファに保持されているデータ量との差が必ず所定増加量となるので、曲間で無音が長く挿入されることを防止することができる。
[Fifth Embodiment]
This embodiment is a modification of the fourth embodiment. In the fourth embodiment, the reference value is set to Vref2 ′ smaller than Vref2 for the first content, and the reference value is set to Vref2 for content other than the first content. In this case, Vref2 ′ is used. When the difference between Vref and Vref is large, silence may be inserted for a long time before the reproduction of the second music file is started. In order to solve this problem, in this example, when the classification notification is received and the reception buffer is switched, a predetermined increase amount (for example, data amount for 2 seconds) is added to the data amount held in the buffer, A new reference value Vref2 is set. As a result, the difference between the new reference value Vref2 and the amount of data held in the buffer is always a predetermined increase amount, so that it is possible to prevent silence from being inserted for a long time between songs.

図28〜図33は、本例の動作を示す模式図であり、図34、図35は本例の動作を示すフローチャートである。まず、図28、図34に示すように、制御部361は、出力バッファを受取バッファと異なるバッファに設定する(S101)。例えば、受取バッファが第1バッファ33に設定され、出力バッファは第2バッファ34に設定される。次に、制御部361は、第1バッファ33及び第2バッファ34の基準値Vref2を、受取バッファである第1バッファ33のデータ量(ここでは未だデータが保持されていないので0である)に所定増加量(2秒分のデータ量)を加算することによって算出し、設定する(S102)。そして、区分部32から受取バッファである第1バッファ33へフレーム受信を開始させる(S103)。   28 to 33 are schematic diagrams showing the operation of this example, and FIGS. 34 and 35 are flowcharts showing the operation of this example. First, as shown in FIGS. 28 and 34, the control unit 361 sets the output buffer to a buffer different from the reception buffer (S101). For example, the receiving buffer is set in the first buffer 33 and the output buffer is set in the second buffer 34. Next, the control unit 361 sets the reference value Vref2 of the first buffer 33 and the second buffer 34 to the data amount of the first buffer 33 that is the receiving buffer (here, it is 0 because no data is held yet). It is calculated and set by adding a predetermined increase amount (data amount for 2 seconds) (S102). Then, frame reception is started from the sorting unit 32 to the first buffer 33 which is a reception buffer (S103).

図35に示すように、区分部32から受取バッファである第1バッファ33へのフレーム受信を継続し(S111)、制御部361は区分部32から区分通知を受信したか否かを判断する(S112)。区分通知を受信しなければ(S112でNO)と、受取バッファへのフレームの受信を継続する(S117)。制御部361は、出力バッファと受取バッファとが異なるか否かを判断する(S118)。ここでは受取バッファが第1バッファ33であり、出力バッファが第2バッファ34である(S118でYES)。制御部361は、受取バッファである第1バッファ33のデータ量が基準値Vref2以上であるか否かを判断し(S119)、図29においては、第1バッファ33のデータ量が基準値Vref2以上であるので(S119でYES)、出力バッファを受取バッファと同じバッファに切り換える(S120)。つまり、出力バッファを第1バッファ33に切り換える。従って、第1バッファ33からフレームの出力が開始され、再生が開始される。   As shown in FIG. 35, frame reception from the sorting unit 32 to the first buffer 33 that is a receiving buffer is continued (S111), and the control unit 361 determines whether or not a sorting notification is received from the sorting unit 32 ( S112). If no classification notification is received (NO in S112), frame reception to the reception buffer is continued (S117). The control unit 361 determines whether or not the output buffer and the reception buffer are different (S118). Here, the receiving buffer is the first buffer 33 and the output buffer is the second buffer 34 (YES in S118). The control unit 361 determines whether or not the data amount of the first buffer 33 that is a receiving buffer is equal to or greater than the reference value Vref2 (S119). In FIG. 29, the data amount of the first buffer 33 is equal to or greater than the reference value Vref2. Therefore (YES in S119), the output buffer is switched to the same buffer as the receiving buffer (S120). That is, the output buffer is switched to the first buffer 33. Accordingly, frame output from the first buffer 33 is started and playback is started.

区分部32が2曲目の先頭のフレームを受信し、区分部32から区分通知を受信すると(S112でYES)、制御部361は、受取バッファである第1バッファ33のデータ量が下限値Vmin未満であるか、又は、上限値Vmaxを越えているか否かを判断する(S113)。図30においては、受取バッファである第1バッファ33のデータ量は下限値Vmin未満である(S113でYES)。従って、制御部361は、基準値Vref2が下限値Vminより大きく、かつ、上限値Vmaxより小さいか否かを判断する(S114)。ここでは、基準値Vref2は下限値Vminよりも小さいので(S114でNO)。制御部361は、図30のように、受取バッファである第1バッファ33のデータ量に所定増加量(2秒分のデータ量)を加算して、新たな基準値Vref2を設定する(S115)。つまり、第1バッファ33に5秒分のデータが保持されている場合、基準値Vref2を5+2=7秒分とする。前の基準値が2秒分であるので、基準値Vref2が5秒分増加することになる。このように、バッファのデータ量に応じて基準値Vref2の増加量がその都度変化することが、本例の最大の特徴である。そして、制御部361は、受取バッファを出力バッファと異なるバッファに切り換える(S116)。つまり、図30のように受取バッファを第2バッファ34に切り換える。   When the sorting unit 32 receives the first frame of the second song and receives a sorting notification from the sorting unit 32 (YES in S112), the control unit 361 has the data amount of the first buffer 33, which is a receiving buffer, less than the lower limit value Vmin. Or whether the upper limit value Vmax is exceeded (S113). In FIG. 30, the amount of data in the first buffer 33, which is a receiving buffer, is less than the lower limit value Vmin (YES in S113). Therefore, the control unit 361 determines whether or not the reference value Vref2 is larger than the lower limit value Vmin and smaller than the upper limit value Vmax (S114). Here, the reference value Vref2 is smaller than the lower limit value Vmin (NO in S114). As shown in FIG. 30, the control unit 361 adds a predetermined increase amount (data amount for 2 seconds) to the data amount of the first buffer 33, which is a reception buffer, and sets a new reference value Vref2 (S115). . That is, when data for 5 seconds is held in the first buffer 33, the reference value Vref2 is set to 5 + 2 = 7 seconds. Since the previous reference value is for 2 seconds, the reference value Vref2 is increased by 5 seconds. Thus, the greatest feature of this example is that the increase amount of the reference value Vref2 changes each time according to the data amount of the buffer. Then, the control unit 361 switches the reception buffer to a buffer different from the output buffer (S116). That is, the reception buffer is switched to the second buffer 34 as shown in FIG.

そして、図31のように、受取バッファである第2バッファ34にフレームを受信し(S117)、第2バッファ34のデータ量が基準値Vref2以上になると(S119でYES)、図31のように出力バッファを受取バッファと同じバッファである第2バッファ34に切り換え(S120)、第2バッファ34から再生を開始する。この時、元の出力バッファである第1バッファ33にデータが残っている場合には、そのデータ削除して第1バッファ33を空にする(S121)。   Then, as shown in FIG. 31, the frame is received by the second buffer 34, which is a receiving buffer (S117), and when the data amount of the second buffer 34 becomes equal to or greater than the reference value Vref2 (YES in S119), as shown in FIG. The output buffer is switched to the second buffer 34 which is the same buffer as the receiving buffer (S120), and reproduction is started from the second buffer 34. At this time, if data remains in the first buffer 33, which is the original output buffer, the data is deleted and the first buffer 33 is emptied (S121).

続いて、図32の状態で区分部32から区分通知を受信する(S112でYES)。第2バッファ34のデータ量は下限値Vmin未満であり(S113でYES)、基準値Vref2は下限値Vminよりも小さい(S114でNO)。従って、制御部361は、図32のように、第2バッファ34のデータ量に所定増加量(2秒分のデータ量)を加算して新たな基準値Vref2を設定する(S115)。例えば、第2バッファ34のデータ量が7秒分であれば、基準値Vref2を9秒分にする。つまり、前の基準値Vref2ga7秒分であるので、基準値Vref2の増加量は2秒分となる。そして、受取バッファを出力バッファと異なるバッファである第1バッファ33に切り換えて(S116)、第1バッファ33にフレームを受信させる(S117)。その後、図33に示すように、第1バッファ33のデータ量が基準値Vref2以上になると、出力バッファを第1バッファ33に切り換えて、第1バッファ33から再生を開始する。   Subsequently, a classification notification is received from the classification unit 32 in the state of FIG. 32 (YES in S112). The amount of data in the second buffer 34 is less than the lower limit value Vmin (YES in S113), and the reference value Vref2 is smaller than the lower limit value Vmin (NO in S114). Therefore, as shown in FIG. 32, the control unit 361 adds a predetermined increase amount (data amount for 2 seconds) to the data amount of the second buffer 34 to set a new reference value Vref2 (S115). For example, if the data amount of the second buffer 34 is 7 seconds, the reference value Vref2 is set to 9 seconds. That is, since the previous reference value Vref2ga is 7 seconds, the increase amount of the reference value Vref2 is 2 seconds. Then, the reception buffer is switched to the first buffer 33 which is a buffer different from the output buffer (S116), and the first buffer 33 is made to receive the frame (S117). Thereafter, as shown in FIG. 33, when the data amount of the first buffer 33 becomes equal to or larger than the reference value Vref2, the output buffer is switched to the first buffer 33, and reproduction is started from the first buffer 33.

なお、S114で基準値Vref2が、下限値Vminよりも大きく、かつ、上限値Vmaxよりも小さくなると、S115の処理をスキップしてS116に進む。すなわち、基準値Vref2が、下限値Vminよりも大きく、かつ、上限値Vmaxよりも小さくなると、その時点で、基準値Vref2の増加を終了する。その結果、定常状態においては、基準値Vref2は、下限値Vminと上限値Vmaxとの間の値に設定されている。また、S114での判断の代わりに、基準値Vref2が下限値Vminより大きいかのみを判断してもよい。   If the reference value Vref2 is larger than the lower limit value Vmin and smaller than the upper limit value Vmax in S114, the process of S115 is skipped and the process proceeds to S116. That is, when the reference value Vref2 is larger than the lower limit value Vmin and smaller than the upper limit value Vmax, the increase of the reference value Vref2 is finished at that time. As a result, in the steady state, the reference value Vref2 is set to a value between the lower limit value Vmin and the upper limit value Vmax. Further, instead of the determination in S114, it may be determined only whether the reference value Vref2 is larger than the lower limit value Vmin.

また、S113で受取バッファのデータ量が下限値Vmin以上、かつ、上限値Vmax以下である場合、S114〜S116の処理をスキップし、S117に進む。つまり、基準値Vref2の増加は受取バッファを切り換える際に実行され、区分部32から区分通知を受信しても、受取バッファを切り換えない場合には、基準値Vref2は増加されない。   If the data amount in the receiving buffer is not less than the lower limit value Vmin and not more than the upper limit value Vmax in S113, the processing of S114 to S116 is skipped and the process proceeds to S117. That is, the increase of the reference value Vref2 is executed when the reception buffer is switched. Even when the classification notification is received from the classification unit 32, the reference value Vref2 is not increased if the reception buffer is not switched.

また、S115で算出された新たな基準値Vref2が上限値Vmaxを越える場合、基準値Vref2はVmaxよりも若干小さい値に設定されるとよい。定常状態の基準値Vref2を下限値Vmin〜Vmaxの間に設定すると共に、S114でNOと判断されて永久的に基準値Vref2が増加し続けることを防止するためである。   When the new reference value Vref2 calculated in S115 exceeds the upper limit value Vmax, the reference value Vref2 may be set to a value slightly smaller than Vmax. This is because the steady-state reference value Vref2 is set between the lower limit values Vmin and Vmax, and NO is determined in S114 to prevent the reference value Vref2 from continuously increasing.

以上のように、本実施形態によると、基準値Vref2を段階的に受取バッファのデータ量に応じて増加させるので、出力バッファ変更時に(つまり曲間で)無音が長時間挿入されることを防止することができる。すなわち、基準値の増加量を大きくすると新たな受取バッファのデータ量が基準値に達するまでに時間がかかるが、受取バッファ(つまり出力バッファ)のデータ量が多く、出力バッファのデータがなくなるまでの時間が長い場合、新たな受取バッファからデータが出力される際に長時間無音が挿入されることはない。同様に、受取バッファ(つまり出力バッファ)のデータ量が少ないと、出力バッファのデータが直ぐに無くなってしまうが、基準値の増加量を小さくすることにより、新たな受取バッファのデータ量が基準値に達するまでの時間が短くなり、新たな受取バッファからデータが出力される際に長時間無音が挿入されることはない。   As described above, according to the present embodiment, since the reference value Vref2 is increased stepwise according to the data amount of the receiving buffer, silence can be prevented from being inserted for a long time when the output buffer is changed (that is, between songs). can do. In other words, if the amount of increase in the reference value is increased, it takes time until the new receive buffer data amount reaches the reference value. However, the amount of data in the receive buffer (that is, the output buffer) is large and the output buffer data is lost. When the time is long, silence is not inserted for a long time when data is output from a new receiving buffer. Similarly, if the amount of data in the receiving buffer (that is, the output buffer) is small, the data in the output buffer will be lost immediately. However, by reducing the increase in the reference value, the data amount in the new receiving buffer becomes the reference value. The time to reach is shortened, and no silence is inserted for a long time when data is output from a new receiving buffer.

以上、本発明の好ましい実施形態を説明したが、本発明はこれらの実施形態には限定されない。本発明は、上記のストリーム再生装置を動作させるためのコンピュータプログラムまたはそのコンピュータプログラムを記録した記録媒体という形態で提供されてもよい。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment. The present invention may be provided in the form of a computer program for operating the above-described stream reproduction device or a recording medium on which the computer program is recorded.

本発明は、サーバから配信されるデータストリームを受信するストリーム再生装置に好適に適用され得る。   The present invention can be suitably applied to a stream reproduction device that receives a data stream distributed from a server.

本発明の実施の形態によるストリーミングシステムの構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the streaming system by embodiment of this invention. 図1中のストリーミングサーバから配信されるデータストリームのデータ構造を示す図である。It is a figure which shows the data structure of the data stream delivered from the streaming server in FIG. 図1中のストリーム再生装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the stream reproduction | regeneration apparatus in FIG. 図1中のストリーム再生装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the stream reproduction | regeneration apparatus in FIG. 図3に示すストリーム再生装置の区分動作の詳細を示すフロー図である。FIG. 4 is a flowchart showing details of the sorting operation of the stream playback device shown in FIG. 3. 図3に示すストリーム再生装置の調整指示動作の詳細を示すフロー図である。FIG. 4 is a flowchart showing details of an adjustment instruction operation of the stream reproduction device shown in FIG. 3. 図3に示すストリーム再生装置の再生動作の詳細を示すフロー図である。FIG. 4 is a flowchart showing details of a playback operation of the stream playback device shown in FIG. 3. 本発明の第2の実施の形態によるストリーム再生装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the stream reproducing | regenerating apparatus by the 2nd Embodiment of this invention. 図8に示すストリーム再生装置の区分動作の詳細を示すフロー図である。It is a flowchart which shows the detail of the division | segmentation operation | movement of the stream reproduction | regeneration apparatus shown in FIG. 本発明の第3の実施の形態によるストリーム再生装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the stream reproducing | regenerating apparatus by the 3rd Embodiment of this invention. 図10に示すストリーム再生装置の動作を示す模式図である。It is a schematic diagram which shows operation | movement of the stream reproduction | regeneration apparatus shown in FIG. 図11に続く、ストリーム再生装置の動作を示す模式図である。FIG. 12 is a schematic diagram illustrating the operation of the stream playback device following FIG. 11. 図12に続く、ストリーム再生装置の動作を示す模式図である。FIG. 13 is a schematic diagram illustrating the operation of the stream playback device continued from FIG. 12. 図13に続く、ストリーム再生装置の動作を示す模式図である。FIG. 14 is a schematic diagram illustrating the operation of the stream playback device continued from FIG. 13. 図11〜図14と異なる、ストリーム再生装置の動作の他の例を示す模式図である。FIG. 15 is a schematic diagram illustrating another example of the operation of the stream playback device, which is different from FIGS. 11 to 14. 図15に続く、ストリーム再生装置の動作を示す模式図である。FIG. 16 is a schematic diagram illustrating an operation of the stream reproduction device continued from FIG. 15. 図16に続く、ストリーム再生装置の動作を示す模式図である。FIG. 17 is a schematic diagram illustrating the operation of the stream reproduction device continued from FIG. 16. 図10に示すストリーム再生装置の区分動作の詳細を示すフロー図である。It is a flowchart which shows the detail of the division | segmentation operation | movement of the stream reproduction | regeneration apparatus shown in FIG. 図10に示すストリーム再生装置の受取指定動作の詳細を示すフロー図である。It is a flowchart which shows the detail of the reception designation | designated operation | movement of the stream reproduction | regeneration apparatus shown in FIG. 図10に示すストリーム再生装置の出力指定動作の詳細を示すフロー図である。It is a flowchart which shows the detail of the output designation | designated operation | movement of the stream reproduction | regeneration apparatus shown in FIG. 第4実施形態のバッファの基準値制御動作を示すフロー図である。It is a flowchart which shows the reference value control operation | movement of the buffer of 4th Embodiment. 第4実施形態のストリーム再生装置の動作の他の例を示す模式図である。It is a schematic diagram which shows the other example of operation | movement of the stream reproducing | regenerating apparatus of 4th Embodiment. 第4実施形態のストリーム再生装置の動作の他の例を示す模式図である。It is a schematic diagram which shows the other example of operation | movement of the stream reproducing | regenerating apparatus of 4th Embodiment. 第4実施形態のストリーム再生装置の動作の他の例を示す模式図である。It is a schematic diagram which shows the other example of operation | movement of the stream reproducing | regenerating apparatus of 4th Embodiment. 第4実施形態のバッファの基準値制御動作を示すフロー図である。It is a flowchart which shows the reference value control operation | movement of the buffer of 4th Embodiment. 第4実施形態のストリーム再生装置の動作の他の例を示す模式図である。It is a schematic diagram which shows the other example of operation | movement of the stream reproducing | regenerating apparatus of 4th Embodiment. 第4実施形態のストリーム再生装置の動作の他の例を示す模式図である。It is a schematic diagram which shows the other example of operation | movement of the stream reproducing | regenerating apparatus of 4th Embodiment. ストリーム再生装置の動作を示す模式図である。It is a schematic diagram which shows operation | movement of a stream reproducing | regenerating apparatus. 図28に続く、ストリーム再生装置の動作を示す模式図である。FIG. 29 is a schematic diagram illustrating the operation of the stream playback device following FIG. 28. 図29に続く、ストリーム再生装置の動作を示す模式図である。FIG. 30 is a schematic diagram illustrating an operation of the stream reproduction device continued from FIG. 29. 図30に続く、ストリーム再生装置の動作を示す模式図である。FIG. 31 is a schematic diagram illustrating the operation of the stream playback device following FIG. 30. 図31に続く、ストリーム再生装置の動作を示す模式図である。FIG. 32 is a schematic diagram illustrating the operation of the stream playback device following FIG. 31. 図32に続く、ストリーム再生装置の動作を示す模式図である。FIG. 33 is a schematic diagram illustrating the operation of the stream playback device following FIG. 32. 第5実施形態のストリーム再生装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the stream reproducing | regenerating apparatus of 5th Embodiment. 第5実施形態のストリーム再生装置の動作を示すフロー図である。It is a flowchart which shows operation | movement of the stream reproducing | regenerating apparatus of 5th Embodiment.

符号の説明Explanation of symbols

1,20,30 ストリーム再生装置
2 ストリーミングサーバ
10,31 受信部
11 受信バッファ
12,32 区分部
13,35 検出部
14,37 デコーダ
15 デコードバッファ
16 データ編集部
17,36 調整部
18 再生部
22 データストリーム生成部
23 配信部
33 第1バッファ
34 第2バッファ
102 メモリ
361 制御部
362 受取指定部
363 出力指定部
1, 20, 30 Stream playback device 2 Streaming server 10, 31 Reception unit 11 Reception buffer 12, 32 Sorting unit 13, 35 Detection unit 14, 37 Decoder 15 Decoding buffer 16 Data editing unit 17, 36 Adjustment unit 18 Playback unit 22 Data Stream generation unit 23 Distribution unit 33 First buffer 34 Second buffer 102 Memory 361 Control unit 362 Receipt designation unit 363 Output designation unit

Claims (5)

複数のコンテンツが連結されたデータストリームを受信する受信手段と、
前記受信されたデータストリームを前記コンテンツごとに区分する区分手段と、
前記区分された各コンテンツを順次再生する再生手段と、
前記受信されたデータストリームを受け取って一時的に保持し、前記データストリームのデータ量が基準値を超えた際に、前記再生手段に出力するバッファ手段と、
前記データストリームのうち最初のコンテンツ以外のコンテンツについては前記基準値を第1基準値に設定し、前記データストリームのうち最初のコンテンツについては前記基準値を第1基準値よりも小さい第2基準値に設定する基準値設定手段と
前記バッファ手段に保持されている前記データストリームのデータ量を検出する検出手段と、
前記検出手段の検出結果に基づいて、前記再生手段が前記各コンテンツを再生する間隔を調整する調整手段とを備え、
前記データストリーム内の各コンテンツは複数のフレームを含み、
前記バッファ手段が、前記調整手段の指定に応じて前記複数のフレームを受け取り又は出力する複数のバッファを含み、
前記区分手段が、前記受信手段が前記各コンテンツの先頭フレームを受信したか否かを判断し、
前記調整手段が、前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記複数のバッファのうちフレームを出力中のバッファのデータ量が、所定の下限値未満であるか否かを判断する第1の判断手段と、
前記フレームを出力中のバッファのデータ量が前記下限値未満であるとき、前記データを出力中のバッファと異なる他のバッファを、前記コンテンツの先頭フレーム及びそれ以降に受信されるフレームを受け取る受取バッファに指定する受取指定手段と、
前記複数のバッファのうちフレームを受け取り中のバッファのデータ量が、前記基準値または前記下限値を超えたとき、前記データを受け取り中のバッファを、前記フレームを前記再生手段に順次出力する出力バッファに指定する出力指定手段とを含む、ストリーム再生装置。
Receiving means for receiving a data stream in which a plurality of contents are concatenated;
Sorting means for sorting the received data stream by content;
Playback means for sequentially playing back each of the divided contents;
Buffer means for receiving and temporarily holding the received data stream, and outputting to the reproducing means when the data amount of the data stream exceeds a reference value;
For the contents other than the first content in the data stream, the reference value is set to the first reference value, and for the first content in the data stream, the reference value is a second reference value that is smaller than the first reference value. a reference value setting means for setting a,
Detecting means for detecting a data amount of the data stream held in the buffer means;
Adjusting means for adjusting an interval at which the reproduction means reproduces each content based on a detection result of the detection means;
Each content in the data stream includes a plurality of frames,
The buffer means includes a plurality of buffers for receiving or outputting the plurality of frames in accordance with designation of the adjusting means;
The classifying means determines whether the receiving means has received the first frame of each content;
When the receiving unit receives the first frame of the content, the adjusting unit determines whether the data amount of the buffer that is outputting the frame among the plurality of buffers is less than a predetermined lower limit value. 1 judging means,
When the amount of data in the buffer that is outputting the frame is less than the lower limit value, another buffer that is different from the buffer that is outputting the data is used as a receiving buffer that receives the first frame of the content and frames received thereafter. The receipt designation means to be specified in
An output buffer for sequentially outputting the frame to the reproducing means when the data amount of the buffer receiving the frame out of the plurality of buffers exceeds the reference value or the lower limit value. A stream reproducing device including output designating means for designating .
複数のフレームを含む複数のコンテンツが連結されたデータストリームを受信する受信手段と、
前記受信されたデータストリームを前記コンテンツごとに区分し、前記受信手段が前記各コンテンツの先頭フレームを受信したか否かを判断する区分手段と、
前記区分された各コンテンツを順次再生する再生手段と、
前記受信されたデータストリームを受け取って一時的に保持し、前記データストリームのデータ量が基準値を超えた際に、前記再生手段に出力する複数のバッファと、
前記バッファに保持されている前記データストリームのデータ量を検出する検出手段と、
前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記複数のバッファのうちフレームを出力中のバッファのデータ量が、下限値未満であるか否かを判断する第1の判断手段と、
前記フレームを出力中のバッファのデータ量が前記下限値未満であると判断されたとき、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量に所定増加量を加算して前記基準値を設定する基準値設定手段と、
前記フレームを出力中のバッファのデータ量が前記下限値未満であると判断されたとき、前記データを出力中のバッファと異なる他のバッファを、前記コンテンツの先頭フレーム及びそれ以降に受信されるフレームを受け取る受取バッファに指定する受取指定手段と、
前記複数のバッファのうちフレームを受け取り中のバッファのデータ量が、前記基準値を超えたとき、前記データを受け取り中のバッファを、前記フレームを前記再生手段に順次出力する出力バッファに指定する出力指定手段とを備える、ストリーム再生装置。
Receiving means for receiving a data stream in which a plurality of contents including a plurality of frames are concatenated;
Classifying means for classifying the received data stream for each content, and determining whether the receiving means has received the first frame of each content;
Playback means for sequentially playing back each of the divided contents;
A plurality of buffers that receive and temporarily store the received data stream and that output to the playback means when the data amount of the data stream exceeds a reference value;
Detecting means for detecting a data amount of the data stream held in the buffer;
First receiving means for determining whether or not the data amount of a buffer that is outputting a frame among the plurality of buffers is less than a lower limit value when the receiving means receives the first frame of the content;
When it is determined that the data amount of the buffer that is outputting the frame is less than the lower limit value, a predetermined increment is added to the data amount of the buffer that is receiving the frame among the plurality of buffers, and the reference value is obtained. A reference value setting means to be set;
When it is determined that the data amount of the buffer that is outputting the frame is less than the lower limit value, other buffers different from the buffer that is outputting the data are received in the first frame of the content and the frames received thereafter. A receiving specification means for specifying a receiving buffer for receiving,
When the data amount of the buffer receiving the frame among the plurality of buffers exceeds the reference value, the buffer receiving the data is designated as an output buffer for sequentially outputting the frames to the reproducing means. A stream reproduction apparatus comprising: a designation unit;
前記受信手段が前記コンテンツの先頭フレームを受信したとき、前記フレームを出力中のバッファのデータ量が前記下限値よりも大きい上限値を超えているか否かを判断する第2の判断手段をさらに備え、
前記データ量が前記上限値を超えていると判断されたとき、前記基準値設定手段が、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量に所定増加量を加算して前記基準値を設定し、
前記データ量が前記上限値を超えていると判断されたとき、前記受取指定手段が、前記フレームを出力中のバッファと異なる他のバッファを、前記受取バッファに指定する、請求項に記載のストリーム再生装置。
When the receiving means receives the first frame of the content, the apparatus further comprises second determining means for determining whether or not the data amount of the buffer that is outputting the frame exceeds an upper limit value that is larger than the lower limit value. ,
When it is determined that the data amount exceeds the upper limit value, the reference value setting means adds a predetermined increase amount to the data amount of the buffer receiving the frame among the plurality of buffers, and the reference value Set
3. The reception specification unit according to claim 2 , wherein when it is determined that the amount of data exceeds the upper limit value, the reception specifying unit specifies another buffer different from the buffer that is outputting the frame as the reception buffer. Stream playback device.
前記基準値設定手段が、現在の前記基準値が前記下限値よりも大きいか否かを判断し、現在の前記基準値が前記下限値よりも大きい場合には、現在の前記基準値のまま維持し、現在の前記基準値が前記下限値以下である場合には、前記複数のバッファのうちフレームを受け取り中のバッファのデータ量に所定増加量を加算して前記基準値を設定する、請求項またはに記載のストリーム再生装置。 The reference value setting means determines whether or not the current reference value is greater than the lower limit value. If the current reference value is greater than the lower limit value, the current reference value is maintained as it is. And when the current reference value is less than or equal to the lower limit value, the reference value is set by adding a predetermined increment to the data amount of the buffer receiving the frame among the plurality of buffers. 4. The stream playback device according to 2 or 3 . 請求項1〜のいずれかに記載のストリーム再生装置の各手段をコンピュータに実行さ
せる、ストリーム再生プログラム。
To execute respective means of the stream playback device according to any one of claims 1-4 in a computer, the stream reproduction program.
JP2008258212A 2008-03-21 2008-10-03 Stream reproducing apparatus and program thereof Expired - Fee Related JP4600698B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008258212A JP4600698B2 (en) 2008-03-21 2008-10-03 Stream reproducing apparatus and program thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008074530 2008-03-21
JP2008258212A JP4600698B2 (en) 2008-03-21 2008-10-03 Stream reproducing apparatus and program thereof

Publications (2)

Publication Number Publication Date
JP2009258608A JP2009258608A (en) 2009-11-05
JP4600698B2 true JP4600698B2 (en) 2010-12-15

Family

ID=41386079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008258212A Expired - Fee Related JP4600698B2 (en) 2008-03-21 2008-10-03 Stream reproducing apparatus and program thereof

Country Status (1)

Country Link
JP (1) JP4600698B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5640574B2 (en) * 2010-09-01 2014-12-17 ヤマハ株式会社 Terminal device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11163808A (en) * 1997-11-27 1999-06-18 Sony Corp Transmitter, receiver and information storage system
JP2002330136A (en) * 2001-04-27 2002-11-15 Toa Corp Receiving device and reproduction method
JP2002330180A (en) * 2001-04-27 2002-11-15 Toa Corp Reception device and reception reproducing method
JP2006050220A (en) * 2004-08-04 2006-02-16 Canon Inc Video reproducing apparatus, relay server and relay service, video distribution system, and video distribution service
JP2006114988A (en) * 2004-10-12 2006-04-27 Toa Corp Receiver, clock adjustment method, and broadcast system
JP2007135070A (en) * 2005-11-11 2007-05-31 Yamaha Corp Content data distribution system
JP2007311902A (en) * 2006-05-16 2007-11-29 Matsushita Electric Ind Co Ltd Stream receiving and reproducing device and streaming network system
JP2007312122A (en) * 2006-05-18 2007-11-29 Hitachi Ltd Network receiver

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006108435A1 (en) * 2005-04-11 2006-10-19 Telefonaktiebolaget Lm Ericsson (Publ) Technique for controlling data packet transmissions of variable bit rate data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11163808A (en) * 1997-11-27 1999-06-18 Sony Corp Transmitter, receiver and information storage system
JP2002330136A (en) * 2001-04-27 2002-11-15 Toa Corp Receiving device and reproduction method
JP2002330180A (en) * 2001-04-27 2002-11-15 Toa Corp Reception device and reception reproducing method
JP2006050220A (en) * 2004-08-04 2006-02-16 Canon Inc Video reproducing apparatus, relay server and relay service, video distribution system, and video distribution service
JP2006114988A (en) * 2004-10-12 2006-04-27 Toa Corp Receiver, clock adjustment method, and broadcast system
JP2007135070A (en) * 2005-11-11 2007-05-31 Yamaha Corp Content data distribution system
JP2007311902A (en) * 2006-05-16 2007-11-29 Matsushita Electric Ind Co Ltd Stream receiving and reproducing device and streaming network system
JP2007312122A (en) * 2006-05-18 2007-11-29 Hitachi Ltd Network receiver

Also Published As

Publication number Publication date
JP2009258608A (en) 2009-11-05

Similar Documents

Publication Publication Date Title
US10366725B2 (en) Server side crossfading for progressive download media
TWI229528B (en) Method of controlling dataflow for a media player system
US11398240B2 (en) Systems and methods for implementing cross-fading, interstitials and other effects downstream
CN102035827B (en) Information processing apparatus and information processing method
US7379657B2 (en) Method for generating additional information for guaranteeing seamless playback between data streams, recording medium storing the information, and recording, editing and/or playback apparatus using the same
EP1783619B1 (en) Contents delivery system, client, server, contents delivery method and contents reproducing method
JP2002510161A (en) Two-way digital radio broadcasting system
JP2003330496A (en) Method and apparatus for controlling buffering of audio stream
JP2002196797A (en) Recording/reproducing device and recording/reproducing method therefor
JP4600698B2 (en) Stream reproducing apparatus and program thereof
JP4404091B2 (en) Content distribution server and terminal for distributing content frames for playing music
US8369456B2 (en) Data processing apparatus and method and encoding device
JP3976191B2 (en) Server, transmission rate control method, program, and recording medium
JP4900299B2 (en) Stream playback apparatus, streaming system, and stream playback program
JP4751568B2 (en) Customizable radio
US20040170387A1 (en) System multiplexing apparatus preventing overflow of audio decoder buffer
KR100931344B1 (en) Method for providing video streaming service and system, server and user terminal for same
JP2009005317A (en) Video/audio playback apparatus
JP2006134271A (en) Reproducing apparatus
JP5610904B2 (en) Distribution digital music data playback system
JP2001128139A (en) Stream data reception terminal and reception method
JPH09292900A (en) Device for regenerating compressed data of audio information
JP2002142209A (en) Consecutive media stream reproduction method and device thereof
JP5093328B2 (en) Content distribution system
JP2005135529A (en) Recording apparatus and recording method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100331

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100412

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100604

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100705

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100813

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100901

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100914

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131008

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4600698

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees