Skip to content

Commit

Permalink
Rename structs
Browse files Browse the repository at this point in the history
  • Loading branch information
brutella committed Jun 4, 2019
1 parent c8a4306 commit 32ca8c5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
AudioCodecSampleRate24Khz byte = 2
)

type SupportedAudioStreamConfiguration struct {
type AudioStreamConfiguration struct {
Codecs []AudioCodecConfiguration `tlv8:"1"`
ComfortNoise bool `tlv8:"2"`
}
Expand All @@ -36,8 +36,8 @@ type AudioCodecParameters struct {
// PacketTime byte `tlv8:"4"` // RFC 4566, supported values: 20, 30, 40, 60 ms
}

func DefaultAudioStreamConfiguration() SupportedAudioStreamConfiguration {
return SupportedAudioStreamConfiguration{
func DefaultAudioStreamConfiguration() AudioStreamConfiguration {
return AudioStreamConfiguration{
Codecs: []AudioCodecConfiguration{
NewOpusAudioCodecConfiguration(),
NewAacEldAudioCodecConfiguration(),
Expand Down
6 changes: 3 additions & 3 deletions rtp/supported_rtp_configuration.go → rtp/configuration.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package rtp

type SupportedRTPConfiguration struct {
type Configuration struct {
Suites []SupportedCryptoSuite `tlv8:"-"`
}

func NewSupportedRTPConfiguration(suite byte) SupportedRTPConfiguration {
return SupportedRTPConfiguration{[]SupportedCryptoSuite{
func NewConfiguration(suite byte) Configuration {
return Configuration{[]SupportedCryptoSuite{
SupportedCryptoSuite{suite},
}}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rtp

type SelectedRtpStreamConfiguration struct {
type StreamConfiguration struct {
Command SessionControlCommand `tlv8:"1"`
Video VideoParameters `tlv8:"2"`
Audio AudioParameters `tlv8:"3"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestSelectedStreamConfiguration(t *testing.T) {

b := c.GetValue()

var cfg SelectedRtpStreamConfiguration
var cfg StreamConfiguration
err := tlv8.Unmarshal(b, &cfg)
if err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion rtp/stream_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestStreamController(t *testing.T) {
t.Fatalf("Zero length bytes")
}

var cfg SupportedVideoStreamConfiguration
var cfg VideoStreamConfiguration
err := tlv8.Unmarshal(b, &cfg)
if err != nil {
t.Fatal(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
VideoCodecCvoSuppported = 1
)

type SupportedVideoStreamConfiguration struct {
type VideoStreamConfiguration struct {
Codecs []VideoCodecConfiguration `tlv8:"1"`
}

Expand Down Expand Up @@ -53,8 +53,8 @@ type VideoCodecAttributes struct {
Framerate byte `tlv8:"3"`
}

func DefaultVideoStreamConfiguration() SupportedVideoStreamConfiguration {
return SupportedVideoStreamConfiguration{
func DefaultVideoStreamConfiguration() VideoStreamConfiguration {
return VideoStreamConfiguration{
Codecs: []VideoCodecConfiguration{
NewH264VideoCodecConfiguration(),
},
Expand Down

0 comments on commit 32ca8c5

Please sign in to comment.