From 3d915d3a691768344fe3509dcb900523d5682cf2 Mon Sep 17 00:00:00 2001 From: "Baik S. Hyun" Date: Fri, 23 Apr 2021 10:53:13 +0900 Subject: [PATCH] fix old import path --- README.md | 26 +++---- av/av.go | 3 + av/avconv/avconv.go | 28 ++++---- av/avutil/avutil.go | 2 +- av/pktque/buf.go | 2 +- av/pktque/filters.go | 19 +++-- av/pubsub/queue.go | 5 +- av/transcode/transcode.go | 24 +++---- cgo/ffmpeg/audio.go | 8 ++- cgo/ffmpeg/video.go | 4 +- codec/aacparser/parser.go | 4 +- codec/codec.go | 10 ++- codec/fake/fake.go | 2 +- codec/h264parser/parser.go | 6 +- examples/audio_decode/main.go | 10 ++- examples/http_flv_and_rtmp_server/main.go | 15 ++-- examples/open_probe_file/main.go | 8 +-- examples/rtmp_publish/main.go | 9 ++- examples/rtmp_server_channels/main.go | 13 ++-- examples/rtmp_server_proxy/main.go | 7 +- examples/rtmp_server_speex_to_aac/main.go | 14 ++-- examples/transcode/main.go | 11 ++- format/aac/aac.go | 6 +- format/flv/flv.go | 16 ++--- format/flv/flvio/amf0.go | 2 +- format/flv/flvio/flvio.go | 4 +- format/format.go | 14 ++-- format/mjpeg/client.go | 14 ++-- format/mp4/demuxer.go | 8 +-- format/mp4/handler.go | 4 +- format/mp4/mp4io/atoms.go | 7 +- format/mp4/mp4io/gen/gen.go | 84 +++++++++++------------ format/mp4/mp4io/mp4io.go | 2 +- format/mp4/muxer.go | 10 +-- format/mp4/stream.go | 4 +- format/mp4f/fd.go | 2 +- format/mp4f/mp4fio/atoms.go | 4 +- format/mp4f/mp4fio/mp4io.go | 4 +- format/mp4f/muxer.go | 12 ++-- format/mp4f/stream.go | 8 +-- format/raw/demuxer.go | 6 +- format/raw/handler.go | 4 +- format/raw/muxer.go | 6 +- format/raw/stream.go | 2 +- format/rtmp/rtmp.go | 10 +-- format/rtsp/client.go | 14 ++-- format/rtsp/sdp/parser.go | 2 +- format/rtsp/stream.go | 4 +- format/ts/demuxer.go | 10 +-- format/ts/handler.go | 4 +- format/ts/muxer.go | 8 +-- format/ts/stream.go | 4 +- format/ts/tsio/tsio.go | 2 +- go.mod | 5 ++ go.sum | 3 + 55 files changed, 269 insertions(+), 250 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/README.md b/README.md index e302478..98e1ddf 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ JOY4 is powerful library written in golang, well-designed interface makes a few Well-designed and easy-to-use interfaces: -- Muxer / Demuxer ([doc](https://pkg.go.dev/github.com/Danile71/joy4/av#Demuxer) [example](https://github.com/Danile71/joy4/blob/master/examples/open_probe_file/main.go)) -- Audio Decoder ([doc](https://pkg.go.dev/github.com/Danile71/joy4/av#AudioDecoder) [example](https://github.com/Danile71/joy4/blob/master/examples/audio_decode/main.go)) -- Transcoding ([doc](https://pkg.go.dev/github.com/Danile71/joy4/av/transcode) [example](https://github.com/Danile71/joy4/blob/master/examples/transcode/main.go)) -- Streaming server ([example](https://github.com/Danile71/joy4/blob/master/examples/http_flv_and_rtmp_server/main.go)) +- Muxer / Demuxer ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av#Demuxer) [example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/open_probe_file/main.go)) +- Audio Decoder ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av#AudioDecoder) [example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/audio_decode/main.go)) +- Transcoding ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av/transcode) [example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/transcode/main.go)) +- Streaming server ([example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/http_flv_and_rtmp_server/main.go)) Support container formats: @@ -34,31 +34,31 @@ RTMP / HTTP-FLV Server - High performance -Publisher-subscriber packet buffer queue ([doc](https://pkg.go.dev/github.com/Danile71/joy4/av/pubsub)) +Publisher-subscriber packet buffer queue ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av/pubsub)) - Customize publisher buffer time and subscriber read position -- Multiple channels live streaming ([example](https://github.com/Danile71/joy4/blob/master/examples/rtmp_server_channels/main.go)) +- Multiple channels live streaming ([example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/rtmp_server_channels/main.go)) -Packet filters ([doc](https://pkg.go.dev/github.com/Danile71/joy4/av/pktque)) +Packet filters ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av/pktque)) - Wait first keyframe - Fix timestamp - Make A/V sync -- Customize ([example](https://github.com/Danile71/joy4/blob/master/examples/rtmp_server_channels/main.go#L19)) +- Customize ([example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/rtmp_server_channels/main.go#L19)) -FFMPEG Golang-style binding ([doc](https://pkg.go.dev/github.com/Danile71/joy4/cgo/ffmpeg)) +FFMPEG Golang-style binding ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg)) - Audio Encoder / Decoder - Video Decoder - Audio Resampler Support codec and container parsers: -- H264 SPS/PPS/AVCDecoderConfigure parser ([doc](https://pkg.go.dev/github.com/Danile71/joy4/codec/h264parser)) -- AAC ADTSHeader/MPEG4AudioConfig parser ([doc](https://pkg.go.dev/github.com/Danile71/joy4/codec/aacparser)) -- MP4 Atoms parser ([doc](https://pkg.go.dev/github.com/Danile71/joy4/format/mp4/mp4io)) -- FLV AMF0 object parser ([doc](https://pkg.go.dev/github.com/Danile71/joy4/format/flv/flvio)) +- H264 SPS/PPS/AVCDecoderConfigure parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/codec/h264parser)) +- AAC ADTSHeader/MPEG4AudioConfig parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/codec/aacparser)) +- MP4 Atoms parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io)) +- FLV AMF0 object parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/format/flv/flvio)) # Requirements diff --git a/av/av.go b/av/av.go index 1f5e676..ef301db 100644 --- a/av/av.go +++ b/av/av.go @@ -121,6 +121,7 @@ var ( PCM_ALAW = MakeAudioCodecType(avCodecTypeMagic + 3) SPEEX = MakeAudioCodecType(avCodecTypeMagic + 4) NELLYMOSER = MakeAudioCodecType(avCodecTypeMagic + 5) + G729= MakeAudioCodecType(avCodecTypeMagic + 6) ) const codecTypeAudioBit = 0x1 @@ -136,6 +137,8 @@ func (self CodecType) String() string { return "PCM_MULAW" case PCM_ALAW: return "PCM_ALAW" + case G729: + return "G729" case SPEEX: return "SPEEX" case NELLYMOSER: diff --git a/av/avconv/avconv.go b/av/avconv/avconv.go index ef33056..59fb366 100644 --- a/av/avconv/avconv.go +++ b/av/avconv/avconv.go @@ -4,17 +4,18 @@ import ( "fmt" "io" "time" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/pktque" - "github.com/Danile71/joy4/av/transcode" + + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av/pktque" + "gitlab.com/ics_cinnamon/joy4/av/transcode" ) var Debug bool type Option struct { Transcode bool - Args []string + Args []string } type Options struct { @@ -23,7 +24,7 @@ type Options struct { type Demuxer struct { transdemux *transcode.Demuxer - streams []av.CodecData + streams []av.CodecData Options Demuxer av.Demuxer } @@ -56,10 +57,10 @@ func (self *Demuxer) prepare() (err error) { } /* - var streams []av.CodecData - if streams, err = self.Demuxer.Streams(); err != nil { - return - } + var streams []av.CodecData + if streams, err = self.Demuxer.Streams(); err != nil { + return + } */ supports := self.Options.OutputCodecTypes @@ -83,7 +84,7 @@ func (self *Demuxer) prepare() (err error) { ok = true var enctype av.CodecType - for _, typ:= range supports { + for _, typ := range supports { if typ.IsAudio() { if enc, _ = avutil.DefaultHandlers.NewAudioEncoder(typ); enc != nil { enctype = typ @@ -152,7 +153,7 @@ func ConvertCmdline(args []string) (err error) { flagt = false var f float64 fmt.Sscanf(arg, "%f", &f) - duration = time.Duration(f*float64(time.Second)) + duration = time.Duration(f * float64(time.Second)) default: output = arg @@ -223,7 +224,7 @@ func ConvertCmdline(args []string) (err error) { } filterdemux := &pktque.FilterDemuxer{ Demuxer: convdemux, - Filter: filters, + Filter: filters, } for { @@ -252,4 +253,3 @@ func ConvertCmdline(args []string) (err error) { return } - diff --git a/av/avutil/avutil.go b/av/avutil/avutil.go index ace236c..5295238 100644 --- a/av/avutil/avutil.go +++ b/av/avutil/avutil.go @@ -9,7 +9,7 @@ import ( "path" "strings" - "github.com/Danile71/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av" ) type HandlerDemuxer struct { diff --git a/av/pktque/buf.go b/av/pktque/buf.go index ccc8a22..62e3170 100644 --- a/av/pktque/buf.go +++ b/av/pktque/buf.go @@ -1,7 +1,7 @@ package pktque import ( - "github.com/Danile71/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av" ) type Buf struct { diff --git a/av/pktque/filters.go b/av/pktque/filters.go index 00dd534..359e04c 100644 --- a/av/pktque/filters.go +++ b/av/pktque/filters.go @@ -1,10 +1,10 @@ - // Package pktque provides packet Filter interface and structures used by other components. package pktque import ( "time" - "github.com/Danile71/joy4/av" + + "gitlab.com/ics_cinnamon/joy4/av" ) type Filter interface { @@ -30,8 +30,8 @@ func (self Filters) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoid // Wrap origin Demuxer and Filter into a new Demuxer, when read this Demuxer filters will be called. type FilterDemuxer struct { av.Demuxer - Filter Filter - streams []av.CodecData + Filter Filter + streams []av.CodecData videoidx int audioidx int } @@ -81,9 +81,9 @@ func (self *WaitKeyFrame) ModifyPacket(pkt *av.Packet, streams []av.CodecData, v // Fix incorrect packet timestamps. type FixTime struct { - zerobase time.Duration - incrbase time.Duration - lasttime time.Duration + zerobase time.Duration + incrbase time.Duration + lasttime time.Duration StartFromZero bool // make timestamp start from zero MakeIncrement bool // force timestamp increment } @@ -114,14 +114,14 @@ func (self *FixTime) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoi // Drop incorrect packets to make A/V sync. type AVSync struct { MaxTimeDiff time.Duration - time []time.Duration + time []time.Duration } func (self *AVSync) ModifyPacket(pkt *av.Packet, streams []av.CodecData, videoidx int, audioidx int) (drop bool, err error) { if self.time == nil { self.time = make([]time.Duration, len(streams)) if self.MaxTimeDiff == 0 { - self.MaxTimeDiff = time.Millisecond*500 + self.MaxTimeDiff = time.Millisecond * 500 } } @@ -188,4 +188,3 @@ func (self *Walltime) ModifyPacket(pkt *av.Packet, streams []av.CodecData, video } return } - diff --git a/av/pubsub/queue.go b/av/pubsub/queue.go index aa34c40..e829ee2 100644 --- a/av/pubsub/queue.go +++ b/av/pubsub/queue.go @@ -2,11 +2,12 @@ package pubsub import ( - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/pktque" "io" "sync" "time" + + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/pktque" ) // time diff --git a/av/transcode/transcode.go b/av/transcode/transcode.go index 3962f1b..74d5fb1 100644 --- a/av/transcode/transcode.go +++ b/av/transcode/transcode.go @@ -1,22 +1,22 @@ - // Package transcoder implements Transcoder based on Muxer/Demuxer and AudioEncoder/AudioDecoder interface. package transcode import ( "fmt" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/pktque" + + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/pktque" ) var Debug bool type tStream struct { - codec av.CodecData - timeline *pktque.Timeline + codec av.CodecData + timeline *pktque.Timeline aencodec, adecodec av.AudioCodecData - aenc av.AudioEncoder - adec av.AudioDecoder + aenc av.AudioEncoder + adec av.AudioDecoder } type Options struct { @@ -27,7 +27,7 @@ type Options struct { } type Transcoder struct { - streams []*tStream + streams []*tStream } func NewTranscoder(streams []av.CodecData, options Options) (_self *Transcoder, err error) { @@ -108,7 +108,7 @@ func (self *tStream) audioDecodeAndEncode(inpkt av.Packet) (outpkts []av.Packet, } // Do the transcode. -// +// // In audio transcoding one Packet may transcode into many Packets // packet time will be adjusted automatically. func (self *Transcoder) Do(pkt av.Packet) (out []av.Packet, err error) { @@ -150,8 +150,8 @@ func (self *Transcoder) Close() (err error) { // Wrap transcoder and origin Muxer into new Muxer. // Write to new Muxer will do transcoding automatically. type Muxer struct { - av.Muxer // origin Muxer - Options // transcode options + av.Muxer // origin Muxer + Options // transcode options transcoder *Transcoder } @@ -195,7 +195,7 @@ type Demuxer struct { av.Demuxer Options transcoder *Transcoder - outpkts []av.Packet + outpkts []av.Packet } func (self *Demuxer) prepare() (err error) { diff --git a/cgo/ffmpeg/audio.go b/cgo/ffmpeg/audio.go index eef1c5e..76fd9ae 100644 --- a/cgo/ffmpeg/audio.go +++ b/cgo/ffmpeg/audio.go @@ -12,9 +12,9 @@ import ( "time" "unsafe" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" ) const debug = false @@ -673,6 +673,8 @@ func NewAudioDecoder(codec av.AudioCodecData) (dec *AudioDecoder, err error) { case av.PCM_ALAW: id = C.AV_CODEC_ID_PCM_ALAW + case av.G729: + id = C.AV_CODEC_ID_G729 default: if ffcodec, ok := codec.(audioCodecData); ok { diff --git a/cgo/ffmpeg/video.go b/cgo/ffmpeg/video.go index 079c0f0..791c1cf 100644 --- a/cgo/ffmpeg/video.go +++ b/cgo/ffmpeg/video.go @@ -10,8 +10,8 @@ import ( "runtime" "unsafe" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" ) type VideoDecoder struct { diff --git a/codec/aacparser/parser.go b/codec/aacparser/parser.go index 2bfa6bf..ee3c518 100644 --- a/codec/aacparser/parser.go +++ b/codec/aacparser/parser.go @@ -6,8 +6,8 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/utils/bits" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/utils/bits" ) // copied from libavcodec/mpeg4audio.h diff --git a/codec/codec.go b/codec/codec.go index 7f46aaf..6adcafd 100644 --- a/codec/codec.go +++ b/codec/codec.go @@ -3,8 +3,8 @@ package codec import ( "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/fake" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/fake" ) type PCMUCodecData struct { @@ -43,6 +43,12 @@ func NewPCMAlawCodecData() av.AudioCodecData { } } +func NewG729CodecData() av.AudioCodecData { + return PCMUCodecData{ + typ: av.G729, + } +} + type SpeexCodecData struct { fake.CodecData } diff --git a/codec/fake/fake.go b/codec/fake/fake.go index bef77bf..28815c3 100644 --- a/codec/fake/fake.go +++ b/codec/fake/fake.go @@ -1,7 +1,7 @@ package fake import ( - "github.com/Danile71/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av" ) type CodecData struct { diff --git a/codec/h264parser/parser.go b/codec/h264parser/parser.go index 7f28adb..9d95c84 100644 --- a/codec/h264parser/parser.go +++ b/codec/h264parser/parser.go @@ -4,9 +4,9 @@ import ( "bytes" "fmt" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/utils/bits" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/utils/bits" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) const ( diff --git a/examples/audio_decode/main.go b/examples/audio_decode/main.go index 4c012bd..d1205be 100644 --- a/examples/audio_decode/main.go +++ b/examples/audio_decode/main.go @@ -1,11 +1,10 @@ - package main import ( - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/cgo/ffmpeg" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg" + "gitlab.com/ics_cinnamon/joy4/format" ) // need ffmpeg installed @@ -37,4 +36,3 @@ func main() { file.Close() } - diff --git a/examples/http_flv_and_rtmp_server/main.go b/examples/http_flv_and_rtmp_server/main.go index 8e2604c..41af650 100644 --- a/examples/http_flv_and_rtmp_server/main.go +++ b/examples/http_flv_and_rtmp_server/main.go @@ -1,14 +1,15 @@ package main import ( - "sync" "io" "net/http" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/av/pubsub" - "github.com/Danile71/joy4/format/rtmp" - "github.com/Danile71/joy4/format/flv" + "sync" + + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av/pubsub" + "gitlab.com/ics_cinnamon/joy4/format" + "gitlab.com/ics_cinnamon/joy4/format/flv" + "gitlab.com/ics_cinnamon/joy4/format/rtmp" ) func init() { @@ -78,7 +79,7 @@ func main() { if ch != nil { w.Header().Set("Content-Type", "video/x-flv") - w.Header().Set("Transfer-Encoding", "chunked") + w.Header().Set("Transfer-Encoding", "chunked") w.Header().Set("Access-Control-Allow-Origin", "*") w.WriteHeader(200) flusher := w.(http.Flusher) diff --git a/examples/open_probe_file/main.go b/examples/open_probe_file/main.go index cb797c1..5c8faaf 100644 --- a/examples/open_probe_file/main.go +++ b/examples/open_probe_file/main.go @@ -2,9 +2,10 @@ package main import ( "fmt" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/format" + + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/format" ) func init() { @@ -36,4 +37,3 @@ func main() { file.Close() } - diff --git a/examples/rtmp_publish/main.go b/examples/rtmp_publish/main.go index b9a39ed..7cca9e5 100644 --- a/examples/rtmp_publish/main.go +++ b/examples/rtmp_publish/main.go @@ -1,10 +1,10 @@ package main import ( - "github.com/Danile71/joy4/av/pktque" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/format/rtmp" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av/pktque" + "gitlab.com/ics_cinnamon/joy4/format" + "gitlab.com/ics_cinnamon/joy4/format/rtmp" ) func init() { @@ -24,4 +24,3 @@ func main() { file.Close() conn.Close() } - diff --git a/examples/rtmp_server_channels/main.go b/examples/rtmp_server_channels/main.go index 88ad8b5..b1a650d 100644 --- a/examples/rtmp_server_channels/main.go +++ b/examples/rtmp_server_channels/main.go @@ -2,14 +2,15 @@ package main import ( "fmt" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/av/pktque" - "github.com/Danile71/joy4/av/pubsub" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/format/rtmp" "sync" "time" + + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av/pktque" + "gitlab.com/ics_cinnamon/joy4/av/pubsub" + "gitlab.com/ics_cinnamon/joy4/format" + "gitlab.com/ics_cinnamon/joy4/format/rtmp" ) func init() { diff --git a/examples/rtmp_server_proxy/main.go b/examples/rtmp_server_proxy/main.go index 67f6235..9845dd1 100644 --- a/examples/rtmp_server_proxy/main.go +++ b/examples/rtmp_server_proxy/main.go @@ -3,9 +3,10 @@ package main import ( "fmt" "strings" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/format/rtmp" + + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/format" + "gitlab.com/ics_cinnamon/joy4/format/rtmp" ) func init() { diff --git a/examples/rtmp_server_speex_to_aac/main.go b/examples/rtmp_server_speex_to_aac/main.go index 7b318e1..8141fd9 100644 --- a/examples/rtmp_server_speex_to_aac/main.go +++ b/examples/rtmp_server_speex_to_aac/main.go @@ -1,16 +1,16 @@ package main import ( - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/transcode" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/format/rtmp" - "github.com/Danile71/joy4/cgo/ffmpeg" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av/transcode" + "gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg" + "gitlab.com/ics_cinnamon/joy4/format" + "gitlab.com/ics_cinnamon/joy4/format/rtmp" ) // need ffmpeg with libspeex and libfdkaac installed -// +// // open http://www.wowza.com/resources/4.4.1/examples/WebcamRecording/FlashRTMPPlayer11/player.html // click connect and recored // input camera H264/SPEEX will converted H264/AAC and saved in out.ts diff --git a/examples/transcode/main.go b/examples/transcode/main.go index c2b36dc..2816488 100644 --- a/examples/transcode/main.go +++ b/examples/transcode/main.go @@ -1,11 +1,11 @@ package main import ( - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/transcode" - "github.com/Danile71/joy4/format" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/cgo/ffmpeg" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av/transcode" + "gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg" + "gitlab.com/ics_cinnamon/joy4/format" ) // need ffmpeg with libfdkaac installed @@ -42,4 +42,3 @@ func main() { infile.Close() trans.Close() } - diff --git a/format/aac/aac.go b/format/aac/aac.go index b8e699f..905e371 100644 --- a/format/aac/aac.go +++ b/format/aac/aac.go @@ -6,9 +6,9 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" ) type Muxer struct { diff --git a/format/flv/flv.go b/format/flv/flv.go index c927f82..5f09c1a 100644 --- a/format/flv/flv.go +++ b/format/flv/flv.go @@ -5,14 +5,14 @@ import ( "fmt" "io" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/codec" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/fake" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/flv/flvio" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/codec" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/fake" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/flv/flvio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) var MaxProbePacketCount = 20 diff --git a/format/flv/flvio/amf0.go b/format/flv/flvio/amf0.go index 70c57c5..6788ef2 100644 --- a/format/flv/flvio/amf0.go +++ b/format/flv/flvio/amf0.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type AMF0ParseError struct { diff --git a/format/flv/flvio/flvio.go b/format/flv/flvio/flvio.go index 326ea64..331ac6f 100644 --- a/format/flv/flvio/flvio.go +++ b/format/flv/flvio/flvio.go @@ -5,8 +5,8 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) func TsToTime(ts int32) time.Duration { diff --git a/format/format.go b/format/format.go index fdcf8ec..50795b1 100644 --- a/format/format.go +++ b/format/format.go @@ -1,13 +1,13 @@ package format import ( - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/format/aac" - "github.com/Danile71/joy4/format/flv" - "github.com/Danile71/joy4/format/mp4" - "github.com/Danile71/joy4/format/rtmp" - "github.com/Danile71/joy4/format/rtsp" - "github.com/Danile71/joy4/format/ts" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/format/aac" + "gitlab.com/ics_cinnamon/joy4/format/flv" + "gitlab.com/ics_cinnamon/joy4/format/mp4" + "gitlab.com/ics_cinnamon/joy4/format/rtmp" + "gitlab.com/ics_cinnamon/joy4/format/rtsp" + "gitlab.com/ics_cinnamon/joy4/format/ts" ) func RegisterAll() { diff --git a/format/mjpeg/client.go b/format/mjpeg/client.go index bbb7b45..d04f569 100644 --- a/format/mjpeg/client.go +++ b/format/mjpeg/client.go @@ -16,13 +16,13 @@ import ( "strings" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/codec" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/rtsp/sdp" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/codec" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/rtsp/sdp" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) var ErrCodecDataChange = fmt.Errorf("rtsp: codec data change, please call HandleCodecDataChange()") diff --git a/format/mp4/demuxer.go b/format/mp4/demuxer.go index 0fc658a..dfd15b8 100644 --- a/format/mp4/demuxer.go +++ b/format/mp4/demuxer.go @@ -6,10 +6,10 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" ) type Demuxer struct { diff --git a/format/mp4/handler.go b/format/mp4/handler.go index 142fff1..7fc787c 100644 --- a/format/mp4/handler.go +++ b/format/mp4/handler.go @@ -3,8 +3,8 @@ package mp4 import ( "io" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" ) var CodecTypes = []av.CodecType{av.H264, av.AAC} diff --git a/format/mp4/mp4io/atoms.go b/format/mp4/mp4io/atoms.go index e730926..e52834d 100644 --- a/format/mp4/mp4io/atoms.go +++ b/format/mp4/mp4io/atoms.go @@ -1,7 +1,10 @@ package mp4io -import "github.com/Danile71/joy4/utils/bits/pio" -import "time" +import ( + "time" + + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" +) const MOOF = Tag(0x6d6f6f66) diff --git a/format/mp4/mp4io/gen/gen.go b/format/mp4/mp4io/gen/gen.go index 35bb87e..7a680bd 100644 --- a/format/mp4/mp4io/gen/gen.go +++ b/format/mp4/mp4io/gen/gen.go @@ -1,14 +1,13 @@ - package main import ( - "strings" "fmt" - "os" "go/ast" "go/parser" - "go/token" "go/printer" + "go/token" + "os" + "strings" ) func getexprs(e ast.Expr) string { @@ -37,7 +36,7 @@ func genatomdecl(origfn *ast.FuncDecl, origname, origtag string) (decls []ast.De if typ == "_unknowns" { fieldslist.List = append(fieldslist.List, &ast.Field{ Names: []*ast.Ident{ast.NewIdent("Unknowns")}, - Type: ast.NewIdent("[]Atom"), + Type: ast.NewIdent("[]Atom"), }) } continue @@ -67,24 +66,24 @@ func genatomdecl(origfn *ast.FuncDecl, origname, origtag string) (decls []ast.De case "bytesleft": typ = "[]byte" case "bytes": - typ = "["+name2+"]byte" + typ = "[" + name2 + "]byte" case "uint24": typ = "uint32" case "time64", "time32": typ = "time.Time" case "atom": - typ = "*"+name2 + typ = "*" + name2 case "atoms": - typ = "[]*"+name2 + typ = "[]*" + name2 case "slice": - typ = "[]"+name2 + typ = "[]" + name2 case "array": - typ = "["+len3+"]"+name2 + typ = "[" + len3 + "]" + name2 } fieldslist.List = append(fieldslist.List, &ast.Field{ Names: []*ast.Ident{ast.NewIdent(name)}, - Type: ast.NewIdent(typ), + Type: ast.NewIdent(typ), }) } @@ -135,7 +134,7 @@ func typegetlen(typ string) (n int) { func typegetlens(typ string) string { n := typegetlen(typ) if n == 0 { - return "Len"+typ + return "Len" + typ } else { return fmt.Sprint(n) } @@ -187,7 +186,7 @@ func typegetputfn(typ string) (fn string) { case "fixed16": fn = "PutFixed16" default: - fn = "Put"+typ + fn = "Put" + typ } return } @@ -218,7 +217,7 @@ func typegetgetfn(typ string) (fn string) { case "fixed16": fn = "GetFixed16" default: - fn = "Get"+typ + fn = "Get" + typ } return } @@ -237,14 +236,14 @@ func addn(n int) (stmts []ast.Stmt) { return addns(fmt.Sprint(n)) } -func simplecall(fun string, args... string) *ast.ExprStmt { +func simplecall(fun string, args ...string) *ast.ExprStmt { _args := []ast.Expr{} for _, s := range args { _args = append(_args, ast.NewIdent(s)) } return &ast.ExprStmt{ X: &ast.CallExpr{ - Fun: ast.NewIdent(fun), + Fun: ast.NewIdent(fun), Args: _args, }, } @@ -283,7 +282,7 @@ func newdecl(origname, name string, params, res []*ast.Field, stmts []ast.Stmt) List: []*ast.Field{ &ast.Field{ Names: []*ast.Ident{ast.NewIdent("self")}, - Type: ast.NewIdent(origname), + Type: ast.NewIdent(origname), }, }, }, @@ -319,7 +318,7 @@ func getstructputgetlenfn(origfn *ast.FuncDecl, origname string) (decls []ast.De getstmts = append(getstmts, &ast.ReturnStmt{}) decls = append(decls, &ast.FuncDecl{ - Name: ast.NewIdent("Get"+origname), + Name: ast.NewIdent("Get" + origname), Type: &ast.FuncType{ Params: &ast.FieldList{ List: []*ast.Field{ @@ -336,7 +335,7 @@ func getstructputgetlenfn(origfn *ast.FuncDecl, origname string) (decls []ast.De }) decls = append(decls, &ast.FuncDecl{ - Name: ast.NewIdent("Put"+origname), + Name: ast.NewIdent("Put" + origname), Type: &ast.FuncType{ Params: &ast.FieldList{ List: []*ast.Field{ @@ -352,7 +351,7 @@ func getstructputgetlenfn(origfn *ast.FuncDecl, origname string) (decls []ast.De Tok: token.CONST, Specs: []ast.Spec{ &ast.ValueSpec{ - Names: []*ast.Ident{ast.NewIdent("Len"+origname)}, + Names: []*ast.Ident{ast.NewIdent("Len" + origname)}, Values: []ast.Expr{ast.NewIdent(fmt.Sprint(totlen))}, }, }, @@ -371,7 +370,7 @@ func cc4decls(name string) (decls []ast.Decl) { }, Values: []ast.Expr{ &ast.CallExpr{ - Fun: ast.NewIdent("Tag"), + Fun: ast.NewIdent("Tag"), Args: []ast.Expr{&ast.BasicLit{Kind: token.INT, Value: fmt.Sprintf("0x%x", []byte(name))}}, }, }, @@ -431,7 +430,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, callmarshal := func(name string) (stmts []ast.Stmt) { callexpr := &ast.CallExpr{ - Fun: ast.NewIdent(name+".Marshal"), + Fun: ast.NewIdent(name + ".Marshal"), Args: []ast.Expr{ast.NewIdent("b[n:]")}, } assign := &ast.AssignStmt{ @@ -446,7 +445,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, callputstruct := func(typ, name string) (stmts []ast.Stmt) { stmts = append(stmts, &ast.ExprStmt{ X: &ast.CallExpr{ - Fun: ast.NewIdent(typegetputfn(typ)), + Fun: ast.NewIdent(typegetputfn(typ)), Args: []ast.Expr{ast.NewIdent("b[n:]"), ast.NewIdent(name)}, }, }) @@ -459,7 +458,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, } calllenstruct := func(typ, name string) (stmts []ast.Stmt) { - inc := typegetlens(typ)+"*len("+name+")" + inc := typegetlens(typ) + "*len(" + name + ")" stmts = append(stmts, &ast.AssignStmt{ Tok: token.ADD_ASSIGN, Lhs: []ast.Expr{ast.NewIdent("n")}, @@ -470,7 +469,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, calllen := func(name string) (stmts []ast.Stmt) { callexpr := &ast.CallExpr{ - Fun: ast.NewIdent(name+".Len"), + Fun: ast.NewIdent(name + ".Len"), Args: []ast.Expr{}, } assign := &ast.AssignStmt{ @@ -484,13 +483,13 @@ func getatommarshalfn(origfn *ast.FuncDecl, foreach := func(name, field string, block []ast.Stmt) (stmts []ast.Stmt) { rangestmt := &ast.RangeStmt{ - Key: ast.NewIdent("_"), + Key: ast.NewIdent("_"), Value: ast.NewIdent(name), Body: &ast.BlockStmt{ List: block, }, Tok: token.DEFINE, - X: ast.NewIdent(field), + X: ast.NewIdent(field), } stmts = append(stmts, rangestmt) return @@ -511,7 +510,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, List: block, }, Tok: token.DEFINE, - X: ast.NewIdent(field), + X: ast.NewIdent(field), } stmts = append(stmts, rangestmt) return @@ -574,7 +573,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, unmarshalatom := func(typ, init string) (stmts []ast.Stmt) { return []ast.Stmt{ &ast.AssignStmt{Tok: token.DEFINE, - Lhs: []ast.Expr{ast.NewIdent("atom")}, Rhs: []ast.Expr{ast.NewIdent("&"+typ+"{"+init+"}")}, + Lhs: []ast.Expr{ast.NewIdent("atom")}, Rhs: []ast.Expr{ast.NewIdent("&" + typ + "{" + init + "}")}, }, &ast.IfStmt{ Init: &ast.AssignStmt{ @@ -591,10 +590,10 @@ func getatommarshalfn(origfn *ast.FuncDecl, unmrashalatoms := func() (stmts []ast.Stmt) { blocks := []ast.Stmt{} - blocks = append(blocks, &ast.AssignStmt{ Tok: token.DEFINE, Lhs: []ast.Expr{ast.NewIdent("tag")}, + blocks = append(blocks, &ast.AssignStmt{Tok: token.DEFINE, Lhs: []ast.Expr{ast.NewIdent("tag")}, Rhs: []ast.Expr{ast.NewIdent("Tag(pio.U32BE(b[n+4:]))")}, }) - blocks = append(blocks, &ast.AssignStmt{ Tok: token.DEFINE, Lhs: []ast.Expr{ast.NewIdent("size")}, + blocks = append(blocks, &ast.AssignStmt{Tok: token.DEFINE, Lhs: []ast.Expr{ast.NewIdent("size")}, Rhs: []ast.Expr{ast.NewIdent("int(pio.U32BE(b[n:]))")}, }) blocks = append(blocks, &ast.IfStmt{ @@ -614,7 +613,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, } for i, atom := range atomarrnames { - selfatom := "self."+atom + selfatom := "self." + atom cases = append(cases, &ast.CaseClause{ List: []ast.Expr{ast.NewIdent(strings.ToUpper(struct2tag(atomarrtypes[i])))}, Body: []ast.Stmt{&ast.BlockStmt{ @@ -635,7 +634,7 @@ func getatommarshalfn(origfn *ast.FuncDecl, } blocks = append(blocks, &ast.SwitchStmt{ - Tag: ast.NewIdent("tag"), + Tag: ast.NewIdent("tag"), Body: &ast.BlockStmt{List: cases}, }) @@ -659,9 +658,9 @@ func getatommarshalfn(origfn *ast.FuncDecl, ifnotnil := func(name string, block []ast.Stmt) (stmts []ast.Stmt) { stmts = append(stmts, &ast.IfStmt{ Cond: &ast.BinaryExpr{ - X: ast.NewIdent(name), + X: ast.NewIdent(name), Op: token.NEQ, - Y: ast.NewIdent("nil"), + Y: ast.NewIdent("nil"), }, Body: &ast.BlockStmt{List: block}, }) @@ -693,9 +692,9 @@ func getatommarshalfn(origfn *ast.FuncDecl, checkcurlen := func(inc, debug string) (stmts []ast.Stmt) { stmts = append(stmts, &ast.IfStmt{ Cond: &ast.BinaryExpr{ - X: ast.NewIdent("len(b)"), + X: ast.NewIdent("len(b)"), Op: token.LSS, - Y: ast.NewIdent("n+"+inc), + Y: ast.NewIdent("n+" + inc), }, Body: &ast.BlockStmt{List: parseerrreturn(debug)}, }) @@ -710,20 +709,20 @@ func getatommarshalfn(origfn *ast.FuncDecl, } checkstructlendo := func(typ, name, debug string, - foreach func(string,[]ast.Stmt)[]ast.Stmt, + foreach func(string, []ast.Stmt) []ast.Stmt, ) (stmts []ast.Stmt) { - inc := typegetlens(typ)+"*len("+name+")" + inc := typegetlens(typ) + "*len(" + name + ")" stmts = append(stmts, checkcurlen(inc, debug)...) stmts = append(stmts, foreach(name, append( []ast.Stmt{ &ast.AssignStmt{ Tok: token.ASSIGN, Lhs: []ast.Expr{ - ast.NewIdent(name+"[i]"), + ast.NewIdent(name + "[i]"), }, Rhs: []ast.Expr{ &ast.CallExpr{ - Fun: ast.NewIdent(typegetgetfn(typ)), + Fun: ast.NewIdent(typegetgetfn(typ)), Args: []ast.Expr{ast.NewIdent("b[n:]")}, }, }, @@ -967,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/Danile71/joy4/utils/bits/pio"`}}, + &ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"`}}, }, }, &ast.GenDecl{ @@ -1054,4 +1053,3 @@ func main() { genatoms(os.Args[2], os.Args[3]) } } - diff --git a/format/mp4/mp4io/mp4io.go b/format/mp4/mp4io/mp4io.go index 837e696..fe88396 100644 --- a/format/mp4/mp4io/mp4io.go +++ b/format/mp4/mp4io/mp4io.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type ParseError struct { diff --git a/format/mp4/muxer.go b/format/mp4/muxer.go index 53d089d..b45f0f9 100644 --- a/format/mp4/muxer.go +++ b/format/mp4/muxer.go @@ -6,11 +6,11 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/mp4/mp4io" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type Muxer struct { diff --git a/format/mp4/stream.go b/format/mp4/stream.go index 4cf2362..270da53 100644 --- a/format/mp4/stream.go +++ b/format/mp4/stream.go @@ -3,8 +3,8 @@ package mp4 import ( "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" ) type Stream struct { diff --git a/format/mp4f/fd.go b/format/mp4f/fd.go index f817632..8a58500 100644 --- a/format/mp4f/fd.go +++ b/format/mp4f/fd.go @@ -1,6 +1,6 @@ package mp4f -import "github.com/Danile71/joy4/format/mp4/mp4io" +import "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" type FDummy struct { Data []byte diff --git a/format/mp4f/mp4fio/atoms.go b/format/mp4f/mp4fio/atoms.go index a851f14..22dc4bc 100644 --- a/format/mp4f/mp4fio/atoms.go +++ b/format/mp4f/mp4fio/atoms.go @@ -1,8 +1,8 @@ package mp4fio import ( - "github.com/Danile71/joy4/format/mp4/mp4io" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) func (self MovieFrag) Tag() mp4io.Tag { diff --git a/format/mp4f/mp4fio/mp4io.go b/format/mp4f/mp4fio/mp4io.go index 9bb98b8..2c43eef 100644 --- a/format/mp4f/mp4fio/mp4io.go +++ b/format/mp4f/mp4fio/mp4io.go @@ -1,8 +1,8 @@ package mp4fio import ( - "github.com/Danile71/joy4/format/mp4/mp4io" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type ElemStreamDesc struct { diff --git a/format/mp4f/muxer.go b/format/mp4f/muxer.go index a55234d..1c32b37 100644 --- a/format/mp4f/muxer.go +++ b/format/mp4f/muxer.go @@ -6,12 +6,12 @@ import ( "os" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/mp4/mp4io" - "github.com/Danile71/joy4/format/mp4f/mp4fio" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/format/mp4f/mp4fio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type Muxer struct { diff --git a/format/mp4f/stream.go b/format/mp4f/stream.go index 0c6bd66..50f7be1 100644 --- a/format/mp4f/stream.go +++ b/format/mp4f/stream.go @@ -3,10 +3,10 @@ package mp4f import ( "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/format/mp4" - "github.com/Danile71/joy4/format/mp4/mp4io" - "github.com/Danile71/joy4/format/mp4f/mp4fio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/format/mp4" + "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io" + "gitlab.com/ics_cinnamon/joy4/format/mp4f/mp4fio" ) type Stream struct { diff --git a/format/raw/demuxer.go b/format/raw/demuxer.go index 716457f..135d8d5 100644 --- a/format/raw/demuxer.go +++ b/format/raw/demuxer.go @@ -5,9 +5,9 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type Demuxer struct { diff --git a/format/raw/handler.go b/format/raw/handler.go index 1343d30..df702e0 100644 --- a/format/raw/handler.go +++ b/format/raw/handler.go @@ -3,8 +3,8 @@ package raw import ( "io" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" ) var CodecTypes = []av.CodecType{av.H264, av.AAC} diff --git a/format/raw/muxer.go b/format/raw/muxer.go index a30c29e..5bc2908 100644 --- a/format/raw/muxer.go +++ b/format/raw/muxer.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type Muxer struct { diff --git a/format/raw/stream.go b/format/raw/stream.go index 5715bac..2933ae4 100644 --- a/format/raw/stream.go +++ b/format/raw/stream.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Danile71/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av" ) type Stream struct { diff --git a/format/rtmp/rtmp.go b/format/rtmp/rtmp.go index 59c1ece..11bba3b 100644 --- a/format/rtmp/rtmp.go +++ b/format/rtmp/rtmp.go @@ -14,11 +14,11 @@ import ( "strings" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/format/flv" - "github.com/Danile71/joy4/format/flv/flvio" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/format/flv" + "gitlab.com/ics_cinnamon/joy4/format/flv/flvio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) var Debug bool diff --git a/format/rtsp/client.go b/format/rtsp/client.go index 9221d25..5957ddb 100644 --- a/format/rtsp/client.go +++ b/format/rtsp/client.go @@ -18,13 +18,13 @@ import ( "strings" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" - "github.com/Danile71/joy4/codec" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/rtsp/sdp" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/codec" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/rtsp/sdp" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) var ErrCodecDataChange = fmt.Errorf("rtsp: codec data change, please call HandleCodecDataChange()") diff --git a/format/rtsp/sdp/parser.go b/format/rtsp/sdp/parser.go index 07972aa..ebe49f1 100644 --- a/format/rtsp/sdp/parser.go +++ b/format/rtsp/sdp/parser.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/Danile71/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av" ) type Session struct { diff --git a/format/rtsp/stream.go b/format/rtsp/stream.go index 1bd3719..fb80794 100644 --- a/format/rtsp/stream.go +++ b/format/rtsp/stream.go @@ -3,8 +3,8 @@ package rtsp import ( "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/format/rtsp/sdp" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/format/rtsp/sdp" ) type Stream struct { diff --git a/format/ts/demuxer.go b/format/ts/demuxer.go index be93f8f..af47017 100644 --- a/format/ts/demuxer.go +++ b/format/ts/demuxer.go @@ -6,11 +6,11 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/ts/tsio" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/ts/tsio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) type Demuxer struct { diff --git a/format/ts/handler.go b/format/ts/handler.go index af0e9b7..8dced16 100644 --- a/format/ts/handler.go +++ b/format/ts/handler.go @@ -3,8 +3,8 @@ package ts import ( "io" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/av/avutil" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/av/avutil" ) func Handler(h *avutil.RegisterHandler) { diff --git a/format/ts/muxer.go b/format/ts/muxer.go index 734e5e5..4cc4b60 100644 --- a/format/ts/muxer.go +++ b/format/ts/muxer.go @@ -5,10 +5,10 @@ import ( "io" "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/codec/aacparser" - "github.com/Danile71/joy4/codec/h264parser" - "github.com/Danile71/joy4/format/ts/tsio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/codec/aacparser" + "gitlab.com/ics_cinnamon/joy4/codec/h264parser" + "gitlab.com/ics_cinnamon/joy4/format/ts/tsio" ) var CodecTypes = []av.CodecType{av.H264, av.AAC} diff --git a/format/ts/stream.go b/format/ts/stream.go index 85e3fe9..448cec9 100644 --- a/format/ts/stream.go +++ b/format/ts/stream.go @@ -3,8 +3,8 @@ package ts import ( "time" - "github.com/Danile71/joy4/av" - "github.com/Danile71/joy4/format/ts/tsio" + "gitlab.com/ics_cinnamon/joy4/av" + "gitlab.com/ics_cinnamon/joy4/format/ts/tsio" ) type Stream struct { diff --git a/format/ts/tsio/tsio.go b/format/ts/tsio/tsio.go index 0d9c430..4213408 100644 --- a/format/ts/tsio/tsio.go +++ b/format/ts/tsio/tsio.go @@ -5,7 +5,7 @@ import ( "io" "time" - "github.com/Danile71/joy4/utils/bits/pio" + "gitlab.com/ics_cinnamon/joy4/utils/bits/pio" ) const ( diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..1fcf8ec --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module gitlab.com/ics_cinnamon/joy4 + +go 1.16 + +require gocv.io/x/gocv v0.27.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..d78389a --- /dev/null +++ b/go.sum @@ -0,0 +1,3 @@ +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +gocv.io/x/gocv v0.27.0 h1:3X8I74ULsWHd4m7DQRv2Nqx5VkKscfUFnKgLNodiboI= +gocv.io/x/gocv v0.27.0/go.mod h1:n4LnYjykU6y9gn48yZf4eLCdtuSb77XxSkW6g0wGf/A=