rename to ipchub

This commit is contained in:
notch
2020-12-14 09:05:52 +08:00
parent 4508302351
commit 2c8ac84a41
22 changed files with 27 additions and 67 deletions

2
.gitignore vendored
View File

@@ -10,7 +10,7 @@ logs
bin
# file
tomatox
ipchub
routetable.json
users.json

6
.vscode/launch.json vendored
View File

@@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "tomatox",
"name": "ipchub",
"type": "go",
"request": "launch",
"mode": "auto",
@@ -14,7 +14,7 @@
"args": []
},
{
"name": "tomatox -log-tofile",
"name": "ipchub -log-tofile",
"type": "go",
"request": "launch",
"mode": "auto",
@@ -23,7 +23,7 @@
"args": ["-log-tofile"]
},
{
"name": "tomatox -h",
"name": "ipchub -h",
"type": "go",
"request": "launch",
"mode": "auto",

View File

@@ -1,2 +1,2 @@
# tomatox
# ipchub
一个小而美的流媒体服务器

View File

@@ -12,16 +12,16 @@ import (
"strings"
"time"
"github.com/cnotch/ipchub/provider/auth"
"github.com/cnotch/ipchub/utils"
cfg "github.com/cnotch/loader"
"github.com/cnotch/tomatox/provider/auth"
"github.com/cnotch/tomatox/utils"
"github.com/cnotch/xlog"
)
// 服务名
const (
Vendor = "CAOHONGJU"
Name = "tomatox"
Name = "ipchub"
Version = "V1.0.0"
)

View File

@@ -1,19 +0,0 @@
// Copyright (c) 2019,CAOHONGJU All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package config
import (
"flag"
)
// RtmpConfig rtsp 配置
type RtmpConfig struct {
ChunkSize int `json:"chunksize"`
}
func (c *RtmpConfig) initFlags() {
// RTSP 组播
flag.IntVar(&c.ChunkSize, "rtmp-chunksize", 16*1024, "Set RTMP ChunkSize")
}

View File

@@ -1,21 +0,0 @@
// Copyright (c) 2019,CAOHONGJU All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package config
import (
"flag"
"github.com/cnotch/tomatox/provider/auth"
)
// RtspConfig rtsp 配置
type RtspConfig struct {
AuthMode auth.Mode `json:"authmode"`
}
func (c *RtspConfig) initFlags() {
// RTSP 组播
flag.Var(&c.AuthMode, "rtsp-auth", "Set RTSP auth mode")
}

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/cnotch/tomatox
module github.com/cnotch/ipchub
go 1.14

View File

@@ -6,7 +6,7 @@
"log": {
"level": "INFO",
"tofile": false,
"filename": "./logs/tomatox.log",
"filename": "./logs/ipchub.log",
"maxsize": 20,
"maxdays": 7,
"maxbackups": 14,

View File

@@ -5,10 +5,10 @@
package main
import (
"github.com/cnotch/ipchub/config"
"github.com/cnotch/ipchub/provider/auth"
"github.com/cnotch/ipchub/provider/route"
"github.com/cnotch/scheduler"
"github.com/cnotch/tomatox/config"
"github.com/cnotch/tomatox/provider/auth"
"github.com/cnotch/tomatox/provider/route"
"github.com/cnotch/xlog"
)

View File

@@ -5,7 +5,7 @@ GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
ENABLED_CGO=0
BINARY_NAME=tomatox
BINARY_NAME=ipchub
BINARY_DIR= bin/v1.0.0
build:

View File

@@ -5,7 +5,7 @@
package rtp
import (
"github.com/cnotch/tomatox/av/h264"
"github.com/cnotch/ipchub/av/h264"
)
type h264FrameExtractor struct {

View File

@@ -7,7 +7,7 @@ package rtp
import (
"fmt"
"github.com/cnotch/tomatox/av/aac"
"github.com/cnotch/ipchub/av/aac"
)
type mpesFrameExtractor struct {

View File

@@ -14,7 +14,7 @@ import (
"net/url"
"strings"
"github.com/cnotch/tomatox/utils/scan"
"github.com/cnotch/ipchub/utils/scan"
)
const (

View File

@@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"github.com/cnotch/tomatox/utils/scan"
"github.com/cnotch/ipchub/utils/scan"
)
// RTSP 响应状态码.

View File

@@ -11,7 +11,7 @@ import (
"os"
"path/filepath"
"github.com/cnotch/tomatox/utils"
"github.com/cnotch/ipchub/utils"
)
// JSON json 提供者

View File

@@ -8,7 +8,7 @@ import (
"strings"
"unicode"
"github.com/cnotch/tomatox/utils/scan"
"github.com/cnotch/ipchub/utils/scan"
)
const (

View File

@@ -8,7 +8,7 @@ import (
"sync"
"time"
"github.com/cnotch/tomatox/provider/security"
"github.com/cnotch/ipchub/provider/security"
)
// Token 用户登录后的Token

View File

@@ -10,7 +10,7 @@ import (
"errors"
"strings"
"github.com/cnotch/tomatox/utils/scan"
"github.com/cnotch/ipchub/utils/scan"
)
// AccessRight 访问权限类型

View File

@@ -11,7 +11,7 @@ import (
"os"
"path/filepath"
"github.com/cnotch/tomatox/utils"
"github.com/cnotch/ipchub/utils"
)
// JSON json 提供者

View File

@@ -7,7 +7,7 @@ package route
import (
"net/url"
"github.com/cnotch/tomatox/utils"
"github.com/cnotch/ipchub/utils"
)
// Route 路由

View File

@@ -7,7 +7,7 @@ package route
import (
"sync"
"github.com/cnotch/tomatox/utils"
"github.com/cnotch/ipchub/utils"
"github.com/cnotch/xlog"
)

View File

@@ -22,7 +22,7 @@ import (
// BenchmarkOf-8 100000000 14.5 ns/op 0 B/op 0 allocs/op
func BenchmarkOf(b *testing.B) {
v := []byte("a/b/c/d/e/f/g/h/this/is/tomatox")
v := []byte("a/b/c/d/e/f/g/h/this/is/ipchub")
b.ReportAllocs()
b.ResetTimer()
@@ -33,7 +33,7 @@ func BenchmarkOf(b *testing.B) {
// BenchmarkOfString-8 100000000 18.4 ns/op 0 B/op 0 allocs/op
func BenchmarkOfString(b *testing.B) {
v := "a/b/c/d/e/f/g/h/this/is/tomatox"
v := "a/b/c/d/e/f/g/h/this/is/ipchub"
b.ReportAllocs()
b.ResetTimer()