Skip to content

Commit 715ceb4

Browse files
committed
README.md: trim trailing whitespace, lf end of line
1 parent 8941767 commit 715ceb4

File tree

1 file changed

+92
-92
lines changed

1 file changed

+92
-92
lines changed

README.md

+92-92
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,92 @@
1-
# RTP/RTCP stack for Go
2-
3-
This Go package implements a RTP/RTCP stack for Go. The package is a
4-
sub-package of the standard Go _net_ package and uses standard _net_ package
5-
functions.
6-
7-
## How to build
8-
9-
The _rtp_ sources use the GOPATH directory structure. To build, test, and run
10-
the software just add the main goRTP directory to GOPATH. For further
11-
information about this structure run `go help gopath` and follow the
12-
instructions. The _rtp_ package is below the package _net_ to make clear that
13-
_rtp_ is a network related package.
14-
15-
To build the package just run `go build net/rtp` and then `go install
16-
net/rtp`. To excecute the tests just run `go test net/rtp`. The tests check if
17-
the code works with the current Go installation on your system. It should
18-
PASS.
19-
20-
A demo program is available and is called _rtpmain_. Use `go build
21-
net/rtpmain` to build it. The command `go install net/rtpmain` installs it in
22-
the `bin` directory of the main directory.
23-
24-
## How to use
25-
26-
This is a pure RTP / RTCP stack and it does not contain any media processing,
27-
for example generating or packing the payload for audio or video codecs.
28-
29-
The directory `src/net/rtpmain` contains an example Go program that performs a
30-
RTP some tests on _localhost_ that shows how to setup a RTP session, an
31-
output stream and how to send and receive RTP data and control events. Parts
32-
of this program are used in the package documentation.
33-
34-
The software should be ready to use for many RTP applications. Standard
35-
point-to-point RTP applications should not pose any problems. RTP multi-cast
36-
using IP multi-cast addresses is not supported. If somebody really requires IP
37-
multi-cast it could be added at the transport level.
38-
39-
RTCP reporting works without support from application. The stack reports RTCP
40-
packets and if the stack created new input streams and an application may
41-
connect to the control channel to receive the RTCP events. Just have a look
42-
into the example program. The RTCP fields in the stream structures are
43-
accessible - however, to use them you may need to have some know-how of the
44-
RTCP definitions and reporting.
45-
46-
## The documentation
47-
48-
After you downloaded the code you may use standard _godoc_ to get a nice
49-
formatted documentation. Just change into the `src` directory, run `godoc
50-
-http=:6060 -path="."`, point your browser at _localhost:6060_, and select
51-
`src` at the top of the page.
52-
53-
I've added some package global documentation and tried to document the
54-
globally visible methods and functions.
55-
56-
Before you start hacking please have a look into the documentation first, in
57-
particular the package documentation (doc.go).
58-
59-
## Some noteable features
60-
61-
* The current release V1.0.0 computes the RTCP intervals based on the length of
62-
RTCP compound packets and the bandwidth allocated to RTCP. The application may
63-
set the bandwidth, if no set GoRTP makes somes educated guesses.
64-
65-
* The application may set the maximum number of output and input streams even
66-
while the RTP session is active. If the application des not set GoRTP sets
67-
the values to 5 and 30 respectively.
68-
69-
* GoRTP produces SR and RR reports and the associated SDES for active streams
70-
only, thus it implements the activity check as defined in chapter 6.4
71-
72-
* An appplication may use GoRTP in _simple RTP_ mode. In this mode only RTP
73-
data packets are exchanged between the peers. No RTCP service is active, no
74-
statistic counters, and GoRTP discards RTCP packets it receives.
75-
76-
* GoRTP limits the number of RR to 31 per RTCP report interval. GoRTP does not
77-
add an additional RR packet in case it detects more than 31 active input
78-
streams. This restriction is mainly due to MTU contraints of modern Ethernet
79-
or DSL based networks. The MTU is usually about 1500 bytes, GoRTP limits
80-
the RTP/RTCP packet size to 1200 bytes. The length of an RR is 24 bytes,
81-
thus 31 RR already require 774 bytes. Adding some data for SR and SDES fills
82-
the rest.
83-
84-
* An application may register to a control event channel and GoRTP delivers a
85-
nice set of control and error events. The events cover:
86-
- Creation of a new input stream when receiving an RTP or RTCP packet and
87-
the SSRC was not known
88-
- RTCP events to inform about RTCP packets and received reports
89-
- Error events
90-
91-
* Currently GoRTP supports only SR, RR, SDES, and BYE RTCP packets. Inside
92-
SDES GoRTP does not support SDES Private and SDES H.323 items.
1+
# RTP/RTCP stack for Go
2+
3+
This Go package implements a RTP/RTCP stack for Go. The package is a
4+
sub-package of the standard Go _net_ package and uses standard _net_ package
5+
functions.
6+
7+
## How to build
8+
9+
The _rtp_ sources use the GOPATH directory structure. To build, test, and run
10+
the software just add the main goRTP directory to GOPATH. For further
11+
information about this structure run `go help gopath` and follow the
12+
instructions. The _rtp_ package is below the package _net_ to make clear that
13+
_rtp_ is a network related package.
14+
15+
To build the package just run `go build net/rtp` and then `go install
16+
net/rtp`. To excecute the tests just run `go test net/rtp`. The tests check if
17+
the code works with the current Go installation on your system. It should
18+
PASS.
19+
20+
A demo program is available and is called _rtpmain_. Use `go build
21+
net/rtpmain` to build it. The command `go install net/rtpmain` installs it in
22+
the `bin` directory of the main directory.
23+
24+
## How to use
25+
26+
This is a pure RTP / RTCP stack and it does not contain any media processing,
27+
for example generating or packing the payload for audio or video codecs.
28+
29+
The directory `src/net/rtpmain` contains an example Go program that performs a
30+
RTP some tests on _localhost_ that shows how to setup a RTP session, an
31+
output stream and how to send and receive RTP data and control events. Parts
32+
of this program are used in the package documentation.
33+
34+
The software should be ready to use for many RTP applications. Standard
35+
point-to-point RTP applications should not pose any problems. RTP multi-cast
36+
using IP multi-cast addresses is not supported. If somebody really requires IP
37+
multi-cast it could be added at the transport level.
38+
39+
RTCP reporting works without support from application. The stack reports RTCP
40+
packets and if the stack created new input streams and an application may
41+
connect to the control channel to receive the RTCP events. Just have a look
42+
into the example program. The RTCP fields in the stream structures are
43+
accessible - however, to use them you may need to have some know-how of the
44+
RTCP definitions and reporting.
45+
46+
## The documentation
47+
48+
After you downloaded the code you may use standard _godoc_ to get a nice
49+
formatted documentation. Just change into the `src` directory, run `godoc
50+
-http=:6060 -path="."`, point your browser at _localhost:6060_, and select
51+
`src` at the top of the page.
52+
53+
I've added some package global documentation and tried to document the
54+
globally visible methods and functions.
55+
56+
Before you start hacking please have a look into the documentation first, in
57+
particular the package documentation (doc.go).
58+
59+
## Some noteable features
60+
61+
* The current release V1.0.0 computes the RTCP intervals based on the length of
62+
RTCP compound packets and the bandwidth allocated to RTCP. The application may
63+
set the bandwidth, if no set GoRTP makes somes educated guesses.
64+
65+
* The application may set the maximum number of output and input streams even
66+
while the RTP session is active. If the application des not set GoRTP sets
67+
the values to 5 and 30 respectively.
68+
69+
* GoRTP produces SR and RR reports and the associated SDES for active streams
70+
only, thus it implements the activity check as defined in chapter 6.4
71+
72+
* An appplication may use GoRTP in _simple RTP_ mode. In this mode only RTP
73+
data packets are exchanged between the peers. No RTCP service is active, no
74+
statistic counters, and GoRTP discards RTCP packets it receives.
75+
76+
* GoRTP limits the number of RR to 31 per RTCP report interval. GoRTP does not
77+
add an additional RR packet in case it detects more than 31 active input
78+
streams. This restriction is mainly due to MTU contraints of modern Ethernet
79+
or DSL based networks. The MTU is usually about 1500 bytes, GoRTP limits
80+
the RTP/RTCP packet size to 1200 bytes. The length of an RR is 24 bytes,
81+
thus 31 RR already require 774 bytes. Adding some data for SR and SDES fills
82+
the rest.
83+
84+
* An application may register to a control event channel and GoRTP delivers a
85+
nice set of control and error events. The events cover:
86+
- Creation of a new input stream when receiving an RTP or RTCP packet and
87+
the SSRC was not known
88+
- RTCP events to inform about RTCP packets and received reports
89+
- Error events
90+
91+
* Currently GoRTP supports only SR, RR, SDES, and BYE RTCP packets. Inside
92+
SDES GoRTP does not support SDES Private and SDES H.323 items.

0 commit comments

Comments
 (0)