Skip to content

Commit

Permalink
Update CI configs to v0.4.12
Browse files Browse the repository at this point in the history
Update lint scripts and CI configs.
  • Loading branch information
pionbot authored and Sean-Der committed Nov 7, 2020
1 parent c182471 commit ae5c004
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ linters:
- wsl # Whitespace Linter - Forces you to use empty lines!

issues:
exclude-use-default: false
exclude-rules:
# Allow complex tests, better to be self contained
- path: _test\.go
Expand Down
4 changes: 4 additions & 0 deletions pkg/media/h264reader/h264reader.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package h264reader implements a H264 Annex-B Reader
package h264reader

import (
Expand Down Expand Up @@ -83,6 +84,9 @@ func (reader *H264Reader) bitStreamStartsWithH264Prefix() (prefixLength int, e e
return 0, errDataIsNotH264Stream
}

// NextNAL reads from stream and returns then next NAL,
// and an error if there is incomplete frame data.
// Returns all nil values when no more NALs are available.
func (reader *H264Reader) NextNAL() (*NAL, error) {
if !reader.nalPrefixParsed {
_, err := reader.bitStreamStartsWithH264Prefix()
Expand Down
2 changes: 2 additions & 0 deletions pkg/media/h264reader/nalunittype.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package h264reader

import "strconv"

// NalUnitType is the type of a NAL
type NalUnitType uint8

// Enums for NalUnitTypes
const (
NalUnitTypeUnspecified NalUnitType = 0 // Unspecified
NalUnitTypeCodedSliceNonIdr NalUnitType = 1 // Coded slice of a non-IDR picture
Expand Down
20 changes: 20 additions & 0 deletions pkg/rtcerr/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ func (e *UnknownError) Error() string {
return fmt.Sprintf("UnknownError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *UnknownError) Unwrap() error {
return e.Err
}
Expand All @@ -28,6 +30,8 @@ func (e *InvalidStateError) Error() string {
return fmt.Sprintf("InvalidStateError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *InvalidStateError) Unwrap() error {
return e.Err
}
Expand All @@ -42,6 +46,8 @@ func (e *InvalidAccessError) Error() string {
return fmt.Sprintf("InvalidAccessError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *InvalidAccessError) Unwrap() error {
return e.Err
}
Expand All @@ -55,6 +61,8 @@ func (e *NotSupportedError) Error() string {
return fmt.Sprintf("NotSupportedError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *NotSupportedError) Unwrap() error {
return e.Err
}
Expand All @@ -68,6 +76,8 @@ func (e *InvalidModificationError) Error() string {
return fmt.Sprintf("InvalidModificationError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *InvalidModificationError) Unwrap() error {
return e.Err
}
Expand All @@ -81,6 +91,8 @@ func (e *SyntaxError) Error() string {
return fmt.Sprintf("SyntaxError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *SyntaxError) Unwrap() error {
return e.Err
}
Expand All @@ -94,6 +106,8 @@ func (e *TypeError) Error() string {
return fmt.Sprintf("TypeError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *TypeError) Unwrap() error {
return e.Err
}
Expand All @@ -108,6 +122,8 @@ func (e *OperationError) Error() string {
return fmt.Sprintf("OperationError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *OperationError) Unwrap() error {
return e.Err
}
Expand All @@ -121,6 +137,8 @@ func (e *NotReadableError) Error() string {
return fmt.Sprintf("NotReadableError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *NotReadableError) Unwrap() error {
return e.Err
}
Expand All @@ -135,6 +153,8 @@ func (e *RangeError) Error() string {
return fmt.Sprintf("RangeError: %v", e.Err)
}

// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
// an Unwrap method returning error. Otherwise, Unwrap returns nil.
func (e *RangeError) Unwrap() error {
return e.Err
}
2 changes: 1 addition & 1 deletion rtptransceiverinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ type RTPTransceiverInit struct {
// Streams []*Track
}

type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck
type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck,golint
2 changes: 1 addition & 1 deletion sessiondescription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ func TestSessionDescription_Unmarshal(t *testing.T) {
parsed, err = desc.Unmarshal()
assert.NotNil(t, parsed)
assert.NoError(t, err)
pc.Close()
assert.NoError(t, pc.Close())
}
2 changes: 1 addition & 1 deletion settingengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (e *SettingEngine) getSDPExtensions() map[SDPSectionType][]sdp.ExtMap {
return e.sdpExtensions
}

// SetProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
// SetICEProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
func (e *SettingEngine) SetICEProxyDialer(d proxy.Dialer) {
e.iceProxyDialer = d
}

0 comments on commit ae5c004

Please sign in to comment.