修改包名

This commit is contained in:
langhuihui
2020-04-12 11:16:34 +08:00
parent 6744f52f07
commit 0024c59ac6
11 changed files with 34 additions and 27 deletions

View File

@@ -1,14 +1,14 @@
# rtmpplugin # plugin-rtmp
the rtmp protocol plugin for monibuca the rtmp protocol plugin for monibuca
实现了RTMP Server的基本功能即接收来自OBS、ffmpeg等推流器的rtmp协议推流。 实现了RTMP Server的基本功能即接收来自OBS、ffmpeg等推流器的rtmp协议推流。
实现了RTMP协议的播放可供rtmp协议播放器拉流播放。 实现了RTMP协议的播放可供rtmp协议播放器拉流播放。
## 插件名称 # 插件名称
RTMP RTMP
## 配置 # 配置
```toml ```toml
[RTMP] [RTMP]

7
amf.go
View File

@@ -1,14 +1,15 @@
package rtmpplugin package rtmp
import ( import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"errors" "errors"
"fmt" "fmt"
"github.com/Monibuca/engine/pool"
"github.com/Monibuca/engine/util"
"log" "log"
"reflect" "reflect"
"github.com/Monibuca/engine/pool"
"github.com/Monibuca/engine/util"
) )
// Action Message Format -- AMF 0 // Action Message Format -- AMF 0

View File

@@ -1,8 +1,9 @@
package rtmpplugin package rtmp
import ( import (
"bytes" "bytes"
"errors" "errors"
"github.com/Monibuca/engine/pool" "github.com/Monibuca/engine/pool"
"github.com/Monibuca/engine/util" "github.com/Monibuca/engine/util"
) )

View File

@@ -1,4 +1,4 @@
package rtmpplugin package rtmp
// http://help.adobe.com/zh_CN/AIR/1.5/jslr/flash/events/NetStatusEvent.html // http://help.adobe.com/zh_CN/AIR/1.5/jslr/flash/events/NetStatusEvent.html

6
go.mod
View File

@@ -1,8 +1,8 @@
module github.com/Monibuca/rtmpplugin module github.com/Monibuca/plugin-rtmp
go 1.13 go 1.13
require ( require (
github.com/Monibuca/engine v1.1.2 github.com/Monibuca/engine v1.2.0
github.com/funny/utest v0.0.0-20161029064919-43870a374500 // indirect github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381
) )

13
go.sum
View File

@@ -1,9 +1,7 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Monibuca/engine v1.0.2 h1:UpPAEQVYrVQrLr9GVGcbu8x5Oiemqd5J2zjGZ/Fhg74= github.com/Monibuca/engine v1.2.0 h1:PeD0HSNvsbC9Ya0BUWM9BoF3Y0X/EgzmmlUvbt5tVOA=
github.com/Monibuca/engine v1.0.2/go.mod h1:NjqVgtXuRSOyk3+NWgCuDf2p7TsBisjYxoEwA9uCZ38= github.com/Monibuca/engine v1.2.0/go.mod h1:WbDkXENLjcPjyjCR1Mix1GA+uAlwORkv/+8aMVrDX2g=
github.com/Monibuca/engine v1.1.2 h1:vhZkKO8r/S3pBgM+AY+vyNZDV4wX0EScdf3PJw/+Ths=
github.com/Monibuca/engine v1.1.2/go.mod h1:OEmvKy5/pgbVEglb6RLC6EL+LRS7UR3l46Vgz1AURJc=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
@@ -14,6 +12,12 @@ github.com/funny/utest v0.0.0-20161029064919-43870a374500 h1:Z0r1CZnoIWFB/Uiwh1B
github.com/funny/utest v0.0.0-20161029064919-43870a374500/go.mod h1:mUn39tBov9jKnTWV1RlOYoNzxdBFHiSzXWdY1FoNGGg= github.com/funny/utest v0.0.0-20161029064919-43870a374500/go.mod h1:mUn39tBov9jKnTWV1RlOYoNzxdBFHiSzXWdY1FoNGGg=
github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs=
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -23,6 +27,7 @@ github.com/shirou/gopsutil v2.20.1+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= 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/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

View File

@@ -1,4 +1,4 @@
package rtmpplugin package rtmp
import ( import (
"bufio" "bufio"

View File

@@ -1,9 +1,10 @@
package rtmpplugin package rtmp
import ( import (
"log" "log"
. "github.com/Monibuca/engine" . "github.com/Monibuca/engine"
. "github.com/logrusorgru/aurora"
) )
var config = new(struct { var config = new(struct {
@@ -16,11 +17,10 @@ func init() {
Name: "RTMP", Name: "RTMP",
Type: PLUGIN_SUBSCRIBER | PLUGIN_PUBLISHER, Type: PLUGIN_SUBSCRIBER | PLUGIN_PUBLISHER,
Config: config, Config: config,
Version: "1.0.0",
Run: run, Run: run,
}) })
} }
func run() { func run() {
log.Printf("server rtmp start at %s", config.ListenAddr) Print(Green("server rtmp start at"), BrightBlue(config.ListenAddr))
log.Fatal(ListenRtmp(config.ListenAddr)) log.Fatal(ListenRtmp(config.ListenAddr))
} }

2
msg.go
View File

@@ -1,4 +1,4 @@
package rtmpplugin package rtmp
import ( import (
"bytes" "bytes"

View File

@@ -1,4 +1,4 @@
package rtmpplugin package rtmp
import ( import (
"bufio" "bufio"

View File

@@ -1,4 +1,4 @@
package rtmpplugin package rtmp
import ( import (
"bufio" "bufio"