JP6083964B2 - Transmission device, transmission method, and program - Google Patents
Transmission device, transmission method, and program Download PDFInfo
- Publication number
- JP6083964B2 JP6083964B2 JP2012147150A JP2012147150A JP6083964B2 JP 6083964 B2 JP6083964 B2 JP 6083964B2 JP 2012147150 A JP2012147150 A JP 2012147150A JP 2012147150 A JP2012147150 A JP 2012147150A JP 6083964 B2 JP6083964 B2 JP 6083964B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- packet
- frame
- transmission
- held
- 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
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明はデータを送信する送信装置、送信方法、及びプログラムに関する。 The present invention relates to a transmission device, a transmission method, and a program for transmitting data.
従来、データをネットワーク経由でリアルタイムに送信するための通信プロトコルとして、RTP(A Transport Protocol for Real−Time Applications,RFC3550,IETF)等が知られている。 Conventionally, RTP (A Transport Protocol for Real-Time Applications, RFC3550, IETF) is known as a communication protocol for transmitting data in real time via a network.
またデータを符号化する技術として、H.264/AVC(ISO/IEC 14496)やJPEG(ISO/IEC 10918)等が知られている。 In addition, as a technique for encoding data, H.264 is used. H.264 / AVC (ISO / IEC 14496) and JPEG (ISO / IEC 10918) are known.
データのリアルタイム送信においては、受信装置におけるリアルタイム性を確保するために、送信装置は遅延無く送信データを送信する必要がある。 In real-time data transmission, the transmission device needs to transmit transmission data without delay in order to ensure real-time performance in the reception device.
しかし、送信データ量が多かったり、ネットワークの帯域が不足していたりすると、データ送信装置の送信処理が滞ってしまう場合がある。送信装置が有する送信バッファに送信データをバッファリングする構成では、送信装置の送信処理が滞ると、送信バッファに送信データが滞留してしまう。送信バッファに送信データが滞留してしまうと、データ受信装置におけるデータ受信のリアルタイム性が確保できなくなってしまう可能性がある。 However, when the amount of transmission data is large or the bandwidth of the network is insufficient, the transmission processing of the data transmission device may be delayed. In the configuration in which the transmission data is buffered in the transmission buffer of the transmission device, the transmission data stays in the transmission buffer when the transmission processing of the transmission device is delayed. If transmission data stays in the transmission buffer, there is a possibility that the real-time property of data reception in the data reception device cannot be secured.
そこで、送信バッファに送信データが滞留してしまった場合にもリアルタイム性を確保してデータ送信を行うための方法として、送信バッファに滞留している送信データの送信を諦め、バッファ内送信データを破棄して送信しない方法が知られている。 Therefore, as a method to ensure real-time transmission even when transmission data stays in the transmission buffer, give up sending transmission data staying in the transmission buffer and change the transmission data in the buffer. A method of discarding and not transmitting is known.
例えば、送信バッファ内の映像データのうち、次に出力される画面内符号化された映像データまでの送信データを破棄して送信しない技術が知られている(例えば、特許文献1)。ここで、画面内符号化された映像データとは、他の映像フレームの映像データを参照せずに符号化された映像データであって、受信装置が他の映像フレームの映像データを参照せずに復号化することができる映像データである。 For example, a technique is known in which transmission data up to the next output video data that is output within the screen is discarded and not transmitted among the video data in the transmission buffer (for example, Patent Document 1). Here, the intra-coded video data is video data encoded without referring to video data of other video frames, and the receiving device does not refer to video data of other video frames. This is video data that can be decrypted.
送信バッファに送信データが滞留してしまうと、受信装置におけるデータ受信のリアルタイム性が確保できなくなってしまう可能性がある。If transmission data stays in the transmission buffer, there is a possibility that the real-time property of data reception in the receiving device cannot be secured.
上記課題を解決するための一手段として、本発明の送信装置は以下の構成を備える。 As a means for solving the above-described problems, the transmission apparatus of the present invention has the following configuration.
すなわち、映像に係るデータを保持するバッファ手段と、前記データを受信装置へ送信する送信手段と、他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されることに応じて、前記バッファ手段に保持されているデータのうちの少なくとも一部のデータを送信させずに、他のフレームを参照しないで復号されるフレームのデータを前記送信手段から前記受信装置へ送信させる送信制御を行う送信制御手段とを有し、前記送信制御手段は、他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されるときに、第1のフレームを構成する一部のデータが前記送信手段によって前記受信装置に送信済みで残りのデータが前記バッファ手段に保持されているときは、前記残りのデータは前記送信手段から前記受信装置へ送信させる。
また、上記課題を解決するための一手段として、本発明の他の送信装置は以下の構成を備える。
映像に係るデータを保持するバッファ手段と、前記データを受信装置へ送信する送信手段と、他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されることに応じて、前記バッファ手段に保持されているデータのうちの少なくとも一部のデータを送信させずに、他のフレームを参照しないで復号されるフレームのデータを前記送信手段から前記受信装置へ送信させる送信制御を行う送信制御手段とを有し、前記送信制御手段は、前記バッファ手段に保持されているデータのデータ量が第1の閾値より大きく第2の閾値以下である場合において前記送信手段から前記受信装置へ送信しないように制御するデータのデータ量よりも、前記バッファ手段に保持されているデータのデータ量が前記第2の閾値より大きい場合において前記送信手段から前記受信装置へ送信しないように制御するデータのデータ量が大きくなるように前記送信制御を行う。
That is, the buffer means for holding data according to the Film images, and transmitting means for pre-sending a Kide over data to the receiving device, the data of the frame to be decoded without reference to other frames the in response to being held in the buffer means, without transmitting at least a portion of the data of Lud over data held in it said buffer means, frame to be decoded without reference to another frame the beam data have a transmission control means for performing transmission control for transmitting from said transmitting means to said receiving apparatus, said transmission control means, the data is the buffer means of the frame to be decoded without reference to another frame When a part of data constituting the first frame is transmitted to the receiving device by the transmitting unit and the remaining data is stored in the buffer unit when held, the remaining data Is transmitted from the transmitting means to the receiving device.
Further, as one means for solving the above problems, another transmission apparatus of the present invention has the following configuration.
Buffer means for holding data relating to video, transmission means for transmitting the data to a receiving device, and data of a frame to be decoded without referring to other frames being held in the buffer means, Transmission control is performed to transmit data of a frame to be decoded without referring to other frames without transmitting at least a part of the data held in the buffer means to the receiving device. Transmission control means, wherein the transmission control means sends data from the transmission means to the receiving device when the amount of data held in the buffer means is greater than a first threshold value and less than or equal to a second threshold value. The data amount of data held in the buffer means is larger than the second threshold value than the data amount of data to be controlled not to transmit. It performs the transmission control so that the data amount increases data to control not to transmit to the receiving apparatus from the transmitting unit in the case.
本発明によれば、受信装置に配信されるデータのリアルタイム性を高めることができる。 ADVANTAGE OF THE INVENTION According to this invention, the real time property of the data delivered to a receiver can be improved.
以下、添付の図面を参照して、本発明をその好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。 Hereinafter, the present invention will be described in detail based on preferred embodiments with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.
<実施例1>
本実施例では、カメラ等で撮像した映像のフレームデータを、受信装置にリアルタイムに送信する送信装置について説明する。ここで、フレームデータには、映像データ及びそれに付随するメタデータや音声データが含まれていてもよい。送信装置や受信装置はそれぞれ単一のコンピュータ装置で実現してもよいし、必要に応じた複数のコンピュータ装置に各機能を分散して実現するようにしてもよい。複数のコンピュータ装置で構成される場合は、互いに通信可能なようにLAN(Local Area Network)などで接続することとしてもよい。
<Example 1>
In this embodiment, a transmission device that transmits frame data of a video captured by a camera or the like to a reception device in real time will be described. Here, the frame data may include video data and accompanying metadata and audio data. Each of the transmission device and the reception device may be realized by a single computer device, or may be realized by distributing each function to a plurality of computer devices as necessary. When configured by a plurality of computer devices, they may be connected via a LAN (Local Area Network) or the like so that they can communicate with each other.
本実施例における送信装置の構成例を図1に示す。制御部101は、図1に示した送信装置の各構成の動作を制御する。制御部101は例えば、CPU(Central Processing Unit)等のプロセッサにより構成される。制御部101がプロセッサとして構成される場合、制御部101は記憶部102に記憶されたプログラムを読み出して実行することにより、図1に示した送信装置の各構成の動作を制御する。
A configuration example of the transmission apparatus in this embodiment is shown in FIG. The
記憶部102は、制御部101が実行するプログラム等を格納する。記憶部102は、例えば、ROM(Read Only Memory)等により構成される。
The
保持部103は、制御部101の主メモリ、ワークエリア等として機能する。保持部103は、例えば、RAM(Random Access Memory)等により構成される。また、保持部103は、受信装置に送信されていないデータを保持する送信バッファ(キュー)としての役割を有する。本実施例において保持部103は、FIFO(First−In First−Out)制御により、保持したパケットを出力する。すなわち、保持部103は、フレームデータを分割したパケットデータを保持する。
The
通信部104は、ネットワークを介して受信装置との情報の入出力を制御する。ネットワークとして例えば、インターネットや公衆無線、LAN等を用いることができる。ネットワークの通信規格や規模、有線、無線は問わない。
The
撮像部105は、被写体の撮像を行う。撮像部105は、レンズやCMOS(Complementary Metal Oxide Semiconductor)などの撮像素子などによって構成される。撮像素子はレンズによって結像された被写体の像を画像信号に変換する。
The
撮像制御部106は、撮像部105の撮影方向や画角を制御する。撮像制御部106は、例えば、撮像部105のパン・チルト・ズーム等の制御を行う。
The
画像処理部107は、撮像部105によって撮像され生成された画像信号に対し、画像処理を行う。例えば、画像処理部107は、撮像部105によって生成されるデータに対し、ホワイトバランス処理、ガンマ処理、ノイズ低減処理等の各種処理を行う。
The
符号化部108は、画像処理部107によって画像処理が施されたデータを所定の符号化方式に応じて変換する処理を行う。本実施例では、H.264/AVCで符号化する例について説明するが、符号化方式は特にこれに限られない。バス110は図1に示した各構成を接続し、各種データの転送経路となる。
The
生成部109は、符号化されたデータを複数に分割したデータセグメントを生成する。例えば、生成部109は、符号化部108によって符号化されたデータから送信プロトコルに応じたパケットを生成する。本実施例では、送信プロトコルとしてRTP(Real‐time Transport Protocol)を用いる場合について説明する。ただし送信プロトコルはこれに限られない。例えば、TCP/IP(Transmission Control Protocol/Internet Protocol)等を用いる構成としてもよい。
The
次に、制御部101の機能構成図について図2を用いて説明する。制御部101がプロセッサを内蔵する場合、図2の各ブロックに示す各機能は、当該プロセッサが記憶部102に記憶されたプログラムを実行することにより実現される。あるいは図2の各ブロックに示す各機能の一部又は全体は、個別のハードウェアにより実現されることとしてもよい。
Next, a functional configuration diagram of the
入力制御部201は、映像データや音声データ、メタデータ等のデータを符号化部108に入力する制御を行う。符号化制御部202は、符号化部108を制御して、入力されたデータを符号化させる。生成制御部203は、生成部109を制御して、符号化されたデータを送信プロトコルに応じてパケット化する。
The
送信制御部204は、生成されたパケットを通信部104から受信装置に送信させる。また送信制御部204は、管理部206の制御に応じて、保持部103に保持されたパケットデータを受信装置に送信する制御を行う。保持制御部205は、生成されたパケットのうち未送信のパケットを保持部103に保持させる制御を行う。
The
管理部206は、保持部103に保持したパケットの管理を行う。具体的には、未送信のパケットを、キューとしての保持部103にエンキュー(enqueue)したり、キューの先頭パケットをデキュー(dequeue)して通信部104に渡したりする。また、管理部206は、必要に応じて保持部103内のパケットを破棄して送信しないように制御する。
The
次に、本実施例にかかる送信装置の動作について、図3から図5を用いて説明する。制御部101がプロセッサを内蔵する形態では、図3から図5の処理フローは、図3から図5に示す手順を当該プロセッサに実行させるためのプログラムを示す。制御部101が内蔵するプロセッサはコンピュータであり、記憶部102から読み出したプログラムを実行する。
Next, the operation of the transmission apparatus according to the present embodiment will be described with reference to FIGS. In the form in which the
まず、生成部109により生成されたパケット(this)を通信部104に入力するまでの処理フローについて図3を用いて説明する。送信制御部204の制御により、通信部104にパケット(this)が入力される(S301)。通信部104にパケットが入力された場合(S301においてYesの場合)、管理部206は、保持部103にパケットがバッファリングされているか確認する(S302)。一方、通信部104にパケットの入力が無い場合(S301においてNoの場合)、処理を終了する。
First, a processing flow until the packet (this) generated by the
通信部104にパケット(this)が入力され、保持部103にパケットが保持されていない場合(S302においてNoの場合)、管理部206はパケットが受信装置へ送信されるか否かを判定する(S303)。判定方法は特に限定しない。
When the packet (this) is input to the
パケットが受信装置へ送信されない場合として、例えば、ネットワークが輻輳状態にある場合や、受信装置がパケットを受信することができない状態である場合等がある。 Examples of the case where the packet is not transmitted to the receiving device include a case where the network is in a congested state and a state where the receiving device cannot receive the packet.
送信装置と受信装置とが通信を行うために用いるプロトコルとしてRTPを用いる場合、ラウンドトリップタイムに基づいてネットワークが輻輳状態にあるか判定することができる。ここでラウンドトリップタイムとは、送信装置と受信装置の一方が他方に対してパケットを送信してから、他方の装置からその返答が返ってくるまでの時間のことをいう。ラウンドトリップタイムに基づいてネットワークが輻輳状態にあるか判定する方法として例えば、TFRC(TCP Friendly Rate Control)等の制御が知られている。このような判定の結果に応じて、ステップS303の判定を行うこととしてもよい。例えば、ネットワークが輻輳状態にあると判定された場合に、パケットが受信装置へ送信されないと判定することができる。 When RTP is used as a protocol used for communication between the transmission device and the reception device, it can be determined whether the network is in a congestion state based on the round trip time. Here, the round trip time refers to the time from when one of the transmission device and the reception device transmits a packet to the other until the response is returned from the other device. As a method for determining whether or not the network is congested based on the round trip time, for example, control such as TFRC (TCP Friendly Rate Control) is known. Depending on the result of such determination, the determination in step S303 may be performed. For example, when it is determined that the network is in a congestion state, it can be determined that the packet is not transmitted to the receiving device.
送信装置と受信装置とが通信を行うために用いるプロトコルとしてTCPを用いる場合、送信装置が送信した1又は複数のセグメント(送信単位あたりのデータ)に対する確認応答(Ack)を受信装置から受信したことに応じて、次のセグメントが送信される。従って、受信装置から確認応答が受信されない場合、送信装置からパケットが送信されない状態が生じることとなる。そこで、送信装置が送信したデータに対する所定の確認応答を受信装置から受信したかに応じて、ステップS303の判定を行うこととしてもよい。例えば、受信装置から所定の確認応答が受信されない場合に、パケットが受信装置へ送信されないと判定することができる。 When TCP is used as a protocol used for communication between the transmission device and the reception device, an acknowledgment (Ack) for one or more segments (data per transmission unit) transmitted from the transmission device is received from the reception device. In response, the next segment is transmitted. Therefore, when an acknowledgment is not received from the receiving device, a state in which no packet is transmitted from the transmitting device occurs. Therefore, the determination in step S303 may be performed according to whether a predetermined confirmation response for the data transmitted by the transmission device is received from the reception device. For example, when a predetermined confirmation response is not received from the receiving device, it can be determined that the packet is not transmitted to the receiving device.
また、TCPを用いる場合には、受信装置の受信バッファの大きさ(ウィンドウサイズ)を超えるデータ量のデータを一度に受信装置に送信することができない。従って、送信しようとするデータのサイズがウィンドウサイズを超える場合、ウィンドウサイズを超えるパケットデータは受信装置へ送信されない。そこで、送信装置が送信するデータサイズと、受信装置が受信可能なデータサイズとに応じて、ステップS303の判定を行うこととしてもよい。例えば、送信装置が送信するデータのサイズが、ウィンドウサイズを超える場合に、パケットが受信装置へ送信されないと判定することができる。 In addition, when TCP is used, data having a data amount exceeding the size of the reception buffer (window size) of the reception device cannot be transmitted to the reception device at a time. Therefore, when the size of data to be transmitted exceeds the window size, packet data exceeding the window size is not transmitted to the receiving device. Therefore, the determination in step S303 may be performed according to the data size transmitted by the transmission device and the data size receivable by the reception device. For example, when the size of data transmitted by the transmission device exceeds the window size, it can be determined that the packet is not transmitted to the reception device.
パケットが受信装置へ送信されると管理部206が判定した場合(S303においてYesの場合)、送信制御部204は通信部104を制御して、入力されたパケット(this)を受信装置に送信する処理を行う(S304)。
When the
一方、パケットが受信装置へ送信されないと管理部206が判定した場合(S303においてNoの場合)、管理部206はパケット(this)をキューとしての保持部103にエンキューする処理を行う(S305)。
On the other hand, when the
ステップS302の処理において、キューとしての保持部103にパケットが保持されている場合(S302においてNoの場合)、送信制御部204は、保持部103に保持されたパケットの送信処理を行う(S400)。すなわち、パケット(this)をキューとしての保持部103にエンキューしつつ、キュー内に既に保持されているパケットを先頭から順に受信装置に送信する処理を行う。
In the process of step S302, if the packet is held in the holding
ここで、ステップS400における送信処理について図4を用いて説明する。まず、管理部206は、パケット(this)が、保持部103に保持され、他のフレームを参照せずに符号化されるフレームを構成するパケットのうち先頭のパケットであるか否かを判定する(S401)。他のフレームを参照せずに符号化されるフレームとは、例えば、画面内予測符号化により符号化されたフレームでありH.264/AVC符号化におけるIDR(Instantaneous Decoder Refresh)フレームが該当する。また例えば、Iフレーム(Intra−coded Frame)が該当する。他のフレームを参照せずに符号化されるフレームを構成するパケットは、受信装置において、他のフレームのデータを参照せずに復号化することができる。本実施例では、ステップS401においてパケット(this)が、保持部103に保持されたパケットのうち先頭のIフレームであるか否か判定する例について説明する。
Here, the transmission process in step S400 will be described with reference to FIG. First, the
パケット(this)が、保持部103に保持され、他のフレームを参照せずに符号化されるフレームを構成するパケットのうち先頭のパケットである場合(S401でYesの場合)、図5を用いて後述するパケット破棄処理を行う(S500)。本実施例にかかるパケット破棄処理は、保持部103に保持された複数のパケットデータのうち一部のパケットデータを受信装置に送信しない制御を行う処理である。このようにして、管理部206は、フレーム内符号化されたフレームデータの先頭を構成するパケットデータを保持部103に保持する場合に、パケット破棄処理を行わせる。
When the packet (this) is held in the holding
パケット(this)が保持部103に保持されたパケットのうち先頭のIフレームではないと判定された場合(S401でNoの場合)、又は、ステップS500の処理を行った場合は、管理部206はステップS402の処理を行う。ステップS402において管理部206はパケット(this)をキューとしての保持部103にエンキューする。
When it is determined that the packet (this) is not the first I frame among the packets held in the holding unit 103 (No in S401), or when the process of step S500 is performed, the
次に管理部206は、パケット送信が行われるか否かを判定する。判定の方法は図3のステップS303の処理と同様であり、特に限定しない。
Next, the
パケット送信が行われると判定した場合(S403においてYesの場合)、管理部206は保持部103(キュー)から先頭のパケットを読み出し(デキュー)する(S404)。そして送信制御部204は読み出したパケットを受信装置へ送信する(S405)。
When it is determined that packet transmission is performed (Yes in S403), the
続いて管理部206は、パケットの読出しにより、キューとしての保持部103が空になったか判定する(S406)。キューにパケットが残っている場合(S406においてNoの場合)、管理部206はステップS403においてパケットの送信が行われないと判定するまで、ステップS403からステップS406の処理を繰り返す。一方、キューにパケットが残っていない場合(S406においてYesの場合)、管理部206はパケット送信処理を終了する。
Subsequently, the
ステップS403において、パケット送信が行われないと判定した場合、管理部206は、キューに保持されたデータの大きさ(蓄積データサイズ)と予め定めた閾値を比較する(S407)。
If it is determined in step S403 that packet transmission is not performed, the
蓄積データサイズが閾値を超えている場合(ステップS407においてYesの場合)図5を用いて後述するパケット破棄処理(S500)を行い、破棄処理後にキュー内パケット送信処理を終了する。このようにして、管理部206は、保持部103に保持されたパケットデータの大きさが所定の閾値を超える場合に、パケット破棄処理を行わせる。
When the accumulated data size exceeds the threshold value (Yes in step S407), a packet discard process (S500) described later with reference to FIG. 5 is performed, and the in-queue packet transmission process is terminated after the discard process. In this way, the
ステップS403において、蓄積データサイズと予め定めた閾値を比較する処理に替えて、1つのパケットデータがキューに保持されている時間(保持時間)と閾値とを比較することとしてもよい。保持時間が閾値を超える場合はパケット破棄処理(S500)を行い、保持時間が閾値以下である場合には、ステップS402の処理を行う。このようにして、管理部206は、1つのパケットデータが保持部103に保持された時間が所定の閾値を超えた場合に、パケット破棄処理を行わせることができる。
In step S403, instead of the process of comparing the accumulated data size with a predetermined threshold value, the time during which one packet data is held in the queue (holding time) may be compared with the threshold value. If the holding time exceeds the threshold value, the packet discarding process (S500) is performed. If the holding time is equal to or less than the threshold value, the process of step S402 is performed. In this way, the
次に、上述のS500におけるパケット破棄処理について図5を用いて説明する。管理部206は、まず、キュー内の先頭のパケットをパケット(next)として取得する(S501)。ここで、キュー内の先頭のパケットとは、キューに保持されているパケットのうち最初にデキューされるパケットである。
Next, the packet discarding process in S500 described above will be described with reference to FIG. First, the
次に、管理部206はパケット(next)が取得できたかどうかを判定する(S502)。先頭パケット(next)が取得できた場合、管理部206はパケット(next)がフレームの先頭パケットかどうかを判定する(S503)。ここで、フレームの先頭パケットとは、1枚のパケットを構成する複数のパケットのうち、最初にキューからデキューされるパケットである。
Next, the
パケット(next)がフレームの先頭パケットではない場合(S503においてNoの場合)、管理部206はキュー内のパケット(next)の次にデキューされるパケットを取得し、取得したパケットを新たなパケット(next)とする(S504)。そして、ステップS502の処理に戻る。
When the packet (next) is not the first packet of the frame (No in S503), the
パケット(next)が先頭パケットである場合(S503においてYesの場合)、管理部206はキュー内のパケット(next)を含む、パケット(next)以降の全パケットを破棄する(S505)。そして、管理部206はパケット破棄処理を終了する。
When the packet (next) is the head packet (Yes in S503), the
ステップS502において、キュー内でパケット(next)が取得できない場合(S502でYesの場合)、キューに保持されたパケットのデータサイズと所定の閾値とを比較する(S506)。ここで、パケット(next)が取得できない場合とは、キュー内の最後のパケットがパケット(next)となっている場合である。すなわち、キュー内のすべてのパケットについてステップS503の判定処理を行ったが、キュー内のいずれのパケットもフレームの先頭パケットではなかった場合である。ここで、キュー内の最後のパケットとは、キュー内のパケットのうち、最後にデキューされるパケットのことである。 In step S502, when the packet (next) cannot be acquired in the queue (Yes in S502), the data size of the packet held in the queue is compared with a predetermined threshold (S506). Here, the case where the packet (next) cannot be acquired is the case where the last packet in the queue is the packet (next). That is, the determination process of step S503 is performed for all the packets in the queue, but none of the packets in the queue is the first packet of the frame. Here, the last packet in the queue is a packet dequeued last among the packets in the queue.
キューに保持されたパケットのデータサイズが所定の閾値を超えている場合(ステップS506でYesの場合)、キュー内の全パケットを破棄し(S507)、キュー内パケット破棄処理を終了する。キューに保持されたパケットのデータサイズが閾値以下の場合(S506でNoの場合)は、そのままキパケット破棄処理を終了する。 If the data size of the packet held in the queue exceeds a predetermined threshold (Yes in step S506), all the packets in the queue are discarded (S507), and the in-queue packet discarding process is terminated. If the data size of the packet held in the queue is equal to or smaller than the threshold value (No in S506), the key packet discarding process is terminated as it is.
このようにして管理部206は、パケット破棄処理において、受信装置に送信した第1のパケットデータにより構成されるフレームデータを構成するパケットデータであって保持部103に保持されている第2のパケットデータを受信装置に送信させる。
In this way, in the packet discarding process, the
また、図4のステップS401において上述のパケット破棄処理を行うことにより、第1のフレームデータの先頭のパケットデータから、第2のフレームデータの先頭のパケットデータの前までのパケットデータを破棄することができる。すなわち、第1のフレームデータの先頭を構成する第3のパケットデータから、第2のフレームデータの先頭を構成する第4のパケットデータの前のパケットデータまでを受信装置に送信しないように制御できる。本実施例において、第4のパケットデータとは、ステップS401においてIフレームの先頭パケットであると判定されたパケット(this)である。 Also, by performing the above-described packet discarding process in step S401 in FIG. 4, the packet data from the first packet data of the first frame data to before the first packet data of the second frame data is discarded. Can do. In other words, it is possible to control so as not to transmit from the third packet data constituting the head of the first frame data to the packet data before the fourth packet data constituting the head of the second frame data. . In the present embodiment, the fourth packet data is a packet (this) determined to be the leading packet of the I frame in step S401.
図6(a)に示した例において、パケットデータ601から609は、それぞれH.264/AVCの符号化方式を用いて符号化された送信データを分割したパケットを示している。 In the example shown in FIG. 2 shows a packet obtained by dividing transmission data encoded using the H.264 / AVC encoding method.
キュー600に保持される各パケットの構成を図7に示す。パケットデータ700は、図6に示したパケットデータ601から609のそれぞれに対応する。パケットデータ700は、RTPパケット701およびエレメントヘッダ704を含む。
The configuration of each packet held in the
RTPパケット701はさらに、RTPペイロード702及びRTPヘッダ703を含む。RTPペイロード702は、H.264/AVCの符号化方式を用いて符号化された映像データを格納する。RTPヘッダ703は、RTPペイロード702に格納された映像データについてのマーカービットやシーケンスナンバー、タイムスタンプ等を格納する。
The
エレメントヘッダ704は、先頭フラグ705とIフレームフラグ706を含む。フレーム先頭フラグ705は、フレームの先頭パケットであるか否かを示すフラグである。Iフレームフラグ706は、Iフレームを構成するパケットであるか否かを示すフラグである。これらのフラグは、図4を用いて説明したパケット送信処理におけるS401の処理や、図5を用いて説明したパケット破棄処理におけるステップS503の処理において用いられる。エレメントヘッダ704は、パケットデータ700がデキューされ、通信部104に送られる際に破棄される。
The
キュー600にIフレームの先頭パケットであるパケットデータ609がエンキューされる場合の処理について、図6(a)を用いて説明する。ここで、図6(a)に示す例では、キュー600にはPフレーム(1)、Pフレーム(2)、Pフレーム(3)を構成するパケットが既にエンキューされているものとする。各Pフレーム(1)から(3)はそれぞれ1枚のフレームである。さらに、図6(a)に示す例では、Pフレーム(1)を構成する3枚のパケットデータ601、602、603のうちパケットデータ601がデキューされ、受信装置に送信済みであるものとする。
Processing when the
図6(a)の例において、パケットデータ609がエンキューされようとすると、キュー600内のパケットの有無が判定される(図3 S302)。キュー600にパケットが格納されていると判定されると(S302でNo)、図4を用いて説明したパケット送信処理を実行する(図3 S400)。
In the example of FIG. 6A, when the
パケット送信処理においては、図4を用いて説明したように、まずエンキューされようとするパケットデータ609がIフレームの先頭パケットであるか否か判定する(図4 S401)。図6(a)の例では、入力されたパケットがIフレームの先頭パケットであると判定され(S401でYes)、図5を用いて説明したパケット破棄処理(図4 S500)に移行する。本実施例におけるパケット破棄処理は、保持部103に保持された複数のパケットデータのうち一部のパケットデータを受信装置に送信しない制御を行う処理である。
In the packet transmission process, as described with reference to FIG. 4, it is first determined whether or not the
図5を用いて説明したパケット破棄処理では、キュー内の先頭パケットから順にパケットを取得し、フレームの先頭パケットを探す。図6(a)に示した例では、パケットデータ602はP(1)フレームの先頭フレームではないので、図5に示したステップS503においてNoに進み、次のパケットデータ603がフレームの先頭パケットであるか判断される。同様にして、パケットデータ603もP(1)フレームの先頭パケットではないので、次のパケットデータ604がフレームの先頭パケットであるか判断される。
In the packet discarding process described with reference to FIG. 5, packets are acquired in order from the first packet in the queue, and the first packet in the frame is searched. In the example shown in FIG. 6A, since the
パケットデータ604は図6(a)に示すようにP(2)フレームの先頭パケットである(図5 S503においてYes)。そこで、図5に示したステップS505の処理に進み、パケットデータ604以降のパケットを破棄してパケット破棄処理を終了する。
The
ここで、パケット破棄処理を行った場合、キュー600に残ったパケットのRTPヘッダ703のシーケンスナンバーを、パケットの破棄数分進めることとしてもよい。パケット破棄処理(図4 S500)を終了すると、パケットデータ609がエンキューされる(図4 S402)。
Here, when the packet discarding process is performed, the sequence number of the
パケットデータ609がエンキューされた状況を図6(b)に示す。図6(b)の例では、既にフレームの一部(パケットデータ601)を送信済みであるP(1)を構成するパケット(パケットデータ602及びパケットデータ603)は破棄されずキュー600に残る。従って、パケットデータ602及びパケットデータ603は受信装置に送信される。このようにして、パケット破棄処理を行う場合に、受信装置に送信した第1のパケットデータにより構成されるフレームデータを構成するパケットデータであって保持部103に保持されている第2のパケットデータを前記受信装置に送信する制御を行う。
FIG. 6B shows a situation where the
本実施例に示した送信装置によれば、フレームの一部を送信済みである場合には当該フレームを構成するパケットを破棄せず、受信装置に送信することができる。従って、フレームを構成する一部のパケットが送信されず、受信装置に送信されたフレームの映像が乱れてしまうことを防ぐことができる。 According to the transmission apparatus shown in the present embodiment, when a part of a frame has been transmitted, the packet constituting the frame can be transmitted to the reception apparatus without being discarded. Therefore, it is possible to prevent a part of the packets constituting the frame from being transmitted and disturbing the video of the frame transmitted to the receiving apparatus.
また、本実施例に示した送信装置によれば、他のフレームを参照せずに復号化することができるフレーム(例えば、Iフレーム)の先頭パケットがエンキューされる場合に、キュー内のパケットの一部又は全部を破棄する(送信しないようにする)制御を行う。
図6の例では、第1のフレームデータP(2)の先頭のパケットデータ604から、第2のフレームデータの先頭のパケットデータ609の前までのパケットデータを破棄することができる。このようにして、新しくエンキューされたパケットデータを速やかに受信装置に送信することができる。従って、受信装置に配信されるデータのリアルタイム性を高めることができる。
Further, according to the transmission apparatus shown in the present embodiment, when the first packet of a frame (for example, I frame) that can be decoded without referring to another frame is enqueued, the packet in the queue A part or all of the data is discarded (not transmitted).
In the example of FIG. 6, packet data from the
本実施例では、既に一部のデータ送信したフレームを構成するパケット(602、603)に続いて、他のフレームを参照せずに復号化することができるフレームの先頭パケット(609)を送信する。従って、破棄処理に伴って、受信装置が復号することができないパケットデータが受信装置に送信されることを防ぐことができる。ここで、破棄処理に伴って、受信装置が復号することができないパケットデータが送信されてしまう場合とは、例えば、受信装置に送信されたパケットデータを復号化する際に参照するパケットデータがパケット破棄処理によって破棄されてしまう場合等がある。 In this embodiment, following the packets (602, 603) constituting a frame in which some data has already been transmitted, the first packet (609) of a frame that can be decoded without referring to other frames is transmitted. . Therefore, it is possible to prevent packet data that cannot be decoded by the receiving apparatus from being transmitted to the receiving apparatus along with the discarding process. Here, when packet data that cannot be decoded by the receiving device is transmitted along with the discarding process, for example, packet data that is referred to when decoding packet data transmitted to the receiving device is a packet In some cases, it is discarded by the discarding process.
本実施例では、Iフレームの先頭パケットがエンキューされる場合、及び、キューの蓄積データサイズが閾値を超えている場合にパケット破棄処理を行う場合について説明したが、これに限られない。Iフレームの先頭パケットがエンキューされる場合、又は、キューの蓄積データサイズが閾値を超えている場合のどちらかの場合にパケット破棄処理を行うこととしてもよい。また、上述の場合に限られず、所定のタイミングでパケット破棄処理を行うこととしてもよい。 In this embodiment, the case where the first packet of the I frame is enqueued and the case where the packet discarding process is performed when the accumulated data size of the queue exceeds the threshold has been described, but the present invention is not limited to this. The packet discarding process may be performed when either the first packet of the I frame is enqueued or when the accumulated data size of the queue exceeds the threshold value. The packet discarding process may be performed at a predetermined timing without being limited to the above case.
また本実施例では、パケット破棄処理において、キュー内の最初のフレームの先頭パケットを検出した場合、それ以降のパケットを破棄する例について図5を用いて説明したが、これに限られない。例えば、キューの先頭から任意のフレーム数後のフレームの先頭パケットを検出した場合、それ以降のパケットを破棄するようにしてもよい。 Further, in the present embodiment, in the packet discarding process, when the first packet of the first frame in the queue is detected, an example of discarding subsequent packets is described with reference to FIG. 5, but the present invention is not limited to this. For example, when the head packet of a frame after an arbitrary number of frames from the head of the queue is detected, the subsequent packets may be discarded.
<実施例2>
本実施例では、データの復号に際し他のフレームを参照する必要があるか否かの区別がないデータを送信する場合について説明する。例えばJPEG(Joint Photographic Experts Group)による符号化形式を用いて符号化されたデータを送信する場合が含まれる。あるいは、送信される全てのフレームが、他のフレームを参照せずに符号化されたフレーム(例えば、Iフレーム)である場合が含まれる。
<Example 2>
In this embodiment, a case will be described in which data is transmitted with no distinction as to whether or not other frames need to be referred to when data is decoded. For example, the case where the data encoded using the encoding format by JPEG (Joint Photographic Experts Group) is transmitted is included. Alternatively, the case where all the frames to be transmitted are frames (for example, I frames) encoded without referring to other frames is included.
本実施例にかかる送信装置の構成は、実施例1において図1及び図2を用いて説明した内容と同じであるため説明を省略する。 Since the configuration of the transmission apparatus according to the present embodiment is the same as that described with reference to FIGS. 1 and 2 in the first embodiment, the description thereof is omitted.
次に、本実施例における送信装置の動作について、図8及び図9を用いて説明する。制御部101がプロセッサを内蔵する形態では、図8及び図9の処理フローは、図8及び図9に示す手順を当該プロセッサに実行させるためのプログラムを示す。制御部101が内蔵するプロセッサはコンピュータであり、記憶部102から読み出したプログラムを実行する。
Next, the operation of the transmission apparatus in the present embodiment will be described with reference to FIGS. In the form in which the
まず、本実施例におけるパケット送信処理について図8を用いて説明する。はじめに、管理部206はパケット(this)をキューとしての保持部103にエンキューする(S801)。
First, packet transmission processing in the present embodiment will be described with reference to FIG. First, the
続いて、管理部206は、パケットが送信されるか否かの判定を行う(S802)。ステップS802の判定処理は、実施例1において図3を用いて説明したステップS303の処理と同様であるので説明を省略する。管理部206は、パケットが送信される場合(S802でYesの場合)、キューの先頭パケットをデキューする(S803)。
Subsequently, the
ステップS803において、キューの先頭パケットがデキューされると、管理部206はデキューしたパケットがフレームの先頭パケットかどうかを判定する(S804)。
In step S803, when the first packet in the queue is dequeued, the
デキューしたパケットがフレームの先頭パケットである場合(S804においてYesの場合)、管理部206はデキューしたパケットのキュー内における滞留時間と予め定めた閾値を比較する(S805)。
When the dequeued packet is the first packet of the frame (Yes in S804), the
ここで、パケットのキュー内滞留時間は、実施例1において図7を用いて説明したエレメントヘッダ704にエンキューされた時刻の情報を記録し、現在時刻とエンキューされた時刻との差から算出できる。ただし滞留時間の算出方法はこれに限られない。
Here, the packet retention time in the queue can be calculated from the difference between the current time and the enqueued time by recording the information of the enqueued time in the
デキューしたパケットのキュー内における滞留時間が閾値を超える場合(S805においてYesの場合)は、デキューしたパケットを破棄する(S808)。そして、デキューしたパケットの破棄後、パケット破棄処理を行ってパケット送信処理を終了する(S900)。ステップS900におけるパケット破棄処理は、保持部103に保持された複数のパケットデータのうち一部のパケットデータを受信装置に送信しない制御を行う処理である。本実施例におけるパケット破棄処理の詳細については図9を用いて後述する。
If the dequeuing time of the dequeued packet in the queue exceeds the threshold (Yes in S805), the dequeued packet is discarded (S808). Then, after discarding the dequeued packet, the packet discarding process is performed and the packet transmission process is terminated (S900). The packet discarding process in step S900 is a process for performing control so that a part of the packet data held in the holding
デキューしたパケットがフレームの先頭パケットでない場合(S804においてNoの場合)、又は、滞留時間が閾値以下である場合(S805においてNoの場合)、送信制御部204はデキューしたパケットを送信する制御を行う(S806)。パケット送信後、管理部206はキューが空かどうかを判定する(S807)。
If the dequeued packet is not the first packet of the frame (No in S804), or if the residence time is equal to or less than the threshold (No in S805), the
キューが空である場合(S807においてYesの場合)、管理部206はパケット送信処理を終了する。一方、キューにデータが保持されている場合(S807においてNoの場合)、管理部206はステップS802の処理に戻る。
When the queue is empty (Yes in S807), the
ステップS802においてパケットの送信が行われないと判定した場合、管理部206はキューに保持されたデータのサイズ(蓄積データサイズ)と予め定めた閾値を比較する(S809)。キュー内の蓄積データサイズが閾値を超える場合(S809においてYesの場合)、パケット破棄処理を行った後、パケット送信処理を終了する(S900)。一方、キュー内の蓄積データサイズが閾値以下の場合(S809においてNoの場合)、パケット送信処理を終了する。
If it is determined in step S802 that no packet is transmitted, the
本実施例における送信処理によれば、キューからフレームの先頭パケットがデキューされた場合であって、当該パケットのキュー内滞留時間が閾値以上である場合に、デキューしたパケットを破棄し、さらにキュー内のパケット破棄処理を行う。このような構成によれば、フレームの先頭パケットからパケットの破棄処理が開始される。すなわち、フレームの一部のデータを送信済である場合には、当該フレームを構成する他のデータを全て送信し終えてからパケットの破棄処理が開始される。このようにして、フレームの一部のデータが送信済みである場合には、当該フレームを構成するパケットを全て送信することができる。したがって、パケットの破棄処理によって、フレーム画像が乱れてしまうことを防ぐことができる。 According to the transmission processing in this embodiment, when the first packet of a frame is dequeued from the queue and the retention time in the queue is equal to or greater than the threshold, the dequeued packet is discarded, and further The packet discard process is performed. According to such a configuration, the packet discarding process is started from the top packet of the frame. That is, when a part of the data of the frame has been transmitted, the packet discarding process is started after all the other data constituting the frame has been transmitted. In this way, when a part of data of a frame has been transmitted, all the packets constituting the frame can be transmitted. Therefore, it is possible to prevent the frame image from being disturbed by the packet discarding process.
次に本実施例におけるパケット破棄処理(S900)について、図9を用いて説明する。はじめに管理部206は、キューが空であるか否かを判定する(S901)。キューが空の場合(S901においてYesの場合)、管理部206はパケット破棄処理を終了する。一方、キューに送信データが保持されている場合(S901においてNoの場合)、管理部206はキューの先頭パケットを取得する(S902)。
Next, the packet discarding process (S900) in the present embodiment will be described with reference to FIG. First, the
キューの先頭パケットを取得すると、管理部206は取得したパケットがフレームの先頭パケットかどうかを判定する(S903)。取得したパケットがフレームの先頭パケットでないと判定した場合(S903においてNoの場合)、パケットを破棄する(S906)。一方、取得したパケットが先頭パケットである場合(S903においてYesの場合)、管理部206はパケットのキュー内における滞留時間と予め定めた閾値とを比較する(S904)。ここで、パケットの滞留時間は、例えばステップS805において説明した方法により算出することができる。
When the leading packet of the queue is acquired, the
キュー内滞留時間が閾値を超える場合(S904においてYesの場合)、管理部206はパケットを破棄する(S906)。一方、パケットのキュー内における滞留時間が閾値以内である場合(S904においてNoの場合)、管理部206はキュー内の蓄積データサイズと予め定めた閾値とを比較する(S905)。
When the retention time in the queue exceeds the threshold (Yes in S904), the
キュー内蓄積データサイズが閾値を超える場合(S906においてYesの場合)、管理部206はパケットを破棄する(S906)。一方キュー内の蓄積データサイズが閾値以内である場合(S905においてNOの場合)、管理部206はパケット破棄処理を終了する。
When the stored data size in the queue exceeds the threshold (Yes in S906), the
ステップS906においてパケットを破棄した後、管理部206はステップS901の処理に戻る。そしてパケット破棄処理を継続する。
After discarding the packet in step S906, the
本実施例では、パケットのキュー内における滞留時間及びキューに保持されたデータサイズを判定する場合について説明したがこれに限られない。例えば、パケットのキュー内における滞留時間又はキューに保持されたデータサイズのいずれか一方のみ判定することとしてもよい。 In the present embodiment, the case where the staying time in the queue of the packet and the data size held in the queue are determined has been described, but the present invention is not limited to this. For example, it is possible to determine only one of the residence time in the queue of the packet or the data size held in the queue.
以上のようにして、キューの先頭にフレームの先頭パケットがある場合であって、キュー内の滞留時間及び蓄積データサイズが閾値以下となった場合にパケット破棄処理を終了する。すなわち、パケット破棄後、フレームの先頭パケットからパケット送信を開始する。すなわち、フレームを構成するデータの全体を受信装置に送信するようにすることができる。従って、フレームを構成する一部のデータのみが受信装置に送信されることを防ぐことができる。このようにして、パケット破棄処理に伴ってフレームの画像が乱れてしまうことを防ぐことができる。 As described above, the packet discarding process is ended when there is a head packet of the frame at the head of the queue and the stay time and the accumulated data size in the queue are equal to or smaller than the threshold value. That is, after the packet is discarded, packet transmission is started from the top packet of the frame. That is, the entire data constituting the frame can be transmitted to the receiving device. Therefore, it is possible to prevent only a part of data constituting the frame from being transmitted to the receiving device. In this way, it is possible to prevent the frame image from being disturbed along with the packet discarding process.
本実施例にかかる送信装置によれば、パケット破棄処理を開始する場合には、送信済みのデータが構成するフレームについては、そのフレームを構成する全てのデータを送信した後に、パケット破棄処理を開始することができる。また、本実施例にかかる送信装置によれば、パケット破棄処理を行う場合、パケット破棄後、フレームの先頭データから送信が開始されるようにすることができる。このようにして、パケット破棄処理に伴ってフレームの画像が乱れてしまうことを防ぐことができる。 According to the transmitting apparatus according to the present embodiment, when the packet discarding process is started, the packet discarding process is started after transmitting all the data constituting the frame for the frame configured by the transmitted data. can do. Also, according to the transmission apparatus of the present embodiment, when performing packet discard processing, transmission can be started from the top data of the frame after discarding the packet. In this way, it is possible to prevent the frame image from being disturbed along with the packet discarding process.
<実施例3>
本実施例では、段階的にキュー内パケットを破棄して送信しないように制御する例について説明する。本実施例にかかる送信装置の構成は、実施例1において図1及び図2を用いて説明した内容と同じであるため説明を省略する。
<Example 3>
In this embodiment, an example will be described in which control is performed so that packets in a queue are discarded and not transmitted step by step. Since the configuration of the transmission apparatus according to the present embodiment is the same as that described with reference to FIGS. 1 and 2 in the first embodiment, the description thereof is omitted.
次に、本実施例における送信装置の動作について、図10及び図11を用いて説明する。制御部101がプロセッサを内蔵する形態では、図10及び図11の処理フローは、図10及び図11に示す手順を当該プロセッサに実行させるためのプログラムを示す。制御部101が内蔵するプロセッサはコンピュータであり、記憶部102から読み出したプログラムを実行する。
Next, the operation of the transmission apparatus according to the present embodiment will be described with reference to FIGS. In the form in which the
まず、本実施例にかかるパケット送信処理について図10を用いて説明する。はじめに、パケット(this)が、他のフレームを参照せずに符号化されたフレーム(例えば、Iフレーム)の先頭パケットであるか否かを判定する(S1001)。 First, packet transmission processing according to the present embodiment will be described with reference to FIG. First, it is determined whether or not the packet (this) is the head packet of a frame (for example, an I frame) encoded without referring to another frame (S1001).
パケット(this)がIフレームの先頭パケットである場合(S1001においてYesの場合)、第2の破棄処理(S500)を実行する。第2破棄処理の内容について実施例1において図5を用いて説明した内容と同じであるため、説明を省略する。 When the packet (this) is the head packet of the I frame (Yes in S1001), the second discarding process (S500) is executed. Since the content of the second discarding process is the same as that described with reference to FIG. 5 in the first embodiment, the description thereof is omitted.
パケット(this)がIフレームの先頭パケットではない場合(S1001においてNo)の場合、又は、ステップS500の処理を終了した場合、管理部206はパケット(this)をキューにエンキューする(S1002)。
When the packet (this) is not the first packet of the I frame (No in S1001) or when the process of step S500 is terminated, the
パケット(this)をエンキューすると、管理部206はパケット送信が行われるか否かを判定する(S1003)。ステップS1003の判定は図3のステップS303において説明した内容と同様であるため説明を省略する。
When the packet (this) is enqueued, the
パケットの送信が行われる場合(S1003においてYesの場合)、管理部206はキューからパケットをデキューする(S1004)。そして、送信制御部204はデキューしたパケットを送信する制御を行う(S1005)。
When the packet is transmitted (Yes in S1003), the
ステップS1005においてパケットを送信すると、管理部206はキューが空になったか否かを判定する(S1006)。キューにデータが保持されている場合(S1006においてNoの場合)、管理部206はステップS1003の処理に戻る。一方、キューにデータが空である場合(S1006においてYesの場合)、管理部206はパケット送信処理を終了する。
When the packet is transmitted in step S1005, the
ステップS1003において、パケットが送信されないと判定した場合、管理部206は、キューに保持されたデータの大きさ(蓄積データサイズ)と予め定めた第1の閾値を比較する(S1007)。蓄積データサイズが第1の閾値以下である場合(S1007においてNoの場合)、管理部206はパケット送信処理を終了する。
If it is determined in step S1003 that no packet is transmitted, the
蓄積データサイズが第1の閾値よりも大きい場合(S1007においてYesの場合)、管理部206は蓄積データサイズを第2の閾値(ただし第1の閾値<第2の閾値とする)と比較する(S1008)。蓄積データサイズが第2の閾値以下である場合(S1008においてNoの場合)、管理部206は第1のパケット破棄処理を行う(S1100)。第1のパケット破棄処理の詳細については、図11を用いて後述する。蓄積データサイズが第2の閾値よりも大きい場合(S1008においてYesの場合)、管理部206は第2のパケット破棄処理を行う(S500)。管理部は、第1のパケット破棄処理又は第2のパケット破棄処理を終了すると、パケット送信処理を終了する。ここで、第2のパケット破棄処理において破棄されるパケットのデータ量は、第1のパケット破棄処理において破棄されるパケットのデータ量よりも大きいものとする。
When the accumulated data size is larger than the first threshold value (Yes in S1007), the
ステップS1007及びステップS1008において、蓄積データサイズと所定の閾値を比較する処理に替えて、1つのパケットデータがキューに保持されている時間(保持時間)と閾値とを比較することとしてもよい。保持時間が第1の閾値より長く第2の閾値(第1の閾値<第2の閾値)以下である場合には第1のパケット破棄処理を行う。保持時間が第2の閾値より長い場合には第2のパケット破棄処理を行う。 In step S1007 and step S1008, instead of the process of comparing the accumulated data size with a predetermined threshold, the time during which one packet data is held in the queue (holding time) may be compared with the threshold. When the holding time is longer than the first threshold and not more than the second threshold (first threshold <second threshold), the first packet discarding process is performed. When the holding time is longer than the second threshold, the second packet discarding process is performed.
次に、本実施例における第1のパケット破棄処理について、図11を用いて説明する。まず、管理部206はキューの先頭パケットを取得し、パケット(next)とする(S1101)。
Next, the first packet discarding process in the present embodiment will be described with reference to FIG. First, the
次に、管理部206はパケット(next)がフレームの先頭パケットであるか否かを判定する(S1102)。パケット(next)がフレームの先頭パケットではない場合(S1102においてNoの場合)、管理部206はパケット(next)の次のパケットを取得し、新たなパケット(next)とする(S1103)。
Next, the
ステップS1103の処理を行うと、管理部206は次のパケットを取得できるどうかを判定する(S1104)。すなわち、管理部206はキュー内の最後のパケットまで処理を終えたか判定する。
When the processing of step S1103 is performed, the
パケット(next)が取得できなかった場合(S1104においてNoの場合)、管理部206は第1の破棄処理を終了する。すなわち管理部206は、キュー内のすべてのパケットをスキャンし終わった場合は第1の破棄処理を終了する。一方、パケット(next)が取得できた場合は、管理部206はステップS1102の処理に戻り、処理を継続する。
When the packet (next) cannot be acquired (No in S1104), the
ステップS1102の判定処理において、パケット(next)がフレームの先頭パケットであると判定された場合、管理部206は当該フレームが他のフレームから参照されていないフレームであるか否か判定する(S1105)。判定処理は、図7を用いて説明したエレメントヘッダ704内に、他のフレームからの参照があることを示すフラグを追加するようにし、フラグの有無で参照の有無を判定するようにすることができる。ただし、判定の方法はこれに限られない。
If it is determined in step S1102 that the packet (next) is the head packet of the frame, the
ここで、他のフレームから参照されていないフレームについて図12を用いて説明する。
図12の例では、H.264/AVCを用いた符号化におけるフレーム間の参照について説明する。
Here, frames that are not referred to by other frames will be described with reference to FIG.
In the example of FIG. Reference between frames in encoding using H.264 / AVC will be described.
フレーム1201から1208はそれぞれH.264/AVCを用いて符号化されたフレームである。図12の例では、左方向から右方向へ向かってパケットが送信されるものとする。Iフレーム1201からPフレーム1207までのフレームは1組のGOP(Group Of Picture)を構成する。
Frames 1201 to 1208 are respectively H.264. This is a frame encoded using H.264 / AVC. In the example of FIG. 12, it is assumed that packets are transmitted from left to right. Frames from the I frame 1201 to the
図12における矢印は符号化時の参照方向であり、フレームの内側に書かれた文字は符号化フレームの種類を示す。ここで、Iフレームはフレーム間予測を用いずに符号化されるフレームである。Pフレームは前方向予測のみを用いて符号化されるフレームである。Bフレームは前方向予測、後方向予測、両方向予測のうちいずれかを選択して符号化されるフレームである。 The arrow in FIG. 12 indicates the reference direction at the time of encoding, and the characters written inside the frame indicate the type of the encoded frame. Here, the I frame is a frame that is encoded without using inter-frame prediction. P frames are frames that are encoded using only forward prediction. The B frame is a frame that is encoded by selecting one of forward prediction, backward prediction, and bidirectional prediction.
図12の例では、Iフレーム1201は、Bフレーム1202及びPフレーム1203に参照されている。Pフレーム1203は、Bフレーム1202及びBフレーム1204に参照されている。図12の例では、Bフレーム1202、1204、1206が他のフレームから参照されていないフレームとなる。
In the example of FIG. 12, the I frame 1201 is referred to by the
図11の処理の説明に戻る。パケット(next)を含むフレームが他のフレームから参照されていないフレームである場合(S1105においてNoの場合)、管理部206はステップS1103の処理に進む。一方、パケット(next)を含むフレームが他のフレームから参照されたフレームである場合(S1105においてYesの場合)、管理部206はキューからパケット(next)を破棄する(S1106)。ステップS1106においてパケット(next)を破棄すると、管理部206はキュー内のパケット(next)の次のパケットを取得して、取得したパケットを新たなパケット(next)とする(S1107)。
Returning to the description of the processing in FIG. When the frame including the packet (next) is a frame that is not referred to by another frame (No in S1105), the
新たなパケット(next)を設定すると、管理部206は新たなパケット(next)がキューから取得可能であるか判断する(S1108)。新たなパケット(next)を取得することができなかった場合、管理部206は第1の破棄処理を終了する。すなわち、キューに保持された最後のパケットまで処理を行った場合には第1の破棄処理を終了する。
When a new packet (next) is set, the
一方、新たなパケット(next)を取得することができた場合(ステップS1108においてNoの場合)、新たなパケット(next)はフレームの先頭パケットであるか判定する(S1109)。新たなパケット(next)がフレームの先頭パケットではない場合(S1109においてNoの場合)、管理部206はステップS1106の処理に戻る。一方、新たなパケット(next)がフレームの先頭パケットであると判定した場合(S1109においてYesの場合)、ステップS1105の処理に戻る。
On the other hand, if a new packet (next) can be acquired (No in step S1108), it is determined whether the new packet (next) is the head packet of the frame (S1109). When the new packet (next) is not the first packet of the frame (No in S1109), the
本実施例における第1の破棄処理では、キュー内のパケットの中から、他のフレームから参照されていないフレームを構成するパケットを破棄する。しかし、第1の破棄処理において、これ以外の方法でパケット破棄処理を行うようにしてもよい。例えば、キュー内の後方から任意のフレームを破棄することとしてもよい。また、例えばJPEGのように他のフレームを参照しない符号化方式で符号化されている場合であれば、キュー内のフレームの中から複数フレーム毎に1フレーム破棄する等の方法で破棄処理を行うこととしてもよい。 In the first discard process in the present embodiment, the packets constituting the frame that is not referred to by other frames are discarded from the packets in the queue. However, in the first discard process, the packet discard process may be performed by other methods. For example, an arbitrary frame may be discarded from the back in the queue. For example, when encoding is performed using an encoding method that does not refer to other frames, such as JPEG, discard processing is performed by a method such as discarding one frame from a plurality of frames in the queue. It is good as well.
本実施例においては、キューに保持されたデータのサイズが第1の閾値よりも大きい場合、さらにキュー内のデータサイズが第1の閾値よりも大きい第2の閾値よりも大きいか判定する。キュー内のデータサイズが第1の閾値より大きく第2の閾値以下である場合は、キューに保持されたパケットのうち、他のフレームから参照されていないフレームを構成するパケットを破棄する。キュー内のデータサイズが第2の閾値よりも大きい場合には、送信済みのデータが含まれるフレームを構成するデータがキュー内に残るようにして、キュー内のデータの破棄処理を行う。 In this embodiment, when the size of data held in the queue is larger than the first threshold, it is further determined whether the data size in the queue is larger than the second threshold larger than the first threshold. When the data size in the queue is larger than the first threshold value and smaller than or equal to the second threshold value, the packets constituting the frame that is not referenced from other frames among the packets held in the queue are discarded. When the data size in the queue is larger than the second threshold value, the data constituting the frame including the transmitted data remains in the queue, and the data in the queue is discarded.
このようにして、本実施例によれば、キューに保持されたデータの大きさに応じて、キューに保持されたデータの破棄を段階的に行うことができる。 In this way, according to the present embodiment, the data held in the queue can be discarded step by step according to the size of the data held in the queue.
<その他の実施例>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other examples>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
103 保持部
104 通信部
204 送信制御部
205 保持制御部
206 管理部
Claims (15)
前記データを受信装置へ送信する送信手段と、
他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されることに応じて、前記バッファ手段に保持されているデータのうちの少なくとも一部のデータを送信させずに、他のフレームを参照しないで復号されるフレームのデータを前記送信手段から前記受信装置へ送信させる送信制御を行う送信制御手段と
を有し、
前記送信制御手段は、他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されるときに、第1のフレームを構成する一部のデータが前記送信手段によって前記受信装置に送信済みで残りのデータが前記バッファ手段に保持されているときは、前記残りのデータは前記送信手段から前記受信装置へ送信させる
ことを特徴とする送信装置。 A buffer means for holding data according to the Film image,
Transmission means for pre-sending a Kide over data to the receiving device,
In response to the data of the frame to be decoded without reference to another frame is held in said buffer means, at least a portion of the de chromatography of Lud over data held in said buffer means without sending the data, have a transmission control means for performing transmission control to transmit the data frames to be decoded without reference to other frames from said transmitting means to the receiving device,
The transmission control means is configured such that when data of a frame to be decoded without referring to another frame is held in the buffer means, a part of data constituting the first frame is transferred to the reception apparatus by the transmission means. When the remaining data has been transmitted and held in the buffer means, the remaining data is transmitted from the transmitting means to the receiving device.
A transmission apparatus characterized by the above.
前記データを受信装置へ送信する送信手段と、Transmitting means for transmitting the data to a receiving device;
他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されることに応じて、前記バッファ手段に保持されているデータのうちの少なくとも一部のデータを送信させずに、他のフレームを参照しないで復号されるフレームのデータを前記送信手段から前記受信装置へ送信させる送信制御を行う送信制御手段とIn response to the fact that the data of the frame to be decoded without referring to other frames is held in the buffer means, at least a part of the data held in the buffer means is not transmitted, and the other Transmission control means for performing transmission control for transmitting data of a frame to be decoded without referring to the frame from the transmission means to the reception device;
を有し、Have
前記送信制御手段は、前記バッファ手段に保持されているデータのデータ量が第1の閾値より大きく第2の閾値以下である場合において前記送信手段から前記受信装置へ送信しないように制御するデータのデータ量よりも、前記バッファ手段に保持されているデータのデータ量が前記第2の閾値より大きい場合において前記送信手段から前記受信装置へ送信しないように制御するデータのデータ量が大きくなるように前記送信制御を行うThe transmission control unit is configured to control data not to be transmitted from the transmission unit to the receiving device when a data amount of data held in the buffer unit is greater than a first threshold value and less than or equal to a second threshold value. The amount of data to be controlled so as not to be transmitted from the transmitting unit to the receiving device is larger than the amount of data when the data amount of the data held in the buffer unit is larger than the second threshold value. Perform the transmission control
ことを特徴とする送信装置。A transmission apparatus characterized by the above.
ことを特徴とする請求項2に記載の送信装置。The transmission apparatus according to claim 2, wherein:
ことを特徴とする請求項1〜3のいずれか1項に記載の送信装置。 The transmission control means performs the transmission control when data constituting the head of the second frame is held in the buffer means without being transmitted from the transmission means to the receiving device. The transmission device according to any one of claims 1 to 3 .
ことを特徴とする請求項4記載の送信装置。The transmission apparatus according to claim 4, wherein:
ことを特徴とする請求項1〜5のいずれか1項に記載の送信装置。 Wherein at least a portion of said data, the transmitting device according to any one of claims 1 to 5, characterized in that a data of frames to be decoded with reference to another frame.
ことを特徴とする請求項1〜6のいずれか1項に記載の送信装置。 Said transmission control means, a state in which the data amount of Lud over data be held by the buffer means exceeds a predetermined threshold value, the state of network congestion, the state in which the receiving device can not receive data, and, one When the time of data is held in said buffer means is in one of the states of the state exceeds a predetermined threshold value, any one of claims 1-6, characterized in that to perform the transmission control Item 1. The transmitter according to Item 1.
前記データをバッファ手段に保持させる保持ステップと、
他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されることに応じて、前記バッファ手段に保持されているデータのうちの少なくとも一部のデータを送信させずに、他のフレームを参照しないで復号されるフレームのデータを送信手段から前記受信装置へ送信させる送信制御を行う送信制御ステップと
を有し、
前記送信制御ステップでは、他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されるときに、第1のフレームを構成する一部のデータが前記送信手段によって前記受信装置に送信済みで残りのデータが前記バッファ手段に保持されているときは、前記残りのデータは前記送信手段から前記受信装置へ送信させる
ことを特徴とする送信方法。 A transmit how to transmit the data according to the image on the receiving device,
A holding step of holding front Kide over data in the buffer means,
In response to the data of the frame to be decoded without reference to another frame is held in said buffer means, at least a portion of the de chromatography of Lud over data held in said buffer means without sending the data, and a transmission control step which performs transmission control for transmitting the signal unit sending the data of the frame to be decoded without reference to other frames to the receiving device,
In the transmission control step, when data of a frame to be decoded without referring to another frame is held in the buffer unit, a part of data constituting the first frame is transferred to the receiving device by the transmission unit. When the remaining data has been transmitted and held in the buffer means, the remaining data is transmitted from the transmitting means to the receiving device.
A transmission method characterized by the above.
前記データをバッファ手段に保持させる保持ステップと、A holding step for holding the data in a buffer means;
他のフレームを参照しないで復号されるフレームのデータが前記バッファ手段に保持されることに応じて、前記バッファ手段に保持されているデータのうちの少なくとも一部のデータを送信させずに、他のフレームを参照しないで復号されるフレームのデータを送信手段から前記受信装置へ送信させる送信制御を行う送信制御ステップとIn response to the fact that the data of the frame to be decoded without referring to other frames is held in the buffer means, at least a part of the data held in the buffer means is not transmitted, and the other A transmission control step for performing transmission control for transmitting data of a frame to be decoded without referring to the frame from the transmission means to the reception device;
を有し、Have
前記送信制御ステップでは、前記バッファ手段に保持されているデータのデータ量が第1の閾値より大きく第2の閾値以下である場合において前記送信手段から前記受信装置へ送信しないように制御するデータのデータ量よりも、前記バッファ手段に保持されているデータのデータ量が前記第2の閾値より大きい場合において前記送信手段から前記受信装置へ送信しないように制御するデータのデータ量が大きくなるように前記送信制御を行うIn the transmission control step, when the data amount of the data held in the buffer unit is larger than the first threshold value and less than or equal to the second threshold value, the data to be controlled so as not to be transmitted from the transmission unit to the receiving device The amount of data to be controlled so as not to be transmitted from the transmitting unit to the receiving device is larger than the amount of data when the data amount of the data held in the buffer unit is larger than the second threshold value. Perform the transmission control
ことを特徴とする送信方法。A transmission method characterized by the above.
ことを特徴とする請求項9に記載の送信方法。The transmission method according to claim 9.
ことを特徴とする請求項8〜10のいずれか1項に記載の送信方法。 In the transmission control step, the transmission control is performed when data constituting the head of the second frame is held in the buffer means without being transmitted from the transmission means to the receiving device. The transmission method according to any one of claims 8 to 10 .
ことを特徴とする請求項11記載の送信方法。The transmission method according to claim 11.
ことを特徴とする請求項8〜12のいずれか1項に記載の送信方法。 Wherein at least a portion of said data is a method of transmission according to any one of claims 8 to 1 2, characterized in that the data of the frame to be decoded with reference to another frame .
ことを特徴とする請求項8〜13のいずれか1項に記載の送信方法。 Wherein in the transmission control step, a state in which the data amount of Lud over data be held by the buffer means exceeds a predetermined threshold value, the state of network congestion, the state in which the receiving device can not receive data, and, one When the time data is held in said buffer means is in one of the states of the state exceeds a predetermined threshold value, any one of claims 8-1 3, characterized in that said transmission control The transmission method described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012147150A JP6083964B2 (en) | 2012-06-29 | 2012-06-29 | Transmission device, transmission method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012147150A JP6083964B2 (en) | 2012-06-29 | 2012-06-29 | Transmission device, transmission method, and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2014011636A JP2014011636A (en) | 2014-01-20 |
JP2014011636A5 JP2014011636A5 (en) | 2015-08-13 |
JP6083964B2 true JP6083964B2 (en) | 2017-02-22 |
Family
ID=50107954
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012147150A Active JP6083964B2 (en) | 2012-06-29 | 2012-06-29 | Transmission device, transmission method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6083964B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017013776A1 (en) * | 2015-07-22 | 2017-01-26 | 株式会社Bonx | Reception system, transmission system, reception method, transmission method, communication control program, and distribution server |
KR101937247B1 (en) * | 2016-12-28 | 2019-01-14 | 네이버 주식회사 | Bandwidth estimation based on buffer and adaptive bitrate publish in real-time live environment |
JP7536567B2 (en) | 2020-09-10 | 2024-08-20 | キヤノン株式会社 | COMMUNICATION DEVICE, CONTROL METHOD, AND PROGRAM |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002247565A (en) * | 2001-02-22 | 2002-08-30 | Hitachi Ltd | Network av camera and system |
JP2006080788A (en) * | 2004-09-08 | 2006-03-23 | Matsushita Electric Ind Co Ltd | Moving picture coder |
JP4393955B2 (en) * | 2004-09-09 | 2010-01-06 | シャープ株式会社 | Transmission device, data transmission method, program, and computer-readable recording medium recording the program |
JP2008135845A (en) * | 2006-11-27 | 2008-06-12 | Ikegami Tsushinki Co Ltd | Transport stream recording and reproducing method and device |
JP2009005193A (en) * | 2007-06-22 | 2009-01-08 | Panasonic Corp | Communication terminal |
JP5227875B2 (en) * | 2009-04-06 | 2013-07-03 | 株式会社日立製作所 | Video encoding device |
-
2012
- 2012-06-29 JP JP2012147150A patent/JP6083964B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014011636A (en) | 2014-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109587510B (en) | Live broadcast method, device, equipment and storage medium | |
CN111740808B (en) | Data transmission method and device | |
EP1842381B1 (en) | System, transmitter, receiver, method and software for transmitting and receiving ordered sets of video frames | |
JP3598110B2 (en) | Data transmission method and apparatus | |
JP6067378B2 (en) | Method and apparatus for determining retransmission | |
JP4688566B2 (en) | Transmitter and receiver | |
WO2018196790A1 (en) | Video playing method, device and system | |
CN109660879B (en) | Live broadcast frame loss method, system, computer equipment and storage medium | |
JP5084362B2 (en) | Data transmission apparatus and data transmission / reception system | |
RU2420909C2 (en) | Splitting data stream | |
JP6242089B2 (en) | Transmission device, transmission method, and program | |
JP4903435B2 (en) | Media signal transmission method and reception method, and transmission / reception method and apparatus | |
EP2919458A1 (en) | Method and system for playback of motion video | |
CN113727185B (en) | Video frame playing method and system | |
EP1187460A2 (en) | Image transmitting method and apparatus and image receiving method and apparatus | |
JP6083964B2 (en) | Transmission device, transmission method, and program | |
CN109862400B (en) | Streaming media transmission method, device and system | |
JP2015138990A (en) | Receiver, transmitter and communication system | |
US20180227231A1 (en) | Identifying Network Conditions | |
CN116546276A (en) | Link bandwidth estimation method, device, equipment, storage medium and program product | |
CN109922307B (en) | Multimedia data transmission method and camera | |
CN115834975B (en) | Video transmission method, device, equipment and medium | |
JP2009071766A (en) | Signal receiving terminal apparatus | |
JP6592864B2 (en) | VIDEO TRANSMISSION DEVICE, VIDEO RECEPTION DEVICE, VIDEO DISTRIBUTION SYSTEM, VIDEO TRANSMISSION DEVICE CONTROL METHOD, AND PROGRAM | |
JP5585109B2 (en) | Video transmission device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150626 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150626 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160531 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160607 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160729 |
|
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: 20161227 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170124 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6083964 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |