mirror of
https://github.com/aler9/gortsplib
synced 2025-10-12 18:40:07 +08:00
convert Tracks into Medias and Formats (#155)
* split tracks from medias * move tracks into dedicated package * move media into dedicated package * edit Medias.Marshal() in order to return SDP * add medias.Find() and simplify examples * improve coverage * fix rebase errors * replace TrackIDs with MediaIDs * implement media-specific and track-specific callbacks for reading RTCP and RTP packets * rename publish into record, read into play * add v2 tag * rename tracks into formats
This commit is contained in:
@@ -3,7 +3,7 @@ package liberrors
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aler9/gortsplib/pkg/base"
|
||||
"github.com/aler9/gortsplib/v2/pkg/base"
|
||||
)
|
||||
|
||||
// ErrClientTerminated is an error that can be returned by a client.
|
||||
@@ -65,12 +65,12 @@ func (e ErrClientContentTypeUnsupported) Error() string {
|
||||
return fmt.Sprintf("unsupported Content-Type header '%v'", e.CT)
|
||||
}
|
||||
|
||||
// ErrClientCannotSetupTracksDifferentURLs is an error that can be returned by a client.
|
||||
type ErrClientCannotSetupTracksDifferentURLs struct{}
|
||||
// ErrClientCannotSetupMediasDifferentURLs is an error that can be returned by a client.
|
||||
type ErrClientCannotSetupMediasDifferentURLs struct{}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrClientCannotSetupTracksDifferentURLs) Error() string {
|
||||
return "cannot setup tracks with different base URLs"
|
||||
func (e ErrClientCannotSetupMediasDifferentURLs) Error() string {
|
||||
return "cannot setup medias with different base URLs"
|
||||
}
|
||||
|
||||
// ErrClientUDPPortsZero is an error that can be returned by a client.
|
||||
|
Reference in New Issue
Block a user