Compare commits
	
		
			17 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 49da18f263 | ||
|   | 0e65c9d1cc | ||
|   | bcb44378a5 | ||
|   | dc22c36964 | ||
|   | 7bb8737cc8 | ||
|   | 5438b5fbf7 | ||
|   | 2979d3f55d | ||
|   | 3c1eaad780 | ||
|   | b6b1f4a437 | ||
|   | f6346a05aa | ||
|   | 413b746b2f | ||
|   | c6f36a9a89 | ||
|   | 230b6c6ad1 | ||
|   | fd7ecfeaad | ||
|   | 4b060bc442 | ||
|   | 9f075c6682 | ||
|   | 0e06666006 | 
							
								
								
									
										4
									
								
								av/av.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								av/av.go
									
									
									
									
									
								
							| @@ -191,7 +191,7 @@ const avCodecTypeMagic = 233333 | ||||
| // CodecData is some important bytes for initializing audio/video decoder, | ||||
| // can be converted to VideoCodecData or AudioCodecData using: | ||||
| // | ||||
| //     codecdata.(AudioCodecData) or codecdata.(VideoCodecData) | ||||
| //	codecdata.(AudioCodecData) or codecdata.(VideoCodecData) | ||||
| // | ||||
| // for H264, CodecData is AVCDecoderConfigure bytes, includes SPS/PPS. | ||||
| type CodecData interface { | ||||
| @@ -255,6 +255,8 @@ type Packet struct { | ||||
| 	Time            time.Duration // packet decode time | ||||
| 	Duration        time.Duration //packet duration | ||||
| 	Data            []byte        // packet data | ||||
| 	Extension       bool | ||||
| 	Extensions      []byte | ||||
| } | ||||
|  | ||||
| // Raw audio frame. | ||||
|   | ||||
| @@ -5,10 +5,10 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/av/pktque" | ||||
| 	"github.com/deepch/vdk/av/transcode" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/pktque" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/transcode" | ||||
| ) | ||||
|  | ||||
| var Debug bool | ||||
|   | ||||
| @@ -9,9 +9,9 @@ import ( | ||||
| 	"path" | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| ) | ||||
|  | ||||
| type HandlerDemuxer struct { | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package pktque | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type Buf struct { | ||||
|   | ||||
| @@ -4,7 +4,7 @@ package pktque | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type Filter interface { | ||||
|   | ||||
| @@ -6,8 +6,8 @@ import ( | ||||
| 	"sync" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/pktque" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/pktque" | ||||
| ) | ||||
|  | ||||
| //        time | ||||
|   | ||||
| @@ -5,8 +5,8 @@ import ( | ||||
| 	"fmt" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/pktque" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/pktque" | ||||
| ) | ||||
|  | ||||
| var Debug bool | ||||
|   | ||||
| @@ -17,9 +17,9 @@ import ( | ||||
| 	"time" | ||||
| 	"unsafe" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| ) | ||||
|  | ||||
| const debug = false | ||||
|   | ||||
| @@ -20,8 +20,8 @@ import ( | ||||
| 	"runtime" | ||||
| 	"unsafe" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| ) | ||||
|  | ||||
| type VideoDecoder struct { | ||||
|   | ||||
| @@ -6,8 +6,8 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/utils/bits" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits" | ||||
| ) | ||||
|  | ||||
| // copied from libavcodec/mpeg4audio.h | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package codec | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/fake" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/fake" | ||||
| ) | ||||
|  | ||||
| type OpusCodecData struct { | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package fake | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type CodecData struct { | ||||
|   | ||||
| @@ -7,9 +7,9 @@ import ( | ||||
|  | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/utils/bits" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
|   | ||||
| @@ -6,9 +6,9 @@ import ( | ||||
| 	"fmt" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/utils/bits" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type SPSInfo struct { | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package mjpeg | ||||
|  | ||||
| import "github.com/deepch/vdk/av" | ||||
| import "git.r-2.top/kunmeng/vdk/av" | ||||
|  | ||||
| type CodecData struct { | ||||
| } | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"errors" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type CodecData struct { | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package main | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/format/ts" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/ts" | ||||
| 	"log" | ||||
| 	"os" | ||||
| ) | ||||
|   | ||||
| @@ -2,15 +2,16 @@ package main | ||||
|  | ||||
| import ( | ||||
| 	"context" | ||||
| 	"github.com/deepch/vdk/format/rtspv2" | ||||
| 	"github.com/deepch/vdk/format/ts" | ||||
| 	"encoding/binary" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/rtspv2" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/ts" | ||||
| 	"log" | ||||
| 	"os/exec" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
| 	RTSPClient, err := rtspv2.Dial(rtspv2.RTSPClientOptions{URL: "rtsp://url", DisableAudio: true, DialTimeout: 3 * time.Second, ReadWriteTimeout: 5 * time.Second, Debug: true, OutgoingProxy: false}) | ||||
| 	RTSPClient, err := rtspv2.Dial(rtspv2.RTSPClientOptions{URL: "rtsp://192.168.211.210:8554", DisableAudio: true, DialTimeout: 3 * time.Second, ReadWriteTimeout: 5 * time.Second, Debug: false, OutgoingProxy: false}) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
| @@ -27,15 +28,16 @@ func main() { | ||||
| 	go func() { | ||||
| 		imNewCodec, err := demuxer.Streams() | ||||
| 		log.Println("new codec data", imNewCodec, err) | ||||
| 		for i, data := range imNewCodec { | ||||
| 			log.Println(i, data) | ||||
| 		} | ||||
| 		//for i, data := range imNewCodec { | ||||
| 		//	log.Println(i, data) | ||||
| 		//} | ||||
| 		for { | ||||
| 			pkt, err := demuxer.ReadPacket() | ||||
| 			if err != nil { | ||||
| 				log.Panic(err) | ||||
| 			} | ||||
| 			log.Println("im new pkt ===>", pkt.Idx, pkt.Time) | ||||
| 			demuxer.ReadPacket() | ||||
| 			//pkt, err := demuxer.ReadPacket() | ||||
| 			//if err != nil { | ||||
| 			//	log.Panic(err) | ||||
| 			//} | ||||
| 			//log.Println("im new pkt ===>", pkt.Idx, pkt.Time) | ||||
| 		} | ||||
| 	}() | ||||
| 	cmd.Start() | ||||
| @@ -50,6 +52,11 @@ func main() { | ||||
| 				return | ||||
| 			} | ||||
| 		case packetAV := <-RTSPClient.OutgoingPacketQueue: | ||||
| 			//log.Println(packetAV.Extensions) | ||||
| 			t := time.UnixMilli(int64(binary.LittleEndian.Uint32(packetAV.Extensions[20:24]))*1000 + int64(binary.LittleEndian.Uint32(packetAV.Extensions[24:28]))/1000) | ||||
| 			log.Println(t.Format("2006-01-02 15:04:05.000")) | ||||
| 			//println(binary.LittleEndian.Uint32(packetAV.Extensions[24:28])) | ||||
| 			//println(binary.LittleEndian.Uint32(packetAV.Extensions[20:24])) | ||||
| 			if packetAV.IsKeyFrame { | ||||
| 				start = true | ||||
| 			} | ||||
|   | ||||
| @@ -6,9 +6,9 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| ) | ||||
|  | ||||
| type Muxer struct { | ||||
|   | ||||
| @@ -12,9 +12,9 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| @@ -47,7 +47,7 @@ type ClientOptions struct { | ||||
| 	DisableAudio     bool | ||||
| } | ||||
|  | ||||
| //Dial func | ||||
| // Dial func | ||||
| func Dial(options ClientOptions) (*Client, error) { | ||||
| 	client := &Client{ | ||||
| 		Signals:             make(chan int, 100), | ||||
| @@ -78,13 +78,13 @@ func Dial(options ClientOptions) (*Client, error) { | ||||
| 	return client, nil | ||||
| } | ||||
|  | ||||
| //Close func | ||||
| // Close func | ||||
| func (client *Client) Close() error { | ||||
| 	err := client.conn.Close() | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| //SetKeepAlive func | ||||
| // SetKeepAlive func | ||||
| func (client *Client) SetKeepAlive() error { | ||||
| 	body, err := json.Marshal(map[string]string{ | ||||
| 		"Name":      "KeepAlive", | ||||
| @@ -100,7 +100,7 @@ func (client *Client) SetKeepAlive() error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| //Monitor func | ||||
| // Monitor func | ||||
| func (client *Client) Monitor() { | ||||
| 	defer func() { | ||||
| 		client.Signals <- SignalStreamStop | ||||
| @@ -321,7 +321,7 @@ func (client *Client) Login() error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| //Command func | ||||
| // Command func | ||||
| func (client *Client) Command(command requestCode, data interface{}) (*Payload, []byte, error) { | ||||
| 	params, err := json.Marshal(map[string]interface{}{ | ||||
| 		"Name":                requestCodes[command], | ||||
| @@ -339,7 +339,7 @@ func (client *Client) Command(command requestCode, data interface{}) (*Payload, | ||||
| 	return resp, body, err | ||||
| } | ||||
|  | ||||
| //send func | ||||
| // send func | ||||
| func (client *Client) send(msgID requestCode, data []byte) error { | ||||
| 	var buf bytes.Buffer | ||||
| 	if err := binary.Write(&buf, binary.LittleEndian, Payload{ | ||||
| @@ -372,7 +372,7 @@ func (client *Client) send(msgID requestCode, data []byte) error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| //recvSize func | ||||
| // recvSize func | ||||
| func (client *Client) recvSize(buffer *bytes.Buffer, size uint32) ([]byte, error) { | ||||
| 	all := uint32(0) | ||||
| 	for { | ||||
| @@ -391,7 +391,7 @@ func (client *Client) recvSize(buffer *bytes.Buffer, size uint32) ([]byte, error | ||||
| 	return nil, nil | ||||
| } | ||||
|  | ||||
| //recv func | ||||
| // recv func | ||||
| func (client *Client) recv(text bool) (*Payload, []byte, error) { | ||||
| 	var p Payload | ||||
| 	var b = make([]byte, 20) | ||||
| @@ -422,7 +422,7 @@ func (client *Client) recv(text bool) (*Payload, []byte, error) { | ||||
| 	return &p, body, nil | ||||
| } | ||||
|  | ||||
| //parseURL func | ||||
| // parseURL func | ||||
| func (client *Client) parseURL(rawURL string) error { | ||||
| 	l, err := url.Parse(rawURL) | ||||
| 	if err != nil { | ||||
|   | ||||
| @@ -5,15 +5,15 @@ import ( | ||||
| 	"fmt" | ||||
| 	"io" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/codec" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/fake" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/codec/h265parser" | ||||
| 	"github.com/deepch/vdk/format/flv/flvio" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/fake" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/flv/flvio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| var MaxProbePacketCount = 20 | ||||
|   | ||||
| @@ -6,7 +6,7 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type AMF0ParseError struct { | ||||
|   | ||||
| @@ -5,8 +5,8 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| func TsToTime(ts int32) time.Duration { | ||||
|   | ||||
| @@ -4,9 +4,9 @@ import ( | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type DecoderConfigDescriptor struct { | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type StreamDescriptor struct { | ||||
|   | ||||
| @@ -6,7 +6,7 @@ import ( | ||||
| 	"os" | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type Tag uint32 | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package fmp4io | ||||
|  | ||||
| import "github.com/deepch/vdk/utils/bits/pio" | ||||
| import "git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
|  | ||||
| const AVC1 = Tag(0x61766331) | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package fmp4io | ||||
|  | ||||
| import "github.com/deepch/vdk/utils/bits/pio" | ||||
| import "git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
|  | ||||
| const MVEX = Tag(0x6d766578) | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package fmp4io | ||||
|  | ||||
| import "github.com/deepch/vdk/utils/bits/pio" | ||||
| import "git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
|  | ||||
| const FTYP = Tag(0x66747970) | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package fmp4io | ||||
| import ( | ||||
| 	"fmt" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const MOOF = Tag(0x6d6f6f66) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"math" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| func GetTime32(b []byte) (t time.Time) { | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package fmp4io | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const MDIA = Tag(0x6d646961) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ import ( | ||||
| 	"fmt" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const MOOV = Tag(0x6d6f6f76) | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| package fmp4io | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/format/fmp4/esio" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/esio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const MP4A = Tag(0x6d703461) | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package fmp4io | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package fmp4io | ||||
| import ( | ||||
| 	"bytes" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const DREF = Tag(0x64726566) | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package fmp4io | ||||
| import ( | ||||
| 	"fmt" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const STBL = Tag(0x7374626c) | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package fmp4io | ||||
|  | ||||
| import "github.com/deepch/vdk/utils/bits/pio" | ||||
| import "git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
|  | ||||
| const SIDX = Tag(0x73696478) | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package fragment | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type Fragment struct { | ||||
|   | ||||
| @@ -6,9 +6,9 @@ import ( | ||||
| 	"sync" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fmp4io" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fragment" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fmp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fragment" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
|   | ||||
| @@ -1,11 +1,11 @@ | ||||
| package fmp4 | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fmp4io" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fragment" | ||||
| 	"github.com/deepch/vdk/format/fmp4/timescale" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fmp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fragment" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/timescale" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type fragmentWithData struct { | ||||
|   | ||||
| @@ -3,12 +3,12 @@ package fmp4 | ||||
| import ( | ||||
| 	"fmt" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/codec/opusparser" | ||||
| 	"github.com/deepch/vdk/format/fmp4/esio" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fmp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/opusparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/esio" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fmp4io" | ||||
| ) | ||||
|  | ||||
| // Track creates a TRAK atom for this stream | ||||
|   | ||||
| @@ -3,10 +3,10 @@ package fmp4 | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fmp4io" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fragment" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fmp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fragment" | ||||
| ) | ||||
|  | ||||
| // TrackFragmenter writes a single audio or video stream as a series of CMAF (fMP4) fragments | ||||
|   | ||||
| @@ -1,13 +1,13 @@ | ||||
| package format | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/format/aac" | ||||
| 	"github.com/deepch/vdk/format/flv" | ||||
| 	"github.com/deepch/vdk/format/mp4" | ||||
| 	"github.com/deepch/vdk/format/rtmp" | ||||
| 	"github.com/deepch/vdk/format/rtsp" | ||||
| 	"github.com/deepch/vdk/format/ts" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/aac" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/flv" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/rtmp" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/rtsp" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/ts" | ||||
| ) | ||||
|  | ||||
| func RegisterAll() { | ||||
|   | ||||
| @@ -6,9 +6,9 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/mkv/mkvio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mkv/mkvio" | ||||
| ) | ||||
|  | ||||
| type Demuxer struct { | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package mkv | ||||
| import ( | ||||
| 	"io" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| ) | ||||
|  | ||||
| var CodecTypes = []av.CodecType{av.H264, av.AAC} | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package mkv | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type Stream struct { | ||||
|   | ||||
| @@ -6,10 +6,10 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| ) | ||||
|  | ||||
| type Demuxer struct { | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package mp4 | ||||
| import ( | ||||
| 	"io" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| ) | ||||
|  | ||||
| var CodecTypes = []av.CodecType{av.H264, av.AAC} | ||||
|   | ||||
| @@ -1,9 +1,10 @@ | ||||
| package mp4io | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const MOOF = Tag(0x6d6f6f66) | ||||
| @@ -24,17 +25,18 @@ func (self AVC1Desc) Tag() Tag { | ||||
| 	return AVC1 | ||||
| } | ||||
|  | ||||
| //0x31766568 | ||||
| // 0x31766568 | ||||
| const HEV1 = Tag(0x68766331) | ||||
|  | ||||
| func (self HV1Desc) Tag() Tag { | ||||
| 	return HEV1 | ||||
| } | ||||
|  | ||||
| //const HVC1 = Tag(0x68766331) | ||||
| //func (self HVC1Desc) Tag() Tag { | ||||
| //	return HVC1 | ||||
| //} | ||||
| // const HVC1 = Tag(0x68766331) | ||||
| // | ||||
| //	func (self HVC1Desc) Tag() Tag { | ||||
| //		return HVC1 | ||||
| //	} | ||||
| const URL = Tag(0x75726c20) | ||||
|  | ||||
| func (self DataReferUrl) Tag() Tag { | ||||
| @@ -304,6 +306,10 @@ func (self *Movie) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("trak", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Tracks) > 100 { | ||||
| 					err = errors.New("too many tracks") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Tracks = append(self.Tracks, atom) | ||||
| 			} | ||||
| 		default: | ||||
| @@ -313,6 +319,10 @@ func (self *Movie) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -601,6 +611,10 @@ func (self *Track) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -940,6 +954,10 @@ func (self *Media) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1173,6 +1191,10 @@ func (self *MediaInfo) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1255,6 +1277,10 @@ func (self *DataInfo) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1817,6 +1843,10 @@ func (self *SampleDesc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1982,6 +2012,10 @@ func (self *MP4ADesc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -2291,6 +2325,10 @@ func (self *AVC1Desc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -2411,6 +2449,10 @@ func (self *HV1Desc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -2954,6 +2996,10 @@ func (self *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("traf", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Tracks) > 100 { | ||||
| 					err = errors.New("too many tracks") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Tracks = append(self.Tracks, atom) | ||||
| 			} | ||||
| 		default: | ||||
| @@ -2963,6 +3009,10 @@ func (self *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -3127,6 +3177,10 @@ func (self *TrackFrag) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -3197,6 +3251,10 @@ func (self *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("trex", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Tracks) > 100 { | ||||
| 					err = errors.New("too many tracks") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Tracks = append(self.Tracks, atom) | ||||
| 			} | ||||
| 		default: | ||||
| @@ -3206,6 +3264,10 @@ func (self *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -966,7 +966,7 @@ func genatoms(filename, outfilename string) { | ||||
| 		&ast.GenDecl{ | ||||
| 			Tok: token.IMPORT, | ||||
| 			Specs: []ast.Spec{ | ||||
| 				&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"github.com/deepch/vdk/utils/bits/pio"`}}, | ||||
| 				&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"git.r-2.top/kunmeng/vdk/utils/bits/pio"`}}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		&ast.GenDecl{ | ||||
|   | ||||
| @@ -8,7 +8,7 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type ParseError struct { | ||||
| @@ -389,7 +389,7 @@ func ReadFileAtoms(r io.ReadSeeker) (atoms []Atom, err error) { | ||||
| 		size := pio.U32BE(taghdr[0:]) | ||||
| 		if size > 5242880 { | ||||
| 			err = parseErr("len", 5242880, err) | ||||
| 			return  | ||||
| 			return | ||||
| 		} | ||||
| 		tag := Tag(pio.U32BE(taghdr[4:])) | ||||
|  | ||||
|   | ||||
| @@ -3,12 +3,12 @@ package mp4 | ||||
| import ( | ||||
| 	"bufio" | ||||
| 	"fmt" | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/codec/h265parser" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| 	"io" | ||||
| 	"time" | ||||
| ) | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package mp4 | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| ) | ||||
|  | ||||
| type Stream struct { | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package mp4f | ||||
|  | ||||
| import "github.com/deepch/vdk/format/mp4/mp4io" | ||||
| import "git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
|  | ||||
| type FDummy struct { | ||||
| 	Data []byte | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| package mp4fio | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| func (self MovieFrag) Tag() mp4io.Tag { | ||||
|   | ||||
| @@ -966,7 +966,7 @@ func genatoms(filename, outfilename string) { | ||||
| 		&ast.GenDecl{ | ||||
| 			Tok: token.IMPORT, | ||||
| 			Specs: []ast.Spec{ | ||||
| 				&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"github.com/deepch/vdk/utils/bits/pio"`}}, | ||||
| 				&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"git.r-2.top/kunmeng/vdk/utils/bits/pio"`}}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		&ast.GenDecl{ | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| package mp4fio | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type ElemStreamDesc struct { | ||||
|   | ||||
| @@ -7,14 +7,14 @@ import ( | ||||
| 	"os" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/codec/h265parser" | ||||
| 	"github.com/deepch/vdk/format/fmp4/fmp4io" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"github.com/deepch/vdk/format/mp4f/mp4fio" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/fmp4/fmp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4f/mp4fio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type Muxer struct { | ||||
|   | ||||
| @@ -3,10 +3,10 @@ package mp4f | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/mp4" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"github.com/deepch/vdk/format/mp4f/mp4fio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4f/mp4fio" | ||||
| ) | ||||
|  | ||||
| type Stream struct { | ||||
|   | ||||
| @@ -6,10 +6,10 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| ) | ||||
|  | ||||
| type Demuxer struct { | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package mp4 | ||||
| import ( | ||||
| 	"io" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| ) | ||||
|  | ||||
| var CodecTypes = []av.CodecType{av.H264, av.AAC} | ||||
|   | ||||
| @@ -1,9 +1,10 @@ | ||||
| package mp4io | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const MOOF = Tag(0x6d6f6f66) | ||||
| @@ -24,17 +25,18 @@ func (self AVC1Desc) Tag() Tag { | ||||
| 	return AVC1 | ||||
| } | ||||
|  | ||||
| //0x31766568 | ||||
| // 0x31766568 | ||||
| const HEV1 = Tag(0x68766331) | ||||
|  | ||||
| func (self HV1Desc) Tag() Tag { | ||||
| 	return HEV1 | ||||
| } | ||||
|  | ||||
| //const HVC1 = Tag(0x68766331) | ||||
| //func (self HVC1Desc) Tag() Tag { | ||||
| //	return HVC1 | ||||
| //} | ||||
| // const HVC1 = Tag(0x68766331) | ||||
| // | ||||
| //	func (self HVC1Desc) Tag() Tag { | ||||
| //		return HVC1 | ||||
| //	} | ||||
| const URL = Tag(0x75726c20) | ||||
|  | ||||
| func (self DataReferUrl) Tag() Tag { | ||||
| @@ -304,6 +306,10 @@ func (self *Movie) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("trak", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Tracks) > 100 { | ||||
| 					err = errors.New("too many tracks") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Tracks = append(self.Tracks, atom) | ||||
| 			} | ||||
| 		default: | ||||
| @@ -313,6 +319,10 @@ func (self *Movie) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -601,6 +611,10 @@ func (self *Track) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -940,6 +954,10 @@ func (self *Media) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1173,6 +1191,10 @@ func (self *MediaInfo) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1255,6 +1277,10 @@ func (self *DataInfo) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1817,6 +1843,10 @@ func (self *SampleDesc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -1982,6 +2012,10 @@ func (self *MP4ADesc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -2291,6 +2325,10 @@ func (self *AVC1Desc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -2411,6 +2449,10 @@ func (self *HV1Desc) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -2954,6 +2996,10 @@ func (self *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("traf", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Tracks) > 100 { | ||||
| 					err = errors.New("too many tracks") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Tracks = append(self.Tracks, atom) | ||||
| 			} | ||||
| 		default: | ||||
| @@ -2963,6 +3009,10 @@ func (self *MovieFrag) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -3127,6 +3177,10 @@ func (self *TrackFrag) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
| @@ -3197,6 +3251,10 @@ func (self *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("trex", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Tracks) > 100 { | ||||
| 					err = errors.New("too many tracks") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Tracks = append(self.Tracks, atom) | ||||
| 			} | ||||
| 		default: | ||||
| @@ -3206,6 +3264,10 @@ func (self *MovieExtend) Unmarshal(b []byte, offset int) (n int, err error) { | ||||
| 					err = parseErr("", n+offset, err) | ||||
| 					return | ||||
| 				} | ||||
| 				if len(self.Unknowns) > 100 { | ||||
| 					err = errors.New("too many unknowns") | ||||
| 					return | ||||
| 				} | ||||
| 				self.Unknowns = append(self.Unknowns, atom) | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -966,7 +966,7 @@ func genatoms(filename, outfilename string) { | ||||
| 		&ast.GenDecl{ | ||||
| 			Tok: token.IMPORT, | ||||
| 			Specs: []ast.Spec{ | ||||
| 				&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"github.com/deepch/vdk/utils/bits/pio"`}}, | ||||
| 				&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"git.r-2.top/kunmeng/vdk/utils/bits/pio"`}}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		&ast.GenDecl{ | ||||
|   | ||||
| @@ -8,7 +8,7 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type ParseError struct { | ||||
|   | ||||
| @@ -6,11 +6,11 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type Muxer struct { | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package mp4 | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/mp4/mp4io" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4/mp4io" | ||||
| ) | ||||
|  | ||||
| type Stream struct { | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| package mse | ||||
|  | ||||
| import ( | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/mp4f" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4f" | ||||
| 	"github.com/gobwas/ws" | ||||
| 	"github.com/gobwas/ws/wsutil" | ||||
| 	"net" | ||||
|   | ||||
| @@ -6,12 +6,11 @@ import ( | ||||
| 	"encoding/gob" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/mp4" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/mp4" | ||||
| 	"github.com/google/uuid" | ||||
| 	"github.com/moby/sys/mountinfo" | ||||
| 	"github.com/shirou/gopsutil/v3/disk" | ||||
| 	"os" | ||||
| 	"path/filepath" | ||||
| @@ -20,7 +19,13 @@ import ( | ||||
| ) | ||||
|  | ||||
| var MIME = []byte{11, 22, 111, 222, 11, 22, 111, 222} | ||||
| var listTag = []string{"{server_id}", "{host_name}", "{host_name_short}", "{host_name_long}", "{stream_name}", "{channel_name}", "{stream_id}", "{channel_id}", "{start_year}", "{start_month}", "{start_day}", "{start_hour}", "{start_minute}", "{start_second}", "{start_millisecond}", "{start_unix_second}", "{start_unix_millisecond}", "{start_time}", "{start_pts}", "{end_year}", "{end_month}", "{end_day}", "{end_hour}", "{end_minute}", "{end_second}", "{end_millisecond}", "{start_unix_second}", "{start_unix_millisecond}", "{end_time}", "{end_pts}", "{duration_second}", "{duration_millisecond}"} | ||||
|  | ||||
| var listTag = []string{"{server_id}", "{host_name}", "{host_name_short}", "{host_name_long}", | ||||
| 	"{stream_name}", "{channel_name}", "{stream_id}", "{channel_id}", | ||||
| 	"{start_year}", "{start_month}", "{start_day}", "{start_hour}", "{start_minute}", "{start_second}", | ||||
| 	"{start_millisecond}", "{start_unix_second}", "{start_unix_millisecond}", "{start_time}", "{start_pts}", | ||||
| 	"{end_year}", "{end_month}", "{end_day}", "{end_hour}", "{end_minute}", "{end_second}", | ||||
| 	"{end_millisecond}", "{end_unix_millisecond}", "{end_unix_second}", "{end_time}", "{end_pts}", "{duration_second}", "{duration_millisecond}"} | ||||
|  | ||||
| const ( | ||||
| 	MP4 = "mp4" | ||||
| @@ -28,20 +33,21 @@ const ( | ||||
| ) | ||||
|  | ||||
| type Muxer struct { | ||||
| 	muxer                                                            *mp4.Muxer | ||||
| 	format                                                           string | ||||
| 	limit                                                            int | ||||
| 	d                                                                *os.File | ||||
| 	m                                                                *os.File | ||||
| 	dur                                                              time.Duration | ||||
| 	h                                                                int | ||||
| 	gof                                                              *Gof | ||||
| 	patch                                                            string | ||||
| 	mpoint                                                           []string | ||||
| 	start, end                                                       time.Time | ||||
| 	pstart, pend                                                     time.Duration | ||||
| 	started                                                          bool | ||||
| 	serverID, streamName, channelName, streamID, channelID, hostname string | ||||
| 	muxer                                                                       *mp4.Muxer | ||||
| 	format                                                                      string | ||||
| 	limit                                                                       int | ||||
| 	d                                                                           *os.File | ||||
| 	m                                                                           *os.File | ||||
| 	dur                                                                         time.Duration | ||||
| 	h                                                                           int | ||||
| 	gof                                                                         *Gof | ||||
| 	patch                                                                       string | ||||
| 	mpoint                                                                      []string | ||||
| 	start, end                                                                  time.Time | ||||
| 	pstart, pend                                                                time.Duration | ||||
| 	started                                                                     bool | ||||
| 	serverID, streamName, channelName, streamID, channelID, hostLong, hostShort string | ||||
| 	handleFileChange                                                            func(bool, string, string, int64, time.Time, time.Time, time.Duration) | ||||
| } | ||||
|  | ||||
| type Gof struct { | ||||
| @@ -69,21 +75,27 @@ func init() { | ||||
|  | ||||
| } | ||||
|  | ||||
| func NewMuxer(serverID, streamName, channelName, streamID, channelID string, mpoint []string, patch, format string, limit int) (m *Muxer, err error) { | ||||
| 	hostname, _ := os.Hostname() | ||||
| func NewMuxer(serverID, streamName, channelName, streamID, channelID string, mpoint []string, patch, format string, limit int, c func(bool, string, string, int64, time.Time, time.Time, time.Duration)) (m *Muxer, err error) { | ||||
| 	hostLong, _ := os.Hostname() | ||||
| 	var hostShort string | ||||
| 	if p, _, ok := strings.Cut(hostLong, "."); ok { | ||||
| 		hostShort = p | ||||
| 	} | ||||
| 	m = &Muxer{ | ||||
| 		mpoint:      mpoint, | ||||
| 		patch:       patch, | ||||
| 		h:           -1, | ||||
| 		gof:         &Gof{}, | ||||
| 		format:      format, | ||||
| 		limit:       limit, | ||||
| 		serverID:    serverID, | ||||
| 		streamName:  streamName, | ||||
| 		channelName: channelName, | ||||
| 		streamID:    streamID, | ||||
| 		channelID:   channelID, | ||||
| 		hostname:    hostname, | ||||
| 		mpoint:           mpoint, | ||||
| 		patch:            patch, | ||||
| 		h:                -1, | ||||
| 		gof:              &Gof{}, | ||||
| 		format:           format, | ||||
| 		limit:            limit, | ||||
| 		serverID:         serverID, | ||||
| 		streamName:       streamName, | ||||
| 		channelName:      channelName, | ||||
| 		streamID:         streamID, | ||||
| 		channelID:        channelID, | ||||
| 		hostLong:         hostLong, | ||||
| 		hostShort:        hostShort, | ||||
| 		handleFileChange: c, | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| @@ -206,9 +218,20 @@ func (m *Muxer) OpenMP4() (err error) { | ||||
| 	if err = os.MkdirAll(filepath.Dir(d), 0755); err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	if m.d, err = os.Create(filepath.Join(filepath.Dir(d), fmt.Sprintf("tmp_%s_%d.mp4", uuid.New(), time.Now().Unix()))); err != nil { | ||||
| 	name := filepath.Join(filepath.Dir(d), fmt.Sprintf("tmp_%s_%d.mp4", uuid.New(), time.Now().Unix())) | ||||
| 	if m.d, err = os.Create(name); err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	m.handleFileChange( | ||||
| 		true, | ||||
| 		m.Codecs(), | ||||
| 		name, | ||||
| 		0, | ||||
| 		m.start, | ||||
| 		m.end, | ||||
| 		m.dur, | ||||
| 	) | ||||
|  | ||||
| 	m.muxer = mp4.NewMuxer(m.d) | ||||
| 	m.muxer.NegativeTsMakeZero = true | ||||
| 	if err = m.muxer.WriteHeader(m.gof.Streams); err != nil { | ||||
| @@ -225,14 +248,14 @@ func (m *Muxer) filePatch() (string, error) { | ||||
| 	) | ||||
|  | ||||
| 	for i, i2 := range m.mpoint { | ||||
| 		if m, err := mountinfo.Mounted(i2); err == nil && m { | ||||
| 			if d, err := disk.Usage(i2); err == nil { | ||||
| 				if d.UsedPercent < mu { | ||||
| 					ui = i | ||||
| 					mu = d.UsedPercent | ||||
| 				} | ||||
| 		//if m, err := mountinfo.Mounted(i2); err == nil && m { | ||||
| 		if d, err := disk.Usage(i2); err == nil { | ||||
| 			if d.UsedPercent < mu { | ||||
| 				ui = i | ||||
| 				mu = d.UsedPercent | ||||
| 			} | ||||
| 		} | ||||
| 		//	} | ||||
| 	} | ||||
|  | ||||
| 	if ui == -1 { | ||||
| @@ -247,11 +270,11 @@ func (m *Muxer) filePatch() (string, error) { | ||||
| 		case "{server_id}": | ||||
| 			ts = strings.Replace(ts, "{server_id}", m.serverID, -1) | ||||
| 		case "{host_name}": | ||||
| 			ts = strings.Replace(ts, "{host_name}", m.hostname, -1) | ||||
| 			ts = strings.Replace(ts, "{host_name}", m.hostLong, -1) | ||||
| 		case "{host_name_short}": | ||||
| 			ts = strings.Replace(ts, "{host_name_short}", m.hostname, -1) | ||||
| 			ts = strings.Replace(ts, "{host_name_short}", m.hostShort, -1) | ||||
| 		case "{host_name_long}": | ||||
| 			ts = strings.Replace(ts, "{host_name_long}", m.hostname, -1) | ||||
| 			ts = strings.Replace(ts, "{host_name_long}", m.hostLong, -1) | ||||
| 		case "{stream_name}": | ||||
| 			ts = strings.Replace(ts, "{stream_name}", m.streamName, -1) | ||||
| 		case "{channel_name}": | ||||
| @@ -263,21 +286,21 @@ func (m *Muxer) filePatch() (string, error) { | ||||
| 		case "{start_year}": | ||||
| 			ts = strings.Replace(ts, "{start_year}", fmt.Sprintf("%d", m.start.Year()), -1) | ||||
| 		case "{start_month}": | ||||
| 			ts = strings.Replace(ts, "{start_month}", fmt.Sprintf("%d", int(m.start.Month())), -1) | ||||
| 			ts = strings.Replace(ts, "{start_month}", fmt.Sprintf("%02d", int(m.start.Month())), -1) | ||||
| 		case "{start_day}": | ||||
| 			ts = strings.Replace(ts, "{start_day}", fmt.Sprintf("%d", m.start.Day()), -1) | ||||
| 			ts = strings.Replace(ts, "{start_day}", fmt.Sprintf("%02d", m.start.Day()), -1) | ||||
| 		case "{start_hour}": | ||||
| 			ts = strings.Replace(ts, "{start_hour}", fmt.Sprintf("%d", m.start.Hour()), -1) | ||||
| 			ts = strings.Replace(ts, "{start_hour}", fmt.Sprintf("%02d", m.start.Hour()), -1) | ||||
| 		case "{start_minute}": | ||||
| 			ts = strings.Replace(ts, "{start_minute}", fmt.Sprintf("%d", m.start.Minute()), -1) | ||||
| 			ts = strings.Replace(ts, "{start_minute}", fmt.Sprintf("%02d", m.start.Minute()), -1) | ||||
| 		case "{start_second}": | ||||
| 			ts = strings.Replace(ts, "{start_second}", fmt.Sprintf("%d", m.start.Second()), -1) | ||||
| 			ts = strings.Replace(ts, "{start_second}", fmt.Sprintf("%02d", m.start.Second()), -1) | ||||
| 		case "{start_millisecond}": | ||||
| 			ts = strings.Replace(ts, "{start_millisecond}", fmt.Sprintf("%d", m.start.Nanosecond()/1000/1000), -1) | ||||
| 		case "{start_unix_millisecond}": | ||||
| 			ts = strings.Replace(ts, "{start_unix_millisecond}", fmt.Sprintf("%d", m.end.UnixMilli()), -1) | ||||
| 			ts = strings.Replace(ts, "{start_unix_millisecond}", fmt.Sprintf("%d", m.start.UnixMilli()), -1) | ||||
| 		case "{start_unix_second}": | ||||
| 			ts = strings.Replace(ts, "{start_unix_second}", fmt.Sprintf("%d", m.end.Unix()), -1) | ||||
| 			ts = strings.Replace(ts, "{start_unix_second}", fmt.Sprintf("%d", m.start.Unix()), -1) | ||||
| 		case "{start_time}": | ||||
| 			ts = strings.Replace(ts, "{start_time}", fmt.Sprintf("%s", m.start.Format("2006-01-02T15:04:05-0700")), -1) | ||||
| 		case "{start_pts}": | ||||
| @@ -285,17 +308,17 @@ func (m *Muxer) filePatch() (string, error) { | ||||
| 		case "{end_year}": | ||||
| 			ts = strings.Replace(ts, "{end_year}", fmt.Sprintf("%d", m.end.Year()), -1) | ||||
| 		case "{end_month}": | ||||
| 			ts = strings.Replace(ts, "{end_month}", fmt.Sprintf("%d", int(m.end.Month())), -1) | ||||
| 			ts = strings.Replace(ts, "{end_month}", fmt.Sprintf("%02d", int(m.end.Month())), -1) | ||||
| 		case "{end_day}": | ||||
| 			ts = strings.Replace(ts, "{end_day}", fmt.Sprintf("%d", m.end.Day()), -1) | ||||
| 			ts = strings.Replace(ts, "{end_day}", fmt.Sprintf("%02d", m.end.Day()), -1) | ||||
| 		case "{end_hour}": | ||||
| 			ts = strings.Replace(ts, "{end_hour}", fmt.Sprintf("%d", m.end.Hour()), -1) | ||||
| 			ts = strings.Replace(ts, "{end_hour}", fmt.Sprintf("%02d", m.end.Hour()), -1) | ||||
| 		case "{end_minute}": | ||||
| 			ts = strings.Replace(ts, "{end_minute}", fmt.Sprintf("%d", m.end.Minute()), -1) | ||||
| 			ts = strings.Replace(ts, "{end_minute}", fmt.Sprintf("%02d", m.end.Minute()), -1) | ||||
| 		case "{end_second}": | ||||
| 			ts = strings.Replace(ts, "{end_second}", fmt.Sprintf("%d", m.end.Second()), -1) | ||||
| 			ts = strings.Replace(ts, "{end_second}", fmt.Sprintf("%02d", m.end.Second()), -1) | ||||
| 		case "{end_millisecond}": | ||||
| 			ts = strings.Replace(ts, "{end_millisecond}", fmt.Sprintf("%d", m.start.Nanosecond()/1000/1000), -1) | ||||
| 			ts = strings.Replace(ts, "{end_millisecond}", fmt.Sprintf("%d", m.end.Nanosecond()/1000/1000), -1) | ||||
| 		case "{end_unix_millisecond}": | ||||
| 			ts = strings.Replace(ts, "{end_unix_millisecond}", fmt.Sprintf("%d", m.end.UnixMilli()), -1) | ||||
| 		case "{end_unix_second}": | ||||
| @@ -314,6 +337,15 @@ func (m *Muxer) filePatch() (string, error) { | ||||
| 	return ts, nil | ||||
| } | ||||
|  | ||||
| func (m *Muxer) Codecs() string { | ||||
| 	var codecs []string | ||||
| 	for _, stream := range m.gof.Streams { | ||||
| 		codecs = append(codecs, strings.ToLower(stream.Type().String())) | ||||
| 	} | ||||
|  | ||||
| 	return strings.Join(codecs, ",") | ||||
| } | ||||
|  | ||||
| func (m *Muxer) WriteTrailer() (err error) { | ||||
| 	if m.muxer != nil { | ||||
| 		m.muxer.WriteTrailer() | ||||
| @@ -330,6 +362,19 @@ func (m *Muxer) WriteTrailer() (err error) { | ||||
| 			if err = os.Rename(m.d.Name(), filepath.Join(filepath.Dir(m.d.Name()), filepath.Base(p))); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			var size int64 | ||||
| 			if fi, err := m.d.Stat(); err == nil { | ||||
| 				size = fi.Size() | ||||
| 			} | ||||
| 			m.handleFileChange( | ||||
| 				false, | ||||
| 				m.Codecs(), | ||||
| 				filepath.Join(filepath.Dir(m.d.Name()), filepath.Base(p)), | ||||
| 				size, | ||||
| 				m.start, | ||||
| 				m.end, | ||||
| 				m.dur, | ||||
| 			) | ||||
| 		} | ||||
| 		err = m.d.Close() | ||||
| 	} | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| package nvr | ||||
|  | ||||
| import "github.com/deepch/vdk/av" | ||||
| import "git.r-2.top/kunmeng/vdk/av" | ||||
|  | ||||
| type Stream struct { | ||||
| 	codec av.CodecData | ||||
|   | ||||
| @@ -4,11 +4,11 @@ import ( | ||||
| 	"bytes" | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/deepch/vdk/codec/h265parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
|  | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| var startCode = []byte{0, 0, 0, 1} | ||||
|   | ||||
| @@ -14,11 +14,11 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/format/flv" | ||||
| 	"github.com/deepch/vdk/format/flv/flvio" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/flv" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/flv/flvio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| var Debug bool | ||||
|   | ||||
| @@ -16,13 +16,13 @@ import ( | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"github.com/deepch/vdk/codec" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/rtsp/sdp" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/rtsp/sdp" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| var ErrCodecDataChange = fmt.Errorf("rtsp: codec data change, please call HandleCodecDataChange()") | ||||
| @@ -1191,6 +1191,7 @@ func (self *Client) Play() (err error) { | ||||
| 		Method: "PLAY", | ||||
| 		Uri:    self.requestUri, | ||||
| 	} | ||||
| 	req.Header = append(req.Header, "Range: npt=0.000-") | ||||
| 	req.Header = append(req.Header, "Session: "+self.session) | ||||
| 	if err = self.WriteRequest(req); err != nil { | ||||
| 		return | ||||
|   | ||||
| @@ -8,7 +8,7 @@ import ( | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| type Session struct { | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package rtsp | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/rtsp/sdp" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/rtsp/sdp" | ||||
| ) | ||||
|  | ||||
| type Stream struct { | ||||
|   | ||||
| @@ -12,19 +12,18 @@ import ( | ||||
| 	"html" | ||||
| 	"io" | ||||
| 	"log" | ||||
| 	"math" | ||||
| 	"net" | ||||
| 	"net/url" | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/codec/h265parser" | ||||
| 	"github.com/deepch/vdk/format/rtsp/sdp" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/rtsp/sdp" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| @@ -93,6 +92,10 @@ type RTSPClient struct { | ||||
| 	FPS                 int | ||||
| 	WaitCodec           bool | ||||
| 	chTMP               int | ||||
| 	timestamp           int64 | ||||
| 	sequenceNumber      int | ||||
| 	end                 int | ||||
| 	offset              int | ||||
| } | ||||
|  | ||||
| type RTSPClientOptions struct { | ||||
| @@ -188,6 +191,7 @@ func Dial(options RTSPClientOptions) (*RTSPClient, error) { | ||||
| 					client.CodecData = append(client.CodecData, h265parser.CodecData{}) | ||||
| 				} | ||||
| 				client.videoCodec = av.H265 | ||||
| 				// Todo: 这里是 WebCoder 需要的扩展内容 | ||||
|  | ||||
| 			} else { | ||||
| 				client.Println("SDP Video Codec Type Not Supported", i2.Type) | ||||
| @@ -244,6 +248,146 @@ func Dial(options RTSPClientOptions) (*RTSPClient, error) { | ||||
| 	return client, nil | ||||
| } | ||||
|  | ||||
| func ReplayDial(options RTSPClientOptions, startTime string) (*RTSPClient, error) { | ||||
| 	client := &RTSPClient{ | ||||
| 		headers:             make(map[string]string), | ||||
| 		Signals:             make(chan int, 100), | ||||
| 		OutgoingProxyQueue:  make(chan *[]byte, 3000), | ||||
| 		OutgoingPacketQueue: make(chan *av.Packet, 3000), | ||||
| 		BufferRtpPacket:     bytes.NewBuffer([]byte{}), | ||||
| 		videoID:             -1, | ||||
| 		audioID:             -2, | ||||
| 		videoIDX:            -1, | ||||
| 		audioIDX:            -2, | ||||
| 		options:             options, | ||||
| 		AudioTimeScale:      8000, | ||||
| 	} | ||||
| 	client.headers["User-Agent"] = "Lavf58.76.100" | ||||
| 	err := client.parseURL(html.UnescapeString(client.options.URL)) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	conn, err := net.DialTimeout("tcp", client.pURL.Host, client.options.DialTimeout) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	err = conn.SetDeadline(time.Now().Add(client.options.ReadWriteTimeout)) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	if client.pURL.Scheme == "rtsps" { | ||||
| 		tlsConn := tls.Client(conn, &tls.Config{InsecureSkipVerify: options.InsecureSkipVerify, ServerName: client.pURL.Hostname()}) | ||||
| 		err = tlsConn.Handshake() | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		conn = tlsConn | ||||
| 	} | ||||
| 	client.conn = conn | ||||
| 	client.connRW = bufio.NewReadWriter(bufio.NewReader(conn), bufio.NewWriter(conn)) | ||||
| 	err = client.request(OPTIONS, nil, client.pURL.String(), false, false) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	err = client.request(DESCRIBE, map[string]string{"Accept": "application/sdp"}, client.pURL.String(), false, false) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	for _, i2 := range client.mediaSDP { | ||||
| 		if (i2.AVType != VIDEO && i2.AVType != AUDIO) || (client.options.DisableAudio && i2.AVType == AUDIO) { | ||||
| 			//TODO check it | ||||
| 			if strings.Contains(string(client.SDPRaw), "LaunchDigital") { | ||||
| 				client.chTMP += 2 | ||||
| 			} | ||||
| 			continue | ||||
| 		} | ||||
| 		// err = client.request(SETUP, map[string]string{"Require": "onvif-replay", "Transport": "RTP/UDP"}, client.ControlTrack(i2.Control), false, false) | ||||
| 		err = client.request(SETUP, map[string]string{"Require": "onvif-replay", "Transport": "RTP/AVP/TCP;unicast;interleaved=" + strconv.Itoa(client.chTMP) + "-" + strconv.Itoa(client.chTMP+1)}, client.ControlTrack(i2.Control), false, false) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		if i2.AVType == VIDEO { | ||||
| 			if i2.Type == av.H264 { | ||||
| 				if len(i2.SpropParameterSets) > 1 { | ||||
| 					if codecData, err := h264parser.NewCodecDataFromSPSAndPPS(i2.SpropParameterSets[0], i2.SpropParameterSets[1]); err == nil { | ||||
| 						client.sps = i2.SpropParameterSets[0] | ||||
| 						client.pps = i2.SpropParameterSets[1] | ||||
| 						client.CodecData = append(client.CodecData, codecData) | ||||
| 					} | ||||
| 				} else { | ||||
| 					client.CodecData = append(client.CodecData, h264parser.CodecData{}) | ||||
| 					client.WaitCodec = true | ||||
| 				} | ||||
| 				client.FPS = i2.FPS | ||||
| 				client.videoCodec = av.H264 | ||||
| 			} else if i2.Type == av.H265 { | ||||
| 				if len(i2.SpropVPS) > 1 && len(i2.SpropSPS) > 1 && len(i2.SpropPPS) > 1 { | ||||
| 					if codecData, err := h265parser.NewCodecDataFromVPSAndSPSAndPPS(i2.SpropVPS, i2.SpropSPS, i2.SpropPPS); err == nil { | ||||
| 						client.vps = i2.SpropVPS | ||||
| 						client.sps = i2.SpropSPS | ||||
| 						client.pps = i2.SpropPPS | ||||
| 						client.CodecData = append(client.CodecData, codecData) | ||||
| 					} | ||||
| 				} else { | ||||
| 					client.CodecData = append(client.CodecData, h265parser.CodecData{}) | ||||
| 				} | ||||
| 				client.videoCodec = av.H265 | ||||
|  | ||||
| 			} else { | ||||
| 				client.Println("SDP Video Codec Type Not Supported", i2.Type) | ||||
| 			} | ||||
| 			client.videoIDX = int8(len(client.CodecData) - 1) | ||||
| 			client.videoID = client.chTMP | ||||
| 		} | ||||
| 		if i2.AVType == AUDIO { | ||||
| 			client.audioID = client.chTMP | ||||
| 			var CodecData av.AudioCodecData | ||||
| 			switch i2.Type { | ||||
| 			case av.AAC: | ||||
| 				CodecData, err = aacparser.NewCodecDataFromMPEG4AudioConfigBytes(i2.Config) | ||||
| 				if err == nil { | ||||
| 					client.Println("Audio AAC bad config") | ||||
| 				} | ||||
| 			case av.OPUS: | ||||
| 				var cl av.ChannelLayout | ||||
| 				switch i2.ChannelCount { | ||||
| 				case 1: | ||||
| 					cl = av.CH_MONO | ||||
| 				case 2: | ||||
| 					cl = av.CH_STEREO | ||||
| 				default: | ||||
| 					cl = av.CH_MONO | ||||
| 				} | ||||
| 				CodecData = codec.NewOpusCodecData(i2.TimeScale, cl) | ||||
| 			case av.PCM_MULAW: | ||||
| 				CodecData = codec.NewPCMMulawCodecData() | ||||
| 			case av.PCM_ALAW: | ||||
| 				CodecData = codec.NewPCMAlawCodecData() | ||||
| 			case av.PCM: | ||||
| 				CodecData = codec.NewPCMCodecData() | ||||
| 			default: | ||||
| 				client.Println("Audio Codec", i2.Type, "not supported") | ||||
| 			} | ||||
| 			if CodecData != nil { | ||||
| 				client.CodecData = append(client.CodecData, CodecData) | ||||
| 				client.audioIDX = int8(len(client.CodecData) - 1) | ||||
| 				client.audioCodec = CodecData.Type() | ||||
| 				if i2.TimeScale != 0 { | ||||
| 					client.AudioTimeScale = int64(i2.TimeScale) | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		client.chTMP += 2 | ||||
| 	} | ||||
| 	test := map[string]string{"Require": "onvif-replay", "Scale": "1.000000", "Speed": "1.000000", "Range": "clock=" + startTime + "-"} | ||||
| 	err = client.request(PLAY, test, client.control, false, false) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	go client.startStream() | ||||
| 	return client, nil | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) ControlTrack(track string) string { | ||||
| 	if strings.Contains(track, "rtsp://") { | ||||
| 		return track | ||||
| @@ -554,293 +698,6 @@ func stringInBetween(str string, start string, end string) (result string) { | ||||
| 	return str | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool) { | ||||
|  | ||||
| 	content := *payloadRAW | ||||
| 	firstByte := content[4] | ||||
| 	padding := (firstByte>>5)&1 == 1 | ||||
| 	extension := (firstByte>>4)&1 == 1 | ||||
| 	CSRCCnt := int(firstByte & 0x0f) | ||||
| 	SequenceNumber := int(binary.BigEndian.Uint16(content[6:8])) | ||||
| 	timestamp := int64(binary.BigEndian.Uint32(content[8:16])) | ||||
|  | ||||
| 	if isRTCPPacket(content) { | ||||
| 		client.Println("skipping RTCP packet") | ||||
| 		return nil, false | ||||
| 	} | ||||
|  | ||||
| 	offset := RTPHeaderSize | ||||
|  | ||||
| 	end := len(content) | ||||
| 	if end-offset >= 4*CSRCCnt { | ||||
| 		offset += 4 * CSRCCnt | ||||
| 	} | ||||
| 	if extension && len(content) < 4+offset+2+2 { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	if extension && end-offset >= 4 { | ||||
| 		extLen := 4 * int(binary.BigEndian.Uint16(content[4+offset+2:])) | ||||
| 		offset += 4 | ||||
| 		if end-offset >= extLen { | ||||
| 			offset += extLen | ||||
| 		} | ||||
| 	} | ||||
| 	if padding && end-offset > 0 { | ||||
| 		paddingLen := int(content[end-1]) | ||||
| 		if end-offset >= paddingLen { | ||||
| 			end -= paddingLen | ||||
| 		} | ||||
| 	} | ||||
| 	offset += 4 | ||||
| 	if len(content) < end { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	switch int(content[1]) { | ||||
| 	case client.videoID: | ||||
| 		if client.PreVideoTS == 0 { | ||||
| 			client.PreVideoTS = timestamp | ||||
| 		} | ||||
| 		if timestamp-client.PreVideoTS < 0 { | ||||
| 			if math.MaxUint32-client.PreVideoTS < 90*100 { //100 ms | ||||
| 				client.PreVideoTS = 0 | ||||
| 				client.PreVideoTS -= (math.MaxUint32 - client.PreVideoTS) | ||||
| 			} else { | ||||
| 				client.PreVideoTS = 0 | ||||
| 			} | ||||
| 		} | ||||
| 		if client.PreSequenceNumber != 0 && SequenceNumber-client.PreSequenceNumber != 1 { | ||||
| 			client.Println("drop packet", SequenceNumber-1) | ||||
| 		} | ||||
| 		client.PreSequenceNumber = SequenceNumber | ||||
| 		if client.BufferRtpPacket.Len() > 4048576 { | ||||
| 			client.Println("Big Buffer Flush") | ||||
| 			client.BufferRtpPacket.Truncate(0) | ||||
| 			client.BufferRtpPacket.Reset() | ||||
| 		} | ||||
| 		nalRaw, _ := h264parser.SplitNALUs(content[offset:end]) | ||||
| 		if len(nalRaw) == 0 || len(nalRaw[0]) == 0 { | ||||
| 			return nil, false | ||||
| 		} | ||||
| 		var retmap []*av.Packet | ||||
| 		for _, nal := range nalRaw { | ||||
| 			if client.videoCodec == av.H265 { | ||||
| 				naluType := (nal[0] >> 1) & 0x3f | ||||
| 				switch naluType { | ||||
| 				case h265parser.NAL_UNIT_CODED_SLICE_TRAIL_R: | ||||
| 					retmap = append(retmap, &av.Packet{ | ||||
| 						Data:            append(binSize(len(nal)), nal...), | ||||
| 						CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 						Idx:             client.videoIDX, | ||||
| 						IsKeyFrame:      false, | ||||
| 						Duration:        time.Duration(float32(timestamp-client.PreVideoTS)/90) * time.Millisecond, | ||||
| 						Time:            time.Duration(timestamp/90) * time.Millisecond, | ||||
| 					}) | ||||
| 				case h265parser.NAL_UNIT_VPS: | ||||
| 					client.CodecUpdateVPS(nal) | ||||
| 				case h265parser.NAL_UNIT_SPS: | ||||
| 					client.CodecUpdateSPS(nal) | ||||
| 				case h265parser.NAL_UNIT_PPS: | ||||
| 					client.CodecUpdatePPS(nal) | ||||
| 				case h265parser.NAL_UNIT_UNSPECIFIED_49: | ||||
| 					se := nal[2] >> 6 | ||||
| 					naluType := nal[2] & 0x3f | ||||
| 					if se == 2 { | ||||
| 						client.BufferRtpPacket.Truncate(0) | ||||
| 						client.BufferRtpPacket.Reset() | ||||
| 						client.BufferRtpPacket.Write([]byte{(nal[0] & 0x81) | (naluType << 1), nal[1]}) | ||||
| 						r := make([]byte, 2) | ||||
| 						r[1] = nal[1] | ||||
| 						r[0] = (nal[0] & 0x81) | (naluType << 1) | ||||
| 						client.BufferRtpPacket.Write(nal[3:]) | ||||
| 					} else if se == 1 { | ||||
| 						client.BufferRtpPacket.Write(nal[3:]) | ||||
| 						retmap = append(retmap, &av.Packet{ | ||||
| 							Data:            append(binSize(client.BufferRtpPacket.Len()), client.BufferRtpPacket.Bytes()...), | ||||
| 							CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 							Idx:             client.videoIDX, | ||||
| 							IsKeyFrame:      naluType == h265parser.NAL_UNIT_CODED_SLICE_IDR_W_RADL, | ||||
| 							Duration:        time.Duration(float32(timestamp-client.PreVideoTS)/90) * time.Millisecond, | ||||
| 							Time:            time.Duration(timestamp/90) * time.Millisecond, | ||||
| 						}) | ||||
| 					} else { | ||||
| 						client.BufferRtpPacket.Write(nal[3:]) | ||||
| 					} | ||||
| 				default: | ||||
| 					//client.Println("Unsupported Nal", naluType) | ||||
| 				} | ||||
|  | ||||
| 			} else if client.videoCodec == av.H264 { | ||||
| 				naluType := nal[0] & 0x1f | ||||
| 				switch { | ||||
| 				case naluType >= 1 && naluType <= 5: | ||||
| 					retmap = append(retmap, &av.Packet{ | ||||
| 						Data:            append(binSize(len(nal)), nal...), | ||||
| 						CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 						Idx:             client.videoIDX, | ||||
| 						IsKeyFrame:      naluType == 5, | ||||
| 						Duration:        time.Duration(float32(timestamp-client.PreVideoTS)/90) * time.Millisecond, | ||||
| 						Time:            time.Duration(timestamp/90) * time.Millisecond, | ||||
| 					}) | ||||
| 				case naluType == 7: | ||||
| 					client.CodecUpdateSPS(nal) | ||||
| 				case naluType == 8: | ||||
| 					client.CodecUpdatePPS(nal) | ||||
| 				case naluType == 24: | ||||
| 					packet := nal[1:] | ||||
| 					for len(packet) >= 2 { | ||||
| 						size := int(packet[0])<<8 | int(packet[1]) | ||||
| 						if size+2 > len(packet) { | ||||
| 							break | ||||
| 						} | ||||
| 						naluTypefs := packet[2] & 0x1f | ||||
| 						switch { | ||||
| 						case naluTypefs >= 1 && naluTypefs <= 5: | ||||
| 							retmap = append(retmap, &av.Packet{ | ||||
| 								Data:            append(binSize(len(packet[2:size+2])), packet[2:size+2]...), | ||||
| 								CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 								Idx:             client.videoIDX, | ||||
| 								IsKeyFrame:      naluType == 5, | ||||
| 								Duration:        time.Duration(float32(timestamp-client.PreVideoTS)/90) * time.Millisecond, | ||||
| 								Time:            time.Duration(timestamp/90) * time.Millisecond, | ||||
| 							}) | ||||
| 						case naluTypefs == 7: | ||||
| 							client.CodecUpdateSPS(packet[2 : size+2]) | ||||
| 						case naluTypefs == 8: | ||||
| 							client.CodecUpdatePPS(packet[2 : size+2]) | ||||
| 						} | ||||
| 						packet = packet[size+2:] | ||||
| 					} | ||||
| 				case naluType == 28: | ||||
| 					fuIndicator := content[offset] | ||||
| 					fuHeader := content[offset+1] | ||||
| 					isStart := fuHeader&0x80 != 0 | ||||
| 					isEnd := fuHeader&0x40 != 0 | ||||
| 					if isStart { | ||||
| 						client.fuStarted = true | ||||
| 						client.BufferRtpPacket.Truncate(0) | ||||
| 						client.BufferRtpPacket.Reset() | ||||
| 						client.BufferRtpPacket.Write([]byte{fuIndicator&0xe0 | fuHeader&0x1f}) | ||||
| 					} | ||||
| 					if client.fuStarted { | ||||
| 						client.BufferRtpPacket.Write(content[offset+2 : end]) | ||||
| 						if isEnd { | ||||
| 							client.fuStarted = false | ||||
| 							naluTypef := client.BufferRtpPacket.Bytes()[0] & 0x1f | ||||
| 							if naluTypef == 7 || naluTypef == 9 { | ||||
| 								bufered, _ := h264parser.SplitNALUs(append([]byte{0, 0, 0, 1}, client.BufferRtpPacket.Bytes()...)) | ||||
| 								for _, v := range bufered { | ||||
| 									naluTypefs := v[0] & 0x1f | ||||
| 									switch { | ||||
| 									case naluTypefs == 5: | ||||
| 										client.BufferRtpPacket.Reset() | ||||
| 										client.BufferRtpPacket.Write(v) | ||||
| 										naluTypef = 5 | ||||
| 									case naluTypefs == 7: | ||||
| 										client.CodecUpdateSPS(v) | ||||
| 									case naluTypefs == 8: | ||||
| 										client.CodecUpdatePPS(v) | ||||
| 									} | ||||
| 								} | ||||
| 							} | ||||
| 							retmap = append(retmap, &av.Packet{ | ||||
| 								Data:            append(binSize(client.BufferRtpPacket.Len()), client.BufferRtpPacket.Bytes()...), | ||||
| 								CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 								Duration:        time.Duration(float32(timestamp-client.PreVideoTS)/90) * time.Millisecond, | ||||
| 								Idx:             client.videoIDX, | ||||
| 								IsKeyFrame:      naluTypef == 5, | ||||
| 								Time:            time.Duration(timestamp/90) * time.Millisecond, | ||||
| 							}) | ||||
| 						} | ||||
| 					} | ||||
| 				default: | ||||
| 					//client.Println("Unsupported NAL Type", naluType) | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		if len(retmap) > 0 { | ||||
| 			client.PreVideoTS = timestamp | ||||
| 			return retmap, true | ||||
| 		} | ||||
| 	case client.audioID: | ||||
| 		if client.PreAudioTS == 0 { | ||||
| 			client.PreAudioTS = timestamp | ||||
| 		} | ||||
| 		nalRaw, _ := h264parser.SplitNALUs(content[offset:end]) | ||||
| 		var retmap []*av.Packet | ||||
| 		for _, nal := range nalRaw { | ||||
| 			var duration time.Duration | ||||
| 			switch client.audioCodec { | ||||
| 			case av.PCM_MULAW: | ||||
| 				duration = time.Duration(len(nal)) * time.Second / time.Duration(client.AudioTimeScale) | ||||
| 				client.AudioTimeLine += duration | ||||
| 				retmap = append(retmap, &av.Packet{ | ||||
| 					Data:            nal, | ||||
| 					CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 					Duration:        duration, | ||||
| 					Idx:             client.audioIDX, | ||||
| 					IsKeyFrame:      false, | ||||
| 					Time:            client.AudioTimeLine, | ||||
| 				}) | ||||
| 			case av.PCM_ALAW: | ||||
| 				duration = time.Duration(len(nal)) * time.Second / time.Duration(client.AudioTimeScale) | ||||
| 				client.AudioTimeLine += duration | ||||
| 				retmap = append(retmap, &av.Packet{ | ||||
| 					Data:            nal, | ||||
| 					CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 					Duration:        duration, | ||||
| 					Idx:             client.audioIDX, | ||||
| 					IsKeyFrame:      false, | ||||
| 					Time:            client.AudioTimeLine, | ||||
| 				}) | ||||
| 			case av.OPUS: | ||||
| 				duration = time.Duration(20) * time.Millisecond | ||||
| 				client.AudioTimeLine += duration | ||||
| 				retmap = append(retmap, &av.Packet{ | ||||
| 					Data:            nal, | ||||
| 					CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 					Duration:        duration, | ||||
| 					Idx:             client.audioIDX, | ||||
| 					IsKeyFrame:      false, | ||||
| 					Time:            client.AudioTimeLine, | ||||
| 				}) | ||||
| 			case av.AAC: | ||||
| 				auHeadersLength := uint16(0) | (uint16(nal[0]) << 8) | uint16(nal[1]) | ||||
| 				auHeadersCount := auHeadersLength >> 4 | ||||
| 				framesPayloadOffset := 2 + int(auHeadersCount)<<1 | ||||
| 				auHeaders := nal[2:framesPayloadOffset] | ||||
| 				framesPayload := nal[framesPayloadOffset:] | ||||
| 				for i := 0; i < int(auHeadersCount); i++ { | ||||
| 					auHeader := uint16(0) | (uint16(auHeaders[0]) << 8) | uint16(auHeaders[1]) | ||||
| 					frameSize := auHeader >> 3 | ||||
| 					frame := framesPayload[:frameSize] | ||||
| 					auHeaders = auHeaders[2:] | ||||
| 					framesPayload = framesPayload[frameSize:] | ||||
| 					if _, _, _, _, err := aacparser.ParseADTSHeader(frame); err == nil { | ||||
| 						frame = frame[7:] | ||||
| 					} | ||||
| 					duration = time.Duration((float32(1024)/float32(client.AudioTimeScale))*1000*1000*1000) * time.Nanosecond | ||||
| 					client.AudioTimeLine += duration | ||||
| 					retmap = append(retmap, &av.Packet{ | ||||
| 						Data:            frame, | ||||
| 						CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 						Duration:        duration, | ||||
| 						Idx:             client.audioIDX, | ||||
| 						IsKeyFrame:      false, | ||||
| 						Time:            client.AudioTimeLine, | ||||
| 					}) | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		if len(retmap) > 0 { | ||||
| 			client.PreAudioTS = timestamp | ||||
| 			return retmap, true | ||||
| 		} | ||||
| 	default: | ||||
| 		//client.Println("Unsuported Intervaled data packet", int(content[1]), content[offset:end]) | ||||
| 	} | ||||
| 	return nil, false | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) CodecUpdateSPS(val []byte) { | ||||
| 	if client.videoCodec != av.H264 && client.videoCodec != av.H265 { | ||||
| 		return | ||||
| @@ -954,7 +811,7 @@ func (client *RTSPClient) CodecUpdateVPS(val []byte) { | ||||
| // Println mini logging functions | ||||
| func (client *RTSPClient) Println(v ...interface{}) { | ||||
| 	if client.options.Debug { | ||||
| 		log.Println(v) | ||||
| 		log.Println(v...) | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
							
								
								
									
										292
									
								
								format/rtspv2/demuxer.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										292
									
								
								format/rtspv2/demuxer.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,292 @@ | ||||
| package rtspv2 | ||||
|  | ||||
| import ( | ||||
| 	"encoding/binary" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
| 	"math" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	TimeBaseFactor = 90 | ||||
| 	TimeDelay      = 1 | ||||
| ) | ||||
|  | ||||
| func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool) { | ||||
| 	content := *payloadRAW | ||||
| 	firstByte := content[4] | ||||
| 	padding := (firstByte>>5)&1 == 1 | ||||
| 	extension := (firstByte>>4)&1 == 1 | ||||
| 	CSRCCnt := int(firstByte & 0x0f) | ||||
| 	client.sequenceNumber = int(binary.BigEndian.Uint16(content[6:8])) | ||||
| 	client.timestamp = int64(binary.BigEndian.Uint32(content[8:16])) | ||||
|  | ||||
| 	if isRTCPPacket(content) { | ||||
| 		client.Println("skipping RTCP packet") | ||||
| 		return nil, false | ||||
| 	} | ||||
|  | ||||
| 	client.offset = RTPHeaderSize | ||||
|  | ||||
| 	client.end = len(content) | ||||
| 	if client.end-client.offset >= 4*CSRCCnt { | ||||
| 		client.offset += 4 * CSRCCnt | ||||
| 	} | ||||
| 	extensionStart := 0 | ||||
| 	extensionEnd := 0 | ||||
| 	if extension && len(content) < 4+client.offset+2+2 { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	if extension && client.end-client.offset >= 4 { | ||||
| 		extLen := 4 * int(binary.BigEndian.Uint16(content[4+client.offset+2:])) | ||||
| 		client.offset += 4 | ||||
| 		if client.end-client.offset >= extLen { | ||||
| 			extensionStart = client.offset | ||||
| 			extensionEnd = client.offset + extLen | ||||
| 			client.offset += extLen | ||||
| 		} | ||||
| 	} | ||||
| 	if padding && client.end-client.offset > 0 { | ||||
| 		paddingLen := int(content[client.end-1]) | ||||
| 		if client.end-client.offset >= paddingLen { | ||||
| 			client.end -= paddingLen | ||||
| 		} | ||||
| 	} | ||||
| 	client.offset += 4 | ||||
| 	if len(content) < client.end { | ||||
| 		return nil, false | ||||
| 	} | ||||
|  | ||||
| 	switch int(content[1]) { | ||||
| 	case client.videoID: | ||||
| 		pck, ok := client.handleVideo(content) | ||||
| 		for _, p := range pck { | ||||
| 			p.Extension = extension | ||||
| 			p.Extensions = content[extensionStart+4 : extensionEnd+4] | ||||
| 		} | ||||
| 		return pck, ok | ||||
| 	case client.audioID: | ||||
| 		pck, ok := client.handleAudio(content) | ||||
| 		for _, p := range pck { | ||||
| 			p.Extension = extension | ||||
| 			p.Extensions = content[extensionStart+4 : extensionEnd+4] | ||||
| 		} | ||||
| 		return pck, ok | ||||
| 	} | ||||
| 	return nil, false | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) handleVideo(content []byte) ([]*av.Packet, bool) { | ||||
| 	if client.PreVideoTS == 0 { | ||||
| 		client.PreVideoTS = client.timestamp | ||||
| 	} | ||||
| 	if client.timestamp-client.PreVideoTS < 0 { | ||||
| 		if math.MaxUint32-client.PreVideoTS < 90*100 { //100 ms | ||||
| 			client.PreVideoTS = 0 | ||||
| 			client.PreVideoTS -= (math.MaxUint32 - client.PreVideoTS) | ||||
| 		} else { | ||||
| 			client.PreVideoTS = 0 | ||||
| 		} | ||||
| 	} | ||||
| 	if client.PreSequenceNumber != 0 && client.sequenceNumber-client.PreSequenceNumber != 1 { | ||||
| 		client.Println("drop packet", client.sequenceNumber-1) | ||||
| 	} | ||||
| 	client.PreSequenceNumber = client.sequenceNumber | ||||
| 	if client.BufferRtpPacket.Len() > 4048576 { | ||||
| 		client.Println("Big Buffer Flush") | ||||
| 		client.BufferRtpPacket.Truncate(0) | ||||
| 		client.BufferRtpPacket.Reset() | ||||
| 	} | ||||
| 	nalRaw, _ := h264parser.SplitNALUs(content[client.offset:client.end]) | ||||
| 	if len(nalRaw) == 0 || len(nalRaw[0]) == 0 { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	var retmap []*av.Packet | ||||
| 	for _, nal := range nalRaw { | ||||
| 		if client.videoCodec == av.H265 { | ||||
| 			//fmt.Printf("Content Len:%d\n", len(content)) | ||||
| 			retmap = client.handleH265Payload(nal, retmap) | ||||
| 		} else if client.videoCodec == av.H264 { | ||||
| 			retmap = client.handleH264Payload(content, nal, retmap) | ||||
| 		} | ||||
| 	} | ||||
| 	if len(retmap) > 0 { | ||||
| 		client.PreVideoTS = client.timestamp | ||||
| 		return retmap, true | ||||
| 	} | ||||
|  | ||||
| 	return nil, false | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) handleH264Payload(content, nal []byte, retmap []*av.Packet) []*av.Packet { | ||||
| 	naluType := nal[0] & 0x1f | ||||
| 	switch { | ||||
| 	case naluType >= 1 && naluType <= 5: | ||||
| 		retmap = client.appendVideoPacket(retmap, nal, naluType == 5) | ||||
| 	case naluType == h264parser.NALU_SPS: | ||||
| 		client.CodecUpdateSPS(nal) | ||||
| 	case naluType == h264parser.NALU_PPS: | ||||
| 		client.CodecUpdatePPS(nal) | ||||
| 	case naluType == 24: | ||||
| 		packet := nal[1:] | ||||
| 		for len(packet) >= 2 { | ||||
| 			size := int(packet[0])<<8 | int(packet[1]) | ||||
| 			if size+2 > len(packet) { | ||||
| 				break | ||||
| 			} | ||||
| 			naluTypefs := packet[2] & 0x1f | ||||
| 			switch { | ||||
| 			case naluTypefs >= 1 && naluTypefs <= 5: | ||||
| 				retmap = client.appendVideoPacket(retmap, packet[2:size+2], naluTypefs == 5) | ||||
| 			case naluTypefs == h264parser.NALU_SPS: | ||||
| 				client.CodecUpdateSPS(packet[2 : size+2]) | ||||
| 			case naluTypefs == h264parser.NALU_PPS: | ||||
| 				client.CodecUpdatePPS(packet[2 : size+2]) | ||||
| 			} | ||||
| 			packet = packet[size+2:] | ||||
| 		} | ||||
| 	case naluType == 28: | ||||
| 		fuIndicator := content[client.offset] | ||||
| 		fuHeader := content[client.offset+1] | ||||
| 		isStart := fuHeader&0x80 != 0 | ||||
| 		isEnd := fuHeader&0x40 != 0 | ||||
| 		if isStart { | ||||
| 			client.fuStarted = true | ||||
| 			client.BufferRtpPacket.Truncate(0) | ||||
| 			client.BufferRtpPacket.Reset() | ||||
| 			client.BufferRtpPacket.Write([]byte{fuIndicator&0xe0 | fuHeader&0x1f}) | ||||
| 		} | ||||
| 		if client.fuStarted { | ||||
| 			client.BufferRtpPacket.Write(content[client.offset+2 : client.end]) | ||||
| 			if isEnd { | ||||
| 				client.fuStarted = false | ||||
| 				naluTypef := client.BufferRtpPacket.Bytes()[0] & 0x1f | ||||
| 				if naluTypef == 7 || naluTypef == 9 { | ||||
| 					bufered, _ := h264parser.SplitNALUs(append([]byte{0, 0, 0, 1}, client.BufferRtpPacket.Bytes()...)) | ||||
| 					for _, v := range bufered { | ||||
| 						naluTypefs := v[0] & 0x1f | ||||
| 						switch { | ||||
| 						case naluTypefs == 5: | ||||
| 							client.BufferRtpPacket.Reset() | ||||
| 							client.BufferRtpPacket.Write(v) | ||||
| 							naluTypef = 5 | ||||
| 						case naluTypefs == h264parser.NALU_SPS: | ||||
| 							client.CodecUpdateSPS(v) | ||||
| 						case naluTypefs == h264parser.NALU_PPS: | ||||
| 							client.CodecUpdatePPS(v) | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 				retmap = client.appendVideoPacket(retmap, client.BufferRtpPacket.Bytes(), naluTypef == 5) | ||||
| 			} | ||||
| 		} | ||||
| 	default: | ||||
| 		client.Println("Unsupported NAL Type", naluType) | ||||
| 	} | ||||
|  | ||||
| 	return retmap | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) handleH265Payload(nal []byte, retmap []*av.Packet) []*av.Packet { | ||||
| 	naluType := (nal[0] >> 1) & 0x3f | ||||
| 	switch naluType { | ||||
| 	case h265parser.NAL_UNIT_CODED_SLICE_TRAIL_R: | ||||
| 		retmap = client.appendVideoPacket(retmap, nal, false) | ||||
| 	case h265parser.NAL_UNIT_VPS: | ||||
| 		client.CodecUpdateVPS(nal) | ||||
| 	case h265parser.NAL_UNIT_SPS: | ||||
| 		client.CodecUpdateSPS(nal) | ||||
| 	case h265parser.NAL_UNIT_PPS: | ||||
| 		client.CodecUpdatePPS(nal) | ||||
| 	case h265parser.NAL_UNIT_UNSPECIFIED_49: | ||||
| 		se := nal[2] >> 6 | ||||
| 		naluType := nal[2] & 0x3f | ||||
| 		switch se { | ||||
| 		case 2: | ||||
| 			client.BufferRtpPacket.Truncate(0) | ||||
| 			client.BufferRtpPacket.Reset() | ||||
| 			client.BufferRtpPacket.Write([]byte{(nal[0] & 0x81) | (naluType << 1), nal[1]}) | ||||
| 			r := make([]byte, 2) | ||||
| 			r[1] = nal[1] | ||||
| 			r[0] = (nal[0] & 0x81) | (naluType << 1) | ||||
| 			client.BufferRtpPacket.Write(nal[3:]) | ||||
| 		case 1: | ||||
| 			client.BufferRtpPacket.Write(nal[3:]) | ||||
| 			retmap = client.appendVideoPacket(retmap, client.BufferRtpPacket.Bytes(), naluType == h265parser.NAL_UNIT_CODED_SLICE_IDR_W_RADL) | ||||
| 		default: | ||||
| 			client.BufferRtpPacket.Write(nal[3:]) | ||||
| 		} | ||||
| 	default: | ||||
| 		// Todo: 这里少东西,需要处理 | ||||
| 		client.Println("Unsupported Nal", naluType) | ||||
| 	} | ||||
| 	return retmap | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) handleAudio(content []byte) ([]*av.Packet, bool) { | ||||
| 	if client.PreAudioTS == 0 { | ||||
| 		client.PreAudioTS = client.timestamp | ||||
| 	} | ||||
| 	nalRaw, _ := h264parser.SplitNALUs(content[client.offset:client.end]) | ||||
| 	var retmap []*av.Packet | ||||
| 	for _, nal := range nalRaw { | ||||
| 		var duration time.Duration | ||||
| 		switch client.audioCodec { | ||||
| 		case av.PCM_MULAW, av.PCM_ALAW: | ||||
| 			duration = time.Duration(len(nal)) * time.Second / time.Duration(client.AudioTimeScale) | ||||
| 			retmap = client.appendAudioPacket(retmap, nal, duration) | ||||
| 		case av.OPUS: | ||||
| 			duration = time.Duration(20) * time.Millisecond | ||||
| 			retmap = client.appendAudioPacket(retmap, nal, duration) | ||||
| 		case av.AAC: | ||||
| 			auHeadersLength := uint16(0) | (uint16(nal[0]) << 8) | uint16(nal[1]) | ||||
| 			auHeadersCount := auHeadersLength >> 4 | ||||
| 			framesPayloadOffset := 2 + int(auHeadersCount)<<1 | ||||
| 			auHeaders := nal[2:framesPayloadOffset] | ||||
| 			framesPayload := nal[framesPayloadOffset:] | ||||
| 			for i := 0; i < int(auHeadersCount); i++ { | ||||
| 				auHeader := uint16(0) | (uint16(auHeaders[0]) << 8) | uint16(auHeaders[1]) | ||||
| 				frameSize := auHeader >> 3 | ||||
| 				frame := framesPayload[:frameSize] | ||||
| 				auHeaders = auHeaders[2:] | ||||
| 				framesPayload = framesPayload[frameSize:] | ||||
| 				if _, _, _, _, err := aacparser.ParseADTSHeader(frame); err == nil { | ||||
| 					frame = frame[7:] | ||||
| 				} | ||||
| 				duration = time.Duration((float32(1024)/float32(client.AudioTimeScale))*1000*1000*1000) * time.Nanosecond | ||||
| 				retmap = client.appendAudioPacket(retmap, frame, duration) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	if len(retmap) > 0 { | ||||
| 		client.PreAudioTS = client.timestamp | ||||
| 		return retmap, true | ||||
| 	} | ||||
| 	return nil, false | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) appendAudioPacket(retmap []*av.Packet, nal []byte, duration time.Duration) []*av.Packet { | ||||
| 	client.AudioTimeLine += duration | ||||
| 	return append(retmap, &av.Packet{ | ||||
| 		Data:            nal, | ||||
| 		CompositionTime: time.Duration(1) * time.Millisecond, | ||||
| 		Duration:        duration, | ||||
| 		Idx:             client.audioIDX, | ||||
| 		IsKeyFrame:      false, | ||||
| 		Time:            client.AudioTimeLine, | ||||
| 	}) | ||||
| } | ||||
|  | ||||
| func (client *RTSPClient) appendVideoPacket(retmap []*av.Packet, nal []byte, isKeyFrame bool) []*av.Packet { | ||||
| 	return append(retmap, &av.Packet{ | ||||
| 		Data:            append(binSize(len(nal)), nal...), | ||||
| 		CompositionTime: time.Duration(TimeDelay) * time.Millisecond, | ||||
| 		Idx:             client.videoIDX, | ||||
| 		IsKeyFrame:      isKeyFrame, | ||||
| 		Duration:        time.Duration(float32(client.timestamp-client.PreVideoTS)/TimeBaseFactor) * time.Millisecond, | ||||
| 		Time:            time.Duration(client.timestamp/TimeBaseFactor) * time.Millisecond, | ||||
| 	}) | ||||
| } | ||||
							
								
								
									
										24
									
								
								format/rtspv2/rtsp_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								format/rtspv2/rtsp_test.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| package rtspv2 | ||||
|  | ||||
| import ( | ||||
| 	"testing" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| func Test(t *testing.T) { | ||||
| 	dial, err := Dial(RTSPClientOptions{URL: "rtsp://192.168.211.9:554/pano/0", DisableAudio: true, DialTimeout: 10 * time.Second, ReadWriteTimeout: 10 * time.Second, Debug: true}) | ||||
| 	//dial, err := Dial(RTSPClientOptions{URL: "rtsp://192.168.211.200:8554", DisableAudio: true, DialTimeout: 10 * time.Second, ReadWriteTimeout: 10 * time.Second, Debug: true}) | ||||
| 	if err != nil { | ||||
| 		return | ||||
| 	} | ||||
| 	for { | ||||
| 		select { | ||||
| 		case signals := <-dial.Signals: | ||||
| 			println(signals) | ||||
| 			continue | ||||
| 		case <-dial.OutgoingPacketQueue: | ||||
| 			//println(time.Now().UnixMilli()) | ||||
| 			continue | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -7,7 +7,7 @@ import ( | ||||
| 	"net/url" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| @@ -30,7 +30,6 @@ const ( | ||||
| 	LocalCache         int = 3 | ||||
| ) | ||||
|  | ||||
| // | ||||
| const ( | ||||
| 	StreamTypeH264 = 0x1b | ||||
| 	StreamTypeH265 = 0x24 | ||||
|   | ||||
| @@ -6,12 +6,12 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/codec/mjpeg" | ||||
| 	"github.com/deepch/vdk/format/ts/tsio" | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/mjpeg" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/ts/tsio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| type Demuxer struct { | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package ts | ||||
| import ( | ||||
| 	"io" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/av/avutil" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av/avutil" | ||||
| ) | ||||
|  | ||||
| func Handler(h *avutil.RegisterHandler) { | ||||
|   | ||||
| @@ -2,14 +2,14 @@ package ts | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"github.com/deepch/vdk/codec/h265parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h265parser" | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/aacparser" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"github.com/deepch/vdk/format/ts/tsio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/aacparser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/ts/tsio" | ||||
| ) | ||||
|  | ||||
| var CodecTypes = []av.CodecType{av.H264, av.H265, av.AAC} | ||||
|   | ||||
| @@ -3,8 +3,8 @@ package ts | ||||
| import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/format/ts/tsio" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/format/ts/tsio" | ||||
| ) | ||||
|  | ||||
| type Stream struct { | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"io" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/utils/bits/pio" | ||||
| 	"git.r-2.top/kunmeng/vdk/utils/bits/pio" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
|   | ||||
| @@ -10,8 +10,8 @@ import ( | ||||
|  | ||||
| 	"github.com/pion/webrtc/v2" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
| 	"github.com/pion/webrtc/v2/pkg/media" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -7,9 +7,9 @@ import ( | ||||
| 	"log" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/deepch/vdk/codec/h264parser" | ||||
| 	"git.r-2.top/kunmeng/vdk/codec/h264parser" | ||||
|  | ||||
| 	"github.com/deepch/vdk/av" | ||||
| 	"git.r-2.top/kunmeng/vdk/av" | ||||
| 	"github.com/pion/interceptor" | ||||
| 	"github.com/pion/webrtc/v3" | ||||
| 	"github.com/pion/webrtc/v3/pkg/media" | ||||
|   | ||||
							
								
								
									
										17
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								go.mod
									
									
									
									
									
								
							| @@ -1,25 +1,25 @@ | ||||
| module github.com/deepch/vdk | ||||
| module git.r-2.top/kunmeng/vdk | ||||
|  | ||||
| go 1.18 | ||||
|  | ||||
| require ( | ||||
| 	github.com/gobwas/ws v1.3.1 | ||||
| 	github.com/google/uuid v1.3.0 | ||||
| 	github.com/pion/interceptor v0.1.17 | ||||
| 	github.com/pion/webrtc/v2 v2.2.26 | ||||
| 	github.com/pion/webrtc/v3 v3.2.12 | ||||
| 	github.com/shirou/gopsutil/v3 v3.24.5 | ||||
| ) | ||||
|  | ||||
| require ( | ||||
| 	github.com/cheekybits/genny v1.0.0 // indirect | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/go-ole/go-ole v1.2.6 // indirect | ||||
| 	github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect | ||||
| 	github.com/gobwas/httphead v0.1.0 // indirect | ||||
| 	github.com/gobwas/pool v0.2.1 // indirect | ||||
| 	github.com/gobwas/ws v1.3.1 // indirect | ||||
| 	github.com/golang/mock v1.6.0 // indirect | ||||
| 	github.com/google/pprof v0.0.0-20230309165930-d61513b1440d // indirect | ||||
| 	github.com/lucas-clemente/quic-go v0.31.1 // indirect | ||||
| 	github.com/marten-seemann/qtls v0.10.0 // indirect | ||||
| 	github.com/marten-seemann/qtls-go1-18 v0.1.4 // indirect | ||||
| 	github.com/marten-seemann/qtls-go1-19 v0.1.2 // indirect | ||||
| 	github.com/onsi/ginkgo/v2 v2.9.0 // indirect | ||||
| @@ -42,16 +42,15 @@ require ( | ||||
| 	github.com/pion/transport v0.14.1 // indirect | ||||
| 	github.com/pion/transport/v2 v2.2.1 // indirect | ||||
| 	github.com/pion/turn/v2 v2.1.2 // indirect | ||||
| 	github.com/pion/udp v0.1.4 // indirect | ||||
| 	github.com/pion/udp/v2 v2.0.1 // indirect | ||||
| 	github.com/pmezard/go-difflib v1.0.0 // indirect | ||||
| 	github.com/stretchr/testify v1.8.4 // indirect | ||||
| 	github.com/tejasmanohar/timerange-go v1.0.0 // indirect | ||||
| 	github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect | ||||
| 	github.com/stretchr/testify v1.9.0 // indirect | ||||
| 	github.com/yusufpapurcu/wmi v1.2.4 // indirect | ||||
| 	golang.org/x/crypto v0.10.0 // indirect | ||||
| 	golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 // indirect | ||||
| 	golang.org/x/mod v0.9.0 // indirect | ||||
| 	golang.org/x/net v0.11.0 // indirect | ||||
| 	golang.org/x/sys v0.9.0 // indirect | ||||
| 	golang.org/x/sys v0.20.0 // indirect | ||||
| 	golang.org/x/tools v0.7.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| ) | ||||
|   | ||||
							
								
								
									
										121
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										121
									
								
								go.sum
									
									
									
									
									
								
							| @@ -12,7 +12,6 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU | ||||
| github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= | ||||
| github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= | ||||
| github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= | ||||
| github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= | ||||
| github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= | ||||
| github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= | ||||
| github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | ||||
| @@ -23,11 +22,13 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn | ||||
| github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= | ||||
| github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= | ||||
| github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= | ||||
| github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= | ||||
| github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= | ||||
| github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= | ||||
| github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= | ||||
| github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= | ||||
| github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= | ||||
| github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= | ||||
| github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= | ||||
| github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= | ||||
| github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= | ||||
| github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= | ||||
| @@ -42,7 +43,6 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er | ||||
| github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | ||||
| github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= | ||||
| github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= | ||||
| github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= | ||||
| github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= | ||||
| github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= | ||||
| github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= | ||||
| @@ -57,6 +57,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W | ||||
| github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= | ||||
| github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= | ||||
| github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= | ||||
| github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= | ||||
| github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= | ||||
| github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= | ||||
| github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | ||||
| @@ -64,6 +65,7 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw | ||||
| github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||||
| github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||||
| github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||||
| github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | ||||
| github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= | ||||
| github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= | ||||
| github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= | ||||
| @@ -83,11 +85,12 @@ github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0 | ||||
| github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= | ||||
| github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= | ||||
| github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | ||||
| github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= | ||||
| github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | ||||
| github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | ||||
| github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | ||||
| github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= | ||||
| github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | ||||
| github.com/lucas-clemente/quic-go v0.7.1-0.20190401152353-907071221cf9 h1:tbuodUh2vuhOVZAdW3NEUvosFHUMJwUNl7jk/VSEiwc= | ||||
| github.com/lucas-clemente/quic-go v0.7.1-0.20190401152353-907071221cf9/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= | ||||
| github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= | ||||
| github.com/lucas-clemente/quic-go v0.31.1 h1:O8Od7hfioqq0PMYHDyBkxU2aA7iZ2W9pjbrWuja2YR4= | ||||
| @@ -95,9 +98,7 @@ github.com/lucas-clemente/quic-go v0.31.1/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYg | ||||
| github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= | ||||
| github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= | ||||
| github.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= | ||||
| github.com/marten-seemann/qtls v0.2.3 h1:0yWJ43C62LsZt08vuQJDK1uC1czUc3FJeCLPoNAI4vA= | ||||
| github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= | ||||
| github.com/marten-seemann/qtls v0.10.0 h1:ECsuYUKalRL240rRD4Ri33ISb7kAQ3qGDlrrl55b2pc= | ||||
| github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= | ||||
| github.com/marten-seemann/qtls-go1-15 v0.1.0/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= | ||||
| github.com/marten-seemann/qtls-go1-18 v0.1.4 h1:ogomB+lWV3Vmwiu6RTwDVTMGx+9j7SEi98e8QB35Its= | ||||
| @@ -111,60 +112,39 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb | ||||
| github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= | ||||
| github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= | ||||
| github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= | ||||
| github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= | ||||
| github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= | ||||
| github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | ||||
| github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | ||||
| github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= | ||||
| github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= | ||||
| github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= | ||||
| github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= | ||||
| github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= | ||||
| github.com/onsi/ginkgo/v2 v2.9.0 h1:Tugw2BKlNHTMfG+CheOITkYvk4LAh6MFOvikhGVnhE8= | ||||
| github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk= | ||||
| github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= | ||||
| github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= | ||||
| github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= | ||||
| github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= | ||||
| github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= | ||||
| github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= | ||||
| github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= | ||||
| github.com/pion/datachannel v1.4.21/go.mod h1:oiNyP4gHx2DIwRzX/MFyH0Rz/Gz05OgBlayAI2hAWjg= | ||||
| github.com/pion/datachannel v1.5.2 h1:piB93s8LGmbECrpO84DnkIVWasRMk3IimbcXkTQLE6E= | ||||
| github.com/pion/datachannel v1.5.2/go.mod h1:FTGQWaHrdCwIJ1rw6xBIfZVkslikjShim5yr05XFuCQ= | ||||
| github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8= | ||||
| github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0= | ||||
| github.com/pion/dtls/v2 v2.0.1/go.mod h1:uMQkz2W0cSqY00xav7WByQ4Hb+18xeQh2oH2fRezr5U= | ||||
| github.com/pion/dtls/v2 v2.0.2/go.mod h1:27PEO3MDdaCfo21heT59/vsdmZc0zMt9wQPcSlLu/1I= | ||||
| github.com/pion/dtls/v2 v2.1.3/go.mod h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus= | ||||
| github.com/pion/dtls/v2 v2.1.5 h1:jlh2vtIyUBShchoTDqpCCqiYCyRFJ/lvf/gQ8TALs+c= | ||||
| github.com/pion/dtls/v2 v2.1.5/go.mod h1:BqCE7xPZbPSubGasRoDFJeTsyJtdD1FanJYL0JGheqY= | ||||
| github.com/pion/dtls/v2 v2.2.6 h1:yXMxKr0Skd+Ub6A8UqXTRLSywskx93ooMRHsQUtd+Z4= | ||||
| github.com/pion/dtls/v2 v2.2.6/go.mod h1:t8fWJCIquY5rlQZwA2yWxUS1+OCrAdXrhVKXB5oD/wY= | ||||
| github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= | ||||
| github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= | ||||
| github.com/pion/ice v0.7.18 h1:KbAWlzWRUdX9SmehBh3gYpIFsirjhSQsCw6K2MjYMK0= | ||||
| github.com/pion/ice v0.7.18/go.mod h1:+Bvnm3nYC6Nnp7VV6glUkuOfToB/AtMRZpOU8ihuf4c= | ||||
| github.com/pion/ice/v2 v2.2.6 h1:R/vaLlI1J2gCx141L5PEwtuGAGcyS6e7E0hDeJFq5Ig= | ||||
| github.com/pion/ice/v2 v2.2.6/go.mod h1:SWuHiOGP17lGromHTFadUe1EuPgFh/oCU6FCMZHooVE= | ||||
| github.com/pion/ice/v2 v2.3.1 h1:FQCmUfZe2Jpe7LYStVBOP6z1DiSzbIateih3TztgTjc= | ||||
| github.com/pion/ice/v2 v2.3.1/go.mod h1:aq2kc6MtYNcn4XmMhobAv6hTNJiHzvD0yXRz80+bnP8= | ||||
| github.com/pion/ice/v2 v2.3.9 h1:7yZpHf3PhPxJGT4JkMj1Y8Rl5cQ6fB709iz99aeMd/U= | ||||
| github.com/pion/ice/v2 v2.3.9/go.mod h1:lT3kv5uUIlHfXHU/ZRD7uKD/ufM202+eTa3C/umgGf4= | ||||
| github.com/pion/interceptor v0.1.11 h1:00U6OlqxA3FFB50HSg25J/8cWi7P6FbSzw4eFn24Bvs= | ||||
| github.com/pion/interceptor v0.1.11/go.mod h1:tbtKjZY14awXd7Bq0mmWvgtHB5MDaRN7HV3OZ/uy7s8= | ||||
| github.com/pion/interceptor v0.1.12 h1:CslaNriCFUItiXS5o+hh5lpL0t0ytQkFnUcbbCs2Zq8= | ||||
| github.com/pion/interceptor v0.1.12/go.mod h1:bDtgAD9dRkBZpWHGKaoKb42FhDHTG2rX8Ii9LRALLVA= | ||||
| github.com/pion/interceptor v0.1.17 h1:prJtgwFh/gB8zMqGZoOgJPHivOwVAp61i2aG61Du/1w= | ||||
| github.com/pion/interceptor v0.1.17/go.mod h1:SY8kpmfVBvrbUzvj2bsXz7OJt5JvmVNZ+4Kjq7FcwrI= | ||||
| github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= | ||||
| github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= | ||||
| github.com/pion/mdns v0.0.4/go.mod h1:R1sL0p50l42S5lJs91oNdUL58nm0QHrhxnSegr++qC0= | ||||
| github.com/pion/mdns v0.0.5 h1:Q2oj/JB3NqfzY9xGZ1fPzZzK7sDSD8rZPOvcIQ10BCw= | ||||
| github.com/pion/mdns v0.0.5/go.mod h1:UgssrvdD3mxpi8tMxAXbsppL3vJ4Jipw1mTCW+al01g= | ||||
| github.com/pion/mdns v0.0.7 h1:P0UB4Sr6xDWEox0kTVxF0LmQihtCbSAdW0H2nEgkA3U= | ||||
| github.com/pion/mdns v0.0.7/go.mod h1:4iP2UbeFhLI/vWju/bw6ZfwjJzk0z8DNValjGxR/dD8= | ||||
| github.com/pion/quic v0.1.1 h1:D951FV+TOqI9A0rTF7tHx0Loooqz+nyzjEyj8o3PuMA= | ||||
| github.com/pion/quic v0.1.1/go.mod h1:zEU51v7ru8Mp4AUBJvj6psrSth5eEFNnVQK5K48oV3k= | ||||
| github.com/pion/quic v0.1.4 h1:bNz9sCJjlM3GqMdq7Fne57FiWfdyiJ++yHVbuqeoD3Y= | ||||
| github.com/pion/quic v0.1.4/go.mod h1:dBhNvkLoQqRwfi6h3Vqj3IcPLgiW7rkZxBbRdp7Vzvk= | ||||
| @@ -173,8 +153,6 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= | ||||
| github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= | ||||
| github.com/pion/rtcp v1.2.3/go.mod h1:zGhIv0RPRF0Z1Wiij22pUt5W/c9fevqSzT4jje/oK7I= | ||||
| github.com/pion/rtcp v1.2.4/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0= | ||||
| github.com/pion/rtcp v1.2.9 h1:1ujStwg++IOLIEoOiIQ2s+qBuJ1VN81KW+9pMPsif+U= | ||||
| github.com/pion/rtcp v1.2.9/go.mod h1:qVPhiCzAm4D/rxb6XzKeyZiQK69yJpbUDJSF7TgrqNo= | ||||
| github.com/pion/rtcp v1.2.10 h1:nkr3uj+8Sp97zyItdN60tE/S6vk4al5CPRR6Gejsdjc= | ||||
| github.com/pion/rtcp v1.2.10/go.mod h1:ztfEwXZNLGyF1oQDttz/ZKIBaeeg/oWbRYqzBM9TL1I= | ||||
| github.com/pion/rtp v1.6.0/go.mod h1:QgfogHsMBVE/RFNno467U/KBqfUywEH+HK+0rtnwsdI= | ||||
| @@ -182,80 +160,46 @@ github.com/pion/rtp v1.6.1/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko | ||||
| github.com/pion/rtp v1.7.13 h1:qcHwlmtiI50t1XivvoawdCGTP4Uiypzfrsap+bijcoA= | ||||
| github.com/pion/rtp v1.7.13/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko= | ||||
| github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0= | ||||
| github.com/pion/sctp v1.8.0/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s= | ||||
| github.com/pion/sctp v1.8.2 h1:yBBCIrUMJ4yFICL3RIvR4eh/H2BTTvlligmSTy+3kiA= | ||||
| github.com/pion/sctp v1.8.2/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s= | ||||
| github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= | ||||
| github.com/pion/sctp v1.8.6 h1:CUex11Vkt9YS++VhLf8b55O3VqKrWL6W3SDwX4jAqsI= | ||||
| github.com/pion/sctp v1.8.6/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= | ||||
| github.com/pion/sctp v1.8.7 h1:JnABvFakZueGAn4KU/4PSKg+GWbF6QWbKTWZOSGJjXw= | ||||
| github.com/pion/sctp v1.8.7/go.mod h1:g1Ul+ARqZq5JEmoFy87Q/4CePtKnTJ1QCL9dBBdN6AU= | ||||
| github.com/pion/sdp/v2 v2.4.0 h1:luUtaETR5x2KNNpvEMv/r4Y+/kzImzbz4Lm1z8eQNQI= | ||||
| github.com/pion/sdp/v2 v2.4.0/go.mod h1:L2LxrOpSTJbAns244vfPChbciR/ReU1KWfG04OpkR7E= | ||||
| github.com/pion/sdp/v3 v3.0.5 h1:ouvI7IgGl+V4CrqskVtr3AaTrPvPisEOxwgpdktctkU= | ||||
| github.com/pion/sdp/v3 v3.0.5/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw= | ||||
| github.com/pion/sdp/v3 v3.0.6 h1:WuDLhtuFUUVpTfus9ILC4HRyHsW6TdugjEX/QY9OiUw= | ||||
| github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw= | ||||
| github.com/pion/srtp v1.5.1 h1:9Q3jAfslYZBt+C69SI/ZcONJh9049JUHZWYRRf5KEKw= | ||||
| github.com/pion/srtp v1.5.1/go.mod h1:B+QgX5xPeQTNc1CJStJPHzOlHK66ViMDWTT0HZTCkcA= | ||||
| github.com/pion/srtp v1.5.2 h1:25DmvH+fqKZDqvX64vTwnycVwL9ooJxHF/gkX16bDBY= | ||||
| github.com/pion/srtp v1.5.2/go.mod h1:NiBff/MSxUwMUwx/fRNyD/xGE+dVvf8BOCeXhjCXZ9U= | ||||
| github.com/pion/srtp/v2 v2.0.9 h1:JJq3jClmDFBPX/F5roEb0U19jSU7eUhyDqR/NZ34EKQ= | ||||
| github.com/pion/srtp/v2 v2.0.9/go.mod h1:5TtM9yw6lsH0ppNCehB/EjEUli7VkUgKSPJqWVqbhQ4= | ||||
| github.com/pion/srtp/v2 v2.0.12 h1:WrmiVCubGMOAObBU1vwWjG0H3VSyQHawKeer2PVA5rY= | ||||
| github.com/pion/srtp/v2 v2.0.12/go.mod h1:C3Ep44hlOo2qEYaq4ddsmK5dL63eLehXFbHaZ9F5V9Y= | ||||
| github.com/pion/srtp/v2 v2.0.15 h1:+tqRtXGsGwHC0G0IUIAzRmdkHvriF79IHVfZGfHrQoA= | ||||
| github.com/pion/srtp/v2 v2.0.15/go.mod h1:b/pQOlDrbB0HEH5EUAQXzSYxikFbNcNuKmF8tM0hCtw= | ||||
| github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg= | ||||
| github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA= | ||||
| github.com/pion/stun v0.4.0 h1:vgRrbBE2htWHy7l3Zsxckk7rkjnjOsSM7PHZnBwo8rk= | ||||
| github.com/pion/stun v0.4.0/go.mod h1:QPsh1/SbXASntw3zkkrIk3ZJVKz4saBY2G7S10P3wCw= | ||||
| github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= | ||||
| github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= | ||||
| github.com/pion/transport v0.6.0/go.mod h1:iWZ07doqOosSLMhZ+FXUTq+TamDoXSllxpbGcfkCmbE= | ||||
| github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8= | ||||
| github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE= | ||||
| github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A= | ||||
| github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q= | ||||
| github.com/pion/transport v0.12.3/go.mod h1:OViWW9SP2peE/HbwBvARicmAVnesphkNkCVZIWJ6q9A= | ||||
| github.com/pion/transport v0.13.0/go.mod h1:yxm9uXpK9bpBBWkITk13cLo1y5/ur5VQpG22ny6EP7g= | ||||
| github.com/pion/transport v0.13.1 h1:/UH5yLeQtwm2VZIPjxwnNFxjS4DFhyLfS4GlfuKUzfA= | ||||
| github.com/pion/transport v0.13.1/go.mod h1:EBxbqzyv+ZrmDb82XswEE0BjfQFtuw1Nu6sjnjWCsGg= | ||||
| github.com/pion/transport v0.14.1 h1:XSM6olwW+o8J4SCmOBb/BpwZypkHeyM0PGFCxNQBr40= | ||||
| github.com/pion/transport v0.14.1/go.mod h1:4tGmbk00NeYA3rUa9+n+dzCCoKkcy3YlYb99Jn2fNnI= | ||||
| github.com/pion/transport/v2 v2.0.0/go.mod h1:HS2MEBJTwD+1ZI2eSXSvHJx/HnzQqRy2/LXxt6eVMHc= | ||||
| github.com/pion/transport/v2 v2.0.2 h1:St+8o+1PEzPT51O9bv+tH/KYYLMNR5Vwm5Z3Qkjsywg= | ||||
| github.com/pion/transport/v2 v2.0.2/go.mod h1:vrz6bUbFr/cjdwbnxq8OdDDzHf7JJfGsIRkxfpZoTA0= | ||||
| github.com/pion/transport/v2 v2.1.0/go.mod h1:AdSw4YBZVDkZm8fpoz+fclXyQwANWmZAlDuQdctTThQ= | ||||
| github.com/pion/transport/v2 v2.2.0/go.mod h1:AdSw4YBZVDkZm8fpoz+fclXyQwANWmZAlDuQdctTThQ= | ||||
| github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= | ||||
| github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= | ||||
| github.com/pion/turn/v2 v2.0.4/go.mod h1:1812p4DcGVbYVBTiraUmP50XoKye++AMkbfp+N27mog= | ||||
| github.com/pion/turn/v2 v2.0.8 h1:KEstL92OUN3k5k8qxsXHpr7WWfrdp7iJZHx99ud8muw= | ||||
| github.com/pion/turn/v2 v2.0.8/go.mod h1:+y7xl719J8bAEVpSXBXvTxStjJv3hbz9YFflvkpcGPw= | ||||
| github.com/pion/turn/v2 v2.1.0 h1:5wGHSgGhJhP/RpabkUb/T9PdsAjkGLS6toYz5HNzoSI= | ||||
| github.com/pion/turn/v2 v2.1.0/go.mod h1:yrT5XbXSGX1VFSF31A3c1kCNB5bBZgk/uu5LET162qs= | ||||
| github.com/pion/turn/v2 v2.1.2 h1:wj0cAoGKltaZ790XEGW9HwoUewqjliwmhtxCuB2ApyM= | ||||
| github.com/pion/turn/v2 v2.1.2/go.mod h1:1kjnPkBcex3dhCU2Am+AAmxDcGhLX3WnMfmkNpvSTQU= | ||||
| github.com/pion/udp v0.1.0/go.mod h1:BPELIjbwE9PRbd/zxI/KYBnbo7B6+oA6YuEaNE8lths= | ||||
| github.com/pion/udp v0.1.1 h1:8UAPvyqmsxK8oOjloDk4wUt63TzFe9WEJkg5lChlj7o= | ||||
| github.com/pion/udp v0.1.1/go.mod h1:6AFo+CMdKQm7UiA0eUPA8/eVCTx8jBIITLZHc9DWX5M= | ||||
| github.com/pion/udp v0.1.4 h1:OowsTmu1Od3sD6i3fQUJxJn2fEvJO6L1TidgadtbTI8= | ||||
| github.com/pion/udp v0.1.4/go.mod h1:G8LDo56HsFwC24LIcnT4YIDU5qcB6NepqqjP0keL2us= | ||||
| github.com/pion/udp/v2 v2.0.1 h1:xP0z6WNux1zWEjhC7onRA3EwwSliXqu1ElUZAQhUP54= | ||||
| github.com/pion/udp/v2 v2.0.1/go.mod h1:B7uvTMP00lzWdyMr/1PVZXtV3wpPIxBRd4Wl6AksXn8= | ||||
| github.com/pion/webrtc/v2 v2.2.26 h1:01hWE26pL3LgqfxvQ1fr6O4ZtyRFFJmQEZK39pHWfFc= | ||||
| github.com/pion/webrtc/v2 v2.2.26/go.mod h1:XMZbZRNHyPDe1gzTIHFcQu02283YO45CbiwFgKvXnmc= | ||||
| github.com/pion/webrtc/v3 v3.1.42 h1:wJEQFIXVanptnQcHOLTuIo4AtGB2+mG2x4OhIhnITOA= | ||||
| github.com/pion/webrtc/v3 v3.1.42/go.mod h1:ffD9DulDrPxyWvDPUIPAOSAWx9GUlOExiJPf7cCcMLA= | ||||
| github.com/pion/webrtc/v3 v3.1.58 h1:husXqiKQuk6gbOqJlPHs185OskAyxUW6iAEgHghgCrc= | ||||
| github.com/pion/webrtc/v3 v3.1.58/go.mod h1:jJdqoqGBlZiE3y8Z1tg1fjSkyEDCZLL+foypUBn0Lhk= | ||||
| github.com/pion/webrtc/v3 v3.2.12 h1:pVqz5NdtTqyhKIhMcXR8bPp709kCf9blyAhDjoVRLvA= | ||||
| github.com/pion/webrtc/v3 v3.2.12/go.mod h1:/Oz6K95CGWaN+3No+Z0NYvgOPOr3aY8UyTlMm/dec3A= | ||||
| github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||||
| github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||||
| github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||||
| github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||||
| github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= | ||||
| github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= | ||||
| github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= | ||||
| github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= | ||||
| github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= | ||||
| @@ -263,6 +207,8 @@ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R | ||||
| github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= | ||||
| github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= | ||||
| github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= | ||||
| github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= | ||||
| github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= | ||||
| github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= | ||||
| github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= | ||||
| github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= | ||||
| @@ -295,24 +241,22 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV | ||||
| github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= | ||||
| github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= | ||||
| github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||||
| github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||||
| github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= | ||||
| github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||||
| github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= | ||||
| github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | ||||
| github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= | ||||
| github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | ||||
| github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||||
| github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= | ||||
| github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||||
| github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= | ||||
| github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= | ||||
| github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= | ||||
| github.com/tejasmanohar/timerange-go v1.0.0 h1:yCd/hWz0NRTU5Pu+f82rsFb0fwpVyJt0oKbAkqOi/ZI= | ||||
| github.com/tejasmanohar/timerange-go v1.0.0/go.mod h1:tic3Puc+uofo0D7502PvYBlu5sJMszF5nGbsYsu7FiI= | ||||
| github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= | ||||
| github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= | ||||
| github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||||
| github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= | ||||
| github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | ||||
| github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= | ||||
| github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= | ||||
| go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= | ||||
| go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= | ||||
| go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= | ||||
| @@ -327,14 +271,6 @@ golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPh | ||||
| golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | ||||
| golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | ||||
| golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= | ||||
| golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= | ||||
| golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= | ||||
| golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8 h1:y+mHpWoQJNAHt26Nhh6JP7hvM71IRZureyvZhoVALIs= | ||||
| golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= | ||||
| golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= | ||||
| golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= | ||||
| golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= | ||||
| golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= | ||||
| golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= | ||||
| golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= | ||||
| golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= | ||||
| @@ -369,24 +305,13 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/ | ||||
| golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= | ||||
| golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= | ||||
| golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||||
| golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||||
| golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | ||||
| golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | ||||
| golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= | ||||
| golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= | ||||
| golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= | ||||
| golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= | ||||
| golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= | ||||
| golang.org/x/net v0.0.0-20220401154927-543a649e0bdd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= | ||||
| golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= | ||||
| golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= | ||||
| golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= | ||||
| golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= | ||||
| golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= | ||||
| golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= | ||||
| golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | ||||
| golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | ||||
| golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= | ||||
| golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= | ||||
| golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= | ||||
| golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= | ||||
| @@ -416,6 +341,7 @@ golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7w | ||||
| golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| @@ -424,26 +350,24 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w | ||||
| golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||||
| golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68 h1:z8Hj/bl9cOV2grsOpEaQFUaly0JWN3i97mo3jXKJNp0= | ||||
| golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= | ||||
| golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= | ||||
| golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||||
| golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= | ||||
| golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||||
| golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | ||||
| golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= | ||||
| golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= | ||||
| @@ -459,12 +383,10 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 | ||||
| golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= | ||||
| golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||||
| golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||||
| golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= | ||||
| golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= | ||||
| golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||||
| golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||||
| golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||||
| golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= | ||||
| golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= | ||||
| golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= | ||||
| golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= | ||||
| @@ -515,20 +437,19 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi | ||||
| google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||||
| google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= | ||||
| google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= | ||||
| google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= | ||||
| gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= | ||||
| gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= | ||||
| gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= | ||||
| gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= | ||||
| gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||||
| gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= | ||||
| gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= | ||||
| gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
|   | ||||
		Reference in New Issue
	
	Block a user