-
Notifications
You must be signed in to change notification settings - Fork 86
/
default_handler.go
81 lines (60 loc) · 1.98 KB
/
default_handler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// Copyright (c) 2018- yutopp ([email protected])
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
//
package rtmp
import (
"io"
"github.com/yutopp/go-rtmp/message"
)
var _ Handler = (*DefaultHandler)(nil)
type DefaultHandler struct {
}
func (h *DefaultHandler) OnServe(conn *Conn) {
}
func (h *DefaultHandler) OnConnect(timestamp uint32, cmd *message.NetConnectionConnect) error {
return nil
}
func (h *DefaultHandler) OnCreateStream(timestamp uint32, cmd *message.NetConnectionCreateStream) error {
return nil
}
func (h *DefaultHandler) OnReleaseStream(timestamp uint32, cmd *message.NetConnectionReleaseStream) error {
return nil
}
func (h *DefaultHandler) OnDeleteStream(timestamp uint32, cmd *message.NetStreamDeleteStream) error {
return nil
}
func (h *DefaultHandler) OnPublish(_ *StreamContext, timestamp uint32, cmd *message.NetStreamPublish) error {
return nil
}
func (h *DefaultHandler) OnPlay(_ *StreamContext, timestamp uint32, cmd *message.NetStreamPlay) error {
return nil
}
func (h *DefaultHandler) OnFCPublish(timestamp uint32, cmd *message.NetStreamFCPublish) error {
return nil
}
func (h *DefaultHandler) OnFCUnpublish(timestamp uint32, cmd *message.NetStreamFCUnpublish) error {
return nil
}
func (h *DefaultHandler) OnSetDataFrame(timestamp uint32, data *message.NetStreamSetDataFrame) error {
return nil
}
func (h *DefaultHandler) OnAudio(timestamp uint32, payload io.Reader) error {
return nil
}
func (h *DefaultHandler) OnVideo(timestamp uint32, payload io.Reader) error {
return nil
}
func (h *DefaultHandler) OnUnknownMessage(timestamp uint32, msg message.Message) error {
return nil
}
func (h *DefaultHandler) OnUnknownCommandMessage(timestamp uint32, cmd *message.CommandMessage) error {
return nil
}
func (h *DefaultHandler) OnUnknownDataMessage(timestamp uint32, data *message.DataMessage) error {
return nil
}
func (h *DefaultHandler) OnClose() {
}