JP5958008B2 - Stream processing apparatus, stream processing method, and stream processing program - Google Patents
Stream processing apparatus, stream processing method, and stream processing program Download PDFInfo
- Publication number
- JP5958008B2 JP5958008B2 JP2012069986A JP2012069986A JP5958008B2 JP 5958008 B2 JP5958008 B2 JP 5958008B2 JP 2012069986 A JP2012069986 A JP 2012069986A JP 2012069986 A JP2012069986 A JP 2012069986A JP 5958008 B2 JP5958008 B2 JP 5958008B2
- Authority
- JP
- Japan
- Prior art keywords
- clock
- tts
- packet
- stream processing
- frequency
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 267
- 238000003672 processing method Methods 0.000 title claims description 11
- 238000000034 method Methods 0.000 claims description 52
- 230000001360 synchronised effect Effects 0.000 claims description 44
- 238000011084 recovery Methods 0.000 claims description 26
- 238000011156 evaluation Methods 0.000 claims description 19
- 238000009825 accumulation Methods 0.000 claims description 11
- 230000014759 maintenance of location Effects 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 description 12
- 230000007423 decrease Effects 0.000 description 10
- 230000003247 decreasing effect Effects 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 230000008929 regeneration Effects 0.000 description 5
- 238000011069 regeneration method Methods 0.000 description 5
- 230000006978 adaptation Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 4
- 239000013078 crystal Substances 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Description
本発明は、ストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムに関し、遅延時間を増大させることなく、基準クロックの周波数を調整するためのストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムに関する。 The present invention relates to a stream processing device, a stream processing method, and a stream processing program, and more particularly to a stream processing device, a stream processing method, and a stream processing program for adjusting the frequency of a reference clock without increasing a delay time.
特開2007−104085号公報(特許文献1)には、バッファに蓄積したパケットの占有量を監視することにより、基準クロックの周波数を調整するための技術が開示されている。すなわち、第2のデータストリームのパケットを第1のデータストリームに対応したフォーマットへ変換する際に、パケットを一旦バッファリングする場合において、第2のデータストリームのパケットをバッファに格納し、このバッファに対するパケットの占有量を調べる。そして、占有量が予め定めた規定範囲を下回るときはバッファからパケットを読み出すペースを遅くし、占有量が規定範囲を上回るときはバッファからパケットを読み出すペースを早くし、占有量が規定範囲内にあるときはバッファからパケットを所定のペースで読み出す。 Japanese Unexamined Patent Application Publication No. 2007-104085 (Patent Document 1) discloses a technique for adjusting the frequency of a reference clock by monitoring the occupation amount of packets accumulated in a buffer. That is, when the packet of the second data stream is converted into a format corresponding to the first data stream, when the packet is temporarily buffered, the packet of the second data stream is stored in the buffer, and Check packet occupancy. When the occupancy is below the predetermined range, the pace at which packets are read from the buffer is slowed down. When the occupancy is above the specified range, the pace at which packets are read out from the buffer is increased, and the occupancy is within the specified range. In some cases, packets are read from the buffer at a predetermined pace.
しかしながら、特許文献1に記載の技術では、基準クロックの周波数を調整するために、予め定めた規定範囲までパケットをバッファへ蓄積する必要がある。たとえば、受信されたパケットが順次バッファに蓄積されていき、パケットが予め定めた規定範囲まで蓄積された後に、最初に受信されたパケットは、バッファから取り出されて次の処理へ移される。従って、パケットが、バッファへ入ってからバッファを出るまでの滞留時間が発生し、パケットを受信しても、滞留時間を経過するまで当該パケットの処理を行うことができない。すなわち、受信したパケットを次の処理へ移すまでの遅延時間が発生してしまう。 However, in the technique described in Patent Document 1, in order to adjust the frequency of the reference clock, it is necessary to accumulate packets in a buffer up to a predetermined specified range. For example, the received packets are sequentially accumulated in the buffer, and after the packets are accumulated to a predetermined specified range, the first received packet is taken out from the buffer and moved to the next processing. Therefore, a residence time from when the packet enters the buffer until it leaves the buffer is generated, and even if the packet is received, the packet cannot be processed until the residence time elapses. That is, a delay time until the received packet is transferred to the next process occurs.
この発明は、上述の課題を解決するためになされたもので、その目的は、ストリームを処理する構成において、遅延時間を増大させることなく、基準クロックの周波数を調整することが可能なストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムを提供することである。 The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a stream processing apparatus capable of adjusting the frequency of the reference clock without increasing the delay time in a stream processing configuration. It is to provide a stream processing method and a stream processing program.
(1)上記課題を解決するために、この発明のある局面に係わるストリーム処理装置は、1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置であって、上記パケットはヘッダおよびペイロードを含み、上記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、上記複数のパケットの各々のヘッダは時刻情報を含み、基準クロックを生成するためのクロック生成部と、上記基準クロックに基づいてカウント値を更新するためのカウンタと、上記カウント値および上記時刻情報に基づいて上記クロック生成部を制御することにより、上記基準クロックの周波数を調整するためのクロック調整部とを備える。 (1) In order to solve the above problems, a stream processing apparatus according to an aspect of the present invention is a stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets, The packet includes a header and a payload, at least some headers of the plurality of packets include information for clock recovery, each header of the plurality of packets includes time information, and clock generation for generating a reference clock And a counter for updating the count value based on the reference clock, and a clock for adjusting the frequency of the reference clock by controlling the clock generation unit based on the count value and the time information And an adjustment unit.
このように、カウント値および時刻情報は、ストリーム処理装置がパケットを受信した時刻から取得することができるので、クロック生成部を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつゲートにおけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置がパケットを受信した時刻から、当該パケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。 As described above, the count value and the time information can be acquired from the time when the stream processing apparatus receives the packet, so that the processing for controlling the clock generation unit and the processing for decoding can be started from the time, In addition, the buffer at the gate is not necessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing apparatus receives the packet until the packet is decoded, for example.
また、ストリーム処理装置におけるクロックに基づいたカウント値、およびVOD(Video On Demand)サーバ等の局側装置におけるクロックに基づいた時刻情報を利用することにより、ストリーム処理装置におけるクロックを、局側装置におけるクロックに同期させることができる。 Further, by using the count value based on the clock in the stream processing device and the time information based on the clock in the station side device such as a VOD (Video On Demand) server, the clock in the stream processing device is Can be synchronized to the clock.
このように、カウント値が局側装置におけるクロックと同期するので、ストリーム処理装置は、ストリーム処理装置におけるクロックに基づいて処理を行うことにより、局側装置におけるクロックに基づいて作成されたストリームを、局側装置におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。 In this way, since the count value is synchronized with the clock in the station side device, the stream processing device performs processing based on the clock in the stream processing device, so that the stream created based on the clock in the station side device is Each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station side device.
(2)好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報に基づいて、上記パケット用の仮想的なバッファの評価値を算出し、算出した上記評価値に応じて上記クロック生成部を制御することにより、上記基準クロックの周波数を調整する。 (2) Preferably, the clock adjustment unit calculates an evaluation value of a virtual buffer for the packet based on the count value and the time information, and the clock generation unit is set according to the calculated evaluation value. By controlling the frequency of the reference clock.
このような構成により、実際にバッファを設けることなく、仮想的なバッファの評価値を算出することができるため、ストリーム処理装置におけるクロックを適切に制御することができる。 With such a configuration, an evaluation value of a virtual buffer can be calculated without actually providing a buffer, so that the clock in the stream processing apparatus can be appropriately controlled.
そして、ストリーム処理装置は、バッファを実装しないので、受信したパケットを、バッファに滞留させることなく次の処理へ移すことができる。 Since the stream processing apparatus does not mount a buffer, the received packet can be transferred to the next process without staying in the buffer.
(3)好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報の差に基づいて、上記基準クロックの周波数を調整する。 (3) Preferably, the clock adjustment unit adjusts the frequency of the reference clock based on the difference between the count value and the time information.
このように、ストリーム処理装置におけるクロックに基づいたカウント値、および局側装置におけるクロックに基づいた時刻情報の差を計算することにより、ストリーム処理装置における動作タイミング、および局側装置における動作タイミングのずれの経時的な変化を分析することができるので、ストリーム処理装置におけるクロックの調整を正確に行うことができる。 Thus, by calculating the difference between the count value based on the clock in the stream processing device and the time information based on the clock in the station side device, the operation timing in the stream processing device and the difference in operation timing in the station side device Can be analyzed, so that the clock in the stream processing apparatus can be adjusted accurately.
また、上記差を算出するために必要なカウント値および時刻情報は、パケットを受信した時刻において取得するので、上記差を算出するための処理を、当該時刻から開始することができる。従って、ストリーム処理装置は、上記パケットを受信した時刻において、ストリーム処理装置におけるクロックの周波数の調整に、上記差を反映させることができる。 In addition, since the count value and time information necessary for calculating the difference are acquired at the time when the packet is received, the process for calculating the difference can be started from the time. Therefore, the stream processing apparatus can reflect the difference in the adjustment of the clock frequency in the stream processing apparatus at the time when the packet is received.
(4)好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報の大小関係に基づいて1または複数の上記パケットを選択し、選択した上記パケットのデータ量の合計に基づいて上記基準クロックの周波数を調整する。 (4) Preferably, the clock adjustment unit selects one or a plurality of the packets based on the magnitude relationship between the count value and the time information, and the reference clock based on the total data amount of the selected packets. Adjust the frequency.
このような構成により、バッファにおけるパケットの蓄積量を仮想的に求めることができるため、上記蓄積量を経時的に監視することにより、ストリーム処理装置における動作タイミング、および局側装置における動作タイミングのずれの経時的な変化を分析することができる。これにより、ストリーム処理装置におけるクロックの調整を正確に行うことができる。 With this configuration, it is possible to virtually determine the amount of packets stored in the buffer. By monitoring the amount of storage over time, the operation timing in the stream processing device and the operation timing in the station side device are shifted. Over time can be analyzed. This makes it possible to accurately adjust the clock in the stream processing apparatus.
(5)より好ましくは、上記クロック調整部は、上記差が所定値になるように、上記基準クロックの周波数を調整する。 (5) More preferably, the clock adjustment unit adjusts the frequency of the reference clock so that the difference becomes a predetermined value.
ストリーム処理装置におけるクロックおよび局側装置におけるクロックが同期していると、ストリーム処理装置におけるクロックに基づいたカウント値、および局側装置におけるクロックに基づいた時刻情報の差が一定になるので、上記差が一定になる。ストリーム処理装置におけるクロックの周波数を調整することにより、ストリーム処理装置におけるクロックを局側装置におけるクロックに同期させることができる。 If the clock in the stream processing device and the clock in the station side device are synchronized, the difference between the count value based on the clock in the stream processing device and the time information based on the clock in the station side device becomes constant, so the above difference Becomes constant. By adjusting the frequency of the clock in the stream processing device, the clock in the stream processing device can be synchronized with the clock in the station side device.
(6)より好ましくは、上記クロック調整部は、上記複数のパケットの一部の上記時刻情報と上記カウント値との差に基づいて、上記基準クロックの周波数を調整する。 (6) More preferably, the clock adjustment unit adjusts the frequency of the reference clock based on a difference between the time information and the count value of a part of the plurality of packets.
このような構成により、ストリーム処理装置が受信する全てのパケットでなく、一部のパケットからストリーム処理装置におけるクロックに基づいたカウント値、および局側装置におけるクロックに基づいた時刻情報の差を計算するので、ストリーム処理装置における計算の負担を軽減することができる。 With such a configuration, the difference between the count value based on the clock in the stream processing device and the time information based on the clock in the station side device is calculated from some packets instead of all the packets received by the stream processing device. Therefore, the calculation burden on the stream processing apparatus can be reduced.
(7)より好ましくは、上記クロック調整部は、上記合計が所定値になるように、上記基準クロックの周波数を調整する。 (7) More preferably, the clock adjustment unit adjusts the frequency of the reference clock so that the total becomes a predetermined value.
このように、ストリーム処理装置により受信されたパケットにおいて、当該パケットを受信したタイミングから、カウント値が時刻情報の示す値となるタイミングまでの間、当該パケットのバイト数を合計に含める。ストリーム処理装置におけるクロックおよび局側装置におけるクロックが同期していると、上記合計が一定になるので、上記合計が一定になるようにストリーム処理装置におけるクロックの周波数を調整することにより、ストリーム処理装置におけるクロックを局側装置におけるクロックに同期させることができる。 In this way, in the packet received by the stream processing device, the number of bytes of the packet is included in the total from the timing when the packet is received until the timing when the count value becomes the value indicated by the time information. When the clock in the stream processing device and the clock in the station-side device are synchronized, the total is constant. Therefore, by adjusting the frequency of the clock in the stream processing device so that the total is constant, the stream processing device Can be synchronized with the clock in the station side device.
(8)より好ましくは、上記クロック調整部は、上記カウント値および上記時刻情報の差を、仮想的なバッファにおける上記パケットの滞留時間として算出し、算出した上記滞留時間に基づいて上記基準クロックの周波数を調整する。 (8) More preferably, the clock adjustment unit calculates a difference between the count value and the time information as a retention time of the packet in a virtual buffer, and based on the calculated retention time, Adjust the frequency.
このような構成により、仮想的なバッファの評価値として、仮想的な滞留時間を計算することができるため、ストリーム処理装置におけるクロックの調整を正確に行うことができる。 With such a configuration, since the virtual residence time can be calculated as the evaluation value of the virtual buffer, the clock in the stream processing apparatus can be accurately adjusted.
(9)より好ましくは、上記クロック調整部は、上記時刻情報が上記カウント値以下となる1または複数の上記パケットのデータ量の合計を、仮想的なバッファにおける上記パケットの蓄積量として算出し、算出した上記蓄積量に基づいて上記基準クロックの周波数を調整する。 (9) More preferably, the clock adjustment unit calculates a sum of data amounts of one or a plurality of the packets whose time information is equal to or less than the count value as an accumulation amount of the packets in a virtual buffer, The frequency of the reference clock is adjusted based on the calculated accumulation amount.
このような構成により、仮想的なバッファの評価値として、仮想的な蓄積量を計算することができるため、ストリーム処理装置におけるクロックの調整を正確に行うことができる。 With such a configuration, since the virtual accumulation amount can be calculated as the evaluation value of the virtual buffer, the clock in the stream processing apparatus can be adjusted accurately.
(10)好ましくは、上記ストリーム処理装置は、さらに、上記パケットのペイロードに対して所定の処理を行うためのペイロード処理部を備え、上記ペイロード処理部は、上記クロック再生用情報および上記時刻情報が同期している場合には、上記基準クロックのタイミングに従って上記所定の処理を行う。 (10) Preferably, the stream processing apparatus further includes a payload processing unit for performing predetermined processing on the payload of the packet, and the payload processing unit stores the clock reproduction information and the time information. If they are synchronized, the predetermined processing is performed according to the timing of the reference clock.
このように、クロック再生用情報および時刻情報が同期していると、ストリーム処理装置は、クロック再生用情報によりクロックを再生させるための、受信したパケットに対するゲート動作を行う必要がないので、速やかに上記パケットに所定の処理を行うことができる。 As described above, when the clock reproduction information and the time information are synchronized, the stream processing apparatus does not need to perform a gate operation on the received packet to reproduce the clock based on the clock reproduction information. Predetermined processing can be performed on the packet.
また、クロック再生用情報によりクロックを再生させるための動作が不要になるので、ストリーム処理装置における処理負担を軽減することができ、かつゲートおよび当該ゲートにおけるバッファも不要となる。 In addition, since the operation for regenerating the clock by the information for clock recovery is not necessary, the processing load on the stream processing apparatus can be reduced, and the gate and the buffer in the gate are also unnecessary.
(11)また、この発明のある局面に係わるストリーム処理方法は、1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置におけるストリーム処理方法であって、上記パケットはヘッダおよびペイロードを含み、上記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、上記複数のパケットの各々のヘッダは時刻情報を含み、基準クロックを生成するステップと、上記基準クロックに基づいてカウント値を更新するステップと、上記カウント値および上記時刻情報に基づいて、上記基準クロックの周波数を調整するステップとを含む。 (11) A stream processing method according to an aspect of the present invention is a stream processing method in a stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets, and the packet Includes a header and a payload, at least some headers of the plurality of packets include information for clock recovery, each header of the plurality of packets includes time information, and generates a reference clock; and the reference clock And updating the count value based on the above and adjusting the frequency of the reference clock based on the count value and the time information.
このように、カウント値および時刻情報は、ストリーム処理装置がパケットを受信した時刻から取得することができるので、クロック生成部を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつゲートにおけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置がパケットを受信した時刻から、当該パケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。 As described above, the count value and the time information can be acquired from the time when the stream processing apparatus receives the packet, so that the processing for controlling the clock generation unit and the processing for decoding can be started from the time, In addition, the buffer at the gate is not necessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing apparatus receives the packet until the packet is decoded, for example.
また、ストリーム処理装置におけるクロックに基づいたカウント値、およびVODサーバ等の局側装置におけるクロックに基づいた時刻情報を利用することにより、ストリーム処理装置におけるクロックを、局側装置におけるクロックに同期させることができる。 Also, by using the count value based on the clock in the stream processing device and the time information based on the clock in the station side device such as the VOD server, the clock in the stream processing device is synchronized with the clock in the station side device. Can do.
このように、カウント値が局側装置におけるクロックと同期するので、ストリーム処理装置は、ストリーム処理装置におけるクロックに基づいて処理を行うことにより、局側装置におけるクロックに基づいて作成されたストリームを、局側装置におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。 In this way, since the count value is synchronized with the clock in the station side device, the stream processing device performs processing based on the clock in the stream processing device, so that the stream created based on the clock in the station side device is Each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station side device.
(12)また、この発明のある局面に係わるストリーム処理プログラムは、1または複数の番組の情報を複数のパケットに分割したストリームを処理するためのストリーム処理装置において用いられるストリーム処理プログラムであって、上記パケットはヘッダおよびペイロードを含み、上記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、上記複数のパケットの各々のヘッダは時刻情報を含み、コンピュータに、基準クロックを生成するステップと、上記基準クロックに基づいてカウント値を更新するステップと、上記カウント値および上記時刻情報に基づいて、上記基準クロックの周波数を調整するステップとを実行させるためのプログラムである。 (12) A stream processing program according to an aspect of the present invention is a stream processing program used in a stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets, The packet includes a header and a payload; at least some of the headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information; and generating a reference clock to the computer And a step of updating a count value based on the reference clock and a step of adjusting the frequency of the reference clock based on the count value and the time information.
このように、カウント値および時刻情報は、ストリーム処理装置がパケットを受信した時刻から取得することができるので、クロック生成部を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつゲートにおけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置がパケットを受信した時刻から、当該パケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。 As described above, the count value and the time information can be acquired from the time when the stream processing apparatus receives the packet, so that the processing for controlling the clock generation unit and the processing for decoding can be started from the time, In addition, the buffer at the gate is not necessary, and the video decoding process can be started immediately. Therefore, it is possible to suppress an increase in delay time from the time when the stream processing apparatus receives the packet until the packet is decoded, for example.
また、ストリーム処理装置におけるクロックに基づいたカウント値、およびVODサーバ等の局側装置におけるクロックに基づいた時刻情報を利用することにより、ストリーム処理装置におけるクロックを、局側装置におけるクロックに同期させることができる。 Also, by using the count value based on the clock in the stream processing device and the time information based on the clock in the station side device such as the VOD server, the clock in the stream processing device is synchronized with the clock in the station side device. Can do.
このように、カウント値が局側装置におけるクロックと同期するので、ストリーム処理装置は、ストリーム処理装置におけるクロックに基づいて処理を行うことにより、局側装置におけるクロックに基づいて作成されたストリームを、局側装置におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。 In this way, since the count value is synchronized with the clock in the station side device, the stream processing device performs processing based on the clock in the stream processing device, so that the stream created based on the clock in the station side device is Each packet of the stream can be processed with the same timing relationship as the processing timing of each packet of the stream in the station side device.
本発明によれば、ストリームを処理する構成において、遅延時間を増大させることなく、基準クロックの周波数を調整することが可能なストリーム処理装置、ストリーム処理方法およびストリーム処理プログラムを提供することである。 The present invention provides a stream processing device, a stream processing method, and a stream processing program that can adjust the frequency of a reference clock without increasing the delay time in a stream processing configuration.
以下、本発明の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。 Hereinafter, embodiments of the present invention will be described 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を参照して、ストリーム処理システム13は、VODサーバ等の局側装置10と、ストリーム処理装置20と、表示装置12とを備える。なお、局側装置10は、ネットワーク11を経由してストリーム処理装置20と接続される。
[Overview of stream processing system]
FIG. 1 is a diagram showing a configuration of a stream processing system according to an embodiment of the present invention.
Referring to FIG. 1, the
局側装置10は、1または複数の番組の情報を含むストリームをネットワーク11経由で送信する。ネットワーク11は、たとえばインターネットであり、局側装置10およびストリーム処理装置20は、IP(Internet Protocol)によりストリームを送受信する。
The station-
図2は、本発明の実施の形態に係るストリーム処理装置において処理されるストリームの一例を示す図である。
図2を参照して、図2の(A)は、たとえばMPEG2−TS(Moving Picture Experts Group 2 Transport Stream)規格のコンテナ形式を用いて、局側装置から送信されるストリームを示し、当該ストリームには、番組の情報が含まれる。
FIG. 2 is a diagram showing an example of a stream processed in the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 2, (A) in FIG. 2 shows a stream transmitted from a station side apparatus using, for example, a container format of MPEG2-TS (Moving Picture Experts Group 2 Transport Stream) standard. Includes program information.
MPEG2―TSは、複数のTSパケットを含む。TSパケットは、188バイトのデータを有し、TSヘッダおよびペイロードを含む。V1、V2、V3およびV4等で示されるビデオTSパケットは、ペイロードにおいて、たとえばMPEG2またはH.264/AVC等により上記番組の情報を符号化したビデオデータであるビデオES(Elementary Stream)を含む。また、TSヘッダは、ペイロードに含まれるビデオデータに対応するPID(Packet Identifier)等の情報を含む。 MPEG2-TS includes a plurality of TS packets. The TS packet has 188 bytes of data and includes a TS header and a payload. Video TS packets indicated by V1, V2, V3, V4, etc. are, for example, MPEG2 or H.264 in the payload. It includes a video ES (Elementary Stream) which is video data obtained by encoding the program information by H.264 / AVC or the like. Further, the TS header includes information such as a PID (Packet Identifier) corresponding to video data included in the payload.
A1で示されるオーディオTSパケットは、ペイロードにおいて、音声情報を符号化したオーディオデータであるオーディオES(Elementary Stream)を含む。また、TSヘッダは、ペイロードに含まれるオーディオデータに対応するPID等の情報を含む。 The audio TS packet indicated by A1 includes an audio ES (Elementary Stream) that is audio data obtained by encoding audio information in the payload. The TS header includes information such as PID corresponding to the audio data included in the payload.
PCR(Program Clock Reference)で示されるPCRパケットは、TSヘッダに含まれるアダプテーションフィールドにおいて、PCRを含む。PCRは、たとえばストリーム処理装置20のSTC(System Time Clock)またはPCRクロックを、局側装置で用いられるPCRクロックと同期させるために用いる。以下、局側装置10におけるPCRクロックを局側PCRクロックと称する。
A PCR packet indicated by PCR (Program Clock Reference) includes PCR in an adaptation field included in the TS header. The PCR is used, for example, to synchronize the STC (System Time Clock) or the PCR clock of the
NULLで示されるヌルパケットは、データを含まないTSパケットであり、0x1FFFのPIDで示される。TSストリームが放送波により送信される場合、所定の周波数帯域および時間を占有して送信することから、送信するデータ量が少ない際にヌルパケットをTSストリームに挿入することにより、伝送ビットレートの調整が行われる。 A null packet indicated by NULL is a TS packet not including data, and is indicated by a PID of 0x1FFF. When a TS stream is transmitted by broadcast waves, the transmission bit rate is adjusted by inserting a null packet into the TS stream when the amount of data to be transmitted is small because it occupies a predetermined frequency band and time. Is done.
一方、図1に示すようなインターネット等のネットワーク11を経由して局側装置10からストリームを送信する場合、送信するデータ量を減らすことにより情報伝送に必要な周波数帯域および時間を節約することが好ましい。
On the other hand, when a stream is transmitted from the station-
従って、局側装置10は、たとえば図2の(A)に示すMPEG2−TSをネットワーク11経由で再送信する際に、ヌルパケット等の番組の情報に関係のないTSパケットを削除した、図2の(B)に示すたとえばMPEG2−TTS(Timestamped TS)に変換する。これにより、局側装置10は、情報伝送に必要な周波数帯域および時間を節約することができる。
Therefore, when the
ネットワーク11経由で送信されるストリームには、複数のTTSパケットが含まれる。TTSパケットは、4バイトのTTSヘッダがTSパケットに付加されたパケットであり、192バイトの大きさを持つ。TTSヘッダには、4バイトのタイムスタンプが含まれる。なお、TTSヘッダは、TSヘッダに含められてもよい。
A stream transmitted via the
ストリーム処理装置20は、ネットワーク11経由で局側装置10からTTSパケットを受信すると、受信したTTSパケットに含まれる符号化された番組の情報をデコーダにおいてデコードし、デコードした番組画像および音声情報を、たとえば表示装置12において再生させる。
When the
しかしながら、局側装置10がネットワーク11経由でストリームを送信する場合、ネットワーク11における伝送速度、通信経路、中継機器の処理能力または回線の混雑度等の揺らぎ、およびNULLパケットの削除等により上記ストリームに含まれるパケットが局側装置10からストリーム処理装置20までの伝送時間は、パケット毎にばらついてしまう。このため、以下の問題が発生する。
However, when the station-
すなわち、局側装置10は、放送波によりストリームの各パケットを送信する際は、当該各パケットが送信される時刻の差である相対送信タイミングを、当該各パケットをデコーダへ投入すべき時刻の差である相対デコードタイミングに合わせて、当該各パケットを送信する。具体的には、局側装置10は、たとえば第一のパケットに続く第二のパケットをデコーダへ投入すべきタイミングが第一のパケットの1秒後である場合、第二のパケットを第一のパケットの1秒後に放送波により送信する。
That is, when the
局側装置10が放送波によりストリームのパケットを送信する場合、パケットが局側装置10からストリーム処理装置20へ到達するまでの伝送時間は、全てのパケットにおいて一定である。
When the station-
従って、ストリーム処理装置20は、放送波によりストリームを受信する際は、受信した上記ストリームの各パケットを、受信したタイミングでデコーダへ投入することにより、相対デコードタイミングを保持したまま当該各パケットをデコーダへ投入することができる。
Therefore, when receiving the stream by the broadcast wave, the
一方、局側装置10がネットワーク11経由でストリームを送信する場合、局側装置10からストリーム処理装置20までのパケットの伝送時間は、パケット毎にばらついてしまう。
On the other hand, when the
従って、ストリーム処理装置20は、ネットワーク11経由で受信した上記ストリームの各パケットを、受信したタイミングでデコーダへ投入しても、相対デコードタイミングを保持したまま当該各パケットをデコーダへ投入することができない。これにより、ストリーム処理装置20は、上記ストリームに含まれる番組の情報を適切に再生することができなくなる。
Therefore, even if the
このため、局側装置10は、各TSパケットをデコーダへ投入すべき相対デコードタイミングを示す時刻情報を、27MHzの局側装置10におけるTTSクロックに基づいて生成する。そして、局側装置10は、上記TSパケットに、生成した時刻情報をTTSタイムスタンプとして含むTTSヘッダを付加することによりTTSパケットを作成し、作成したTTSパケットをネットワーク11経由で送信する。以下、局側装置10におけるTTSクロックを局側TTSクロックと称する。
For this reason, the
ストリーム処理装置20は、自己における基準クロックを局側TTSクロックに同期させることができれば、受信したTTSパケットにおけるTTSタイムスタンプに基づいて、相対デコードタイミングでパケットをデコーダへ投入することができる。
If the
[ストリーム処理装置の構成]
図3は、本発明の実施の形態に係るストリーム処理装置の構成を示す図である。
図3を参照して、ストリーム処理装置20は、タイムスタンプ取得部21と、TTSゲート部22と、仮想バッファ演算部(クロック調整部)23と、TTSカウンタ部(カウンタ)24と、TTSクロック調整部(クロック調整部)25と、TTSクロック生成部26と、デマックス部27と、PCR回復部28と、ビデオESバッファ29と、ビデオデコーダ部(ペイロード処理部)30と、オーディオESバッファ31と、オーディオデコーダ部(ペイロード処理部)32とを備える。
[Configuration of stream processing device]
FIG. 3 is a diagram showing the configuration of the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 3, the
タイムスタンプ取得部21は、ストリーム処理装置20が受信したストリームに含まれるTTSパケットのTTSヘッダからTTSタイムスタンプを取得し、取得したTTSタイムスタンプを仮想バッファ演算部23へ出力する。そして、タイムスタンプ取得部21は、TTSタイムスタンプを取得済のTTSパケットを、TTSゲート部22へ出力する。
The time
TTSゲート部22は、タイムスタンプ取得部21からTTSパケットを受けると、受けたTTSパケットのTTSタイムスタンプおよびTTSカウンタ部24におけるカウント値に基づいてゲート動作を行う。より詳細には、TTSゲート部22は、TTSパケットを受けると、TTSカウンタ部24からのカウント値を監視し、当該カウント値が当該TTSパケットのTTSタイムスタンプと一致すると、当該TTSパケットからTTSヘッダを削除することによりTSパケットを作成し、作成したTSパケットをデマックス部27へ出力する。
When receiving the TTS packet from the time
また、TTSゲート部22は、ストリームにおけるTTSパケットのTTSタイムスタンプ、および後述するPCRパケットのPCRが同期している場合、ゲート動作を行わない。ここでいう同期とは、TTSタイムスタンプおよびPCRが同一のクロックにより生成されるカウント値であることを意味する。
Further, the
たとえば、TTSゲート部22は、複数のPCRパケットからPCR、および上記PCRパケットのTTSタイムスタンプを取得する。そして、TTSゲート部22は、取得した各パケットにおけるPCRおよびTTSタイムスタンプの差が一定である場合、TTSタイムスタンプおよびPCRが同期していると判断する。なお、ストリーム処理システム上同期していることが定まっていれば、すなわち局側装置10において同期していることが定まっていれば、特に判断の必要はない。
For example, the
TTSクロック生成部26は、ストリーム処理装置20における基準クロックであるTTSクロックを生成する。TTSクロック生成部26によって生成されたTTSクロックは、TTSカウンタ部24または図示しないPCRカウンタに用いる27MHzの基準クロックとして用いられる。具体的には、TTSクロック生成部26は、VCXO(Voltage Controlled Xtal Oscillator)を含み、たとえば水晶などの結晶を用いた発振器である。VCXOへ出力する電圧を調整することにより、VCXOの共鳴周波数が変化する。
The TTS
TTSクロック生成部26は、たとえばVCXOにより生成したクロックをTTSカウンタ部24へ出力する。また、TTSクロック調整部25によりVCXOへ出力する電圧が調整され、これによりTTSクロック生成部26がTTSカウンタ部24へ出力するクロックの周波数が変化する。以下、ストリーム処理装置20におけるTTSクロックをローカルTTSクロックと称する場合がある。
The TTS
TTSカウンタ部24は、たとえばTTSクロック生成部26から受けたクロックに基づいて、TTSカウント値を更新する。そして、TTSカウンタ部24は、更新したカウント値をTTSゲート部22および仮想バッファ演算部23へ出力する。具体的には、TTSカウント値は、たとえばクロックを受けるごとにTTSカウント値をインクリメントする。従って、TTSカウンタ部24は、時間が経過するに従い、TTSクロックと同期してカウント値を増加させる。これにより、カウント値は、現在時刻として利用でき、当該カウント値の大小関係から時系列の前後関係を取得することができる。
The
仮想バッファ演算部23は、TTSカウンタ部24から取得したTTSカウント値およびタイムスタンプ取得部21から受けたTTSタイムスタンプに基づいて、仮想的なバッファの評価値として仮想バッファ滞留時間および仮想バッファ蓄積量を計算する。そして、仮想バッファ演算部23は、計算した仮想バッファ滞留時間および仮想バッファ蓄積量に応じて、ローカルTTSクロックの周波数が、局側TTSクロックと比べて高い、低いまたは適切かどうかを判断し、判断した結果をTTSクロック調整部25へ通知する。
Based on the TTS count value acquired from the
より詳細には、仮想バッファ演算部23は、仮想バッファ滞留時間を計算する際には、以下の動作を行う。すなわち、仮想バッファ演算部23は、ユーザによる番組選択またはエラー発生等の後、最初のTTSタイムスタンプをタイムスタンプ取得部21から受けると、TTSカウンタ部24におけるカウント値を、当該最初のTTSタイムスタンプで初期化する。そして、仮想バッファ演算部23は、タイムスタンプ取得部21からTTSタイムスタンプを受けると共に、TTSカウンタ部24から現在の時刻を示すTTSカウント値を取得する。上記TTSカウント値は、ストリーム処理装置20が上記TTSタイムスタンプに対応するTTSパケットを受信した時刻を示す。
More specifically, the virtual
そして、仮想バッファ演算部23は、上記TTSタイムスタンプおよび上記TTSカウント値の差を計算し、計算した差を仮想バッファにおける仮想滞留時間を示すΔtとする。仮想バッファ演算部23は、複数のTTSパケットに対してΔtを計算し、計算した複数のΔtに基づいてΔtの傾向を分析する。
Then, the virtual
この際、仮想バッファ演算部23は、たとえば計算した2つのΔtから、Δtの傾向を分析してもよい。また、仮想バッファ演算部23は、たとえば複数のΔtの移動平均を示すAvgΔtを計算し、計算したAvgΔtに基づいてAvgΔtの傾向を分析してもよい。
At this time, the virtual
仮想バッファ演算部23は、たとえばΔtまたはAvgΔtが増加傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて低いと判断する。仮想バッファ演算部23がこの際行う判断の詳細については、後述する。
For example, when Δt or AvgΔt tends to increase, the virtual
また、仮想バッファ演算部23は、たとえばΔtまたはAvgΔtが減少傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高いと判断する。また、仮想バッファ演算部23は、たとえばΔtまたはAvgΔtが一定である場合、ローカルTTSクロックの周波数および局側TTSクロックの周波数が同じであると判断する。
For example, when Δt or AvgΔt tends to decrease, the virtual
そして、仮想バッファ演算部23は、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて、高い、低いまたは同じのいずれかを示す上記判断結果をクロック調整部25へ通知する。
Then, the virtual
また、仮想バッファ演算部23は、仮想バッファ蓄積量を計算する際には、以下の動作を行う。すなわち、仮想バッファ演算部23は、タイムスタンプ取得部21からTTSタイムスタンプを受けると共に、仮想蓄積量であるSnに192を加える。192は、TTSパケットのバイト数を示す。
Further, the virtual
そして、仮想バッファ演算部23は、上記TTSタイムスタンプを、上記TTSタイムスタンプに対応するTTSパケットが仮想バッファを出る時刻とみなし、TTSカウンタ部24におけるTTSカウント値を監視することにより、TTSカウント値が上記時刻を示すタイミングにおいて以下の動作を行う。
Then, the virtual
すなわち、仮想バッファ演算部23は、TTSカウント値および上記TTSタイムスタンプが一致すると、仮想バッファにおける仮想蓄積量であるSnから192を減算する。仮想バッファ演算部23は、上記処理を、複数のTTSパケットについて行うことによりSnを計算する。言い換えれば、仮想バッファ演算部23は、TTSパケットのTTSタイムスタンプが、TTSカウント値以上であるTTSパケットを選択し、選択したTTSパケットの大きさの合計であるSnを算出する。
That is, when the TTS count value and the TTS time stamp coincide with each other, the virtual
仮想バッファ演算部23は、たとえばTTSカウンタ部24におけるTTSカウント値を監視し、当該TTSカウント値が所定の値を増加させる毎にSnを取得し、取得した複数のSnに基づいてSnの傾向を分析する。
The virtual
この際、仮想バッファ演算部23は、たとえば計算した2つのSnからSnの傾向を分析してもよい。また、仮想バッファ演算部23は、たとえば複数のSnの移動平均を示すAvgSnを計算し、計算したAvgSnに基づいてAvgSnの傾向を分析してもよい。
At this time, the virtual
仮想バッファ演算部23は、たとえばSnまたはAvgSnが増加傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて低いと判断する。仮想バッファ演算部23がこの際行う判断の詳細については、後述する。
For example, when Sn or AvgSn tends to increase, the virtual
また、仮想バッファ演算部23は、たとえばSnまたはAvgSnが減少傾向にある場合、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高いと判断する。また、仮想バッファ演算部23は、たとえばSnまたはAvgSnが一定である場合、ローカルTTSクロックの周波数および局側TTSクロックの周波数が同じであると判断する。
For example, when Sn or AvgSn tends to decrease, the virtual
そして、仮想バッファ演算部23は、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて、高い、低いまたは同じのいずれかを示す上記判断結果をクロック調整部25へ通知する。
Then, the virtual
TTSクロック調整部25は、仮想バッファ演算部23からの判断結果に基づいて、TTSクロック生成部26におけるTTSクロックの周波数を調整する。具体的には、TTSクロック調整部25は、TTSクロックの周波数が局側TTSクロックの周波数と比べて低いことを示す判断結果を仮想バッファ演算部23から受けると、TTSクロック生成部26におけるVCXOへ出力する電圧を調整することにより、TTSクロックの周波数を高くする。
The TTS
また、TTSクロック調整部25は、TTSクロックの周波数が局側TTSクロックの周波数と比べて高いことを示す判断結果を仮想バッファ演算部23から受けると、TTSクロック生成部26におけるVCXOへ出力する電圧を調整することにより、TTSクロックの周波数を低くする。
When the TTS
デマックス部27は、たとえばTTSゲート部22から受けたビデオTSパケット、オーディオTSパケットまたはPCRパケット等のTSパケットを、PIDで識別して分離する。より詳細には、デマックス部27は、TTSゲート部22からビデオTSパケットを受けると、受けたビデオTSパケットをTSヘッダおよびペイロードに分離し、分離したペイロードに含まれるビデオデータをビデオESバッファ29へ出力する。
The
また、デマックス部27は、TTSゲート部22からオーディオTSパケットを受けると、受けたオーディオTSパケットをTSヘッダおよびペイロードに分離し、分離したペイロードに含まれるオーディオデータをオーディオESバッファ31へ出力する。
In addition, when receiving the audio TS packet from the
また、デマックス部27は、TTSゲート部22からPCRパケットを受けると、受けたPCRパケットをTSヘッダおよびペイロードに分離し、分離したTSヘッダのアダプテーションフィールドに含まれるPCRを取得し、取得したPCRをPCR回復部28へ出力する。
Further, upon receiving the PCR packet from the
PCR回復部28は、デマックス部27からPCRを受けると、受けたPCRおよび図示しないストリーム処理装置20におけるPCRクロックに基づくPCRカウント値を比較する。以下、ストリーム処理装置20におけるPCRクロックをローカルPCRクロックと称する場合がある。
When receiving the PCR from the
PCRは、局側PCRクロックに基づいて付与されるカウント値であるので、PCR回復部28は、複数のPCRパケットにおいて、PCRおよびPCRカウント値の差が一定となるようにローカルPCRクロックの周波数を調整することにより、ローカルPCRクロックを局側PCRクロックに同期させる。
Since the PCR is a count value given based on the local side PCR clock, the
ビデオESバッファ29は、デマックス部27から受けたビデオデータを一時的に保持する。ビデオESバッファ29は、ビデオデコーダ部30の要求に応じて、保持するビデオデータをビデオデコーダ部30へ出力する。
The
ビデオデコーダ部30は、ビデオESバッファ29において保持されるビデオデータをデコード処理する。この際、ビデオデコーダ部30は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期している場合、TTSクロックを基準クロックとして用いる。また、ビデオデコーダ部30は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期していない場合、PCR回復部28により再生されたPCRクロックを基準クロックとして用いる。
The
より詳細には、ビデオデコーダ部30は、ビデオESバッファ29において保持される、TTSパケットのペイロードに含まれるビデオPES(Packetized Elementary Stream)のPESヘッダに含まれるDTS(Decoding Time Stamp)およびPTS(Presentation Time Stamp)を参照する。
More specifically, the
DTSは、当該ビデオPESに含まれる番組画像データをデコード処理するタイミングを指定する。PTSは、当該番組画像データをデコード処理して作成した番組画像を提示するタイミングを指定する。 The DTS specifies the timing for decoding the program image data included in the video PES. The PTS designates the timing for presenting a program image created by decoding the program image data.
そして、ビデオデコーダ部30は、DTSが基準クロックと一致すると、上記DTSに対応するPESに含まれるビデオデータをデコード処理することにより、番組画像を作成する。そして、ビデオデコーダ部30は、PTSが基準クロックと一致すると、上記PTSに対応するPESに含まれるビデオデータをデコード処理することにより作成した番組画像を、たとえば表示装置12へ出力する。
When the DTS coincides with the reference clock, the
オーディオESバッファ31は、デマックス部27から受けたオーディオデータを一時的に保持する。オーディオESバッファ31は、オーディオデコーダ部32の要求に応じて、保持するオーディオデータをオーディオデコーダ部32へ出力する。
The
オーディオデコーダ部32は、オーディオESバッファ31において保持されるオーディオデータをデコード処理する。この際、オーディオデコーダ部32は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期している場合、TTSクロックを基準クロックとして用いる。また、オーディオデコーダ部32は、受信するストリームにおいてTTSタイムスタンプおよびPCRが同期していない場合、PCR回復部28により再生されたPCRクロックを基準クロックとして用いる。
The
より詳細には、オーディオデコーダ部32は、オーディオESバッファ31において保持される、TTSパケットのペイロードに含まれるオーディオPESのPESヘッダに含まれるPTSを参照する。
More specifically, the
そして、オーディオデコーダ部32は、PTSが基準クロックと一致すると、上記PTSに対応するPESに含まれるオーディオデータをデコード処理することにより作成した音声情報を、たとえば表示装置12へ出力する。
When the PTS matches the reference clock, the
[ローカルTTSクロックおよび局側TTSクロックの同期関係]
ところで、特許文献1により示される第一の技術を実装したストリーム処理装置14は、受信したストリームのTTSパケットを、TTSゲート部へ出力する前にバッファに滞留させる。そして、TTSゲート部は、バッファに滞留するTTSパケットの中から、TTSカウント値と一致するTTSタイムスタンプを含むTTSパケットをデマックス部へ出力させる。
[Synchronization of local TTS clock and station TTS clock]
By the way, the stream processing apparatus 14 that implements the first technique disclosed in Patent Document 1 causes the TTS packet of the received stream to stay in the buffer before being output to the TTS gate unit. Then, the TTS gate unit outputs a TTS packet including a TTS time stamp that matches the TTS count value from the TTS packets staying in the buffer to the demax unit.
たとえば、バッファへ入力するTTSパケットの単位時間当たりのバイト数を示す入力レート、およびバッファからデマックス部へ出力するTTSパケットの単位時間当たりのバイト数を示す出力レートが同じであれば、バッファに滞留するTTSパケットのバイト数を示す実蓄積量は、変化しない。 For example, if the input rate indicating the number of bytes per unit time of the TTS packet input to the buffer and the output rate indicating the number of bytes per unit time of the TTS packet output from the buffer to the demux unit are the same, the buffer stays in the buffer. The actual accumulated amount indicating the number of bytes of the TTS packet to be changed does not change.
また、たとえば、入力レートが出力レートより大きいと、実蓄積量は、増加する。また、たとえば、入力レートが出力レートより小さいと、実蓄積量は、減少する。 Further, for example, when the input rate is higher than the output rate, the actual accumulation amount increases. For example, when the input rate is smaller than the output rate, the actual accumulation amount decreases.
入力レートは、局側装置における局側TTSクロックにより決定される。また、出力レートは、ストリーム処理装置14におけるローカルTTSクロックにより決定される。従って、ストリーム処理装置14は、実蓄積量を監視することにより、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高い、低いまたは適正であるかどうかを判断することができる。 The input rate is determined by the station TTS clock in the station apparatus. The output rate is determined by the local TTS clock in the stream processing device 14. Therefore, the stream processing apparatus 14 can determine whether the frequency of the local TTS clock is higher, lower, or appropriate than the frequency of the local TTS clock by monitoring the actual accumulation amount.
しかしながら、上記の動作では、ストリーム処理装置14が新しいストリームを受信する際に、バッファにある程度TTSパケットを滞留させないと、入力レートおよび出力レートの大小関係は判断できない。このため、最初のTTSパケットは、バッファへ入力された後、バッファにある程度ストリームが滞留するまでバッファから出力されない。従って、実蓄積量の評価は、バッファへ入力したTTSパケットがバッファから出力されるまでなされないので、遅延時間が発生してしまう。特に、入力レートが小さい場合、遅延時間が長くなってしまうという問題が発生する。また、たとえばストリーム処理装置14は、受信したパケットがバッファを出てくるまでは、当該パケットを次の処理へ移すことができない。 However, in the above operation, when the stream processing apparatus 14 receives a new stream, the magnitude relationship between the input rate and the output rate cannot be determined unless the TTS packet is retained in the buffer to some extent. For this reason, after the first TTS packet is input to the buffer, it is not output from the buffer until a stream stays in the buffer to some extent. Therefore, since the actual accumulated amount is not evaluated until the TTS packet input to the buffer is output from the buffer, a delay time occurs. In particular, when the input rate is small, there arises a problem that the delay time becomes long. For example, the stream processing device 14 cannot move the received packet to the next process until the received packet comes out of the buffer.
上記問題を解決するために、たとえば第二の技術を実装したストリーム処理装置15が考えられる。ストリーム受信装置15は、受信したストリームのTTSパケットをバッファへ入力するタイミングで、上記タイミングを示す入力時刻を取得する。そして、ストリーム処理装置15は、当該TTSパケットをバッファで滞留させた後、当該TTSパケットのTTSタイムスタンプがTTSカウント値と一致するタイミングで、上記タイミングを示す出力時刻を取得し、当該TTSパケットをデマックス部へ出力させる。ストリーム処理装置15は、出力時刻および入力時刻の差を計算することにより、当該TTSパケットがバッファに実際に滞留した時間を示す実滞留時間を取得する。 In order to solve the above-described problem, for example, a stream processing device 15 that implements the second technique is conceivable. The stream receiving device 15 acquires the input time indicating the above timing at the timing when the TTS packet of the received stream is input to the buffer. Then, after the stream processing device 15 retains the TTS packet in the buffer, the stream processing device 15 acquires an output time indicating the timing at a timing when the TTS timestamp of the TTS packet matches the TTS count value, Output to the demax section. The stream processing device 15 calculates the difference between the output time and the input time, thereby acquiring the actual residence time indicating the time that the TTS packet actually stayed in the buffer.
ストリーム処理装置15は、複数のTTSパケットにおける実滞留時間を取得し、取得した実滞留時間の傾向に基づいて、ストリーム処理装置15におけるローカルTTSクロックの周波数が局側装置における局側TTSクロックの周波数と比べて、高い、低いまたは適正であるかどうかを判断する。 The stream processing device 15 acquires the actual residence time in a plurality of TTS packets, and the frequency of the local TTS clock in the stream processing device 15 is the frequency of the station TTS clock in the station side device based on the acquired tendency of the actual residence time. To determine whether it is high, low or reasonable.
より詳細には、たとえば、ローカルTTSクロックが示す時刻をTとする。また、局側TTSクロックが示す時刻をtとする。Tおよびtの関係は、一般にはT=a×t+bと記述でき、aが1の場合、ローカルTTSクロックおよび局側TTSクロックが同期している。また、a>1の場合、ローカルTTSクロックの周波数は、局側TTSクロックの周波数より高い。また、a<1の場合、ローカルTTSクロックの周波数は、局側TTSクロックの周波数より低い。 More specifically, for example, let T be the time indicated by the local TTS clock. The time indicated by the station TTS clock is t. The relationship between T and t can be generally described as T = a × t + b. When a is 1, the local TTS clock and the station-side TTS clock are synchronized. When a> 1, the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock. When a <1, the frequency of the local TTS clock is lower than the frequency of the station side TTS clock.
たとえば、局側装置は、時刻(t1+L)を示すTTSタイムスタンプを付与したTTSパケットを時刻t1において、ストリーム処理装置15へ送信する。ストリーム処理装置15は、伝送時間を無視できるとして、時刻T1において当該TTSパケットをバッファへ入力する。時刻T1は、時刻(a×t1+b)に対応する。ストリーム処理装置15は、時刻(t1+L)において当該パケットをバッファからデマックス部へ出力させる。従って、実滞留時間を示すD1は、時刻(t1+L)および時刻(a×t1+b)の差である、((1−a)×t1+L−b)となる。 For example, the station side device transmits a TTS packet with a TTS time stamp indicating the time (t1 + L) to the stream processing device 15 at time t1. The stream processing device 15 inputs the TTS packet to the buffer at time T1, assuming that the transmission time can be ignored. Time T1 corresponds to time (a × t1 + b). The stream processing device 15 outputs the packet from the buffer to the demux unit at time (t1 + L). Therefore, D1 indicating the actual residence time is ((1−a) × t1 + L−b), which is the difference between the time (t1 + L) and the time (a × t1 + b).
また、たとえば、局側装置は、時刻(t2+L)を示すTTSタイムスタンプを付与したTTSパケットを、時刻t1より後の時刻t2において、ストリーム処理装置15へ送信する。ストリーム処理装置15は、伝送時間を無視できるとして、時刻T2において当該TTSパケットをバッファへ入力する。時刻T2は、時刻(a×t2+b)に対応する。ストリーム処理装置15は、時刻(t2+L)において当該パケットをバッファからデマックス部へ出力させる。従って、実滞留時間を示すD2は、時刻(t2+L)および時刻(a×t2+b)の差である、((1−a)×t2+L−b)となる。 Further, for example, the station side device transmits a TTS packet with a TTS time stamp indicating the time (t2 + L) to the stream processing device 15 at time t2 after time t1. Assuming that the transmission time can be ignored, the stream processing device 15 inputs the TTS packet to the buffer at time T2. Time T2 corresponds to time (a × t2 + b). The stream processing device 15 outputs the packet from the buffer to the demux unit at time (t2 + L). Therefore, D2 indicating the actual residence time is ((1−a) × t2 + L−b), which is the difference between the time (t2 + L) and the time (a × t2 + b).
また、実滞留時間の差を示すD2およびD1の差は、((1−a)×(t2−t1))となる。前提条件として、時刻t2は、時刻t1より後の時刻であるので、(t2−t1)は正である。たとえば、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より高い場合、すなわちa>1の場合、(1−a)が負となるので、実滞留時間の差は、負となる。これは、時刻t2が時刻t1より後になればなるほど、D2は、D1より小さくなることを示している。 Further, the difference between D2 and D1 indicating the difference in actual residence time is ((1-a) × (t2-t1)). As a precondition, since the time t2 is a time after the time t1, (t2-t1) is positive. For example, when the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock, that is, when a> 1, (1−a) is negative, so the difference in the actual residence time is negative. This indicates that D2 becomes smaller than D1 as time t2 comes after time t1.
すなわち、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より高い場合、局側装置が送信する時刻が遅いTTSパケットは、局側装置が送信する時刻が早いTTSパケットと比べて、バッファにおける実滞留時間が短くなる。従って、ストリーム処理装置15は、後に受信したTTSパケットの実滞留時間が、先に受信したTTSパケットの実滞留時間と比べて短い、すなわち実滞留時間が減少傾向にある場合に、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて高いと判断することができる。 That is, when the frequency of the local TTS clock is higher than the frequency of the station-side TTS clock, the TTS packet transmitted later by the station-side device is more effective than the TTS packet transmitted earlier by the station-side device. Residence time is shortened. Therefore, the stream processing apparatus 15 determines the local TTS clock when the actual residence time of the TTS packet received later is shorter than the actual residence time of the previously received TTS packet, that is, when the actual residence time tends to decrease. It can be determined that the frequency is higher than the frequency of the station-side TTS clock.
また、たとえば、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より低い場合、すなわちa<1の場合、(1−a)が正となるので、実滞留時間の差は、正となる。これは、時刻t2が時刻t1より後になればなるほど、D2は、D1より大きくなることを示している。 Further, for example, when the frequency of the local TTS clock is lower than the frequency of the station-side TTS clock, that is, when a <1, (1-a) is positive, so the difference in the actual residence time is positive. This indicates that D2 becomes larger than D1 as time t2 comes after time t1.
すなわち、ローカルTTSクロックの周波数が、局側TTSクロックの周波数より低い場合、局側装置が送信する時刻が遅いTTSパケットは、局側装置が送信する時刻が早いTTSパケットと比べて、バッファにおける実滞留時間が長くなる。従って、ストリーム処理装置15は、後に受信したTTSパケットの実滞留時間が、先に受信したTTSパケットの実滞留時間と比べて長い、すなわち実滞留時間が増加傾向にある場合に、ローカルTTSクロックの周波数が局側TTSクロックの周波数と比べて低いと判断することができる。 That is, when the frequency of the local TTS clock is lower than the frequency of the station-side TTS clock, TTS packets transmitted later by the station-side device are more effective in the buffer than TTS packets transmitted earlier by the station-side device. Residence time is increased. Therefore, the stream processing apparatus 15 determines that the local residence time of the local TTS clock when the actual residence time of the TTS packet received later is longer than the actual residence time of the previously received TTS packet, that is, when the actual residence time tends to increase. It can be determined that the frequency is lower than the frequency of the station-side TTS clock.
また、たとえば、ローカルTTSクロックの周波数が、局側TTSクロックの周波数と同じ場合、すなわちa=1の場合、(1−a)が0となるので、実滞留時間の差は、0となる。これは、実滞留時間の差が、時刻t1または時刻t2によらないことを示している。 Further, for example, when the frequency of the local TTS clock is the same as the frequency of the station-side TTS clock, that is, when a = 1, (1−a) is 0, so the difference in the actual residence time is 0. This indicates that the difference in the actual residence time does not depend on the time t1 or the time t2.
すなわち、ローカルTTSクロックの周波数が、局側TTSクロックの周波数と同じ場合、TTSパケットのバッファにおける実滞留時間は変化しない。従って、ストリーム処理装置15は、実滞留時間が変化しない場合に、ローカルTTSクロックおよび局側TTSクロックが同期していると判断することができる。 That is, when the frequency of the local TTS clock is the same as the frequency of the station-side TTS clock, the actual residence time in the TTS packet buffer does not change. Therefore, the stream processing device 15 can determine that the local TTS clock and the station-side TTS clock are synchronized when the actual residence time does not change.
ストリーム処理装置15は、実滞留時間を取得することにより、バッファへ入力するTTSパケットの単位時間当たりのバイト数に応じて遅延時間が変化するという問題を、解決することができる。 By obtaining the actual residence time, the stream processing device 15 can solve the problem that the delay time changes according to the number of bytes per unit time of the TTS packet input to the buffer.
しかしながら、上記の動作によっても、受信したストリームのTTSパケットは、バッファへ入力してから、当該TTSパケットのTTSタイムスタンプがTTSカウント値と一致するタイミングまでバッファに滞留する。従って、バッファへ入力したTTSパケットが、バッファから出力されるまでの遅延時間が発生してしまうという問題が残ってしまう。また、たとえばストリーム処理装置15は、受信したパケットがバッファを出てくるまでは、当該パケットを次の処理へ移すことができない。本発明の実施の形態におけるストリーム処理装置20では、以下の動作により上記問題を解決する。
However, even with the above-described operation, the TTS packet of the received stream remains in the buffer until the TTS time stamp of the TTS packet matches the TTS count value after being input to the buffer. Therefore, there remains a problem that a delay time until the TTS packet input to the buffer is output from the buffer is generated. Further, for example, the stream processing device 15 cannot move the packet to the next processing until the received packet comes out of the buffer. The
[滞留時間に基づくTTSクロックの再生処理動作]
ストリーム処理装置10は、以下に示す各シーケンス図の各ステップを図示しないメモリから読み出して実行する。このプログラムは、外部からインストールすることができる。このインストールされるプログラムは、たとえば記録媒体に格納された状態で流通する。
[Regeneration processing operation of TTS clock based on residence time]
The
図4は、本発明の実施の形態に係るストリーム処理装置において仮想バッファを用いて算出した平均仮想滞留時間に基づいてTTSクロックの再生処理を行う際の動作手順を定めたフローチャートである。
図4を参照して、まず、ストリーム処理装置20は、受信するストリームにおけるTTSパケットを受ける(ステップS102)。
FIG. 4 is a flowchart that defines an operation procedure when performing the reproduction process of the TTS clock based on the average virtual residence time calculated using the virtual buffer in the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 4, first,
次に、ストリーム処理装置20におけるタイムスタンプ取得部21は、たとえばi番目のTTSパケットを受けると、受けたTTSパケットにおけるTTSヘッダからTTSタイムスタンプを示すTS[i]を取得する(ステップS104)。
Next, when receiving the i-th TTS packet, for example, the time
次に、タイムスタンプ取得部21は、取得したTS[i]を仮想バッファ演算部23へ出力する。また、タイムスタンプ取得部21は、受けたTTSパケットをTTSゲート部22へ出力する。
Next, the time
次に、仮想バッファ演算部23は、たとえばユーザによる番組選択またはエラー発生等の後、最初のTTSタイムスタンプであるTS[0]を、タイムスタンプ取得部21から受けると(ステップS106でYES)、TTSカウンタ部24におけるTTSカウント値をTS[0]に初期化する(ステップS108)。
Next, when the virtual
次に、仮想バッファ演算部23は、タイムスタンプ取得部21からTS[i]を受けると、TS[i]を受けた時刻tiにおけるTTSカウント値に対応するSTC[i]をTTSカウンタ部24から取得する(ステップS110)。
Next, upon receiving TS [i] from the time
次に、仮想バッファ演算部23は、TS[i]とSTC[i]との差を示すΔt[i]を計算する(ステップS112)。
Next, the virtual
より詳細には、TS[i]は、時刻tiにおいてストリーム処理装置20により受信されたi番目のTTSパケットが、TTSゲート部22によりデマックス部27へ出力される時刻である。すなわち、TS[i]は、i番目のTTSパケットが仮想バッファを出る時刻とみなすことができる。
More specifically, TS [i] is the time at which the i-th TTS packet received by the
また、STC[i]は、i番目のTTSパケットがストリーム処理装置20により受信された時刻tiを示す。すなわち、STC[i]は、i番目のTTSパケットが仮想バッファへ入る時刻とみなすことができる。
STC [i] indicates a time ti when the i-th TTS packet is received by the
従って、Δt[i]は、i番目のTTSパケットが仮想バッファへ入ってから仮想バッファを出るまでの仮想滞留時間を示す。 Therefore, Δt [i] indicates the virtual residence time from when the i-th TTS packet enters the virtual buffer until it leaves the virtual buffer.
次に、仮想バッファ演算部23は、時刻tiの直近の、たとえばp個のΔtに基づいて移動平均を算出するようにユーザにより設定されている場合、Δt[i-p+1]からΔt[i]までのΔtに基づいて、i番目のTTSパケットの移動平均に対応する平均仮想滞留時間を示すAvgΔt[i]を計算する(ステップS114)。
Next, when the virtual
次に、仮想バッファ演算部23は、たとえばAvgΔt[i]、および時刻tiより前に計算したAvgΔt[i−1]から、AvgΔtの傾向を分析する(ステップS116)。
Next, the virtual
次に、仮想バッファ演算部23は、たとえばAvgΔt[i]がAvgΔt[i−1]より大きい場合、平均仮想滞留時間であるAvgΔtが増加傾向にあると判断し(ステップS118でYES)、平均仮想滞留時間が増加傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を上げる(ステップS120)。
Next, for example, when AvgΔt [i] is larger than AvgΔt [i−1], the virtual
また、仮想バッファ演算部23は、たとえばAvgΔt[i]がAvgΔt[i−1]より小さい場合、平均仮想滞留時間であるAvgΔtが増加傾向でなく(ステップS118でNO)、減少傾向にあると判断し(ステップS122でYES)、平均仮想滞留時間が減少傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を下げる(ステップS124)。
For example, when AvgΔt [i] is smaller than AvgΔt [i−1], the virtual
また、仮想バッファ演算部23は、たとえばAvgΔt[i]がAvgΔt[i−1]と同じである場合、平均仮想滞留時間であるAvgΔtが増加傾向でも減少傾向でもないと判断し(ステップS122でNO)、TTSクロック生成部26の周波数を調整するための通知をTTSクロック調整部25へ出力しない。
For example, when AvgΔt [i] is the same as AvgΔt [i−1], the virtual
以上の動作により、ストリーム処理装置20は、仮想バッファを用いて算出した平均仮想滞留時間に基づいてTTSクロックの再生処理を行う。
With the above operation, the
第二の技術では、TTSパケットがバッファを出るタイミングで実滞留時間を計算する。一方、仮想バッファ演算部23は、上記のステップS112において、i番目のTTSパケットが仮想バッファへ入る時刻を示す時刻tiにおいて、実滞留時間と等価な上記仮想滞留時間を算出することができる。
In the second technique, the actual residence time is calculated at the timing when the TTS packet leaves the buffer. On the other hand, the virtual
すなわち、仮想バッファ演算部23は、上記仮想滞留時間を算出するために、i番目のTTSパケットが仮想バッファから出る時刻であるTS[i]まで待つ必要がない。従って、ストリーム処理装置20は、i番目のTTSパケットが仮想バッファへ入る時刻を示す時刻tiにおいて算出した仮想滞留時間に基づいて、TTSクロックを再生することができる。また、ストリーム処理装置20は、受信したパケットを、バッファにおいて滞留させることなく次の処理へ移すことができる。
That is, the virtual
また、仮想バッファ演算部23は、上記のステップS114において移動平均を算出したが、これに限定するものではない。仮想バッファ演算部23は、未加工の仮想滞留時間に基づいて、仮想滞留時間の傾向を分析してもよい。
Moreover, although the virtual
たとえば、ストリーム処理装置20は、一定の時間間隔で規則正しく局側装置10から送信されたTTSパケットを、一定の時間間隔で規則正しく受信できる状況において、仮想バッファ演算部23は、Δt[i]がΔt[i−1]より大きい場合、仮想滞留時間が増加傾向にあると判断し、Δt[i]がΔt[i−1]より小さい場合、仮想滞留時間が減少傾向にあると判断することができる。また、仮想バッファ演算部23は、Δt[i]がΔt[i−1]と同程度である場合、仮想滞留時間が増加傾向でも減少傾向でもないと判断することができる。すなわち、ストリーム処理装置20は、Δtが所定値になるようにTTSクロック生成部26の周波数を調整することにより、ローカルTTSクロックを局側TTSクロックに同期させることができる。
For example, in a situation in which the
また、局側装置10がMPEG2−TSを再送信する際に、ヌルパケット等を削除することによりMPEG2−TTSを作成する場合、当該MPEG2−TTSは、図2の(B)に示すような時系列上不連続なTTSパケットを含んでしまう。また、TTSパケットの伝送時間は、TTSパケットにより異なるので、ストリーム処理装置20が各TTSパケットを受信する時間間隔は、一定でない。この際、仮想バッファ演算部23が、ステップS112において算出するΔtは、受信するTTSパケット毎にばらついてしまう。
When the
Δtのばらつきが大きくなると、TTSクロックの周波数の揺らぎが発生する。このTTSクロックの周波数の揺らぎが、さらに大きなΔtのばらつきを引き起こし、これによりTTSクロックの周波数の揺らぎが増幅される場合がある。 When the variation in Δt increases, the frequency of the TTS clock fluctuates. This fluctuation in the frequency of the TTS clock causes an even larger variation in Δt, which may amplify the fluctuation in the frequency of the TTS clock.
この場合においても、仮想バッファ演算部23は、上記のステップS114において、ばらついたΔtの移動平均を算出することにより、Δtを平滑化したAvgΔtを取得する。これにより、AvgΔtは、ローパスフィルタを通過したΔtとみなせるので、過剰なフィードバック処理に起因するTTSクロックの周波数の揺らぎを抑えることができる。
Even in this case, the virtual
従って、仮想バッファ演算部23は、ステップS116において、AvgΔtに基づいて滞留時間の傾向を判断する際に、ストリーム処理装置20がTTSパケットを受信する時刻が不規則な場合においても、適切な判断を行うことができる。
Therefore, when determining the tendency of the residence time based on AvgΔt in step S116, the virtual
また、上記のステップS102からステップS124までの動作は、ストリーム処理装置20が受信する全てのパケットについて行う必要はない。たとえば、ストリーム処理装置20は、所定のパケット数毎に上記動作を行ってもよい。
Further, the above operations from step S102 to step S124 need not be performed for all packets received by the
[仮想バッファにおける仮想蓄積量の算出処理動作]
図4に示すTTSクロックの再生処理において、仮想バッファを用いて算出した仮想滞留時間を用いたが、仮想バッファを用いて算出した仮想蓄積量によってTTSクロックの再生処理を行ってもよい。以下に、仮想バッファを用いて算出した平均仮想蓄積量に応じてTTSクロックの再生処理を行う際の動作手順を示す。
[Calculation processing operation of virtual accumulation amount in virtual buffer]
In the reproduction process of the TTS clock shown in FIG. 4, the virtual residence time calculated using the virtual buffer is used. However, the reproduction process of the TTS clock may be performed according to the virtual accumulation amount calculated using the virtual buffer. Hereinafter, an operation procedure when performing a reproduction process of the TTS clock according to the average virtual accumulation amount calculated using the virtual buffer will be described.
図5は、本発明の実施の形態に係るストリーム処理装置において仮想バッファにおける仮想蓄積量の算出処理を行う際の動作手順を定めたフローチャートである。
図5を参照して、まず、ストリーム処理装置20は、受信するストリームにおけるTTSパケットを受ける(ステップS202)。
FIG. 5 is a flowchart that defines an operation procedure when performing calculation processing of the virtual accumulation amount in the virtual buffer in the stream processing apparatus according to the embodiment of the present invention.
Referring to FIG. 5, first,
次に、ストリーム処理装置20におけるタイムスタンプ取得部21は、たとえばi番目のTTSパケットを受けると、受けたTTSパケットにおけるTTSヘッダからTTSタイムスタンプを示すTS[i]を取得する(ステップS204)。
Next, when receiving the i-th TTS packet, for example, the time
次に、タイムスタンプ取得部21は、取得したTS[i]を仮想バッファ演算部23へ出力する。また、タイムスタンプ取得部21は、受けたTTSパケットをTTSゲート部22へ出力する。
Next, the time
次に、仮想バッファ演算部23は、たとえばユーザによる番組選択またはエラー発生等の後、最初のTTSタイムスタンプであるTS[0]を、タイムスタンプ取得部21から受けると(ステップS206でYES)、TTSカウンタ部24におけるTTSカウント値をTS[0]に初期化する(ステップS208)。また、仮想バッファ演算部23は、仮想バッファにおける仮想蓄積量を示すSnに、初期値としてたとえば0を設定する。
Next, when the virtual
次に、仮想バッファ演算部23は、タイムスタンプ取得部21からTS[i]を受けると、仮想蓄積量であるSnにTTSパケットの大きさである192を加える(ステップS210)。
Next, upon receiving TS [i] from the time
次に、仮想バッファ演算部23は、i番目のTTSパケットが仮想バッファを出ていく時刻を示すTS[i]までTTSカウント値を監視し(ステップS212でNO)、TS[i]がTTSカウント値と一致すると(ステップS212でYES)、仮想蓄積量であるSnからTTSパケットの大きさである192を減じる(ステップS214)。
Next, the virtual
以上の動作により、ストリーム処理装置20は、仮想バッファにおける仮想蓄積量の算出処理を行う。
Through the above operation, the
第一の技術では、バッファにおいて、ストリームを所定レベルに達するまで蓄積させ、バッファに蓄積させたストリームのバイト数、すなわち蓄積量の変化を監視する。この際、ストリーム処理装置は、ストリームの蓄積量が所定レベルに達するまで、TTSクロックの再生処理を開始できない。また、ストリーム処理装置は、バッファにおけるストリームを次の処理へ移すことができないため、遅延時間が発生してしまう。 In the first technique, a stream is accumulated in a buffer until a predetermined level is reached, and the number of bytes of the stream accumulated in the buffer, that is, a change in the accumulation amount is monitored. At this time, the stream processing apparatus cannot start the reproduction process of the TTS clock until the accumulated amount of the stream reaches a predetermined level. Further, since the stream processing apparatus cannot move the stream in the buffer to the next processing, a delay time occurs.
一方、ストリーム処理装置20における仮想バッファ演算部23は、ステップS210で、TTSパケットが仮想バッファへ入る時刻において仮想蓄積量であるSnに192を加える。また、仮想バッファ演算部23は、ステップS212で、当該TTSパケットが仮想バッファを出る時刻において仮想蓄積量であるSnから192を減じる。すなわち、当該TTSパケットが、仮想バッファに入る時刻および仮想バッファを出る時刻の間だけ、当該TTSパケットの容量が、仮想バッファにおける仮想蓄積量であるSnに含められる。
On the other hand, the virtual
以上の動作により、i番目のTTSパケットが仮想バッファへ入る時刻を示す時刻tiにおける処理を行うだけで、当該TTSパケットを仮想バッファに蓄積させる処理を完了させることができる。 With the above operation, the processing for accumulating the TTS packet in the virtual buffer can be completed only by performing the processing at the time ti indicating the time when the i-th TTS packet enters the virtual buffer.
これにより、TTSパケットが仮想バッファに入る時刻から仮想バッファを出る時刻まで、当該TTSパケットを仮想バッファに蓄積させることができる。 Thereby, the TTS packet can be accumulated in the virtual buffer from the time when the TTS packet enters the virtual buffer to the time when the virtual buffer exits.
また、仮想バッファ演算部23は、上記仮想蓄積量を算出するために、仮想バッファにおいて所定レベルに達するまでストリームを蓄積する必要がない。従って、ストリーム処理装置20は、実際のバッファにストリームを蓄積することなく次の処理へ移すことができる。
In addition, the virtual
また、上記のステップS202からステップS214までの動作は、ストリーム処理装置20が受信する全てのパケットについて行う必要はない。たとえば、ストリーム処理装置20は、所定のパケット数毎に上記動作を行ってもよい。
Further, the operations from step S202 to step S214 need not be performed for all packets received by the
[蓄積量に基づくTTSクロックの再生処理動作]
図6は、本発明の実施の形態に係るストリーム処理装置において仮想バッファを用いて算出した平均仮想蓄積量に基づいてTTSクロックの再生処理を行う際の動作手順を定めたフローチャートである。
[Reproduction processing operation of TTS clock based on accumulated amount]
FIG. 6 is a flowchart that defines an operation procedure when performing the reproduction process of the TTS clock based on the average virtual accumulation amount calculated using the virtual buffer in the stream processing apparatus according to the embodiment of the present invention.
ストリーム処理装置20は、以下に示す、仮想バッファを用いて算出した平均仮想蓄積量に応じてTTSクロックの再生処理を行う際の動作と、図5に示すステップS210からステップS216までの仮想蓄積量を算出するための動作とを並行して行ってもよい。
The
図6を参照して、ストリーム処理装置20は、局側装置10から最初のTTSパケットを受けることにより動作を開始する(ステップS308)。
Referring to FIG. 6, the
次に、仮想バッファ演算部23は、たとえば仮想蓄積量であるSnを評価する時間間隔がユーザにより設定されている場合、TTSカウンタ部24におけるTTSカウント値を監視し(ステップS310でNO)、当該TTSカウント値において上記時間間隔に対応する所定時間分のTTSカウント値が増加すると(ステップS310でYES)、所定時間が経過した時刻tjにおける仮想蓄積量であるSn[j]を取得する(ステップS312)。
Next, for example, when the time interval for evaluating the virtual accumulation amount Sn is set by the user, the virtual
次に、仮想バッファ演算部23は、時刻tjの直近の、たとえばr個のSnに基づいて移動平均を算出するようにユーザにより設定されている場合、Sn[j-r+1]からSn[j]までのSnに基づいて、j番目のSnの移動平均に対応する平均仮想蓄積量であるAvgSn[j]を計算する(ステップS314)。
Next, when the virtual
次に、仮想バッファ演算部23は、たとえばAvgSn[j]、および時刻tjより前に計算したAvgSn[j−1]から、AvgSnの傾向を分析する(ステップS316)。
Next, the virtual
次に、仮想バッファ演算部23は、たとえばAvgSn[i]がAvgSn[i−1]より大きい場合、平均仮想蓄積量であるAvgSnが増加傾向にあると判断し(ステップS318でYES)、平均仮想蓄積量が増加傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を上げる(ステップS320)。
Next, for example, when AvgSn [i] is larger than AvgSn [i−1], the virtual
また、仮想バッファ演算部23は、たとえばAvgSn[i]がAvgSn[i−1]より小さい場合、平均仮想蓄積量であるAvgSnが増加傾向でなく(ステップS318でNO)、減少傾向にあると判断し(ステップS322でYES)、平均仮想蓄積量が減少傾向にあることをTTSクロック調整部25へ通知する。TTSクロック調整部25は、上記通知に応じてTTSクロック生成部26の周波数を下げる(ステップS324)。
For example, when AvgSn [i] is smaller than AvgSn [i−1], the virtual
また、仮想バッファ演算部23は、たとえばAvgSn[i]がAvgSn[i−1]と同じである場合、平均仮想蓄積量であるAvgSnが増加傾向でも減少傾向でもないと判断し(ステップS322でNO)、TTSクロック生成部26の周波数を調整するための通知をTTSクロック調整部25へ出力しない。
Further, for example, when AvgSn [i] is the same as AvgSn [i−1], the virtual
以上の動作により、ストリーム処理装置20は、仮想バッファを用いて算出した平均仮想蓄積量に基づいてTTSクロックの再生処理を行う。
Through the above operation, the
次に、仮想バッファ演算部23は、ストリームを受信している間は(ステップS326でNO)、ステップS310に戻り所定時間ごとにSnを取得する。また、仮想バッファ演算部23は、ストリームの受信が終了すると(ステップS326でYES)、上記動作を終了する。
Next, while receiving the stream (NO in step S326), the virtual
なお、仮想バッファ演算部23は、上記のステップS310においてユーザにより設定されている時間間隔で仮想蓄積量であるSnを評価するが、これに限定するものではない。仮想バッファ演算部23は、たとえばタイムスタンプ取得部21からTTSタイムスタンプを受けるタイミングに同期して、仮想蓄積量であるSnを評価してもよい。しかしながら、仮想蓄積量であるSnは、時間と共に変化するので、所定の時間間隔毎にSnを取得することが好ましい。これにより、サンプリングの偏りを防ぐことができる。
The virtual
また、仮想バッファ演算部23は、上記のステップS314において移動平均を算出したが、これに限定するものではなく、未加工の仮想蓄積量に基づいて、仮想蓄積量の傾向を分析してもよい。
In addition, the virtual
たとえば、ストリーム処理装置20は、一定の時間間隔で規則正しく局側装置10から送信されたTTSパケットを、一定の時間間隔で規則正しく受信できる状況において、仮想バッファ演算部23は、Sn[j]がSn[j−1]より大きい場合、仮想蓄積量が増加傾向にあると判断し、Sn[j]がSn[j−1]より小さい場合、仮想蓄積量が減少傾向にあると判断することができる。また、仮想バッファ演算部23は、Sn[j]がSn[j−1]と同程度である場合、仮想蓄積量が増加傾向でも減少傾向でもないと判断することができる。すなわち、ストリーム処理装置20は、Snが所定値になるようにTTSクロック生成部26の周波数を調整することにより、ローカルTTSクロックを局側TTSクロックに同期させることができる。
For example, in a situation where the
また、局側装置10がMPEG2−TSを再送信する際に、ヌルパケット等を削除することによりMPEG2−TTSを作成する場合、当該MPEG2−TTSは、図2の(B)に示すような時系列上不連続なTTSパケットを含んでしまう。また、TTSパケットの伝送時間は、TTSパケットにより異なるので、ストリーム処理装置20が各TTSパケットを受信する時間間隔は、一定でない。この際、仮想バッファ演算部23が、ステップS312において取得するSnは、取得するタイミングによって大きくばらついてしまう。
When the
Snのばらつきが大きくなると、TTSクロックの周波数の揺らぎが発生する。このTTSクロックの周波数の揺らぎが、さらに大きなSnのばらつきを引き起こし、これによりTTSクロックの周波数の揺らぎが増幅される場合がある。 When the variation in Sn increases, the frequency of the TTS clock fluctuates. This fluctuation in the frequency of the TTS clock causes a larger variation in Sn, which may amplify the fluctuation in the frequency of the TTS clock.
この場合においても、仮想バッファ演算部23は、上記のステップS314において、ばらついたSnの移動平均を算出することにより、Snを平滑化したAvgSnを取得する。これにより、AvgSnは、ローパスフィルタを通過したSnとみなせるので、過剰なフィードバック処理に起因するTTSクロックの周波数の揺らぎを抑えることができる。
Also in this case, the virtual
従って、仮想バッファ演算部23は、ステップS316において、AvgSnに基づいて仮想蓄積量の傾向を判断する際に、ストリーム処理装置20がTTSパケットを受信する時刻が不規則な場合においても、適切な判断を行うことができる。
Accordingly, when the virtual
[受信したTTSパケットの処理動作]
図7は、本発明の実施の形態に係るストリーム処理装置において受信したTTSパケットを処理する動作手順を定めたフローチャートである。
[Processing of received TTS packet]
FIG. 7 is a flowchart defining an operation procedure for processing a received TTS packet in the stream processing apparatus according to the embodiment of the present invention.
タイムスタンプ取得部21は、図4に示すステップS104、図5に示すステップS204および図6に示すステップS304において、i番目のTTSパケットからTTSタイムスタンプを取得後、上記TTSパケットをTTSゲート部22へ出力する。
The time
ストリーム処理装置20は、以下に示す、上記TTSパケットがTTSゲート部22へ出力されてから行われる動作と、図4に示すステップS110からステップS124までの動作、図5に示すステップS210からステップS216までの動作、または図6に示すステップS310からステップS324までの動作とを並行して行ってもよい。
The
図7を参照して、ストリーム処理装置20は、受信するストリームにおけるTTSパケットを受ける動作以降の動作(ステップS402〜ステップS408)は、図4に示すフローチャートにおける動作(ステップS102〜ステップS108)、および図5に示すフローチャートにおける動作(ステップS202〜ステップS208)と同様であるため、ここでは詳細な説明を繰り返さない。
Referring to FIG. 7, the
次に、TTSゲート部22は、i番目のTTSパケットをタイムスタンプ取得部21から受けると、受信するストリームにおける、TTSタイムスタンプおよびPCRが同期しているかどうか確認する(ステップS410)。
Next, when receiving the i-th TTS packet from the time
次に、TTSゲート部22は、受信するストリームにおける、TTSタイムスタンプおよびPCRが同期している場合(ステップS410でYES)、PCRクロックの代わりにTTSクロックを利用できるので、ゲート動作を行わない。すなわち、TTSゲート部22は、タイムスタンプ取得部21から受けたi番目のTTSパケットからTTSヘッダを外すことによりi番目のTSパケットを作成し、作成したi番目のTSパケットをデマックス部27へ出力する。
Next, when the TTS time stamp and the PCR in the received stream are synchronized (YES in step S410), the
次に、デマックス部27は、i番目のTSパケットをTTSゲート部22から受けると、受けたTSパケットをビデオTSパケット、オーディオTSパケットまたはPCRパケット等に多重分離し、多重分離したTSパケットをTSヘッダおよびペイロードに分離する(ステップS412)。
Next, upon receiving the i-th TS packet from the
次に、デマックス部27は、たとえばi番目のTSパケットがビデオTSパケットである場合、ビデオデータを含むペイロードをビデオESバッファへ出力する。また、デマックス部27は、たとえばi番目のTSパケットがオーディオTSパケットである場合、オーディオデータを含むペイロードをオーディオESバッファ31へ出力する。
Next, for example, when the i-th TS packet is a video TS packet, the
また、デマックス部27は、i番目のTSパケットがPCRを含むPCRパケットである場合、PCRクロックの代わりにTTSクロックを利用するので、アダプテーションフィールドに含まれるPCRをPCR回復部28へ出力しなくてもよい。
Further, when the i-th TS packet is a PCR packet including the PCR, the
次に、ビデオデコーダ部30は、TTSクロック生成部26における基準クロックのタイミングに従って、ビデオデータのデコード処理を行う(ステップS414)。次に、ビデオデコーダ部30は、デコード処理により作成した番組画像を例えば表示装置12へ出力する。
Next, the
また、オーディオデコーダ部30は、TTSクロック生成部26における基準クロックのタイミングに従って、オーディオデータのデコード処理を行う(ステップS416)。次に、オーディオデコーダ部30は、デコード処理により作成した音声情報をたとえば表示装置12へ出力する。
In addition, the
また、TTSゲート部22は、受信したストリームにおける、TTSタイムスタンプおよびPCRが同期していない場合(ステップS410でNO)、ローカルPCRクロックを再生するためにゲート動作を行う(ステップS418)。
In addition, when the TTS time stamp and the PCR in the received stream are not synchronized (NO in step S410), the
すなわち、TTSゲート部22は、TTSカウンタ部24から受けるTTSカウント値が、タイムスタンプ取得部21から受けたi番目のTTSパケットに対応するTS[i]と一致すると、TTSヘッダを外すことにより作成したi番目のTSパケットをデマックス部27へ出力する。
That is, when the TTS count value received from the
次に、デマックス部27は、i番目のTSパケットをTTSゲート部22から受けると、受けたTSパケットをビデオTSパケット、オーディオTSパケットまたはPCRパケット等に多重分離し、多重分離したTSパケットをTSヘッダおよびペイロードに分離する(ステップS420)。
Next, upon receiving the i-th TS packet from the
次に、デマックス部27は、たとえばi番目のTSパケットがビデオTSパケットである場合、ビデオデータを含むペイロードをビデオESバッファへ出力する。また、デマックス部27は、たとえばi番目のTSパケットがオーディオTSパケットである場合、オーディオデータを含むペイロードをオーディオESバッファへ出力する。
Next, for example, when the i-th TS packet is a video TS packet, the
また、デマックス部27は、i番目のTSパケットがPCRを含むPCRパケットである場合、アダプテーションフィールドからPCRを分析し、分析したPCRをPCR回復部28へ出力する。
Further, when the i-th TS packet is a PCR packet including PCR, the
次に、PCR回復部28は、PCRをデマックス部27から受けると、受けたPCRに基づいて、PCRクロックを再生する(ステップS422)。具体的には、PCR回復部28は、受けたPCRがローカルPCRクロックより進んでいる場合、ローカルPCRクロックの周波数を上げる。また、PCR回復部28は、受けたPCRがローカルPCRクロックより遅れている場合、ローカルPCRクロックの周波数を下げる。
Next, when receiving the PCR from the
これにより、ストリーム処理装置30は、局側PCRクロックと同期したローカルPCRクロックに合わせて、受信したストリームを処理することができる。
As a result, the
また、ビデオデコーダ部30は、ローカルPCRクロックのタイミングに従って、ビデオデータのデコード処理を行う(ステップS424)。次に、ビデオデコーダ部30は、デコード処理により作成した番組画像を例えば表示装置12へ出力する。
In addition, the
また、オーディオデコーダ部30は、ローカルPCRクロックのタイミングに従って、オーディオデータのデコード処理を行う(ステップS426)。次に、オーディオデコーダ部30は、デコード処理により作成した音声情報をたとえば表示装置12へ出力する。
Also, the
以上の動作により、ストリーム処理装置20は、ストリーム処理装置において受信したTTSパケットを処理する。
Through the above operation, the
なお、ビデオTSパケットまたはオーディオTSパケットのペイロードに含まれる情報は、ビデオESバッファ29またはオーディオESバッファ31において滞留する。このため、ビデオTSパケットおよびオーディオTSパケットは、どのタイミングでTTSゲート部22からデマックス部27へ出力しても構わない。
Information included in the payload of the video TS packet or the audio TS packet stays in the
一方、PCRパケットは、ローカルPCRクロックを局側PCRクロックに同期させるために用いられるので、所定のタイミングでPCR回復部28へ出力する必要がある。
On the other hand, since the PCR packet is used to synchronize the local PCR clock with the local PCR clock, it is necessary to output it to the
従って、TTSゲート部22は、ステップS418において、PCRパケットのみゲート動作を行い、PCRパケット以外のTSパケットについてはそのままデマックス部27へ出力してもよい。
Therefore, in step S418, the
また、TTSゲート部22は、ローカルPCRクロックを再生させるために、局側TTSクロックと同期したローカルTTSクロックによりゲート動作を行う。すなわち、TTSゲート部22は、局側TTSクロックと同期したローカルTTSクロックに基づいて、PCRパケットに含まれるTTSタイムスタンプに対応したタイミングで、上記PCRパケットをデマックス部27へ出力する。これにより、PCR回復部28は、上記PCRパケットを相対デコードタイミングで、デマックス部27経由でTTSゲート部22からPCRを受ける。
Further, the
このように、PCR回復部28が相対デコードタイミングで受けたPCRに基づいてローカルPCRクロックを再生することにより、ストリーム処理装置20は、ローカルPCRクロックを局側PCRクロックに同期させることができる。
In this way, by reproducing the local PCR clock based on the PCR received by the
また、局側TTSクロックおよび局側PCRクロックが同期している場合、図4または図6に示すローカルTTSクロックの再生処理により、ローカルTTSクロックを局側TTSクロックに同期させると、ローカルTTSクロックは、自動的に局側PCRクロックと同期する。従って、ストリーム処理装置20は、PCRを用いてローカルPCRクロックを局側PCRに同期させる必要はなく、ローカルPCRクロックの代わりにローカルTTSクロックを利用することができる。
If the station TTS clock and the station PCR clock are synchronized, the local TTS clock is synchronized with the station TTS clock by the local TTS clock regeneration process shown in FIG. 4 or FIG. Automatically synchronizes with the station side PCR clock. Therefore, the
これにより、ストリーム処理装置20は、受信するストリームにおいて、TTSタイムスタンプおよびPCRが同期している場合、デマックス部27以降の処理を行う際に、TTSクロックを基準クロックとして用いることができる。
As a result, when the TTS time stamp and the PCR are synchronized in the received stream, the
また、受信するストリームにおいて、TTSタイムスタンプおよびPCRが同期している場合、PCRクロックを再生する必要がないので、PCRパケットを相対デコードタイミングでPCR回復部28へ投入する必要がない。従って、TTSゲート部22は、ゲート動作を行う必要はなく、受信したストリームのTTSパケットは、滞留することなくタイムスタンプ取得部21からデマックス部27以降の処理へ移される。
Further, when the TTS time stamp and the PCR are synchronized in the received stream, it is not necessary to regenerate the PCR clock, so that it is not necessary to input the PCR packet to the
すなわち、ストリーム処理装置20は、受信したストリームのTTSパケットを、遅延時間なしでデマックス部27以降の処理へ移すことができる。
That is, the
ところで、基準クロックの周波数を調整するために、予め定めた規定範囲までパケットをバッファへ蓄積する必要がある。たとえば、受信されたパケットが順次バッファに蓄積されていき、パケットが予め定めた規定範囲まで蓄積された後に、最初に受信されたパケットは、バッファから取り出されて次の処理へ移される。従って、パケットが、バッファへ入ってからバッファを出るまでの滞留時間、すなわち遅延時間が発生することから、パケットを受信しても、遅延時間を経過するまで当該パケットの処理を行うことができない。 By the way, in order to adjust the frequency of the reference clock, it is necessary to store packets in a buffer up to a predetermined specified range. For example, the received packets are sequentially accumulated in the buffer, and after the packets are accumulated to a predetermined specified range, the first received packet is taken out from the buffer and moved to the next processing. Therefore, since a residence time from when the packet enters the buffer until it leaves the buffer, that is, a delay time occurs, even if the packet is received, the packet cannot be processed until the delay time elapses.
これに対して、本発明の実施の形態に係るストリーム処理装置では、TTSパケットはTTSヘッダ、TSヘッダおよびペイロードを含み、複数のTTSパケットの少なくとも一部のTSヘッダはPCRを含み、複数のTTSパケットの各々のTTSヘッダはTTSタイムスタンプを含み、ローカルTTSクロックを生成するためのTTSクロック生成部26と、ローカルTTSクロックに基づいてTTSカウント値を更新するためのTTSカウンタ部24と、TTSカウント値およびTTSタイムスタンプに基づいてTTSクロック生成部26を制御することにより、ローカルTTSクロックの周波数を調整するための仮想バッファ演算部23およびTTSクロック調整部25とを備える。
On the other hand, in the stream processing apparatus according to the embodiment of the present invention, the TTS packet includes a TTS header, a TS header, and a payload, at least a part of the TS headers of the plurality of TTS packets includes a PCR, and the plurality of TTSs Each TTS header of the packet includes a TTS time stamp, a TTS
このように、TTSカウント値およびTTSタイムスタンプ値は、ストリーム処理装置20がTTSパケットを受信した時刻から取得することができるので、TTSクロック生成部26を制御する処理およびデコードする処理を、当該時刻から開始することができ、かつTTSゲート部22におけるバッファが不要となり、映像のデコード処理もすぐに開始することができる。従って、ストリーム処理装置20がTTSパケットを受信した時刻から、当該TTSパケットをたとえばデコード処理するまでの遅延時間の増大を抑制することができる。
Thus, since the TTS count value and the TTS timestamp value can be obtained from the time when the
また、ローカルTTSクロックに基づいたTTSカウント値、およびVODサーバ等の局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値を利用することにより、ローカルTTSクロックを、局側装置10におけるTTSクロックに同期させることができる。
Further, by using the TTS count value based on the local TTS clock and the TTS time stamp value based on the TTS clock in the
このように、TTSカウント値が局側装置10におけるTTSクロックと同期するので、ストリーム処理装置20は、ローカルTTSクロックに基づいて処理を行うことにより、局側装置10におけるTTSクロックに基づいて作成されたストリームを、局側装置10におけるストリームの各パケットの処理タイミングと同様のタイミング関係で、ストリームの各パケットを処理することができる。
Thus, since the TTS count value is synchronized with the TTS clock in the station-
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプに基づいて、TTSパケット用の仮想的なバッファの評価値を算出し、算出した評価値に応じてTTSクロック生成部26を制御することにより、ローカルTTSクロックの周波数を調整する。
In the stream processing device according to the embodiment of the present invention, the virtual
このような構成により、実際にバッファを設けることなく、仮想的なバッファの評価値を算出することができるため、ローカルTTSクロックを適切に制御することができる。 With such a configuration, an evaluation value of a virtual buffer can be calculated without actually providing a buffer, so that the local TTS clock can be appropriately controlled.
そして、ストリーム処理装置20は、バッファを実装しないので、受信したTTSパケットを、バッファに滞留させることなく次の処理へ移すことができる。
Since the
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの差に基づいて、ローカルTTSクロックの周波数を調整する。
In the stream processing apparatus according to the embodiment of the present invention, the virtual
このように、TTSクロックに基づいたTTSカウント値、および局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値の差を計算することにより、ストリーム処理装置20における動作タイミング、および局側装置10における動作タイミングのずれの経時的な変化を分析することができるので、ローカルTTSクロックの調整を正確に行うことができる。
Thus, by calculating the difference between the TTS count value based on the TTS clock and the TTS timestamp value based on the TTS clock in the
また、上記差を算出するために必要なTTSカウント値およびTTSタイムスタンプ値は、TTSパケットを受信した時刻において取得するので、上記差を算出するための処理を、当該時刻から開始することができる。従って、ストリーム処理装置20は、上記TTSパケットを受信した時刻において、TTSクロックの周波数の調整に、上記差を反映させることができる。
Further, since the TTS count value and the TTS time stamp value necessary for calculating the difference are acquired at the time when the TTS packet is received, the process for calculating the difference can be started from the time. . Therefore, the
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの大小関係に基づいて1または複数のTTSパケットを選択し、選択したTTSパケットのデータ量の合計に基づいてローカルTTSクロックの周波数を調整する。
In the stream processing apparatus according to the embodiment of the present invention, the virtual
このような構成により、バッファにおけるTTSパケットの蓄積量を仮想的に求めることができるため、上記蓄積量を経時的に監視することにより、ストリーム処理装置20における動作タイミング、および局側装置10における動作タイミングのずれの経時的な変化を分析することができる。これにより、ローカルTTSクロックの調整を正確に行うことができる。
With such a configuration, it is possible to virtually determine the amount of TTS packets stored in the buffer. Therefore, by monitoring the amount of storage over time, the operation timing in the
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの差が所定値になるように、ローカルTTSクロックの周波数を調整する。
In the stream processing apparatus according to the embodiment of the present invention, the virtual
ローカルTTSクロックおよび局側装置10におけるTTSクロックが同期していると、ローカルTTSクロックに基づいたTTSカウント値、および局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値の差が一定になる。上記差が一定になるようにローカルTTSクロックの周波数を調整することにより、ローカルTTSクロックを局側装置10におけるTTSクロックに同期させることができる。
When the local TTS clock and the TTS clock in the
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、複数のTTSパケットの一部のTTSタイムスタンプとTTSカウント値との差に基づいて、ローカルTTSクロックの周波数を調整する。
Further, in the stream processing device according to the embodiment of the present invention, the virtual
このような構成により、ストリーム処理装置20が受信する全てのTTSパケットでなく、一部のTTSパケットからローカルTTSクロックに基づいたTTSカウント値、および局側装置10におけるTTSクロックに基づいたTTSタイムスタンプ値の差を計算するので、ストリーム処理装置20における計算の負担を軽減することができる。
With such a configuration, not all TTS packets received by the
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、選択したTTSパケットのデータ量の合計が所定値になるように、ローカルTTSクロックの周波数を調整する。
Further, in the stream processing apparatus according to the embodiment of the present invention, the virtual
このように、ストリーム処理装置20により受信されたTTSパケットにおいて、当該TTSパケットを受信したタイミングから、TTSカウント値がTTSタイムスタンプの示す値となるタイミングまでの間、当該TTSパケットのバイト数を合計に含める。ローカルTTSクロックおよび局側装置10におけるTTSクロックが同期していると、上記合計が一定になるので、上記合計が一定になるようにローカルTTSクロックの周波数を調整することにより、ローカルTTSクロックを局側装置10におけるTTSクロックに同期させることができる。
Thus, in the TTS packet received by the
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSカウント値およびTTSタイムスタンプの差を、仮想的なバッファにおけるTTSパケットの仮想滞留時間として算出し、算出した仮想滞留時間に基づいてローカルTTSクロックの周波数を調整する。
Further, in the stream processing apparatus according to the embodiment of the present invention, the virtual
このような構成により、仮想的なバッファの評価値として、仮想滞留時間を計算することができるため、ローカルTTSクロックの調整を正確に行うことができる。 With such a configuration, the virtual dwell time can be calculated as a virtual buffer evaluation value, so the local TTS clock can be accurately adjusted.
また、本発明の実施の形態に係るストリーム処理装置では、仮想バッファ演算部23およびTTSクロック調整部25は、TTSタイムスタンプがTTSカウント値以下となる1または複数のTTSパケットのデータ量の合計を、仮想的なバッファにおけるTTSパケットの仮想蓄積量として算出し、算出した仮想蓄積量に基づいてローカルTTSクロックの周波数を調整する。
In the stream processing apparatus according to the embodiment of the present invention, the virtual
このような構成により、仮想的なバッファの評価値として、仮想蓄積量を計算することができるため、ローカルTTSクロックの調整を正確に行うことができる。 With such a configuration, since the virtual accumulation amount can be calculated as the evaluation value of the virtual buffer, the local TTS clock can be adjusted accurately.
また、本発明の実施の形態に係るストリーム処理装置では、ストリーム処理装置20は、さらに、TTSパケットのペイロードに対してデコード処理を行うためのビデオデコーダ部30およびオーディオデコーダ部32を備え、ビデオデコーダ部30およびオーディオデコーダ部32は、PCRおよびTTSタイムスタンプが同期している場合には、ローカルTTSクロックのタイミングに従ってデコード処理を行う。
In the stream processing apparatus according to the embodiment of the present invention, the
このように、PCRおよびTTSタイムスタンプが同期していると、ストリーム処理装置20は、PCRクロックを再生させるための、受信したTTSパケットに対するゲート動作を行う必要がないので、速やかにTSSパケットにデコード処理を行うことができる。
As described above, when the PCR and TTS time stamps are synchronized, the
また、PCRクロックを再生させるための動作が不要になるので、ストリーム処理装置20における処理負担を軽減することができ、かつバッファ等を含むTTSゲート部22も不要となる。
In addition, since the operation for reproducing the PCR clock is unnecessary, the processing burden on the
なお、TTSカウンタ部24は、TTSクロック生成部26からクロックを受けるごとにTTSカウント値をインクリメントしたが、これに限定するものではない。TTSカウンタ部24は、たとえばTTSクロック生成部26からクロックを受けるごとにTTSカウント値をデクリメントしてもよい。従って、TTSカウンタ部24は、時間が経過するに従い、TTSクロックと同期してカウント値を減少させる。これによっても、カウント値は、現在時刻として利用でき、当該カウント値の大小関係から時系列の前後関係を取得することができる。
The
また、本発明の実施の形態に係るストリーム処理装置は、MPEG2−TS規格に従うストリームの処理を行なう構成であるとしたが、これに限定するものではない。他の規格に従うストリームの処理を行なう構成であってもよい。 Moreover, although the stream processing apparatus according to the embodiment of the present invention is configured to perform stream processing in accordance with the MPEG2-TS standard, the present invention is not limited to this. It may be configured to process a stream according to another standard.
上記実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記説明ではなく特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The above embodiment should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
10 局側装置
11 ネットワーク
12 表示装置
13 ストリーム処理システム
20 ストリーム処理装置
21 タイムスタンプ取得部
22 TTSゲート部
23 仮想バッファ演算部(クロック調整部)
24 TTSカウンタ部
25 TTSクロック調整部
26 TTSクロック生成部
27 デマックス部
28 PCR回復部
29 ビデオESバッファ
30 ビデオデコーダ部(ペイロード処理部)
31 オーディオESバッファ
32 オーディオデコーダ部(ペイロード処理部)
DESCRIPTION OF
24
31
Claims (14)
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するためのクロック生成部と、
前記基準クロックに基づいてカウント値を更新するためのカウンタと、
前記カウント値および前記時刻情報に基づいて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整するためのクロック調整部とを備え、
前記ストリーム処理装置は、さらに、
前記パケットのペイロードに対して所定の処理を行うためのペイロード処理部を備え、
前記ペイロード処理部は、前記クロック再生用情報および前記時刻情報が同期している場合には、前記基準クロックのタイミングに従って前記所定の処理を行う、ストリーム処理装置。 A stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
A clock generator for generating a reference clock;
A counter for updating the count value based on the reference clock;
By controlling the clock generator based on the count value and the time information, Bei example a clock adjusting portion for adjusting the frequency of the reference clock,
The stream processing device further includes:
A payload processing unit for performing predetermined processing on the payload of the packet;
The payload processing unit performs the predetermined processing according to the timing of the reference clock when the clock reproduction information and the time information are synchronized .
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するためのクロック生成部と、
前記基準クロックに基づいてカウント値を更新するためのカウンタと、
前記カウント値および前記時刻情報に基づいて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整するためのクロック調整部とを備え、
前記クロック調整部は、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記クロック生成部を制御することにより、前記基準クロックの周波数を調整する、ストリーム処理装置。 A stream processing apparatus for processing a stream obtained by dividing information of one or a plurality of programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
A clock generator for generating a reference clock;
A counter for updating the count value based on the reference clock;
By controlling the clock generator based on the count value and the time information, Bei example a clock adjusting portion for adjusting the frequency of the reference clock,
The clock adjustment unit calculates an evaluation value of the virtual buffer for the packet based on the count value and the time information, and controls the clock generation unit according to the calculated evaluation value, A stream processing apparatus for adjusting a frequency of the reference clock .
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップとを含み、
前記ストリーム処理方法は、さらに、
前記パケットのペイロードに対して所定の処理を行うステップを含み、
前記所定の処理を行うステップにおいては、前記クロック再生用情報および前記時刻情報が同期している場合には、前記基準クロックのタイミングに従って前記所定の処理を行う、ストリーム処理方法。 A stream processing method in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
Generating a reference clock; and
Updating the count value based on the reference clock;
Based on the count value and the time information, viewing including the step of adjusting the frequency of the reference clock,
The stream processing method further includes:
Performing predetermined processing on the payload of the packet,
In the step of performing the predetermined processing, when the clock reproduction information and the time information are synchronized, the predetermined processing is performed according to the timing of the reference clock .
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップとを含み、
前記周波数を調整するステップにおいては、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記基準クロックの周波数を調整する、ストリーム処理方法。 A stream processing method in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
Generating a reference clock; and
Updating the count value based on the reference clock;
Based on the count value and the time information, viewing including the step of adjusting the frequency of the reference clock,
In the step of adjusting the frequency, an evaluation value of the virtual buffer for the packet is calculated based on the count value and the time information, and the frequency of the reference clock is adjusted according to the calculated evaluation value to, stream processing method.
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
コンピュータに、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップと、
前記パケットのペイロードに対して所定の処理を行うステップとを実行させるためのプログラムであり、
前記所定の処理を行うステップにおいては、前記クロック再生用情報および前記時刻情報が同期している場合には、前記基準クロックのタイミングに従って前記所定の処理を行う、ストリーム処理プログラム。 A stream processing program used in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
On the computer,
Generating a reference clock; and
Updating the count value based on the reference clock;
Adjusting the frequency of the reference clock based on the count value and the time information ;
A program for executing a predetermined process on the payload of the packet,
A stream processing program that, in the step of performing the predetermined process, performs the predetermined process according to the timing of the reference clock when the clock reproduction information and the time information are synchronized .
前記パケットはヘッダおよびペイロードを含み、前記複数のパケットの少なくとも一部のヘッダはクロック再生用情報を含み、前記複数のパケットの各々のヘッダは時刻情報を含み、
コンピュータに、
基準クロックを生成するステップと、
前記基準クロックに基づいてカウント値を更新するステップと、
前記カウント値および前記時刻情報に基づいて、前記基準クロックの周波数を調整するステップとを実行させるためのプログラムであり、
前記周波数を調整するステップにおいては、前記カウント値および前記時刻情報に基づいて、前記パケット用の仮想的なバッファの評価値を算出し、算出した前記評価値に応じて前記基準クロックの周波数を調整する、ストリーム処理プログラム。 A stream processing program used in a stream processing apparatus for processing a stream obtained by dividing information of one or more programs into a plurality of packets,
The packet includes a header and a payload; at least some headers of the plurality of packets include clock recovery information; each header of the plurality of packets includes time information;
On the computer,
Generating a reference clock; and
Updating the count value based on the reference clock;
Adjusting the frequency of the reference clock based on the count value and the time information ,
In the step of adjusting the frequency, an evaluation value of the virtual buffer for the packet is calculated based on the count value and the time information, and the frequency of the reference clock is adjusted according to the calculated evaluation value A stream processing program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012069986A JP5958008B2 (en) | 2012-03-26 | 2012-03-26 | Stream processing apparatus, stream processing method, and stream processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012069986A JP5958008B2 (en) | 2012-03-26 | 2012-03-26 | Stream processing apparatus, stream processing method, and stream processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013201702A JP2013201702A (en) | 2013-10-03 |
JP5958008B2 true JP5958008B2 (en) | 2016-07-27 |
Family
ID=49521565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012069986A Active JP5958008B2 (en) | 2012-03-26 | 2012-03-26 | Stream processing apparatus, stream processing method, and stream processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5958008B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6252615B2 (en) * | 2016-03-25 | 2017-12-27 | 住友電気工業株式会社 | Clock reproduction apparatus, stream processing apparatus, clock reproduction method, and clock reproduction program |
JP7428009B2 (en) * | 2020-02-28 | 2024-02-06 | 住友電気工業株式会社 | Broadcast retransmission system, station side equipment, home side equipment, and broadcast retransmission method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0514399A (en) * | 1991-07-03 | 1993-01-22 | Oki Electric Ind Co Ltd | Picture packet communication system |
JP3837693B2 (en) * | 2000-10-24 | 2006-10-25 | 富士通株式会社 | Packet communication system |
JP2007104085A (en) * | 2005-09-30 | 2007-04-19 | Toshiba Corp | Digital broadcast method and apparatus employing communication line |
JP4886758B2 (en) * | 2008-11-13 | 2012-02-29 | 住友電気工業株式会社 | Clock circuit and video processing apparatus |
-
2012
- 2012-03-26 JP JP2012069986A patent/JP5958008B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013201702A (en) | 2013-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4361561B2 (en) | Data receiving apparatus and data receiving method | |
US9832507B2 (en) | System and method for synchronizing media output devices connected on a network | |
US11849166B2 (en) | Transmitting method, receiving method, transmitting device, and receiving device | |
US7778277B2 (en) | Timing recovery method and system thereof | |
US20120207215A1 (en) | Video information reproduction method and system, and video information content | |
JP2013192148A (en) | Reception device, clock restoration method, and program | |
US20240064359A1 (en) | Transmitting method, receiving method, transmitting device, and receiving device | |
JP5958008B2 (en) | Stream processing apparatus, stream processing method, and stream processing program | |
JP3906712B2 (en) | Data stream processing device | |
JP6822407B2 (en) | Receiver, data processing method, and program | |
JP2005151463A (en) | Device and method for receiving stream data | |
JP5149404B2 (en) | Video receiver | |
JP6259227B2 (en) | Clock reproduction control device and video signal receiving device | |
JP2010136159A (en) | Data receiver | |
JP4874272B2 (en) | Video signal processing apparatus and video signal processing method | |
JP2008067179A (en) | Receiver and coded data reproduction method | |
JP4212404B2 (en) | System clock control apparatus and system clock control method for stream receiver | |
JP6252615B2 (en) | Clock reproduction apparatus, stream processing apparatus, clock reproduction method, and clock reproduction program | |
WO2023108500A1 (en) | Data processing method and system, storage medium, and terminal device | |
JP2012016066A (en) | Video signal processor, and video signal processing method | |
JP2008211331A (en) | Stream data receiving and reproducing device | |
WO2012066832A1 (en) | Ip receiver device, ip transmitter device, and ts receiver device | |
JP2009060324A (en) | Time stamp addition device, time stamp addition method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141024 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150911 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151013 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151127 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20160408 |
|
TRDD | Decision of grant or rejection written | ||
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20160408 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20160524 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160606 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5958008 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |