File tree 10 files changed +104
-7
lines changed
10 files changed +104
-7
lines changed Original file line number Diff line number Diff line change 5
5
[ ![ Build Status] [ build-img ]] [ build-url ]
6
6
[ ![ Go Report] [ goreport-img ]] [ goreport-url ]
7
7
8
- [ protocol-img ] : https://img.shields.io/badge/obs--websocket-v5.4.2 -blue?logo=obs-studio&style=flat-square
9
- [ protocol-url ] : https://github.com/obsproject/obs-websocket/blob/5.4.2 /docs/generated/protocol.md
8
+ [ protocol-img ] : https://img.shields.io/badge/obs--websocket-v5.5.0 -blue?logo=obs-studio&style=flat-square
9
+ [ protocol-url ] : https://github.com/obsproject/obs-websocket/blob/5.5.0 /docs/generated/protocol.md
10
10
[ doc-img ] : https://img.shields.io/badge/pkg.go.dev-reference-blue?logo=go&logoColor=white&style=flat-square
11
11
[ doc-url ] : https://pkg.go.dev/github.com/andreykaipov/goobs
12
12
[ build-img ] : https://img.shields.io/github/actions/workflow/status/andreykaipov/goobs/ci.yml?logo=github&style=flat-square&branch=main
@@ -66,9 +66,9 @@ The corresponding output:
66
66
[ // ] : # ( snippet-2-begin )
67
67
``` console
68
68
❯ go run _examples/basic/main.go
69
- OBS Studio version: 30.1 .0
70
- Server protocol version: 5.4.2
71
- Client protocol version: 5.4.2
72
- Client library version: 1.2.2
69
+ OBS Studio version: 30.2 .0
70
+ Server protocol version: 5.5.0
71
+ Client protocol version: 5.5.0
72
+ Client library version: 1.4.0
73
73
```
74
74
[ // ] : # ( snippet-2-end )
Original file line number Diff line number Diff line change
1
+ // This file has been automatically generated. Don't edit it.
2
+
3
+ package events
4
+
5
+ /*
6
+ Represents the event body for the RecordFileChanged event.
7
+
8
+ The record output has started writing to a new file. For example, when a file split happens.
9
+ */
10
+ type RecordFileChanged struct {
11
+ // File name that the output has begun writing to
12
+ NewOutputPath string `json:"newOutputPath,omitempty"`
13
+ }
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ func GetType(name string) any {
66
66
return & StreamStateChanged {}
67
67
case "RecordStateChanged" :
68
68
return & RecordStateChanged {}
69
+ case "RecordFileChanged" :
70
+ return & RecordFileChanged {}
69
71
case "ReplayBufferStateChanged" :
70
72
return & ReplayBufferStateChanged {}
71
73
case "VirtualcamStateChanged" :
Original file line number Diff line number Diff line change
1
+ // This file has been automatically generated. Don't edit it.
2
+
3
+ package record
4
+
5
+ // Represents the request body for the CreateRecordChapter request.
6
+ type CreateRecordChapterParams struct {
7
+ // Name of the new chapter
8
+ ChapterName * string `json:"chapterName,omitempty"`
9
+ }
10
+
11
+ func NewCreateRecordChapterParams () * CreateRecordChapterParams {
12
+ return & CreateRecordChapterParams {}
13
+ }
14
+ func (o * CreateRecordChapterParams ) WithChapterName (x string ) * CreateRecordChapterParams {
15
+ o .ChapterName = & x
16
+ return o
17
+ }
18
+
19
+ // Returns the associated request.
20
+ func (o * CreateRecordChapterParams ) GetRequestName () string {
21
+ return "CreateRecordChapter"
22
+ }
23
+
24
+ // Represents the response body for the CreateRecordChapter request.
25
+ type CreateRecordChapterResponse struct {
26
+ _response
27
+ }
28
+
29
+ /*
30
+ Adds a new chapter marker to the file currently being recorded.
31
+
32
+ Note: As of OBS 30.2.0, the only file format supporting this feature is Hybrid MP4.
33
+ */
34
+ func (c * Client ) CreateRecordChapter (paramss ... * CreateRecordChapterParams ) (* CreateRecordChapterResponse , error ) {
35
+ if len (paramss ) == 0 {
36
+ paramss = []* CreateRecordChapterParams {{}}
37
+ }
38
+ params := paramss [0 ]
39
+ data := & CreateRecordChapterResponse {}
40
+ return data , c .client .SendRequest (params , data )
41
+ }
Original file line number Diff line number Diff line change
1
+ // This file has been automatically generated. Don't edit it.
2
+
3
+ package record
4
+
5
+ // Represents the request body for the SplitRecordFile request.
6
+ type SplitRecordFileParams struct {}
7
+
8
+ // Returns the associated request.
9
+ func (o * SplitRecordFileParams ) GetRequestName () string {
10
+ return "SplitRecordFile"
11
+ }
12
+
13
+ // Represents the response body for the SplitRecordFile request.
14
+ type SplitRecordFileResponse struct {
15
+ _response
16
+ }
17
+
18
+ // Splits the current file being recorded into a new file.
19
+ func (c * Client ) SplitRecordFile (paramss ... * SplitRecordFileParams ) (* SplitRecordFileResponse , error ) {
20
+ if len (paramss ) == 0 {
21
+ paramss = []* SplitRecordFileParams {{}}
22
+ }
23
+ params := paramss [0 ]
24
+ data := & SplitRecordFileResponse {}
25
+ return data , c .client .SendRequest (params , data )
26
+ }
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ type SceneItemTransform struct {
104
104
BoundsHeight float64 `json:"boundsHeight"`
105
105
BoundsType string `json:"boundsType"`
106
106
BoundsWidth float64 `json:"boundsWidth"`
107
+ CropToBounds bool `json:"cropToBounds"`
107
108
CropBottom float64 `json:"cropBottom"`
108
109
CropLeft float64 `json:"cropLeft"`
109
110
CropRight float64 `json:"cropRight"`
Original file line number Diff line number Diff line change @@ -115,9 +115,11 @@ The following tables show how to make the appropriate `goobs` request for any gi
115
115
## record
116
116
| obs-websocket | goobs |
117
117
| --- | --- |
118
+ | CreateRecordChapter | ` client.Record.CreateRecordChapter(...) ` |
118
119
| GetRecordStatus | ` client.Record.GetRecordStatus(...) ` |
119
120
| PauseRecord | ` client.Record.PauseRecord(...) ` |
120
121
| ResumeRecord | ` client.Record.ResumeRecord(...) ` |
122
+ | SplitRecordFile | ` client.Record.SplitRecordFile(...) ` |
121
123
| StartRecord | ` client.Record.StartRecord(...) ` |
122
124
| StopRecord | ` client.Record.StopRecord(...) ` |
123
125
| ToggleRecord | ` client.Record.ToggleRecord(...) ` |
Original file line number Diff line number Diff line change 48
48
// run at the end of all others
49
49
"record.ResumeRecord" ,
50
50
"record.StopRecord" ,
51
+ "record.CreateRecordChapter" ,
52
+ "record.SplitRecordFile" ,
51
53
}
52
54
)
53
55
Original file line number Diff line number Diff line change 7
7
8
8
const lib = "github.com/andreykaipov/goobs"
9
9
10
- var ProtocolVersion = "5.4.2 "
10
+ var ProtocolVersion = "5.5.0 "
11
11
12
12
var LibraryVersion = func () string {
13
13
bi , ok := debug .ReadBuildInfo ()
Original file line number Diff line number Diff line change @@ -693,6 +693,11 @@ func Test_record(t *testing.T) {
693
693
client .Disconnect ()
694
694
})
695
695
696
+ _ , err = client .Record .CreateRecordChapter (& record.CreateRecordChapterParams {ChapterName : & []string {"test" }[0 ]})
697
+ if err != nil {
698
+ t .Logf ("%s" , err )
699
+ }
700
+ assert .Error (t , err )
696
701
_ , err = client .Record .GetRecordStatus (& record.GetRecordStatusParams {})
697
702
if err != nil {
698
703
t .Logf ("%s" , err )
@@ -708,6 +713,11 @@ func Test_record(t *testing.T) {
708
713
t .Logf ("%s" , err )
709
714
}
710
715
assert .Error (t , err )
716
+ _ , err = client .Record .SplitRecordFile (& record.SplitRecordFileParams {})
717
+ if err != nil {
718
+ t .Logf ("%s" , err )
719
+ }
720
+ assert .Error (t , err )
711
721
_ , err = client .Record .StartRecord (& record.StartRecordParams {})
712
722
if err != nil {
713
723
t .Logf ("%s" , err )
You can’t perform that action at this time.
0 commit comments