批量修改所有引入包路径

This commit is contained in:
dexter
2022-02-26 12:39:44 +08:00
parent b2d85005b3
commit 96cf2384b0
32 changed files with 71 additions and 68 deletions

View File

@@ -4,7 +4,7 @@ import (
"io" "io"
"net" "net"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
const ( const (

View File

@@ -5,8 +5,8 @@ import (
"errors" "errors"
"io" "io"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
"github.com/Monibuca/engine/v4/util/bits/pio" "v4.m7s.live/engine/util/bits/pio"
) )
// Start Code + NAL Unit -> NALU Header + NALU Body // Start Code + NAL Unit -> NALU Header + NALU Body

View File

@@ -4,8 +4,8 @@ import (
"bytes" "bytes"
"errors" "errors"
"github.com/Monibuca/engine/v4/util"
"github.com/q191201771/naza/pkg/nazabits" "github.com/q191201771/naza/pkg/nazabits"
"v4.m7s.live/engine/util"
) )
type H265NALUType byte type H265NALUType byte

View File

@@ -1,6 +1,6 @@
package codec package codec
import "github.com/Monibuca/engine/v4/util" import "v4.m7s.live/engine/util"
type MP4 interface { type MP4 interface {
} }

View File

@@ -6,7 +6,7 @@ import (
"io" "io"
"io/ioutil" "io/ioutil"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
//"sync" //"sync"
) )

View File

@@ -4,8 +4,9 @@ import (
"bytes" "bytes"
"errors" "errors"
"fmt" "fmt"
"github.com/Monibuca/engine/v4/util"
"io" "io"
"v4.m7s.live/engine/util"
) )
// ios13818-1-CN.pdf 43(57)/166 // ios13818-1-CN.pdf 43(57)/166

View File

@@ -7,8 +7,8 @@ import (
"io" "io"
"io/ioutil" "io/ioutil"
"github.com/Monibuca/engine/v4/codec" "v4.m7s.live/engine/codec"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
// ios13818-1-CN.pdf 45/166 // ios13818-1-CN.pdf 45/166

View File

@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
// ios13818-1-CN.pdf 46(60)-153(167)/page // ios13818-1-CN.pdf 46(60)-153(167)/page

View File

@@ -3,9 +3,10 @@ package mpegts
import ( import (
"errors" "errors"
"fmt" "fmt"
"github.com/Monibuca/engine/v4/util"
"io" "io"
"io/ioutil" "io/ioutil"
"v4.m7s.live/engine/util"
) )
// //

View File

@@ -5,7 +5,7 @@ import (
"github.com/cnotch/ipchub/av/codec/hevc" "github.com/cnotch/ipchub/av/codec/hevc"
"github.com/Monibuca/engine/v4/util/bits" "v4.m7s.live/engine/util/bits"
) )
type SPSInfo struct { type SPSInfo struct {

View File

@@ -4,9 +4,9 @@ import (
"net" "net"
"time" "time"
"github.com/Monibuca/engine/v4/codec"
"github.com/Monibuca/engine/v4/log"
"github.com/pion/rtp" "github.com/pion/rtp"
"v4.m7s.live/engine/codec"
"v4.m7s.live/engine/log"
) )
type NALUSlice net.Buffers type NALUSlice net.Buffers
@@ -197,4 +197,4 @@ type DecoderConfiguration[T RawSlice] struct {
AVCC net.Buffers AVCC net.Buffers
Raw T Raw T
FLV net.Buffers FLV net.Buffers
} }

View File

@@ -1,7 +1,7 @@
package common package common
import ( import (
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
type RingBuffer[T any] struct { type RingBuffer[T any] struct {

View File

@@ -1,7 +1,7 @@
package common package common
import ( import (
"github.com/Monibuca/engine/v4/log" "v4.m7s.live/engine/log"
) )
type IStream interface { type IStream interface {

View File

@@ -7,8 +7,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/Monibuca/engine/v4/log"
"go.uber.org/zap" "go.uber.org/zap"
"v4.m7s.live/engine/log"
) )
type Config map[string]any type Config map[string]any

View File

@@ -1,11 +1,12 @@
package config package config
import ( import (
"github.com/Monibuca/engine/v4/log"
"context" "context"
"net" "net"
"runtime" "runtime"
"time" "time"
"v4.m7s.live/engine/log"
) )
type TCP struct { type TCP struct {

View File

@@ -5,7 +5,7 @@ package engine
// "time" // "time"
// "unsafe" // "unsafe"
// "github.com/Monibuca/engine/v4/util" // "v4.m7s.live/engine/util"
// ) // )
// type DataTrack struct { // type DataTrack struct {

2
go.mod
View File

@@ -1,4 +1,4 @@
module v4.m7s.live/engine module v4.m7s.live/engine
go 1.18 go 1.18

View File

@@ -4,10 +4,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/log"
. "github.com/logrusorgru/aurora" . "github.com/logrusorgru/aurora"
"go.uber.org/zap" "go.uber.org/zap"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/log"
) )
type GlobalConfig struct { type GlobalConfig struct {

4
io.go
View File

@@ -9,9 +9,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/util"
"go.uber.org/zap" "go.uber.org/zap"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/util"
) )
type IOConfig interface { type IOConfig interface {

View File

@@ -1,4 +1,4 @@
package engine package engine // import "v4.m7s.live/engine"
import ( import (
"bytes" "bytes"
@@ -12,13 +12,13 @@ import (
"runtime" "runtime"
"time" "time"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/log"
"github.com/Monibuca/engine/v4/util"
"github.com/google/uuid" "github.com/google/uuid"
. "github.com/logrusorgru/aurora" . "github.com/logrusorgru/aurora"
"go.uber.org/zap" "go.uber.org/zap"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/log"
"v4.m7s.live/engine/util"
) )
var ( var (

View File

@@ -10,11 +10,11 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/log"
"github.com/Monibuca/engine/v4/util"
"go.uber.org/zap" "go.uber.org/zap"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/log"
"v4.m7s.live/engine/util"
) )
// InstallPlugin 安装插件,传入插件配置生成插件信息对象 // InstallPlugin 安装插件,传入插件配置生成插件信息对象

View File

@@ -1,8 +1,8 @@
package engine package engine
import ( import (
"github.com/Monibuca/engine/v4/common" "v4.m7s.live/engine/common"
"github.com/Monibuca/engine/v4/config" "v4.m7s.live/engine/config"
) )
type IPublisher interface { type IPublisher interface {

View File

@@ -5,12 +5,12 @@ import (
"time" "time"
"unsafe" "unsafe"
. "github.com/Monibuca/engine/v4/common"
"github.com/Monibuca/engine/v4/log"
"github.com/Monibuca/engine/v4/track"
"github.com/Monibuca/engine/v4/util"
. "github.com/logrusorgru/aurora" . "github.com/logrusorgru/aurora"
"go.uber.org/zap" "go.uber.org/zap"
. "v4.m7s.live/engine/common"
"v4.m7s.live/engine/log"
"v4.m7s.live/engine/track"
"v4.m7s.live/engine/util"
) )
type StreamState byte type StreamState byte

View File

@@ -5,10 +5,10 @@ import (
"net" "net"
"time" "time"
. "github.com/Monibuca/engine/v4/common"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/track"
"go.uber.org/zap" "go.uber.org/zap"
. "v4.m7s.live/engine/common"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/track"
) )
type HaveFLV interface { type HaveFLV interface {

View File

@@ -4,10 +4,10 @@ import (
"net" "net"
"time" "time"
"github.com/Monibuca/engine/v4/codec" "v4.m7s.live/engine/codec"
. "github.com/Monibuca/engine/v4/common" . "v4.m7s.live/engine/common"
"github.com/Monibuca/engine/v4/config" "v4.m7s.live/engine/config"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
func NewAAC(stream IStream) (aac *AAC) { func NewAAC(stream IStream) (aac *AAC) {

View File

@@ -3,10 +3,10 @@ package track
import ( import (
"net" "net"
"github.com/Monibuca/engine/v4/codec"
. "github.com/Monibuca/engine/v4/common"
"github.com/Monibuca/engine/v4/config"
"go.uber.org/zap" "go.uber.org/zap"
"v4.m7s.live/engine/codec"
. "v4.m7s.live/engine/common"
"v4.m7s.live/engine/config"
) )
var adcflv1 = []byte{codec.FLV_TAG_TYPE_AUDIO, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0} var adcflv1 = []byte{codec.FLV_TAG_TYPE_AUDIO, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0}

View File

@@ -4,10 +4,10 @@ import (
"context" "context"
"time" "time"
. "github.com/Monibuca/engine/v4/common"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/util"
"github.com/pion/rtp" "github.com/pion/rtp"
. "v4.m7s.live/engine/common"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/util"
) )
// Base 基础Track类 // Base 基础Track类
@@ -89,7 +89,7 @@ func (av *Media[T]) UnmarshalRTP(raw []byte) (frame *RTPFrame) {
return return
} }
if config.Global.RTPReorder { if config.Global.RTPReorder {
if frame.SequenceNumber < av.lastSeq && av.lastSeq - frame.SequenceNumber < 0x8000 { if frame.SequenceNumber < av.lastSeq && av.lastSeq-frame.SequenceNumber < 0x8000 {
// 出现旧的包直接丢弃 // 出现旧的包直接丢弃
return nil return nil
} else if av.lastSeq == 0 { } else if av.lastSeq == 0 {

View File

@@ -3,9 +3,9 @@ package track
import ( import (
"time" "time"
"github.com/Monibuca/engine/v4/codec" "v4.m7s.live/engine/codec"
. "github.com/Monibuca/engine/v4/common" . "v4.m7s.live/engine/common"
"github.com/Monibuca/engine/v4/config" "v4.m7s.live/engine/config"
) )
func NewG711(stream IStream, alaw bool) (g711 *G711) { func NewG711(stream IStream, alaw bool) (g711 *G711) {

View File

@@ -4,10 +4,10 @@ import (
"net" "net"
"time" "time"
"github.com/Monibuca/engine/v4/codec" "v4.m7s.live/engine/codec"
. "github.com/Monibuca/engine/v4/common" . "v4.m7s.live/engine/common"
"github.com/Monibuca/engine/v4/config" "v4.m7s.live/engine/config"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
type H264 struct { type H264 struct {

View File

@@ -4,10 +4,10 @@ import (
"net" "net"
"time" "time"
"github.com/Monibuca/engine/v4/codec" "v4.m7s.live/engine/codec"
. "github.com/Monibuca/engine/v4/common" . "v4.m7s.live/engine/common"
"github.com/Monibuca/engine/v4/config" "v4.m7s.live/engine/config"
"github.com/Monibuca/engine/v4/util" "v4.m7s.live/engine/util"
) )
type H265 struct { type H265 struct {

View File

@@ -4,12 +4,12 @@ import (
"bytes" "bytes"
"net" "net"
"github.com/Monibuca/engine/v4/codec"
. "github.com/Monibuca/engine/v4/common"
"github.com/Monibuca/engine/v4/config"
"github.com/Monibuca/engine/v4/util"
. "github.com/logrusorgru/aurora" . "github.com/logrusorgru/aurora"
"go.uber.org/zap" "go.uber.org/zap"
"v4.m7s.live/engine/codec"
. "v4.m7s.live/engine/common"
"v4.m7s.live/engine/config"
"v4.m7s.live/engine/util"
) )
type Video struct { type Video struct {

View File

@@ -7,7 +7,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/Monibuca/engine/v4/log" "v4.m7s.live/engine/log"
) )
type TCPListener interface { type TCPListener interface {