Documentation ¶
Index ¶
- Variables
- func Ass_f(ctx context.Context, save_path string, filePath string, st time.Time)
- func Assf(s string)
- func AutoSend_silver_gift()
- func Autoskipf(s string) uint
- func Danmuji_auto()
- func Danmujif(s string)
- func Entry_danmu()
- func Gui_show(m ...string)
- func Heart(b []byte)
- func IsOn(s string) bool
- func Itos(i []interface{}) string
- func Jiezouf(s []string) bool
- func Keep_medal_light()
- func Lessdanmuf(s string) (show bool)
- func Msg(b []byte)
- func Msg_senddanmu(msg string)
- func Msg_showdanmu(item Danmu_item)
- func PlayRecDanmu(filePath string) (*websocket.Server, func())
- func Reply(b []byte)
- func Search_stream_tag(buf []byte, keyframe *slice.Buf[byte]) (front_buf []byte, last_available_offset int, err error)
- func SendStreamWs(item Danmu_item)
- func Shortdanmuf(s string) string
- func StartRecDanmu(ctx context.Context, filePath string)
- func StreamOCommon(roomid int) (array []*c.Common)
- func StreamOCut(roomid int, title ...string)
- func StreamOStart(roomid int)
- func StreamOStatus(roomid int) (Islive bool)
- func StreamOStop(roomid int)
- func TTS(msg string)
- type Ass
- type Autoskip
- type Autoskip_item
- type Communicate
- type Danmu_item
- type Danmu_mq_t
- type Danmuji
- type Fmp4Decoder
- type Jiezou
- type Lessdanmu
- type M4SStream
- func (t *M4SStream) Common() *c.Common
- func (t *M4SStream) LoadConfig(common *c.Common) (e error)
- func (t *M4SStream) PusherToFile(contextC context.Context, filepath string, startFunc func(*M4SStream) error, ...) error
- func (t *M4SStream) PusherToHttp(conn net.Conn, w http.ResponseWriter, r *http.Request, ...) error
- func (t *M4SStream) Start() bool
- func (t *M4SStream) Stop()
- type M4SStream_Config
- type SaveDanmuToDB
- type Shortdanmu
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Ass_height = 720 //字幕高度 Ass_width = 1280 //字幕宽度 Ass_font = 50 //字幕字体大小 Ass_T = 7 //单条字幕显示时间 Ass_loc = 7 //字幕位置 小键盘对应的位置 )
View Source
var Danmu_mq = mq.New()
View Source
var Heart_map = map[string]func(replyF, int){
"heartbeat": replyF.heartbeat,
}
View Source
var Msg_map = map[string]func(replyF, string){}/* 113 elements not displayed */
Msg类型数据处理方法map
View Source
var SaveToJson saveToJson
View Source
var StreamWs = websocket.New_server()
直播Web服务口
View Source
var (
TTS_setting_string = map[string]string{
"0buyguide": "感谢{D}",
"0gift": "感谢{D}",
"0superchat": "感谢{D}",
}
)
Functions ¶
func Danmuji_auto ¶
func Danmuji_auto()
func Lessdanmuf ¶
func PlayRecDanmu ¶ added in v0.5.10
func Search_stream_tag ¶ added in v0.6.1
func Search_stream_tag(buf []byte, keyframe *slice.Buf[byte]) (front_buf []byte, last_available_offset int, err error)
this fuction read []byte and return flv header and all complete keyframe if possible. complete keyframe means the video and audio tags between two video key frames tag
func SendStreamWs ¶ added in v0.5.10
func SendStreamWs(item Danmu_item)
func Shortdanmuf ¶
func StreamOCommon ¶ added in v0.5.10
获取实例的Common
Types ¶
type Autoskip_item ¶ added in v0.5.6
type Communicate ¶ added in v0.5.10
func (*Communicate) Count ¶ added in v0.5.10
func (t *Communicate) Count() int
func (*Communicate) Reset ¶ added in v0.5.10
func (t *Communicate) Reset()
func (*Communicate) Store ¶ added in v0.5.10
func (t *Communicate) Store(k interface{})
type Danmu_item ¶ added in v0.5.10
type Danmu_item struct {
// contains filtered or unexported fields
}
Msg-弹幕处理
type Danmu_mq_t ¶
type Danmu_mq_t struct {
// contains filtered or unexported fields
}
type Fmp4Decoder ¶ added in v0.5.10
type Fmp4Decoder struct { AVTDiff float64 // 音视频时间戳容差 // contains filtered or unexported fields }
func (*Fmp4Decoder) Init_fmp4 ¶ added in v0.5.10
func (t *Fmp4Decoder) Init_fmp4(buf []byte) (b []byte, err error)
func (*Fmp4Decoder) Search_stream_fmp4 ¶ added in v0.6.1
type M4SStream ¶ added in v0.5.10
type M4SStream struct { Status context.Context //IsLive()是否运行中 Stream_msg *msgq.MsgType[[]byte] //流数据消息 tag:data Current_save_path string //明确的直播流保存目录 Callback_start func(*M4SStream) error //实例开始的回调 Callback_startRec func(*M4SStream) error //录制开始的回调 Callback_stopRec func(*M4SStream) //录制结束的回调 Callback_stop func(*M4SStream) //实例结束的回调 // contains filtered or unexported fields }
func (*M4SStream) LoadConfig ¶ added in v0.5.10
func (*M4SStream) PusherToFile ¶ added in v0.8.0
func (t *M4SStream) PusherToFile(contextC context.Context, filepath string, startFunc func(*M4SStream) error, stopFunc func(*M4SStream) error) error
保存到文件
type M4SStream_Config ¶ added in v0.5.10
type M4SStream_Config struct {
// contains filtered or unexported fields
}
type SaveDanmuToDB ¶ added in v0.8.8
type Shortdanmu ¶
type Shortdanmu struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.