Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelbender committed Mar 6, 2018
1 parent e99a340 commit 97e761b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# go-sdp

Go implementation of SDP (Session Description Protocol)
Go implementation of SDP (Session Description Protocol). No external dependencies.

[![Build Status](https://api.travis-ci.org/pixelbender/go-sdp.svg)](https://travis-ci.org/pixelbender/go-sdp)
[![Coverage Status](https://coveralls.io/repos/github/pixelbender/go-sdp/badge.svg?branch=master)](https://coveralls.io/github/pixelbender/go-sdp?branch=master)
Expand All @@ -14,7 +14,7 @@ Go implementation of SDP (Session Description Protocol)
## Installation

```sh
go get github.com/pixelbender/go-sdp/...
go get github.com/pixelbender/go-sdp/sdp
```

## SDP Decoding
Expand All @@ -28,7 +28,7 @@ import (
)

func main() {
desc, err := sdp.ParseString(`v=0
sess, err := sdp.ParseString(`v=0
o=alice 2890844526 2890844526 IN IP4 alice.example.org
s=Example
c=IN IP4 127.0.0.1
Expand All @@ -41,7 +41,7 @@ a=rtpmap:8 PCMA/8000`)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(desc.Media[0].Format[0].Name) // prints PCMU
fmt.Println(sess.Media[0].Format[0].Name) // prints PCMU
}
}
```
Expand All @@ -57,7 +57,7 @@ import (
)

func main() {
sess := &sdp.SessionDescription{
sess := &sdp.Session{
Origin: &sdp.Origin{
Username: "alice",
Address: "alice.example.org",
Expand Down Expand Up @@ -87,10 +87,11 @@ func main() {
```

## Attributes mapping
| Scope | Attribute | Struct / Property |

| Scope | Attribute | Property |
| ----- | --------- | ----------------- |
| session, media | sendrecv, recvonly, sendonly, inactive | Session.Mode, Media.Mode |
| media | rtpmap | Format |
| media | rtpmap | Media.Format |
| media | rtcp-fb | Format.Feedback |
| media | fmtp | Format.Params |

Expand Down

0 comments on commit 97e761b

Please sign in to comment.