完善rtmp server

This commit is contained in:
DESKTOP-COJOJSE\lenovo
2023-11-25 17:45:19 +08:00
parent 33ec8159f1
commit f932284313
14 changed files with 643 additions and 153 deletions

View File

@@ -1,7 +1,11 @@
package rtmp
import "github.com/yangjiechina/live-server/stream"
import (
"github.com/yangjiechina/avformat/utils"
"github.com/yangjiechina/live-server/stream"
"net"
)
type Sink struct {
stream.SinkImpl
func NewSink(id stream.SinkId, conn net.Conn) stream.ISink {
return &stream.SinkImpl{Id_: id, Protocol_: stream.ProtocolRtmp, Conn: conn, DesiredAudioCodecId_: utils.AVCodecIdNONE, DesiredVideoCodecId_: utils.AVCodecIdNONE}
}