4-2-1 RTP (Real-Time Transport Protocol):
4-2-2 RTCP (Real-Time Control Protocol):
4-2-3 RTP Application:
Real-time protocols : RTP 、 RTCP
To ensure the real time transportation of IP datagrams carrying voice,special protocols are defined:
4-2-1 RTP (Real-Time Transport Protocol):
- RTP 最常被使用在 Voice over IP ,屬於獨立的通訊協定,通常建立在 UDP 之上提供即時資料傳
輸的點對點 (end-to-end) 傳送服務。
-
RTP 的網路功能:
Unicast:
傳送資料時,資料會被拷貝成 N 份並且傳給 N 個目的端。
Multicast:
傳送端只送一次,接著由 network 負責把資料分送給多個位址。
-
RTP enable us:
定義送出資料的資料型態。
決定封包的序列。
對不同來源的 media stream 進行同步化。
- RTP data packets are not guaranteed to arrive at all. Receiver must reconstruct the sender's packet
sequence and detect lost packets using the information provided in the packer header.
-
RTP data-packet header format:
-
Payload Type (PT):7 bits
紀錄後面資料用哪種 Codec , receiver 端找出相對應的 decoder 解碼出來。
常用 types:
Payload Type |
Codec |
0 |
PCM μ -Law |
8 |
PCM-A Law |
9 |
G..722 audio codec |
4 |
G..723 audio codec |
15 |
G..728 audio codec |
18 |
G..729 audio codec |
34 |
G..763 audio codec |
31 |
G..761 audio codec |
- Sequence Number:16 bits:
A packet number 用來標示 packet 在一連串資料中的位置 ( 順序 )。
- Timestamp:32 bits:
讓 receiver 端知道在正確的時間將資料播放出來 。
由上圖可知,如果只有 Sequence Number ,並不能完整照順序的將 data 播放出來,
因為如果data中間有一段是沒有資料的,只有 Sequence Number 的話會造成錯誤,需
搭配上讓它知道在哪個時間將 data 正確播放出來,如此我們才能播放出正確無誤的
資訊。Return
4-2-2 RTCP (Real-Time Control Protocol):
-
Enable us to monitor the quality on the data distribution.
-
Provide control and identification mechanisms for RTP transmissions.
- Several types of RTCP packets:
Sender Report
Receiver Report
Source Description
Bye
Application-specific Return
4-2-3 RTP Application:
- Receive data from the network (RTP Clients) receive media streams from the network ex:
-
Conferencing application need to be able to receive a media stream from an RTP session and render it on console.
-
A telephone answeri 1g machine application needs to be able to receive a media stream from an RTP session and store it in a file.
- Transmit data across the network (RTP Servers) transmitting media streams across the network ex: in a
conferencing application, a media stream might be captured from a video camera and sent out on one
or more RTP sessions. The media streams might be encoded in multiple media formats and sent out
on several RTP sessions for conferencing with heterogeneous receivers. Return
Return to top