mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 03:25:58 +08:00
Update CI configs to v0.4.12
Update lint scripts and CI configs.
This commit is contained in:
@@ -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
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// Package h264reader implements a H264 Annex-B Reader
|
||||
package h264reader
|
||||
|
||||
import (
|
||||
@@ -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()
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ type RTPTransceiverInit struct {
|
||||
// Streams []*Track
|
||||
}
|
||||
|
||||
type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck
|
||||
type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck,golint
|
||||
|
@@ -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())
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user