mirror of https://bitbucket.org/ausocean/av.git
stream/mts: lowercase PID PAT and PMT in func names
This commit is contained in:
parent
c1f7497078
commit
1e9b6c25c9
|
@ -160,19 +160,19 @@ type Packet struct {
|
|||
|
||||
// FindPMT will take a clip of mpegts and try to find a PMT table - if one
|
||||
// is found, then it is returned along with its index, otherwise nil, -1 and an error is returned.
|
||||
func FindPMT(d []byte) ([]byte, int, error) {
|
||||
return FindPID(d, PmtPid)
|
||||
func FindPmt(d []byte) ([]byte, int, error) {
|
||||
return FindPid(d, PmtPid)
|
||||
}
|
||||
|
||||
// FindPAT will take a clip of mpegts and try to find a PAT table - if one
|
||||
// is found, then it is returned along with its index, otherwise nil, -1 and an error is returned.
|
||||
func FindPAT(d []byte) ([]byte, int, error) {
|
||||
return FindPID(d, PatPid)
|
||||
func FindPat(d []byte) ([]byte, int, error) {
|
||||
return FindPid(d, PatPid)
|
||||
}
|
||||
|
||||
// FindPID will take a clip of mpegts and try to find a packet with given PID - if one
|
||||
// is found, then it is returned along with its index, otherwise nil, -1 and an error is returned.
|
||||
func FindPID(d []byte, pid uint16) (pkt []byte, i int, err error) {
|
||||
func FindPid(d []byte, pid uint16) (pkt []byte, i int, err error) {
|
||||
if len(d) < PacketSize {
|
||||
return nil, -1, errors.New("Mmpegts data not of valid length")
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ func FindPID(d []byte, pid uint16) (pkt []byte, i int, err error) {
|
|||
return
|
||||
}
|
||||
}
|
||||
return nil, -1, fmt.Errorf("could not find packet with pid: %d",pid)
|
||||
return nil, -1, fmt.Errorf("could not find packet with pid: %d", pid)
|
||||
}
|
||||
|
||||
// FillPayload takes a channel and fills the packets Payload field until the
|
||||
|
|
Loading…
Reference in New Issue