Browse Source

current remopo

pull/86/head
Ruben Cid 5 years ago
parent
commit
bc882c1e7c
  1. 2
      container/flv/demuxer.go
  2. 10
      container/flv/muxer.go
  3. 2
      container/flv/tag.go
  4. 2
      container/ts/muxer.go
  5. 3
      container/ts/muxer_test.go
  6. 1
      go.mod
  7. 6
      go.sum
  8. 10
      main.go
  9. 2
      parser/aac/parser.go
  10. 8
      parser/parser.go
  11. 5
      protocol/hls/hls.go
  12. 8
      protocol/hls/source.go
  13. 4
      protocol/httpflv/server.go
  14. 8
      protocol/httpflv/writer.go
  15. 9
      protocol/httpopera/http_opera.go
  16. 2
      protocol/rtmp/cache/cache.go
  17. 2
      protocol/rtmp/cache/gop.go
  18. 4
      protocol/rtmp/cache/special.go
  19. 4
      protocol/rtmp/core/chunk_stream.go
  20. 3
      protocol/rtmp/core/chunk_stream_test.go
  21. 4
      protocol/rtmp/core/conn.go
  22. 4
      protocol/rtmp/core/conn_client.go
  23. 4
      protocol/rtmp/core/conn_server.go
  24. 3
      protocol/rtmp/core/conn_test.go
  25. 2
      protocol/rtmp/core/handshake.go
  26. 10
      protocol/rtmp/rtmp.go
  27. 4
      protocol/rtmp/rtmprelay/rtmprelay.go
  28. 6
      protocol/rtmp/rtmprelay/staticrelay.go
  29. 9
      protocol/rtmp/stream.go
  30. 2
      utils/queue/queue.go

2
container/flv/demuxer.go

@ -3,7 +3,7 @@ package flv @@ -3,7 +3,7 @@ package flv
import (
"errors"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
var (

10
container/flv/muxer.go

@ -9,15 +9,15 @@ import ( @@ -9,15 +9,15 @@ import (
"strings"
"time"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"
"github.com/gwuhaolin/livego/utils/pio"
"github.com/gwuhaolin/livego/utils/uid"
"livego/av"
"livego/protocol/amf"
"livego/utils/pio"
"livego/utils/uid"
)
var (
flvHeader = []byte{0x46, 0x4c, 0x56, 0x01, 0x05, 0x00, 0x00, 0x00, 0x09}
flvDir = flag.String("flvDir", "tmp", "output flv file at flvDir/APP/KEY_TIME.flv")
flvDir = flag.String("flvDir", "tmp", "output flv file at flvDir/APP/KEY_TIME.flv")
)
/*

2
container/flv/tag.go

@ -3,7 +3,7 @@ package flv @@ -3,7 +3,7 @@ package flv
import (
"fmt"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
type flvTag struct {

2
container/ts/muxer.go

@ -3,7 +3,7 @@ package ts @@ -3,7 +3,7 @@ package ts
import (
"io"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
const (

3
container/ts/muxer_test.go

@ -3,7 +3,8 @@ package ts @@ -3,7 +3,8 @@ package ts
import (
"testing"
"github.com/gwuhaolin/livego/av"
"livego/av"
"github.com/stretchr/testify/assert"
)

1
go.mod

@ -7,7 +7,6 @@ require ( @@ -7,7 +7,6 @@ require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-redis/redis/v7 v7.2.0
github.com/gorilla/mux v1.7.4 // indirect
github.com/gwuhaolin/livego v0.0.0-20191025074832-36aaf27ee5c7
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6
github.com/satori/go.uuid v1.2.0
github.com/smartystreets/goconvey v1.6.4 // indirect

6
go.sum

@ -6,7 +6,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC @@ -6,7 +6,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U=
github.com/go-redis/redis/v7 v7.2.0 h1:CrCexy/jYWZjW0AyVoHlcJUeZN19VWlbepTh1Vq6dJs=
github.com/go-redis/redis/v7 v7.2.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@ -16,8 +15,6 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa @@ -16,8 +15,6 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gwuhaolin/livego v0.0.0-20191025074832-36aaf27ee5c7 h1:Hwr5HBWp2+ftb74B9dgSHgN2Z7ndoYEkX9TqkPeegJ0=
github.com/gwuhaolin/livego v0.0.0-20191025074832-36aaf27ee5c7/go.mod h1:XPGYyS5lXw2ForUaQjb/hJbzhuKPjnLxcGgSWCXZUGQ=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
@ -45,8 +42,6 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 @@ -45,8 +42,6 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@ -72,7 +67,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy @@ -72,7 +67,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
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 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

10
main.go

@ -6,11 +6,11 @@ import ( @@ -6,11 +6,11 @@ import (
"net"
"time"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/hls"
"github.com/gwuhaolin/livego/protocol/httpflv"
"github.com/gwuhaolin/livego/protocol/httpopera"
"github.com/gwuhaolin/livego/protocol/rtmp"
"livego/configure"
"livego/protocol/hls"
"livego/protocol/httpflv"
"livego/protocol/httpopera"
"livego/protocol/rtmp"
)
var (

2
parser/aac/parser.go

@ -4,7 +4,7 @@ import ( @@ -4,7 +4,7 @@ import (
"errors"
"io"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
type mpegExtension struct {

8
parser/parser.go

@ -4,10 +4,10 @@ import ( @@ -4,10 +4,10 @@ import (
"errors"
"io"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/parser/aac"
"github.com/gwuhaolin/livego/parser/h264"
"github.com/gwuhaolin/livego/parser/mp3"
"livego/av"
"livego/parser/aac"
"livego/parser/h264"
"livego/parser/mp3"
)
var (

5
protocol/hls/hls.go

@ -11,8 +11,9 @@ import ( @@ -11,8 +11,9 @@ import (
"strings"
"time"
"github.com/gwuhaolin/livego/av"
"github.com/orcaman/concurrent-map"
"livego/av"
cmap "github.com/orcaman/concurrent-map"
)
const (

8
protocol/hls/source.go

@ -7,10 +7,10 @@ import ( @@ -7,10 +7,10 @@ import (
"log"
"time"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/container/flv"
"github.com/gwuhaolin/livego/container/ts"
"github.com/gwuhaolin/livego/parser"
"livego/av"
"livego/container/flv"
"livego/container/ts"
"livego/parser"
)
const (

4
protocol/httpflv/server.go

@ -7,8 +7,8 @@ import ( @@ -7,8 +7,8 @@ import (
"net/http"
"strings"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/rtmp"
"livego/av"
"livego/protocol/rtmp"
)
type Server struct {

8
protocol/httpflv/writer.go

@ -7,10 +7,10 @@ import ( @@ -7,10 +7,10 @@ import (
"net/http"
"time"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"
"github.com/gwuhaolin/livego/utils/pio"
"github.com/gwuhaolin/livego/utils/uid"
"livego/av"
"livego/protocol/amf"
"livego/utils/pio"
"livego/utils/uid"
)
const (

9
protocol/httpopera/http_opera.go

@ -8,12 +8,13 @@ import ( @@ -8,12 +8,13 @@ import (
"net"
"net/http"
"livego/av"
"livego/configure"
"livego/protocol/rtmp"
"livego/protocol/rtmp/rtmprelay"
jwtmiddleware "github.com/auth0/go-jwt-middleware"
"github.com/dgrijalva/jwt-go"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/rtmp"
"github.com/gwuhaolin/livego/protocol/rtmp/rtmprelay"
)
type Response struct {

2
protocol/rtmp/cache/cache.go vendored

@ -3,7 +3,7 @@ package cache @@ -3,7 +3,7 @@ package cache
import (
"flag"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
var (

2
protocol/rtmp/cache/gop.go vendored

@ -3,7 +3,7 @@ package cache @@ -3,7 +3,7 @@ package cache
import (
"errors"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
var (

4
protocol/rtmp/cache/special.go vendored

@ -4,8 +4,8 @@ import ( @@ -4,8 +4,8 @@ import (
"bytes"
"log"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"
"livego/av"
"livego/protocol/amf"
)
const (

4
protocol/rtmp/core/chunk_stream.go

@ -4,8 +4,8 @@ import ( @@ -4,8 +4,8 @@ import (
"encoding/binary"
"fmt"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/utils/pool"
"livego/av"
"livego/utils/pool"
)
type ChunkStream struct {

3
protocol/rtmp/core/chunk_stream_test.go

@ -4,7 +4,8 @@ import ( @@ -4,7 +4,8 @@ import (
"bytes"
"testing"
"github.com/gwuhaolin/livego/utils/pool"
"livego/utils/pool"
"github.com/stretchr/testify/assert"
)

4
protocol/rtmp/core/conn.go

@ -5,8 +5,8 @@ import ( @@ -5,8 +5,8 @@ import (
"net"
"time"
"github.com/gwuhaolin/livego/utils/pio"
"github.com/gwuhaolin/livego/utils/pool"
"livego/utils/pio"
"livego/utils/pool"
)
const (

4
protocol/rtmp/core/conn_client.go

@ -12,8 +12,8 @@ import ( @@ -12,8 +12,8 @@ import (
"log"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"
"livego/av"
"livego/protocol/amf"
)
var (

4
protocol/rtmp/core/conn_server.go

@ -7,8 +7,8 @@ import ( @@ -7,8 +7,8 @@ import (
"log"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/amf"
"livego/av"
"livego/protocol/amf"
)
var (

3
protocol/rtmp/core/conn_test.go

@ -5,7 +5,8 @@ import ( @@ -5,7 +5,8 @@ import (
"io"
"testing"
"github.com/gwuhaolin/livego/utils/pool"
"livego/utils/pool"
"github.com/stretchr/testify/assert"
)

2
protocol/rtmp/core/handshake.go

@ -10,7 +10,7 @@ import ( @@ -10,7 +10,7 @@ import (
"time"
"github.com/gwuhaolin/livego/utils/pio"
"livego/utils/pio"
)
var (

10
protocol/rtmp/rtmp.go

@ -11,12 +11,12 @@ import ( @@ -11,12 +11,12 @@ import (
"strings"
"time"
"github.com/gwuhaolin/livego/utils/uid"
"livego/utils/uid"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/container/flv"
"github.com/gwuhaolin/livego/protocol/rtmp/core"
"livego/av"
"livego/configure"
"livego/container/flv"
"livego/protocol/rtmp/core"
)
const (

4
protocol/rtmp/rtmprelay/rtmprelay.go

@ -7,8 +7,8 @@ import ( @@ -7,8 +7,8 @@ import (
"io"
"log"
"github.com/gwuhaolin/livego/protocol/amf"
"github.com/gwuhaolin/livego/protocol/rtmp/core"
"livego/protocol/amf"
"livego/protocol/rtmp/core"
)
var (

6
protocol/rtmp/rtmprelay/staticrelay.go

@ -6,9 +6,9 @@ import ( @@ -6,9 +6,9 @@ import (
"log"
"sync"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/configure"
"github.com/gwuhaolin/livego/protocol/rtmp/core"
"livego/av"
"livego/configure"
"livego/protocol/rtmp/core"
)
type StaticPush struct {

9
protocol/rtmp/stream.go

@ -6,10 +6,11 @@ import ( @@ -6,10 +6,11 @@ import (
"strings"
"time"
"github.com/gwuhaolin/livego/av"
"github.com/gwuhaolin/livego/protocol/rtmp/cache"
"github.com/gwuhaolin/livego/protocol/rtmp/rtmprelay"
"github.com/orcaman/concurrent-map"
"livego/av"
"livego/protocol/rtmp/cache"
"livego/protocol/rtmp/rtmprelay"
cmap "github.com/orcaman/concurrent-map"
)
var (

2
utils/queue/queue.go

@ -3,7 +3,7 @@ package queue @@ -3,7 +3,7 @@ package queue
import (
"sync"
"github.com/gwuhaolin/livego/av"
"livego/av"
)
// Queue is a basic FIFO queue for Messages.

Loading…
Cancel
Save