Changeset 297002cf2c9237445fbe2435d9c9ce3ac3b67ff0
- Timestamp:
- 06/16/08 18:47:40
(3 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1213634860 +0300
- git-parent:
[9074b2fc7ea620916db536a46ccb8a4340dbdf71]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1213634860 +0300
- Message:
RTP sout: append RTCP BYE to the Sender Report
Pointed-out-by: Sébastien Escudier
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3561b9b |
r297002c |
|
| 54 | 54 | { |
|---|
| 55 | 55 | size_t length; /* RTCP packet length */ |
|---|
| 56 | | uint8_t payload[28 + 8 + (2 * 257)]; |
|---|
| | 56 | uint8_t payload[28 + 8 + (2 * 257) + 8]; |
|---|
| 57 | 57 | int handle; /* RTCP socket handler */ |
|---|
| 58 | 58 | |
|---|
| … | … | |
| 165 | 165 | |
|---|
| 166 | 166 | uint8_t *ptr = rtcp->payload; |
|---|
| | 167 | uint64_t now64 = NTPtime64 (); |
|---|
| | 168 | SetQWBE (ptr + 8, now64); /* Update the Sender Report timestamp */ |
|---|
| | 169 | |
|---|
| 167 | 170 | /* Bye */ |
|---|
| | 171 | ptr += rtcp->length; |
|---|
| 168 | 172 | ptr[0] = (2 << 6) | 1; /* V = 2, P = 0, SC = 1 */ |
|---|
| 169 | 173 | ptr[1] = 203; /* payload type: Bye */ |
|---|
| 170 | 174 | SetWBE (ptr + 2, 1); |
|---|
| 171 | | /* SSRC is already there :) */ |
|---|
| | 175 | memcpy (ptr + 4, rtcp->payload + 4, 4); /* Copy SSRC from Sender Report */ |
|---|
| | 176 | rtcp->length += 8; |
|---|
| 172 | 177 | |
|---|
| 173 | 178 | /* We are THE sender, so we are more important than anybody else, so |
|---|
| 174 | 179 | * we can afford not to check bandwidth constraints here. */ |
|---|
| 175 | | send (rtcp->handle, rtcp->payload, 8, 0); |
|---|
| | 180 | send (rtcp->handle, rtcp->payload, rtcp->length, 0); |
|---|
| 176 | 181 | net_Close (rtcp->handle); |
|---|
| 177 | 182 | } |
|---|