From 1e9b6c25c9d4f1757edc7b8abd210727e229bef0 Mon Sep 17 00:00:00 2001 From: Saxon Date: Thu, 28 Feb 2019 11:04:40 +1030 Subject: [PATCH] stream/mts: lowercase PID PAT and PMT in func names --- stream/mts/mpegts.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stream/mts/mpegts.go b/stream/mts/mpegts.go index e9bbf0e1..c3c0d390 100644 --- a/stream/mts/mpegts.go +++ b/stream/mts/mpegts.go @@ -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