This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
events_streaming.go
112 lines (106 loc) · 3.65 KB
/
events_streaming.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package obsws
// This file is automatically generated.
// https://github.com/christopher-dG/go-obs-websocket/blob/master/codegen/protocol.py
// StreamStartingEvent : A request to start streaming has been issued.
//
// Since obs-websocket version: 0.3.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#streamstarting
type StreamStartingEvent struct {
// Always false (retrocompatibility).
// Required: Yes.
PreviewOnly bool `json:"preview-only"`
_event `json:",squash"`
}
// StreamStartedEvent : Streaming started successfully.
//
// Since obs-websocket version: 0.3.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#streamstarted
type StreamStartedEvent struct {
_event `json:",squash"`
}
// StreamStoppingEvent : A request to stop streaming has been issued.
//
// Since obs-websocket version: 0.3.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#streamstopping
type StreamStoppingEvent struct {
// Always false (retrocompatibility).
// Required: Yes.
PreviewOnly bool `json:"preview-only"`
_event `json:",squash"`
}
// StreamStoppedEvent : Streaming stopped successfully.
//
// Since obs-websocket version: 0.3.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#streamstopped
type StreamStoppedEvent struct {
_event `json:",squash"`
}
// StreamStatusEvent : Emit every 2 seconds.
//
// Since obs-websocket version: 0.3.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#streamstatus
type StreamStatusEvent struct {
// Current streaming state.
// Required: Yes.
Streaming bool `json:"streaming"`
// Current recording state.
// Required: Yes.
Recording bool `json:"recording"`
// Replay Buffer status.
// Required: Yes.
ReplayBufferActive bool `json:"replay-buffer-active"`
// Amount of data per second (in bytes) transmitted by the stream encoder.
// Required: Yes.
BytesPerSec int `json:"bytes-per-sec"`
// Amount of data per second (in kilobits) transmitted by the stream encoder.
// Required: Yes.
KbitsPerSec int `json:"kbits-per-sec"`
// Percentage of dropped frames.
// Required: Yes.
Strain float64 `json:"strain"`
// Total time (in seconds) since the stream started.
// Required: Yes.
TotalStreamTime int `json:"total-stream-time"`
// Total number of frames transmitted since the stream started.
// Required: Yes.
NumTotalFrames int `json:"num-total-frames"`
// Number of frames dropped by the encoder since the stream started.
// Required: Yes.
NumDroppedFrames int `json:"num-dropped-frames"`
// Current framerate.
// Required: Yes.
FPS float64 `json:"fps"`
// Number of frames rendered.
// Required: Yes.
RenderTotalFrames int `json:"render-total-frames"`
// Number of frames missed due to rendering lag.
// Required: Yes.
RenderMissedFrames int `json:"render-missed-frames"`
// Number of frames outputted.
// Required: Yes.
OutputTotalFrames int `json:"output-total-frames"`
// Number of frames skipped due to encoding lag.
// Required: Yes.
OutputSkippedFrames int `json:"output-skipped-frames"`
// Average frame time (in milliseconds).
// Required: Yes.
AverageFrameTime float64 `json:"average-frame-time"`
// Current CPU usage (percentage).
// Required: Yes.
CpuUsage float64 `json:"cpu-usage"`
// Current RAM usage (in megabytes).
// Required: Yes.
MemoryUsage float64 `json:"memory-usage"`
// Free recording disk space (in megabytes).
// Required: Yes.
FreeDiskSpace float64 `json:"free-disk-space"`
// Always false (retrocompatibility).
// Required: Yes.
PreviewOnly bool `json:"preview-only"`
_event `json:",squash"`
}