Documentation ¶
Index ¶
- Variables
- func Ass_f(save_path string, filePath string, st time.Time)
- func Assf(s string)
- func AutoSend_silver_gift()
- func Autobanf(s string) bool
- 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 Obs_R(on bool)
- func Obsf(on bool)
- func PlayRecDanmu(filePath string) (*websocket.Server, func())
- func Reply(b []byte)
- func Save_to_json(Loc int, context []byte)
- func Seach_stream_tag(buf []byte) (front_buf []byte, keyframe [][]byte, last_avilable_offset int, err error)
- func SendStreamWs(item Danmu_item)
- func Shortdanmuf(s string) string
- func ShowRevf()
- func StartRecDanmu(filePath string)
- func StopRecDanmu()
- func StreamOCommon(roomid int) (array []c.Common)
- func StreamOStatus(roomid int) bool
- func StreamOStop(roomid int)
- func TTS(msg string)
- type Ass
- type Autoban
- type Autoskip
- type Autoskip_item
- type Communicate
- type Danmu_item
- type Danmu_mq_t
- type Danmuji
- type Fmp4Decoder
- type Jiezou
- type Lessdanmu
- type M4SStream
- type M4SStream_Config
- type Obs
- type SavestreamO
- type Shortdanmu
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ShowRev_old float64 ShowRev_start bool )
功能区 ShowRev 显示h营收
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(10)
View Source
var Heart_map = map[string]func(replyF, int){
"heartbeat": replyF.heartbeat,
}
View Source
var Msg_map = map[string]func(replyF, string){ `VOICE_JOIN_ROOM_COUNT_INFO`: replyF.voice_join_room_count_info, `VOICE_JOIN_LIST`: nil, `VOICE_JOIN_STATUS`: replyF.voice_join_status, `STOP_LIVE_ROOM_LIST`: nil, `PK_LOTTERY_START`: replyF.pk_lottery_start, `PK_BATTLE_PRE_NEW`: nil, `PK_BATTLE_START_NEW`: nil, `PK_BATTLE_PROCESS_NEW`: replyF.pk_battle_process_new, `VTR_GIFT_LOTTERY`: replyF.vtr_gift_lottery, `ENTRY_EFFECT_MUST_RECEIVE`: nil, `GIFT_BAG_DOT`: nil, `LITTLE_MESSAGE_BOX`: replyF.little_message_box, `MESSAGEBOX_USER_MEDAL_CHANGE`: replyF.messagebox_user_medal_change, `HOT_RANK_SETTLEMENT`: nil, `HOT_RANK_SETTLEMENT_V2`: replyF.hot_rank_settlement_v2, `HOT_RANK_CHANGED`: nil, `HOT_RANK_CHANGED_V2`: nil, `CARD_MSG`: nil, `WIDGET_BANNER`: nil, `ROOM_ADMINS`: nil, `ONLINE_RANK_TOP3`: nil, `ONLINE_RANK_COUNT`: nil, `ONLINE_RANK_V2`: nil, "TRADING_SCORE": nil, "MATCH_ROOM_CONF": nil, "HOT_ROOM_NOTIFY": nil, "MATCH_TEAM_GIFT_RANK": nil, "ACTIVITY_MATCH_GIFT": nil, "PK_BATTLE_PRE": nil, "PK_BATTLE_START": nil, "PK_BATTLE_PROCESS": nil, "PK_BATTLE_END": nil, "PK_BATTLE_RANK_CHANGE": nil, "PK_BATTLE_SETTLE_USER": nil, "PK_BATTLE_SETTLE_V2": nil, "PK_BATTLE_SETTLE": nil, "SYS_MSG": nil, "ROOM_SKIN_MSG": nil, "GUARD_ACHIEVEMENT_ROOM": nil, "ANCHOR_LOT_START": replyF.anchor_lot_start, "ANCHOR_LOT_CHECKSTATUS": nil, "ANCHOR_LOT_END": nil, "ANCHOR_LOT_AWARD": replyF.anchor_lot_award, "COMBO_SEND": nil, "INTERACT_WORD": replyF.interact_word, "ACTIVITY_BANNER_UPDATE_V2": nil, "NOTICE_MSG": nil, "ROOM_BANNER": nil, "ONLINERANK": nil, "WELCOME": nil, "HOUR_RANK_AWARDS": nil, "ROOM_RANK": nil, "ROOM_SHIELD": nil, "USER_TOAST_MSG": replyF.user_toast_msg, "WIN_ACTIVITY": replyF.win_activity, "SPECIAL_GIFT": replyF.special_gift, "GUARD_BUY": nil, "WELCOME_GUARD": nil, "DANMU_MSG": replyF.danmu, "DANMU_MSG:4:0:2:2:2:0": replyF.danmu, "ROOM_CHANGE": replyF.room_change, "ROOM_SILENT_OFF": replyF.roomsilent, "ROOM_SILENT_ON": replyF.roomsilent, "SEND_GIFT": replyF.send_gift, "ROOM_BLOCK_MSG": replyF.room_block_msg, "PREPARING": replyF.preparing, "LIVE": replyF.live, "SUPER_CHAT_ENTRANCE": nil, "SUPER_CHAT_MESSAGE_DELETE": nil, "SUPER_CHAT_MESSAGE": nil, "SUPER_CHAT_MESSAGE_JPN": replyF.super_chat_message, "PANEL": nil, "ENTRY_EFFECT": replyF.entry_effect, "ROOM_REAL_TIME_MESSAGE_UPDATE": nil, "WATCHED_CHANGE": replyF.watched_change, "FULL_SCREEN_SPECIAL_EFFECT": nil, "GIFT_BOARD_RED_DOT": nil, "USER_PANEL_RED_ALARM": nil, "POPULARITY_RED_POCKET_NEW": replyF.popularity_red_pocket_new, "POPULARITY_RED_POCKET_START": replyF.popularity_red_pocket_start, "POPULARITY_RED_POCKET_WINNER_LIST": nil, "COMMON_NOTICE_DANMAKU": replyF.common_notice_danmaku, "ACTIVITY_BANNER_CHANGE": nil, "ACTIVITY_BANNER_CHANGE_V2": replyF.activity_banner_change_v2, "VIDEO_CONNECTION_JOIN_START": replyF.video_connection_join_start, "VIDEO_CONNECTION_JOIN_END": replyF.video_connection_join_end, "VIDEO_CONNECTION_MSG": replyF.video_connection_msg, "WARNING": replyF.warning, "DANMU_AGGREGATION": nil, "GUARD_HONOR_THOUSAND": nil, "LIKE_INFO_V3_CLICK": replyF.like_info_v3_click, "LIKE_INFO_V3_UPDATE": nil, "USER_TASK_PROGRESS": nil, "LITTLE_TIPS": replyF.little_tips, "LIKE_INFO_V3_NOTICE": nil, "LIVE_INTERACTIVE_GAME": nil, }
Msg类型数据处理方法map
View Source
var Recoder = websocket.Recorder{ Server: StreamWs, }
弹幕回放
View Source
var StreamWs = websocket.New_server()
直播Web服务口
Functions ¶
func Danmuji_auto ¶
func Danmuji_auto()
func Lessdanmuf ¶
func PlayRecDanmu ¶ added in v0.5.10
func Save_to_json ¶ added in v0.5.8
func Seach_stream_tag ¶ added in v0.5.9
func Seach_stream_tag(buf []byte) (front_buf []byte, keyframe [][]byte, last_avilable_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 StartRecDanmu ¶ added in v0.5.10
func StartRecDanmu(filePath string)
func StopRecDanmu ¶ added in v0.5.10
func StopRecDanmu()
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 {
// contains filtered or unexported fields
}
func (*Fmp4Decoder) Init_fmp4 ¶ added in v0.5.10
func (t *Fmp4Decoder) Init_fmp4(buf []byte) error
func (*Fmp4Decoder) Seach_stream_fmp4 ¶ added in v0.5.10
func (t *Fmp4Decoder) Seach_stream_fmp4(buf []byte) (keyframes [][]byte, last_avilable_offset int, err error)
type M4SStream ¶ added in v0.5.10
type M4SStream struct { Status *signal.Signal //IsLive()是否运行中 Stream_msg *msgq.Msgq //流数据消息 tag:data Current_save_path string //明确的直播流保存目录 Callback_start func(*M4SStream) //实例开始的回调 Callback_startRec func(*M4SStream) //录制开始的回调 Callback_stopRec func(*M4SStream) //录制结束的回调 Callback_stop func(*M4SStream) //实例结束的回调 // contains filtered or unexported fields }
func (*M4SStream) LoadConfig ¶ added in v0.5.10
func (t *M4SStream) LoadConfig(common c.Common, l *log.Log_interface)
type M4SStream_Config ¶ added in v0.5.10
type M4SStream_Config struct {
// contains filtered or unexported fields
}
type SavestreamO ¶ added in v0.5.10
type Shortdanmu ¶
type Shortdanmu struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.