detached d290b71

feat(capi): add video source bindings, VideoAPI and shared memory ports

commit
d290b710e1b5c0a24bf3f0605085f69eb1049af1
author
brice · · 2026-10-14 18:59 UTC
parent
c3499e2
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
13 files · +2464 -3
M .mockery.yml +7 -0
@@ -16,6 +16,8 @@ packages:
1616 InitAPI:
1717 LoopAPI:
1818 StreamOps:
19+ VideoAPI:
20+ SharedMemAPI:
1921 github.com/bnema/purego-pipewire/pipewire:
2022 config:
2123 all: false
@@ -24,3 +26,8 @@ packages:
2426 Runtime:
2527 MainLoop:
2628 Player:
29+ github.com/bnema/purego-pipewire/internal/ports/in:
30+ config:
31+ all: false
32+ interfaces:
33+ VideoHandler:
@@ -16,6 +16,8 @@ packages:
16 InitAPI:16 InitAPI:
17 LoopAPI:17 LoopAPI:
18 StreamOps:18 StreamOps:
19+ VideoAPI:
20+ SharedMemAPI:
19 github.com/bnema/purego-pipewire/pipewire:21 github.com/bnema/purego-pipewire/pipewire:
20 config:22 config:
21 all: false23 all: false
@@ -24,3 +26,8 @@ packages:
24 Runtime:26 Runtime:
25 MainLoop:27 MainLoop:
26 Player:28 Player:
29+ github.com/bnema/purego-pipewire/internal/ports/in:
30+ config:
31+ all: false
32+ interfaces:
33+ VideoHandler:
M gen/pipewire.json +20 -2
@@ -6,7 +6,8 @@
66 "groups": [
77 {"name": "init", "interface": "InitAPI", "package": "out", "symbols": ["pw_init", "pw_deinit"]},
88 {"name": "loop", "interface": "LoopAPI", "package": "out", "symbols": ["pw_main_loop_new", "pw_main_loop_destroy", "pw_main_loop_run", "pw_main_loop_quit", "pw_main_loop_get_loop"]},
9- {"name": "stream_playback", "interface": "StreamPlaybackAPI", "package": "out", "symbols": ["pw_stream_new_simple", "pw_stream_connect", "pw_stream_set_active", "pw_stream_disconnect", "pw_stream_dequeue_buffer", "pw_stream_queue_buffer", "pw_stream_add_listener", "pw_stream_destroy"]}
9+ {"name": "stream_playback", "interface": "StreamPlaybackAPI", "package": "out", "symbols": ["pw_stream_new_simple", "pw_stream_connect", "pw_stream_set_active", "pw_stream_disconnect", "pw_stream_dequeue_buffer", "pw_stream_queue_buffer", "pw_stream_add_listener", "pw_stream_destroy"]},
10+ {"name": "video", "interface": "VideoAPI", "package": "out", "symbols": ["pw_loop_new", "pw_loop_destroy", "pw_loop_get_fd", "pw_loop_enter", "pw_loop_leave", "pw_loop_iterate", "pw_context_new", "pw_context_connect", "pw_context_destroy", "pw_core_disconnect", "pw_properties_new_string", "pw_stream_new", "pw_stream_update_params", "pw_stream_get_node_id", "pw_stream_trigger_process", "pw_stream_is_driving", "pw_stream_return_buffer"]}
1011 ],
1112 "symbols": [
1213 {"name": "pw_init", "library": "pipewire", "group": "init", "signature": "func(argc *int32, argv ***byte)"},
@@ -23,7 +24,24 @@
2324 {"name": "pw_stream_dequeue_buffer", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer) unsafe.Pointer"},
2425 {"name": "pw_stream_queue_buffer", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer, buffer unsafe.Pointer) int32"},
2526 {"name": "pw_stream_add_listener", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer, listener unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) int32"},
26- {"name": "pw_stream_destroy", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer)"}
27+ {"name": "pw_stream_destroy", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer)"},
28+ {"name": "pw_loop_new", "library": "pipewire", "group": "video", "signature": "func(props unsafe.Pointer) unsafe.Pointer"},
29+ {"name": "pw_loop_destroy", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer)"},
30+ {"name": "pw_loop_get_fd", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer) int32"},
31+ {"name": "pw_loop_enter", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer)"},
32+ {"name": "pw_loop_leave", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer)"},
33+ {"name": "pw_loop_iterate", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer, timeout int32) int32"},
34+ {"name": "pw_context_new", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer"},
35+ {"name": "pw_context_connect", "library": "pipewire", "group": "video", "signature": "func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer"},
36+ {"name": "pw_context_destroy", "library": "pipewire", "group": "video", "signature": "func(context unsafe.Pointer)"},
37+ {"name": "pw_core_disconnect", "library": "pipewire", "group": "video", "signature": "func(core unsafe.Pointer) int32"},
38+ {"name": "pw_properties_new_string", "library": "pipewire", "group": "video", "signature": "func(args *byte) unsafe.Pointer"},
39+ {"name": "pw_stream_new", "library": "pipewire", "group": "video", "signature": "func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer"},
40+ {"name": "pw_stream_update_params", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32"},
41+ {"name": "pw_stream_get_node_id", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer) uint32"},
42+ {"name": "pw_stream_trigger_process", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer) int32"},
43+ {"name": "pw_stream_is_driving", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer) bool"},
44+ {"name": "pw_stream_return_buffer", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer, buffer unsafe.Pointer) int32"}
2745 ],
2846 "callbacks": [
2947 {"name": "pw_stream_events", "signature": "struct{version uint32; destroy *func(stream unsafe.Pointer); state_changed *func(stream unsafe.Pointer, old uint32, state uint32, error *byte); control_info *func(stream unsafe.Pointer, id uint32, control unsafe.Pointer); io_changed *func(stream unsafe.Pointer, id uint32, area unsafe.Pointer, size uint32); param_changed *func(stream unsafe.Pointer, id uint32, param unsafe.Pointer); add_buffer *func(stream unsafe.Pointer, buffer unsafe.Pointer); remove_buffer *func(stream unsafe.Pointer, buffer unsafe.Pointer); process *func(stream unsafe.Pointer); drained *func(stream unsafe.Pointer); command *func(stream unsafe.Pointer, cmd unsafe.Pointer); trigger_done *func(stream unsafe.Pointer)}", "group": "stream_playback"}
@@ -6,7 +6,8 @@
6 "groups": [6 "groups": [
7 {"name": "init", "interface": "InitAPI", "package": "out", "symbols": ["pw_init", "pw_deinit"]},7 {"name": "init", "interface": "InitAPI", "package": "out", "symbols": ["pw_init", "pw_deinit"]},
8 {"name": "loop", "interface": "LoopAPI", "package": "out", "symbols": ["pw_main_loop_new", "pw_main_loop_destroy", "pw_main_loop_run", "pw_main_loop_quit", "pw_main_loop_get_loop"]},8 {"name": "loop", "interface": "LoopAPI", "package": "out", "symbols": ["pw_main_loop_new", "pw_main_loop_destroy", "pw_main_loop_run", "pw_main_loop_quit", "pw_main_loop_get_loop"]},
9- {"name": "stream_playback", "interface": "StreamPlaybackAPI", "package": "out", "symbols": ["pw_stream_new_simple", "pw_stream_connect", "pw_stream_set_active", "pw_stream_disconnect", "pw_stream_dequeue_buffer", "pw_stream_queue_buffer", "pw_stream_add_listener", "pw_stream_destroy"]}9+ {"name": "stream_playback", "interface": "StreamPlaybackAPI", "package": "out", "symbols": ["pw_stream_new_simple", "pw_stream_connect", "pw_stream_set_active", "pw_stream_disconnect", "pw_stream_dequeue_buffer", "pw_stream_queue_buffer", "pw_stream_add_listener", "pw_stream_destroy"]},
10+ {"name": "video", "interface": "VideoAPI", "package": "out", "symbols": ["pw_loop_new", "pw_loop_destroy", "pw_loop_get_fd", "pw_loop_enter", "pw_loop_leave", "pw_loop_iterate", "pw_context_new", "pw_context_connect", "pw_context_destroy", "pw_core_disconnect", "pw_properties_new_string", "pw_stream_new", "pw_stream_update_params", "pw_stream_get_node_id", "pw_stream_trigger_process", "pw_stream_is_driving", "pw_stream_return_buffer"]}
10 ],11 ],
11 "symbols": [12 "symbols": [
12 {"name": "pw_init", "library": "pipewire", "group": "init", "signature": "func(argc *int32, argv ***byte)"},13 {"name": "pw_init", "library": "pipewire", "group": "init", "signature": "func(argc *int32, argv ***byte)"},
@@ -23,7 +24,24 @@
23 {"name": "pw_stream_dequeue_buffer", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer) unsafe.Pointer"},24 {"name": "pw_stream_dequeue_buffer", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer) unsafe.Pointer"},
24 {"name": "pw_stream_queue_buffer", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer, buffer unsafe.Pointer) int32"},25 {"name": "pw_stream_queue_buffer", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer, buffer unsafe.Pointer) int32"},
25 {"name": "pw_stream_add_listener", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer, listener unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) int32"},26 {"name": "pw_stream_add_listener", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer, listener unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) int32"},
26- {"name": "pw_stream_destroy", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer)"}27+ {"name": "pw_stream_destroy", "library": "pipewire", "group": "stream_playback", "signature": "func(stream unsafe.Pointer)"},
28+ {"name": "pw_loop_new", "library": "pipewire", "group": "video", "signature": "func(props unsafe.Pointer) unsafe.Pointer"},
29+ {"name": "pw_loop_destroy", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer)"},
30+ {"name": "pw_loop_get_fd", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer) int32"},
31+ {"name": "pw_loop_enter", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer)"},
32+ {"name": "pw_loop_leave", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer)"},
33+ {"name": "pw_loop_iterate", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer, timeout int32) int32"},
34+ {"name": "pw_context_new", "library": "pipewire", "group": "video", "signature": "func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer"},
35+ {"name": "pw_context_connect", "library": "pipewire", "group": "video", "signature": "func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer"},
36+ {"name": "pw_context_destroy", "library": "pipewire", "group": "video", "signature": "func(context unsafe.Pointer)"},
37+ {"name": "pw_core_disconnect", "library": "pipewire", "group": "video", "signature": "func(core unsafe.Pointer) int32"},
38+ {"name": "pw_properties_new_string", "library": "pipewire", "group": "video", "signature": "func(args *byte) unsafe.Pointer"},
39+ {"name": "pw_stream_new", "library": "pipewire", "group": "video", "signature": "func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer"},
40+ {"name": "pw_stream_update_params", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32"},
41+ {"name": "pw_stream_get_node_id", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer) uint32"},
42+ {"name": "pw_stream_trigger_process", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer) int32"},
43+ {"name": "pw_stream_is_driving", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer) bool"},
44+ {"name": "pw_stream_return_buffer", "library": "pipewire", "group": "video", "signature": "func(stream unsafe.Pointer, buffer unsafe.Pointer) int32"}
27 ],45 ],
28 "callbacks": [46 "callbacks": [
29 {"name": "pw_stream_events", "signature": "struct{version uint32; destroy *func(stream unsafe.Pointer); state_changed *func(stream unsafe.Pointer, old uint32, state uint32, error *byte); control_info *func(stream unsafe.Pointer, id uint32, control unsafe.Pointer); io_changed *func(stream unsafe.Pointer, id uint32, area unsafe.Pointer, size uint32); param_changed *func(stream unsafe.Pointer, id uint32, param unsafe.Pointer); add_buffer *func(stream unsafe.Pointer, buffer unsafe.Pointer); remove_buffer *func(stream unsafe.Pointer, buffer unsafe.Pointer); process *func(stream unsafe.Pointer); drained *func(stream unsafe.Pointer); command *func(stream unsafe.Pointer, cmd unsafe.Pointer); trigger_done *func(stream unsafe.Pointer)}", "group": "stream_playback"}47 {"name": "pw_stream_events", "signature": "struct{version uint32; destroy *func(stream unsafe.Pointer); state_changed *func(stream unsafe.Pointer, old uint32, state uint32, error *byte); control_info *func(stream unsafe.Pointer, id uint32, control unsafe.Pointer); io_changed *func(stream unsafe.Pointer, id uint32, area unsafe.Pointer, size uint32); param_changed *func(stream unsafe.Pointer, id uint32, param unsafe.Pointer); add_buffer *func(stream unsafe.Pointer, buffer unsafe.Pointer); remove_buffer *func(stream unsafe.Pointer, buffer unsafe.Pointer); process *func(stream unsafe.Pointer); drained *func(stream unsafe.Pointer); command *func(stream unsafe.Pointer, cmd unsafe.Pointer); trigger_done *func(stream unsafe.Pointer)}", "group": "stream_playback"}
M internal/capi/adapters_gen.go +73 -0 generated file: collapsed
M internal/capi/register_all.go +1 -0
@@ -9,5 +9,6 @@ func registerAll(h loader.Handles) error {
99 registerLoop(h.PipeWire)
1010 registerLoopLock(h.PipeWire)
1111 registerStream_playback(h.PipeWire)
12+ registerVideo(h.PipeWire)
1213 return nil
1314 }
@@ -9,5 +9,6 @@ func registerAll(h loader.Handles) error {
9 registerLoop(h.PipeWire)9 registerLoop(h.PipeWire)
10 registerLoopLock(h.PipeWire)10 registerLoopLock(h.PipeWire)
11 registerStream_playback(h.PipeWire)11 registerStream_playback(h.PipeWire)
12+ registerVideo(h.PipeWire)
12 return nil13 return nil
13 }14 }
A internal/capi/video_gen.go +137 -0
@@ -0,0 +1,137 @@
1+// Code generated by pipewiregen. DO NOT EDIT.
2+
3+package capi
4+
5+import "github.com/bnema/purego"
6+
7+import "unsafe"
8+
9+
10+// pw_loop_newFunc is the function type for pw_loop_new.
11+type pw_loop_newFunc func(props unsafe.Pointer) unsafe.Pointer
12+
13+// pw_loop_destroyFunc is the function type for pw_loop_destroy.
14+type pw_loop_destroyFunc func(loop unsafe.Pointer)
15+
16+// pw_loop_get_fdFunc is the function type for pw_loop_get_fd.
17+type pw_loop_get_fdFunc func(loop unsafe.Pointer) int32
18+
19+// pw_loop_enterFunc is the function type for pw_loop_enter.
20+type pw_loop_enterFunc func(loop unsafe.Pointer)
21+
22+// pw_loop_leaveFunc is the function type for pw_loop_leave.
23+type pw_loop_leaveFunc func(loop unsafe.Pointer)
24+
25+// pw_loop_iterateFunc is the function type for pw_loop_iterate.
26+type pw_loop_iterateFunc func(loop unsafe.Pointer, timeout int32) int32
27+
28+// pw_context_newFunc is the function type for pw_context_new.
29+type pw_context_newFunc func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer
30+
31+// pw_context_connectFunc is the function type for pw_context_connect.
32+type pw_context_connectFunc func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer
33+
34+// pw_context_destroyFunc is the function type for pw_context_destroy.
35+type pw_context_destroyFunc func(context unsafe.Pointer)
36+
37+// pw_core_disconnectFunc is the function type for pw_core_disconnect.
38+type pw_core_disconnectFunc func(core unsafe.Pointer) int32
39+
40+// pw_properties_new_stringFunc is the function type for pw_properties_new_string.
41+type pw_properties_new_stringFunc func(args *byte) unsafe.Pointer
42+
43+// pw_stream_newFunc is the function type for pw_stream_new.
44+type pw_stream_newFunc func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer
45+
46+// pw_stream_update_paramsFunc is the function type for pw_stream_update_params.
47+type pw_stream_update_paramsFunc func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32
48+
49+// pw_stream_get_node_idFunc is the function type for pw_stream_get_node_id.
50+type pw_stream_get_node_idFunc func(stream unsafe.Pointer) uint32
51+
52+// pw_stream_trigger_processFunc is the function type for pw_stream_trigger_process.
53+type pw_stream_trigger_processFunc func(stream unsafe.Pointer) int32
54+
55+// pw_stream_is_drivingFunc is the function type for pw_stream_is_driving.
56+type pw_stream_is_drivingFunc func(stream unsafe.Pointer) bool
57+
58+// pw_stream_return_bufferFunc is the function type for pw_stream_return_buffer.
59+type pw_stream_return_bufferFunc func(stream unsafe.Pointer, buffer unsafe.Pointer) int32
60+
61+
62+
63+var (
64+
65+ pw_loop_new pw_loop_newFunc
66+
67+ pw_loop_destroy pw_loop_destroyFunc
68+
69+ pw_loop_get_fd pw_loop_get_fdFunc
70+
71+ pw_loop_enter pw_loop_enterFunc
72+
73+ pw_loop_leave pw_loop_leaveFunc
74+
75+ pw_loop_iterate pw_loop_iterateFunc
76+
77+ pw_context_new pw_context_newFunc
78+
79+ pw_context_connect pw_context_connectFunc
80+
81+ pw_context_destroy pw_context_destroyFunc
82+
83+ pw_core_disconnect pw_core_disconnectFunc
84+
85+ pw_properties_new_string pw_properties_new_stringFunc
86+
87+ pw_stream_new pw_stream_newFunc
88+
89+ pw_stream_update_params pw_stream_update_paramsFunc
90+
91+ pw_stream_get_node_id pw_stream_get_node_idFunc
92+
93+ pw_stream_trigger_process pw_stream_trigger_processFunc
94+
95+ pw_stream_is_driving pw_stream_is_drivingFunc
96+
97+ pw_stream_return_buffer pw_stream_return_bufferFunc
98+
99+)
100+
101+func registerVideo(handle uintptr) {
102+
103+ purego.RegisterLibFunc(&pw_loop_new, handle, "pw_loop_new")
104+
105+ purego.RegisterLibFunc(&pw_loop_destroy, handle, "pw_loop_destroy")
106+
107+ purego.RegisterLibFunc(&pw_loop_get_fd, handle, "pw_loop_get_fd")
108+
109+ purego.RegisterLibFunc(&pw_loop_enter, handle, "pw_loop_enter")
110+
111+ purego.RegisterLibFunc(&pw_loop_leave, handle, "pw_loop_leave")
112+
113+ purego.RegisterLibFunc(&pw_loop_iterate, handle, "pw_loop_iterate")
114+
115+ purego.RegisterLibFunc(&pw_context_new, handle, "pw_context_new")
116+
117+ purego.RegisterLibFunc(&pw_context_connect, handle, "pw_context_connect")
118+
119+ purego.RegisterLibFunc(&pw_context_destroy, handle, "pw_context_destroy")
120+
121+ purego.RegisterLibFunc(&pw_core_disconnect, handle, "pw_core_disconnect")
122+
123+ purego.RegisterLibFunc(&pw_properties_new_string, handle, "pw_properties_new_string")
124+
125+ purego.RegisterLibFunc(&pw_stream_new, handle, "pw_stream_new")
126+
127+ purego.RegisterLibFunc(&pw_stream_update_params, handle, "pw_stream_update_params")
128+
129+ purego.RegisterLibFunc(&pw_stream_get_node_id, handle, "pw_stream_get_node_id")
130+
131+ purego.RegisterLibFunc(&pw_stream_trigger_process, handle, "pw_stream_trigger_process")
132+
133+ purego.RegisterLibFunc(&pw_stream_is_driving, handle, "pw_stream_is_driving")
134+
135+ purego.RegisterLibFunc(&pw_stream_return_buffer, handle, "pw_stream_return_buffer")
136+
137+}
@@ -0,0 +1,137 @@
1+// Code generated by pipewiregen. DO NOT EDIT.
2+
3+package capi
4+
5+import "github.com/bnema/purego"
6+
7+import "unsafe"
8+
9+
10+// pw_loop_newFunc is the function type for pw_loop_new.
11+type pw_loop_newFunc func(props unsafe.Pointer) unsafe.Pointer
12+
13+// pw_loop_destroyFunc is the function type for pw_loop_destroy.
14+type pw_loop_destroyFunc func(loop unsafe.Pointer)
15+
16+// pw_loop_get_fdFunc is the function type for pw_loop_get_fd.
17+type pw_loop_get_fdFunc func(loop unsafe.Pointer) int32
18+
19+// pw_loop_enterFunc is the function type for pw_loop_enter.
20+type pw_loop_enterFunc func(loop unsafe.Pointer)
21+
22+// pw_loop_leaveFunc is the function type for pw_loop_leave.
23+type pw_loop_leaveFunc func(loop unsafe.Pointer)
24+
25+// pw_loop_iterateFunc is the function type for pw_loop_iterate.
26+type pw_loop_iterateFunc func(loop unsafe.Pointer, timeout int32) int32
27+
28+// pw_context_newFunc is the function type for pw_context_new.
29+type pw_context_newFunc func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer
30+
31+// pw_context_connectFunc is the function type for pw_context_connect.
32+type pw_context_connectFunc func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer
33+
34+// pw_context_destroyFunc is the function type for pw_context_destroy.
35+type pw_context_destroyFunc func(context unsafe.Pointer)
36+
37+// pw_core_disconnectFunc is the function type for pw_core_disconnect.
38+type pw_core_disconnectFunc func(core unsafe.Pointer) int32
39+
40+// pw_properties_new_stringFunc is the function type for pw_properties_new_string.
41+type pw_properties_new_stringFunc func(args *byte) unsafe.Pointer
42+
43+// pw_stream_newFunc is the function type for pw_stream_new.
44+type pw_stream_newFunc func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer
45+
46+// pw_stream_update_paramsFunc is the function type for pw_stream_update_params.
47+type pw_stream_update_paramsFunc func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32
48+
49+// pw_stream_get_node_idFunc is the function type for pw_stream_get_node_id.
50+type pw_stream_get_node_idFunc func(stream unsafe.Pointer) uint32
51+
52+// pw_stream_trigger_processFunc is the function type for pw_stream_trigger_process.
53+type pw_stream_trigger_processFunc func(stream unsafe.Pointer) int32
54+
55+// pw_stream_is_drivingFunc is the function type for pw_stream_is_driving.
56+type pw_stream_is_drivingFunc func(stream unsafe.Pointer) bool
57+
58+// pw_stream_return_bufferFunc is the function type for pw_stream_return_buffer.
59+type pw_stream_return_bufferFunc func(stream unsafe.Pointer, buffer unsafe.Pointer) int32
60+
61+
62+
63+var (
64+
65+ pw_loop_new pw_loop_newFunc
66+
67+ pw_loop_destroy pw_loop_destroyFunc
68+
69+ pw_loop_get_fd pw_loop_get_fdFunc
70+
71+ pw_loop_enter pw_loop_enterFunc
72+
73+ pw_loop_leave pw_loop_leaveFunc
74+
75+ pw_loop_iterate pw_loop_iterateFunc
76+
77+ pw_context_new pw_context_newFunc
78+
79+ pw_context_connect pw_context_connectFunc
80+
81+ pw_context_destroy pw_context_destroyFunc
82+
83+ pw_core_disconnect pw_core_disconnectFunc
84+
85+ pw_properties_new_string pw_properties_new_stringFunc
86+
87+ pw_stream_new pw_stream_newFunc
88+
89+ pw_stream_update_params pw_stream_update_paramsFunc
90+
91+ pw_stream_get_node_id pw_stream_get_node_idFunc
92+
93+ pw_stream_trigger_process pw_stream_trigger_processFunc
94+
95+ pw_stream_is_driving pw_stream_is_drivingFunc
96+
97+ pw_stream_return_buffer pw_stream_return_bufferFunc
98+
99+)
100+
101+func registerVideo(handle uintptr) {
102+
103+ purego.RegisterLibFunc(&pw_loop_new, handle, "pw_loop_new")
104+
105+ purego.RegisterLibFunc(&pw_loop_destroy, handle, "pw_loop_destroy")
106+
107+ purego.RegisterLibFunc(&pw_loop_get_fd, handle, "pw_loop_get_fd")
108+
109+ purego.RegisterLibFunc(&pw_loop_enter, handle, "pw_loop_enter")
110+
111+ purego.RegisterLibFunc(&pw_loop_leave, handle, "pw_loop_leave")
112+
113+ purego.RegisterLibFunc(&pw_loop_iterate, handle, "pw_loop_iterate")
114+
115+ purego.RegisterLibFunc(&pw_context_new, handle, "pw_context_new")
116+
117+ purego.RegisterLibFunc(&pw_context_connect, handle, "pw_context_connect")
118+
119+ purego.RegisterLibFunc(&pw_context_destroy, handle, "pw_context_destroy")
120+
121+ purego.RegisterLibFunc(&pw_core_disconnect, handle, "pw_core_disconnect")
122+
123+ purego.RegisterLibFunc(&pw_properties_new_string, handle, "pw_properties_new_string")
124+
125+ purego.RegisterLibFunc(&pw_stream_new, handle, "pw_stream_new")
126+
127+ purego.RegisterLibFunc(&pw_stream_update_params, handle, "pw_stream_update_params")
128+
129+ purego.RegisterLibFunc(&pw_stream_get_node_id, handle, "pw_stream_get_node_id")
130+
131+ purego.RegisterLibFunc(&pw_stream_trigger_process, handle, "pw_stream_trigger_process")
132+
133+ purego.RegisterLibFunc(&pw_stream_is_driving, handle, "pw_stream_is_driving")
134+
135+ purego.RegisterLibFunc(&pw_stream_return_buffer, handle, "pw_stream_return_buffer")
136+
137+}
A internal/ports/in/mocks/mock_VideoHandler.go +189 -0
@@ -0,0 +1,189 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "github.com/bnema/purego-pipewire/spa"
9+ mock "github.com/stretchr/testify/mock"
10+)
11+
12+// NewMockVideoHandler creates a new instance of MockVideoHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13+// The first argument is typically a *testing.T value.
14+func NewMockVideoHandler(t interface {
15+ mock.TestingT
16+ Cleanup(func())
17+}) *MockVideoHandler {
18+ if helper, ok := t.(interface{ Helper() }); ok {
19+ helper.Helper()
20+ }
21+
22+ mock := &MockVideoHandler{}
23+ mock.Mock.Test(t)
24+
25+ t.Cleanup(func() {
26+ if helper, ok := t.(interface{ Helper() }); ok {
27+ helper.Helper()
28+ }
29+ mock.AssertExpectations(t)
30+ })
31+
32+ return mock
33+}
34+
35+// MockVideoHandler is an autogenerated mock type for the VideoHandler type
36+type MockVideoHandler struct {
37+ mock.Mock
38+}
39+
40+type MockVideoHandler_Expecter struct {
41+ mock *mock.Mock
42+}
43+
44+func (_m *MockVideoHandler) EXPECT() *MockVideoHandler_Expecter {
45+ return &MockVideoHandler_Expecter{mock: &_m.Mock}
46+}
47+
48+// BuffersChanged provides a mock function for the type MockVideoHandler
49+func (_mock *MockVideoHandler) BuffersChanged() {
50+ _mock.Called()
51+ return
52+}
53+
54+// MockVideoHandler_BuffersChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuffersChanged'
55+type MockVideoHandler_BuffersChanged_Call struct {
56+ *mock.Call
57+}
58+
59+// BuffersChanged is a helper method to define mock.On call
60+func (_e *MockVideoHandler_Expecter) BuffersChanged() *MockVideoHandler_BuffersChanged_Call {
61+ return &MockVideoHandler_BuffersChanged_Call{Call: _e.mock.On("BuffersChanged")}
62+}
63+
64+func (_c *MockVideoHandler_BuffersChanged_Call) Run(run func()) *MockVideoHandler_BuffersChanged_Call {
65+ _c.Call.Run(func(args mock.Arguments) {
66+ run()
67+ })
68+ return _c
69+}
70+
71+func (_c *MockVideoHandler_BuffersChanged_Call) Return() *MockVideoHandler_BuffersChanged_Call {
72+ _c.Call.Return()
73+ return _c
74+}
75+
76+func (_c *MockVideoHandler_BuffersChanged_Call) RunAndReturn(run func()) *MockVideoHandler_BuffersChanged_Call {
77+ _c.Run(run)
78+ return _c
79+}
80+
81+// FormatChanged provides a mock function for the type MockVideoHandler
82+func (_mock *MockVideoHandler) FormatChanged(f spa.VideoFormat, w int, h int, stride int) {
83+ _mock.Called(f, w, h, stride)
84+ return
85+}
86+
87+// MockVideoHandler_FormatChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FormatChanged'
88+type MockVideoHandler_FormatChanged_Call struct {
89+ *mock.Call
90+}
91+
92+// FormatChanged is a helper method to define mock.On call
93+// - f spa.VideoFormat
94+// - w int
95+// - h int
96+// - stride int
97+func (_e *MockVideoHandler_Expecter) FormatChanged(f any, w any, h any, stride any) *MockVideoHandler_FormatChanged_Call {
98+ return &MockVideoHandler_FormatChanged_Call{Call: _e.mock.On("FormatChanged", f, w, h, stride)}
99+}
100+
101+func (_c *MockVideoHandler_FormatChanged_Call) Run(run func(f spa.VideoFormat, w int, h int, stride int)) *MockVideoHandler_FormatChanged_Call {
102+ _c.Call.Run(func(args mock.Arguments) {
103+ var arg0 spa.VideoFormat
104+ if args[0] != nil {
105+ arg0 = args[0].(spa.VideoFormat)
106+ }
107+ var arg1 int
108+ if args[1] != nil {
109+ arg1 = args[1].(int)
110+ }
111+ var arg2 int
112+ if args[2] != nil {
113+ arg2 = args[2].(int)
114+ }
115+ var arg3 int
116+ if args[3] != nil {
117+ arg3 = args[3].(int)
118+ }
119+ run(
120+ arg0,
121+ arg1,
122+ arg2,
123+ arg3,
124+ )
125+ })
126+ return _c
127+}
128+
129+func (_c *MockVideoHandler_FormatChanged_Call) Return() *MockVideoHandler_FormatChanged_Call {
130+ _c.Call.Return()
131+ return _c
132+}
133+
134+func (_c *MockVideoHandler_FormatChanged_Call) RunAndReturn(run func(f spa.VideoFormat, w int, h int, stride int)) *MockVideoHandler_FormatChanged_Call {
135+ _c.Run(run)
136+ return _c
137+}
138+
139+// StateChanged provides a mock function for the type MockVideoHandler
140+func (_mock *MockVideoHandler) StateChanged(state int32, nodeID uint32, err string) {
141+ _mock.Called(state, nodeID, err)
142+ return
143+}
144+
145+// MockVideoHandler_StateChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateChanged'
146+type MockVideoHandler_StateChanged_Call struct {
147+ *mock.Call
148+}
149+
150+// StateChanged is a helper method to define mock.On call
151+// - state int32
152+// - nodeID uint32
153+// - err string
154+func (_e *MockVideoHandler_Expecter) StateChanged(state any, nodeID any, err any) *MockVideoHandler_StateChanged_Call {
155+ return &MockVideoHandler_StateChanged_Call{Call: _e.mock.On("StateChanged", state, nodeID, err)}
156+}
157+
158+func (_c *MockVideoHandler_StateChanged_Call) Run(run func(state int32, nodeID uint32, err string)) *MockVideoHandler_StateChanged_Call {
159+ _c.Call.Run(func(args mock.Arguments) {
160+ var arg0 int32
161+ if args[0] != nil {
162+ arg0 = args[0].(int32)
163+ }
164+ var arg1 uint32
165+ if args[1] != nil {
166+ arg1 = args[1].(uint32)
167+ }
168+ var arg2 string
169+ if args[2] != nil {
170+ arg2 = args[2].(string)
171+ }
172+ run(
173+ arg0,
174+ arg1,
175+ arg2,
176+ )
177+ })
178+ return _c
179+}
180+
181+func (_c *MockVideoHandler_StateChanged_Call) Return() *MockVideoHandler_StateChanged_Call {
182+ _c.Call.Return()
183+ return _c
184+}
185+
186+func (_c *MockVideoHandler_StateChanged_Call) RunAndReturn(run func(state int32, nodeID uint32, err string)) *MockVideoHandler_StateChanged_Call {
187+ _c.Run(run)
188+ return _c
189+}
@@ -0,0 +1,189 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "github.com/bnema/purego-pipewire/spa"
9+ mock "github.com/stretchr/testify/mock"
10+)
11+
12+// NewMockVideoHandler creates a new instance of MockVideoHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13+// The first argument is typically a *testing.T value.
14+func NewMockVideoHandler(t interface {
15+ mock.TestingT
16+ Cleanup(func())
17+}) *MockVideoHandler {
18+ if helper, ok := t.(interface{ Helper() }); ok {
19+ helper.Helper()
20+ }
21+
22+ mock := &MockVideoHandler{}
23+ mock.Mock.Test(t)
24+
25+ t.Cleanup(func() {
26+ if helper, ok := t.(interface{ Helper() }); ok {
27+ helper.Helper()
28+ }
29+ mock.AssertExpectations(t)
30+ })
31+
32+ return mock
33+}
34+
35+// MockVideoHandler is an autogenerated mock type for the VideoHandler type
36+type MockVideoHandler struct {
37+ mock.Mock
38+}
39+
40+type MockVideoHandler_Expecter struct {
41+ mock *mock.Mock
42+}
43+
44+func (_m *MockVideoHandler) EXPECT() *MockVideoHandler_Expecter {
45+ return &MockVideoHandler_Expecter{mock: &_m.Mock}
46+}
47+
48+// BuffersChanged provides a mock function for the type MockVideoHandler
49+func (_mock *MockVideoHandler) BuffersChanged() {
50+ _mock.Called()
51+ return
52+}
53+
54+// MockVideoHandler_BuffersChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuffersChanged'
55+type MockVideoHandler_BuffersChanged_Call struct {
56+ *mock.Call
57+}
58+
59+// BuffersChanged is a helper method to define mock.On call
60+func (_e *MockVideoHandler_Expecter) BuffersChanged() *MockVideoHandler_BuffersChanged_Call {
61+ return &MockVideoHandler_BuffersChanged_Call{Call: _e.mock.On("BuffersChanged")}
62+}
63+
64+func (_c *MockVideoHandler_BuffersChanged_Call) Run(run func()) *MockVideoHandler_BuffersChanged_Call {
65+ _c.Call.Run(func(args mock.Arguments) {
66+ run()
67+ })
68+ return _c
69+}
70+
71+func (_c *MockVideoHandler_BuffersChanged_Call) Return() *MockVideoHandler_BuffersChanged_Call {
72+ _c.Call.Return()
73+ return _c
74+}
75+
76+func (_c *MockVideoHandler_BuffersChanged_Call) RunAndReturn(run func()) *MockVideoHandler_BuffersChanged_Call {
77+ _c.Run(run)
78+ return _c
79+}
80+
81+// FormatChanged provides a mock function for the type MockVideoHandler
82+func (_mock *MockVideoHandler) FormatChanged(f spa.VideoFormat, w int, h int, stride int) {
83+ _mock.Called(f, w, h, stride)
84+ return
85+}
86+
87+// MockVideoHandler_FormatChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FormatChanged'
88+type MockVideoHandler_FormatChanged_Call struct {
89+ *mock.Call
90+}
91+
92+// FormatChanged is a helper method to define mock.On call
93+// - f spa.VideoFormat
94+// - w int
95+// - h int
96+// - stride int
97+func (_e *MockVideoHandler_Expecter) FormatChanged(f any, w any, h any, stride any) *MockVideoHandler_FormatChanged_Call {
98+ return &MockVideoHandler_FormatChanged_Call{Call: _e.mock.On("FormatChanged", f, w, h, stride)}
99+}
100+
101+func (_c *MockVideoHandler_FormatChanged_Call) Run(run func(f spa.VideoFormat, w int, h int, stride int)) *MockVideoHandler_FormatChanged_Call {
102+ _c.Call.Run(func(args mock.Arguments) {
103+ var arg0 spa.VideoFormat
104+ if args[0] != nil {
105+ arg0 = args[0].(spa.VideoFormat)
106+ }
107+ var arg1 int
108+ if args[1] != nil {
109+ arg1 = args[1].(int)
110+ }
111+ var arg2 int
112+ if args[2] != nil {
113+ arg2 = args[2].(int)
114+ }
115+ var arg3 int
116+ if args[3] != nil {
117+ arg3 = args[3].(int)
118+ }
119+ run(
120+ arg0,
121+ arg1,
122+ arg2,
123+ arg3,
124+ )
125+ })
126+ return _c
127+}
128+
129+func (_c *MockVideoHandler_FormatChanged_Call) Return() *MockVideoHandler_FormatChanged_Call {
130+ _c.Call.Return()
131+ return _c
132+}
133+
134+func (_c *MockVideoHandler_FormatChanged_Call) RunAndReturn(run func(f spa.VideoFormat, w int, h int, stride int)) *MockVideoHandler_FormatChanged_Call {
135+ _c.Run(run)
136+ return _c
137+}
138+
139+// StateChanged provides a mock function for the type MockVideoHandler
140+func (_mock *MockVideoHandler) StateChanged(state int32, nodeID uint32, err string) {
141+ _mock.Called(state, nodeID, err)
142+ return
143+}
144+
145+// MockVideoHandler_StateChanged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateChanged'
146+type MockVideoHandler_StateChanged_Call struct {
147+ *mock.Call
148+}
149+
150+// StateChanged is a helper method to define mock.On call
151+// - state int32
152+// - nodeID uint32
153+// - err string
154+func (_e *MockVideoHandler_Expecter) StateChanged(state any, nodeID any, err any) *MockVideoHandler_StateChanged_Call {
155+ return &MockVideoHandler_StateChanged_Call{Call: _e.mock.On("StateChanged", state, nodeID, err)}
156+}
157+
158+func (_c *MockVideoHandler_StateChanged_Call) Run(run func(state int32, nodeID uint32, err string)) *MockVideoHandler_StateChanged_Call {
159+ _c.Call.Run(func(args mock.Arguments) {
160+ var arg0 int32
161+ if args[0] != nil {
162+ arg0 = args[0].(int32)
163+ }
164+ var arg1 uint32
165+ if args[1] != nil {
166+ arg1 = args[1].(uint32)
167+ }
168+ var arg2 string
169+ if args[2] != nil {
170+ arg2 = args[2].(string)
171+ }
172+ run(
173+ arg0,
174+ arg1,
175+ arg2,
176+ )
177+ })
178+ return _c
179+}
180+
181+func (_c *MockVideoHandler_StateChanged_Call) Return() *MockVideoHandler_StateChanged_Call {
182+ _c.Call.Return()
183+ return _c
184+}
185+
186+func (_c *MockVideoHandler_StateChanged_Call) RunAndReturn(run func(state int32, nodeID uint32, err string)) *MockVideoHandler_StateChanged_Call {
187+ _c.Run(run)
188+ return _c
189+}
A internal/ports/in/video.go +20 -0
@@ -0,0 +1,20 @@
1+package in
2+
3+import "github.com/bnema/purego-pipewire/spa"
4+
5+// VideoHandler receives video source stream events. All methods are called on
6+// the thread that drives the PipeWire loop (the goroutine that calls
7+// Loop.Iterate), from inside Iterate. Implementations must not block and
8+// should not allocate.
9+type VideoHandler interface {
10+ // StateChanged reports a stream state change. state is a pw_stream_state
11+ // value (-1 error, 0 unconnected, 1 connecting, 2 paused, 3 streaming).
12+ // nodeID is the PipeWire node id once known (0 before). err is the error
13+ // message when state is -1.
14+ StateChanged(state int32, nodeID uint32, err string)
15+ // FormatChanged reports the negotiated format.
16+ FormatChanged(f spa.VideoFormat, w, h, stride int)
17+ // BuffersChanged is called after a buffer was added or removed. Dequeue
18+ // may now return a buffer.
19+ BuffersChanged()
20+}
@@ -0,0 +1,20 @@
1+package in
2+
3+import "github.com/bnema/purego-pipewire/spa"
4+
5+// VideoHandler receives video source stream events. All methods are called on
6+// the thread that drives the PipeWire loop (the goroutine that calls
7+// Loop.Iterate), from inside Iterate. Implementations must not block and
8+// should not allocate.
9+type VideoHandler interface {
10+ // StateChanged reports a stream state change. state is a pw_stream_state
11+ // value (-1 error, 0 unconnected, 1 connecting, 2 paused, 3 streaming).
12+ // nodeID is the PipeWire node id once known (0 before). err is the error
13+ // message when state is -1.
14+ StateChanged(state int32, nodeID uint32, err string)
15+ // FormatChanged reports the negotiated format.
16+ FormatChanged(f spa.VideoFormat, w, h, stride int)
17+ // BuffersChanged is called after a buffer was added or removed. Dequeue
18+ // may now return a buffer.
19+ BuffersChanged()
20+}
M internal/ports/out/capi_gen.go +1 -0 generated file: collapsed
M internal/ports/out/mocks/mock_CAPI.go +884 -1
@@ -46,6 +46,223 @@ func (_m *MockCAPI) EXPECT() *MockCAPI_Expecter {
4646 return &MockCAPI_Expecter{mock: &_m.Mock}
4747 }
4848
49+// PWContextConnect provides a mock function for the type MockCAPI
50+func (_mock *MockCAPI) PWContextConnect(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
51+ ret := _mock.Called(context, props, user_data_size)
52+
53+ if len(ret) == 0 {
54+ panic("no return value specified for PWContextConnect")
55+ }
56+
57+ var r0 unsafe.Pointer
58+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
59+ r0 = returnFunc(context, props, user_data_size)
60+ } else {
61+ r0 = ret.Get(0).(unsafe.Pointer)
62+ }
63+ return r0
64+}
65+
66+// MockCAPI_PWContextConnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextConnect'
67+type MockCAPI_PWContextConnect_Call struct {
68+ *mock.Call
69+}
70+
71+// PWContextConnect is a helper method to define mock.On call
72+// - context unsafe.Pointer
73+// - props unsafe.Pointer
74+// - user_data_size uintptr
75+func (_e *MockCAPI_Expecter) PWContextConnect(context any, props any, user_data_size any) *MockCAPI_PWContextConnect_Call {
76+ return &MockCAPI_PWContextConnect_Call{Call: _e.mock.On("PWContextConnect", context, props, user_data_size)}
77+}
78+
79+func (_c *MockCAPI_PWContextConnect_Call) Run(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockCAPI_PWContextConnect_Call {
80+ _c.Call.Run(func(args mock.Arguments) {
81+ var arg0 unsafe.Pointer
82+ if args[0] != nil {
83+ arg0 = args[0].(unsafe.Pointer)
84+ }
85+ var arg1 unsafe.Pointer
86+ if args[1] != nil {
87+ arg1 = args[1].(unsafe.Pointer)
88+ }
89+ var arg2 uintptr
90+ if args[2] != nil {
91+ arg2 = args[2].(uintptr)
92+ }
93+ run(
94+ arg0,
95+ arg1,
96+ arg2,
97+ )
98+ })
99+ return _c
100+}
101+
102+func (_c *MockCAPI_PWContextConnect_Call) Return(v unsafe.Pointer) *MockCAPI_PWContextConnect_Call {
103+ _c.Call.Return(v)
104+ return _c
105+}
106+
107+func (_c *MockCAPI_PWContextConnect_Call) RunAndReturn(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockCAPI_PWContextConnect_Call {
108+ _c.Call.Return(run)
109+ return _c
110+}
111+
112+// PWContextDestroy provides a mock function for the type MockCAPI
113+func (_mock *MockCAPI) PWContextDestroy(context unsafe.Pointer) {
114+ _mock.Called(context)
115+ return
116+}
117+
118+// MockCAPI_PWContextDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextDestroy'
119+type MockCAPI_PWContextDestroy_Call struct {
120+ *mock.Call
121+}
122+
123+// PWContextDestroy is a helper method to define mock.On call
124+// - context unsafe.Pointer
125+func (_e *MockCAPI_Expecter) PWContextDestroy(context any) *MockCAPI_PWContextDestroy_Call {
126+ return &MockCAPI_PWContextDestroy_Call{Call: _e.mock.On("PWContextDestroy", context)}
127+}
128+
129+func (_c *MockCAPI_PWContextDestroy_Call) Run(run func(context unsafe.Pointer)) *MockCAPI_PWContextDestroy_Call {
130+ _c.Call.Run(func(args mock.Arguments) {
131+ var arg0 unsafe.Pointer
132+ if args[0] != nil {
133+ arg0 = args[0].(unsafe.Pointer)
134+ }
135+ run(
136+ arg0,
137+ )
138+ })
139+ return _c
140+}
141+
142+func (_c *MockCAPI_PWContextDestroy_Call) Return() *MockCAPI_PWContextDestroy_Call {
143+ _c.Call.Return()
144+ return _c
145+}
146+
147+func (_c *MockCAPI_PWContextDestroy_Call) RunAndReturn(run func(context unsafe.Pointer)) *MockCAPI_PWContextDestroy_Call {
148+ _c.Run(run)
149+ return _c
150+}
151+
152+// PWContextNew provides a mock function for the type MockCAPI
153+func (_mock *MockCAPI) PWContextNew(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
154+ ret := _mock.Called(loop, props, user_data_size)
155+
156+ if len(ret) == 0 {
157+ panic("no return value specified for PWContextNew")
158+ }
159+
160+ var r0 unsafe.Pointer
161+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
162+ r0 = returnFunc(loop, props, user_data_size)
163+ } else {
164+ r0 = ret.Get(0).(unsafe.Pointer)
165+ }
166+ return r0
167+}
168+
169+// MockCAPI_PWContextNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextNew'
170+type MockCAPI_PWContextNew_Call struct {
171+ *mock.Call
172+}
173+
174+// PWContextNew is a helper method to define mock.On call
175+// - loop unsafe.Pointer
176+// - props unsafe.Pointer
177+// - user_data_size uintptr
178+func (_e *MockCAPI_Expecter) PWContextNew(loop any, props any, user_data_size any) *MockCAPI_PWContextNew_Call {
179+ return &MockCAPI_PWContextNew_Call{Call: _e.mock.On("PWContextNew", loop, props, user_data_size)}
180+}
181+
182+func (_c *MockCAPI_PWContextNew_Call) Run(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockCAPI_PWContextNew_Call {
183+ _c.Call.Run(func(args mock.Arguments) {
184+ var arg0 unsafe.Pointer
185+ if args[0] != nil {
186+ arg0 = args[0].(unsafe.Pointer)
187+ }
188+ var arg1 unsafe.Pointer
189+ if args[1] != nil {
190+ arg1 = args[1].(unsafe.Pointer)
191+ }
192+ var arg2 uintptr
193+ if args[2] != nil {
194+ arg2 = args[2].(uintptr)
195+ }
196+ run(
197+ arg0,
198+ arg1,
199+ arg2,
200+ )
201+ })
202+ return _c
203+}
204+
205+func (_c *MockCAPI_PWContextNew_Call) Return(v unsafe.Pointer) *MockCAPI_PWContextNew_Call {
206+ _c.Call.Return(v)
207+ return _c
208+}
209+
210+func (_c *MockCAPI_PWContextNew_Call) RunAndReturn(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockCAPI_PWContextNew_Call {
211+ _c.Call.Return(run)
212+ return _c
213+}
214+
215+// PWCoreDisconnect provides a mock function for the type MockCAPI
216+func (_mock *MockCAPI) PWCoreDisconnect(core unsafe.Pointer) int32 {
217+ ret := _mock.Called(core)
218+
219+ if len(ret) == 0 {
220+ panic("no return value specified for PWCoreDisconnect")
221+ }
222+
223+ var r0 int32
224+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
225+ r0 = returnFunc(core)
226+ } else {
227+ r0 = ret.Get(0).(int32)
228+ }
229+ return r0
230+}
231+
232+// MockCAPI_PWCoreDisconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWCoreDisconnect'
233+type MockCAPI_PWCoreDisconnect_Call struct {
234+ *mock.Call
235+}
236+
237+// PWCoreDisconnect is a helper method to define mock.On call
238+// - core unsafe.Pointer
239+func (_e *MockCAPI_Expecter) PWCoreDisconnect(core any) *MockCAPI_PWCoreDisconnect_Call {
240+ return &MockCAPI_PWCoreDisconnect_Call{Call: _e.mock.On("PWCoreDisconnect", core)}
241+}
242+
243+func (_c *MockCAPI_PWCoreDisconnect_Call) Run(run func(core unsafe.Pointer)) *MockCAPI_PWCoreDisconnect_Call {
244+ _c.Call.Run(func(args mock.Arguments) {
245+ var arg0 unsafe.Pointer
246+ if args[0] != nil {
247+ arg0 = args[0].(unsafe.Pointer)
248+ }
249+ run(
250+ arg0,
251+ )
252+ })
253+ return _c
254+}
255+
256+func (_c *MockCAPI_PWCoreDisconnect_Call) Return(n int32) *MockCAPI_PWCoreDisconnect_Call {
257+ _c.Call.Return(n)
258+ return _c
259+}
260+
261+func (_c *MockCAPI_PWCoreDisconnect_Call) RunAndReturn(run func(core unsafe.Pointer) int32) *MockCAPI_PWCoreDisconnect_Call {
262+ _c.Call.Return(run)
263+ return _c
264+}
265+
49266 // PWDeinit provides a mock function for the type MockCAPI
50267 func (_mock *MockCAPI) PWDeinit() {
51268 _mock.Called()
@@ -125,6 +342,285 @@ func (_c *MockCAPI_PWInit_Call) RunAndReturn(run func(argc *int32, argv ***byte)
125342 return _c
126343 }
127344
345+// PWLoopDestroy provides a mock function for the type MockCAPI
346+func (_mock *MockCAPI) PWLoopDestroy(loop unsafe.Pointer) {
347+ _mock.Called(loop)
348+ return
349+}
350+
351+// MockCAPI_PWLoopDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopDestroy'
352+type MockCAPI_PWLoopDestroy_Call struct {
353+ *mock.Call
354+}
355+
356+// PWLoopDestroy is a helper method to define mock.On call
357+// - loop unsafe.Pointer
358+func (_e *MockCAPI_Expecter) PWLoopDestroy(loop any) *MockCAPI_PWLoopDestroy_Call {
359+ return &MockCAPI_PWLoopDestroy_Call{Call: _e.mock.On("PWLoopDestroy", loop)}
360+}
361+
362+func (_c *MockCAPI_PWLoopDestroy_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopDestroy_Call {
363+ _c.Call.Run(func(args mock.Arguments) {
364+ var arg0 unsafe.Pointer
365+ if args[0] != nil {
366+ arg0 = args[0].(unsafe.Pointer)
367+ }
368+ run(
369+ arg0,
370+ )
371+ })
372+ return _c
373+}
374+
375+func (_c *MockCAPI_PWLoopDestroy_Call) Return() *MockCAPI_PWLoopDestroy_Call {
376+ _c.Call.Return()
377+ return _c
378+}
379+
380+func (_c *MockCAPI_PWLoopDestroy_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopDestroy_Call {
381+ _c.Run(run)
382+ return _c
383+}
384+
385+// PWLoopEnter provides a mock function for the type MockCAPI
386+func (_mock *MockCAPI) PWLoopEnter(loop unsafe.Pointer) {
387+ _mock.Called(loop)
388+ return
389+}
390+
391+// MockCAPI_PWLoopEnter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopEnter'
392+type MockCAPI_PWLoopEnter_Call struct {
393+ *mock.Call
394+}
395+
396+// PWLoopEnter is a helper method to define mock.On call
397+// - loop unsafe.Pointer
398+func (_e *MockCAPI_Expecter) PWLoopEnter(loop any) *MockCAPI_PWLoopEnter_Call {
399+ return &MockCAPI_PWLoopEnter_Call{Call: _e.mock.On("PWLoopEnter", loop)}
400+}
401+
402+func (_c *MockCAPI_PWLoopEnter_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopEnter_Call {
403+ _c.Call.Run(func(args mock.Arguments) {
404+ var arg0 unsafe.Pointer
405+ if args[0] != nil {
406+ arg0 = args[0].(unsafe.Pointer)
407+ }
408+ run(
409+ arg0,
410+ )
411+ })
412+ return _c
413+}
414+
415+func (_c *MockCAPI_PWLoopEnter_Call) Return() *MockCAPI_PWLoopEnter_Call {
416+ _c.Call.Return()
417+ return _c
418+}
419+
420+func (_c *MockCAPI_PWLoopEnter_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopEnter_Call {
421+ _c.Run(run)
422+ return _c
423+}
424+
425+// PWLoopGetFd provides a mock function for the type MockCAPI
426+func (_mock *MockCAPI) PWLoopGetFd(loop unsafe.Pointer) int32 {
427+ ret := _mock.Called(loop)
428+
429+ if len(ret) == 0 {
430+ panic("no return value specified for PWLoopGetFd")
431+ }
432+
433+ var r0 int32
434+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
435+ r0 = returnFunc(loop)
436+ } else {
437+ r0 = ret.Get(0).(int32)
438+ }
439+ return r0
440+}
441+
442+// MockCAPI_PWLoopGetFd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopGetFd'
443+type MockCAPI_PWLoopGetFd_Call struct {
444+ *mock.Call
445+}
446+
447+// PWLoopGetFd is a helper method to define mock.On call
448+// - loop unsafe.Pointer
449+func (_e *MockCAPI_Expecter) PWLoopGetFd(loop any) *MockCAPI_PWLoopGetFd_Call {
450+ return &MockCAPI_PWLoopGetFd_Call{Call: _e.mock.On("PWLoopGetFd", loop)}
451+}
452+
453+func (_c *MockCAPI_PWLoopGetFd_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopGetFd_Call {
454+ _c.Call.Run(func(args mock.Arguments) {
455+ var arg0 unsafe.Pointer
456+ if args[0] != nil {
457+ arg0 = args[0].(unsafe.Pointer)
458+ }
459+ run(
460+ arg0,
461+ )
462+ })
463+ return _c
464+}
465+
466+func (_c *MockCAPI_PWLoopGetFd_Call) Return(n int32) *MockCAPI_PWLoopGetFd_Call {
467+ _c.Call.Return(n)
468+ return _c
469+}
470+
471+func (_c *MockCAPI_PWLoopGetFd_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockCAPI_PWLoopGetFd_Call {
472+ _c.Call.Return(run)
473+ return _c
474+}
475+
476+// PWLoopIterate provides a mock function for the type MockCAPI
477+func (_mock *MockCAPI) PWLoopIterate(loop unsafe.Pointer, timeout int32) int32 {
478+ ret := _mock.Called(loop, timeout)
479+
480+ if len(ret) == 0 {
481+ panic("no return value specified for PWLoopIterate")
482+ }
483+
484+ var r0 int32
485+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, int32) int32); ok {
486+ r0 = returnFunc(loop, timeout)
487+ } else {
488+ r0 = ret.Get(0).(int32)
489+ }
490+ return r0
491+}
492+
493+// MockCAPI_PWLoopIterate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopIterate'
494+type MockCAPI_PWLoopIterate_Call struct {
495+ *mock.Call
496+}
497+
498+// PWLoopIterate is a helper method to define mock.On call
499+// - loop unsafe.Pointer
500+// - timeout int32
501+func (_e *MockCAPI_Expecter) PWLoopIterate(loop any, timeout any) *MockCAPI_PWLoopIterate_Call {
502+ return &MockCAPI_PWLoopIterate_Call{Call: _e.mock.On("PWLoopIterate", loop, timeout)}
503+}
504+
505+func (_c *MockCAPI_PWLoopIterate_Call) Run(run func(loop unsafe.Pointer, timeout int32)) *MockCAPI_PWLoopIterate_Call {
506+ _c.Call.Run(func(args mock.Arguments) {
507+ var arg0 unsafe.Pointer
508+ if args[0] != nil {
509+ arg0 = args[0].(unsafe.Pointer)
510+ }
511+ var arg1 int32
512+ if args[1] != nil {
513+ arg1 = args[1].(int32)
514+ }
515+ run(
516+ arg0,
517+ arg1,
518+ )
519+ })
520+ return _c
521+}
522+
523+func (_c *MockCAPI_PWLoopIterate_Call) Return(n int32) *MockCAPI_PWLoopIterate_Call {
524+ _c.Call.Return(n)
525+ return _c
526+}
527+
528+func (_c *MockCAPI_PWLoopIterate_Call) RunAndReturn(run func(loop unsafe.Pointer, timeout int32) int32) *MockCAPI_PWLoopIterate_Call {
529+ _c.Call.Return(run)
530+ return _c
531+}
532+
533+// PWLoopLeave provides a mock function for the type MockCAPI
534+func (_mock *MockCAPI) PWLoopLeave(loop unsafe.Pointer) {
535+ _mock.Called(loop)
536+ return
537+}
538+
539+// MockCAPI_PWLoopLeave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopLeave'
540+type MockCAPI_PWLoopLeave_Call struct {
541+ *mock.Call
542+}
543+
544+// PWLoopLeave is a helper method to define mock.On call
545+// - loop unsafe.Pointer
546+func (_e *MockCAPI_Expecter) PWLoopLeave(loop any) *MockCAPI_PWLoopLeave_Call {
547+ return &MockCAPI_PWLoopLeave_Call{Call: _e.mock.On("PWLoopLeave", loop)}
548+}
549+
550+func (_c *MockCAPI_PWLoopLeave_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopLeave_Call {
551+ _c.Call.Run(func(args mock.Arguments) {
552+ var arg0 unsafe.Pointer
553+ if args[0] != nil {
554+ arg0 = args[0].(unsafe.Pointer)
555+ }
556+ run(
557+ arg0,
558+ )
559+ })
560+ return _c
561+}
562+
563+func (_c *MockCAPI_PWLoopLeave_Call) Return() *MockCAPI_PWLoopLeave_Call {
564+ _c.Call.Return()
565+ return _c
566+}
567+
568+func (_c *MockCAPI_PWLoopLeave_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopLeave_Call {
569+ _c.Run(run)
570+ return _c
571+}
572+
573+// PWLoopNew provides a mock function for the type MockCAPI
574+func (_mock *MockCAPI) PWLoopNew(props unsafe.Pointer) unsafe.Pointer {
575+ ret := _mock.Called(props)
576+
577+ if len(ret) == 0 {
578+ panic("no return value specified for PWLoopNew")
579+ }
580+
581+ var r0 unsafe.Pointer
582+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) unsafe.Pointer); ok {
583+ r0 = returnFunc(props)
584+ } else {
585+ r0 = ret.Get(0).(unsafe.Pointer)
586+ }
587+ return r0
588+}
589+
590+// MockCAPI_PWLoopNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopNew'
591+type MockCAPI_PWLoopNew_Call struct {
592+ *mock.Call
593+}
594+
595+// PWLoopNew is a helper method to define mock.On call
596+// - props unsafe.Pointer
597+func (_e *MockCAPI_Expecter) PWLoopNew(props any) *MockCAPI_PWLoopNew_Call {
598+ return &MockCAPI_PWLoopNew_Call{Call: _e.mock.On("PWLoopNew", props)}
599+}
600+
601+func (_c *MockCAPI_PWLoopNew_Call) Run(run func(props unsafe.Pointer)) *MockCAPI_PWLoopNew_Call {
602+ _c.Call.Run(func(args mock.Arguments) {
603+ var arg0 unsafe.Pointer
604+ if args[0] != nil {
605+ arg0 = args[0].(unsafe.Pointer)
606+ }
607+ run(
608+ arg0,
609+ )
610+ })
611+ return _c
612+}
613+
614+func (_c *MockCAPI_PWLoopNew_Call) Return(v unsafe.Pointer) *MockCAPI_PWLoopNew_Call {
615+ _c.Call.Return(v)
616+ return _c
617+}
618+
619+func (_c *MockCAPI_PWLoopNew_Call) RunAndReturn(run func(props unsafe.Pointer) unsafe.Pointer) *MockCAPI_PWLoopNew_Call {
620+ _c.Call.Return(run)
621+ return _c
622+}
623+
128624 // PWMainLoopDestroy provides a mock function for the type MockCAPI
129625 func (_mock *MockCAPI) PWMainLoopDestroy(loop unsafe.Pointer) {
130626 _mock.Called(loop)
@@ -364,7 +860,58 @@ func (_c *MockCAPI_PWMainLoopRun_Call) Return(n int32) *MockCAPI_PWMainLoopRun_C
364860 return _c
365861 }
366862
367-func (_c *MockCAPI_PWMainLoopRun_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockCAPI_PWMainLoopRun_Call {
863+func (_c *MockCAPI_PWMainLoopRun_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockCAPI_PWMainLoopRun_Call {
864+ _c.Call.Return(run)
865+ return _c
866+}
867+
868+// PWPropertiesNewString provides a mock function for the type MockCAPI
869+func (_mock *MockCAPI) PWPropertiesNewString(args *byte) unsafe.Pointer {
870+ ret := _mock.Called(args)
871+
872+ if len(ret) == 0 {
873+ panic("no return value specified for PWPropertiesNewString")
874+ }
875+
876+ var r0 unsafe.Pointer
877+ if returnFunc, ok := ret.Get(0).(func(*byte) unsafe.Pointer); ok {
878+ r0 = returnFunc(args)
879+ } else {
880+ r0 = ret.Get(0).(unsafe.Pointer)
881+ }
882+ return r0
883+}
884+
885+// MockCAPI_PWPropertiesNewString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWPropertiesNewString'
886+type MockCAPI_PWPropertiesNewString_Call struct {
887+ *mock.Call
888+}
889+
890+// PWPropertiesNewString is a helper method to define mock.On call
891+// - args *byte
892+func (_e *MockCAPI_Expecter) PWPropertiesNewString(args any) *MockCAPI_PWPropertiesNewString_Call {
893+ return &MockCAPI_PWPropertiesNewString_Call{Call: _e.mock.On("PWPropertiesNewString", args)}
894+}
895+
896+func (_c *MockCAPI_PWPropertiesNewString_Call) Run(run func(args *byte)) *MockCAPI_PWPropertiesNewString_Call {
897+ _c.Call.Run(func(args mock.Arguments) {
898+ var arg0 *byte
899+ if args[0] != nil {
900+ arg0 = args[0].(*byte)
901+ }
902+ run(
903+ arg0,
904+ )
905+ })
906+ return _c
907+}
908+
909+func (_c *MockCAPI_PWPropertiesNewString_Call) Return(v unsafe.Pointer) *MockCAPI_PWPropertiesNewString_Call {
910+ _c.Call.Return(v)
911+ return _c
912+}
913+
914+func (_c *MockCAPI_PWPropertiesNewString_Call) RunAndReturn(run func(args *byte) unsafe.Pointer) *MockCAPI_PWPropertiesNewString_Call {
368915 _c.Call.Return(run)
369916 return _c
370917 }
@@ -661,6 +1208,171 @@ func (_c *MockCAPI_PWStreamDisconnect_Call) RunAndReturn(run func(stream unsafe.
6611208 return _c
6621209 }
6631210
1211+// PWStreamGetNodeId provides a mock function for the type MockCAPI
1212+func (_mock *MockCAPI) PWStreamGetNodeId(stream unsafe.Pointer) uint32 {
1213+ ret := _mock.Called(stream)
1214+
1215+ if len(ret) == 0 {
1216+ panic("no return value specified for PWStreamGetNodeId")
1217+ }
1218+
1219+ var r0 uint32
1220+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) uint32); ok {
1221+ r0 = returnFunc(stream)
1222+ } else {
1223+ r0 = ret.Get(0).(uint32)
1224+ }
1225+ return r0
1226+}
1227+
1228+// MockCAPI_PWStreamGetNodeId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamGetNodeId'
1229+type MockCAPI_PWStreamGetNodeId_Call struct {
1230+ *mock.Call
1231+}
1232+
1233+// PWStreamGetNodeId is a helper method to define mock.On call
1234+// - stream unsafe.Pointer
1235+func (_e *MockCAPI_Expecter) PWStreamGetNodeId(stream any) *MockCAPI_PWStreamGetNodeId_Call {
1236+ return &MockCAPI_PWStreamGetNodeId_Call{Call: _e.mock.On("PWStreamGetNodeId", stream)}
1237+}
1238+
1239+func (_c *MockCAPI_PWStreamGetNodeId_Call) Run(run func(stream unsafe.Pointer)) *MockCAPI_PWStreamGetNodeId_Call {
1240+ _c.Call.Run(func(args mock.Arguments) {
1241+ var arg0 unsafe.Pointer
1242+ if args[0] != nil {
1243+ arg0 = args[0].(unsafe.Pointer)
1244+ }
1245+ run(
1246+ arg0,
1247+ )
1248+ })
1249+ return _c
1250+}
1251+
1252+func (_c *MockCAPI_PWStreamGetNodeId_Call) Return(v uint32) *MockCAPI_PWStreamGetNodeId_Call {
1253+ _c.Call.Return(v)
1254+ return _c
1255+}
1256+
1257+func (_c *MockCAPI_PWStreamGetNodeId_Call) RunAndReturn(run func(stream unsafe.Pointer) uint32) *MockCAPI_PWStreamGetNodeId_Call {
1258+ _c.Call.Return(run)
1259+ return _c
1260+}
1261+
1262+// PWStreamIsDriving provides a mock function for the type MockCAPI
1263+func (_mock *MockCAPI) PWStreamIsDriving(stream unsafe.Pointer) bool {
1264+ ret := _mock.Called(stream)
1265+
1266+ if len(ret) == 0 {
1267+ panic("no return value specified for PWStreamIsDriving")
1268+ }
1269+
1270+ var r0 bool
1271+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) bool); ok {
1272+ r0 = returnFunc(stream)
1273+ } else {
1274+ r0 = ret.Get(0).(bool)
1275+ }
1276+ return r0
1277+}
1278+
1279+// MockCAPI_PWStreamIsDriving_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamIsDriving'
1280+type MockCAPI_PWStreamIsDriving_Call struct {
1281+ *mock.Call
1282+}
1283+
1284+// PWStreamIsDriving is a helper method to define mock.On call
1285+// - stream unsafe.Pointer
1286+func (_e *MockCAPI_Expecter) PWStreamIsDriving(stream any) *MockCAPI_PWStreamIsDriving_Call {
1287+ return &MockCAPI_PWStreamIsDriving_Call{Call: _e.mock.On("PWStreamIsDriving", stream)}
1288+}
1289+
1290+func (_c *MockCAPI_PWStreamIsDriving_Call) Run(run func(stream unsafe.Pointer)) *MockCAPI_PWStreamIsDriving_Call {
1291+ _c.Call.Run(func(args mock.Arguments) {
1292+ var arg0 unsafe.Pointer
1293+ if args[0] != nil {
1294+ arg0 = args[0].(unsafe.Pointer)
1295+ }
1296+ run(
1297+ arg0,
1298+ )
1299+ })
1300+ return _c
1301+}
1302+
1303+func (_c *MockCAPI_PWStreamIsDriving_Call) Return(b bool) *MockCAPI_PWStreamIsDriving_Call {
1304+ _c.Call.Return(b)
1305+ return _c
1306+}
1307+
1308+func (_c *MockCAPI_PWStreamIsDriving_Call) RunAndReturn(run func(stream unsafe.Pointer) bool) *MockCAPI_PWStreamIsDriving_Call {
1309+ _c.Call.Return(run)
1310+ return _c
1311+}
1312+
1313+// PWStreamNew provides a mock function for the type MockCAPI
1314+func (_mock *MockCAPI) PWStreamNew(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer {
1315+ ret := _mock.Called(core, name, props)
1316+
1317+ if len(ret) == 0 {
1318+ panic("no return value specified for PWStreamNew")
1319+ }
1320+
1321+ var r0 unsafe.Pointer
1322+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, *byte, unsafe.Pointer) unsafe.Pointer); ok {
1323+ r0 = returnFunc(core, name, props)
1324+ } else {
1325+ r0 = ret.Get(0).(unsafe.Pointer)
1326+ }
1327+ return r0
1328+}
1329+
1330+// MockCAPI_PWStreamNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamNew'
1331+type MockCAPI_PWStreamNew_Call struct {
1332+ *mock.Call
1333+}
1334+
1335+// PWStreamNew is a helper method to define mock.On call
1336+// - core unsafe.Pointer
1337+// - name *byte
1338+// - props unsafe.Pointer
1339+func (_e *MockCAPI_Expecter) PWStreamNew(core any, name any, props any) *MockCAPI_PWStreamNew_Call {
1340+ return &MockCAPI_PWStreamNew_Call{Call: _e.mock.On("PWStreamNew", core, name, props)}
1341+}
1342+
1343+func (_c *MockCAPI_PWStreamNew_Call) Run(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer)) *MockCAPI_PWStreamNew_Call {
1344+ _c.Call.Run(func(args mock.Arguments) {
1345+ var arg0 unsafe.Pointer
1346+ if args[0] != nil {
1347+ arg0 = args[0].(unsafe.Pointer)
1348+ }
1349+ var arg1 *byte
1350+ if args[1] != nil {
1351+ arg1 = args[1].(*byte)
1352+ }
1353+ var arg2 unsafe.Pointer
1354+ if args[2] != nil {
1355+ arg2 = args[2].(unsafe.Pointer)
1356+ }
1357+ run(
1358+ arg0,
1359+ arg1,
1360+ arg2,
1361+ )
1362+ })
1363+ return _c
1364+}
1365+
1366+func (_c *MockCAPI_PWStreamNew_Call) Return(v unsafe.Pointer) *MockCAPI_PWStreamNew_Call {
1367+ _c.Call.Return(v)
1368+ return _c
1369+}
1370+
1371+func (_c *MockCAPI_PWStreamNew_Call) RunAndReturn(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer) *MockCAPI_PWStreamNew_Call {
1372+ _c.Call.Return(run)
1373+ return _c
1374+}
1375+
6641376 // PWStreamNewSimple provides a mock function for the type MockCAPI
6651377 func (_mock *MockCAPI) PWStreamNewSimple(context unsafe.Pointer, name *byte, props unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) unsafe.Pointer {
6661378 ret := _mock.Called(context, name, props, events, data)
@@ -793,6 +1505,63 @@ func (_c *MockCAPI_PWStreamQueueBuffer_Call) RunAndReturn(run func(stream unsafe
7931505 return _c
7941506 }
7951507
1508+// PWStreamReturnBuffer provides a mock function for the type MockCAPI
1509+func (_mock *MockCAPI) PWStreamReturnBuffer(stream unsafe.Pointer, buffer unsafe.Pointer) int32 {
1510+ ret := _mock.Called(stream, buffer)
1511+
1512+ if len(ret) == 0 {
1513+ panic("no return value specified for PWStreamReturnBuffer")
1514+ }
1515+
1516+ var r0 int32
1517+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer) int32); ok {
1518+ r0 = returnFunc(stream, buffer)
1519+ } else {
1520+ r0 = ret.Get(0).(int32)
1521+ }
1522+ return r0
1523+}
1524+
1525+// MockCAPI_PWStreamReturnBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamReturnBuffer'
1526+type MockCAPI_PWStreamReturnBuffer_Call struct {
1527+ *mock.Call
1528+}
1529+
1530+// PWStreamReturnBuffer is a helper method to define mock.On call
1531+// - stream unsafe.Pointer
1532+// - buffer unsafe.Pointer
1533+func (_e *MockCAPI_Expecter) PWStreamReturnBuffer(stream any, buffer any) *MockCAPI_PWStreamReturnBuffer_Call {
1534+ return &MockCAPI_PWStreamReturnBuffer_Call{Call: _e.mock.On("PWStreamReturnBuffer", stream, buffer)}
1535+}
1536+
1537+func (_c *MockCAPI_PWStreamReturnBuffer_Call) Run(run func(stream unsafe.Pointer, buffer unsafe.Pointer)) *MockCAPI_PWStreamReturnBuffer_Call {
1538+ _c.Call.Run(func(args mock.Arguments) {
1539+ var arg0 unsafe.Pointer
1540+ if args[0] != nil {
1541+ arg0 = args[0].(unsafe.Pointer)
1542+ }
1543+ var arg1 unsafe.Pointer
1544+ if args[1] != nil {
1545+ arg1 = args[1].(unsafe.Pointer)
1546+ }
1547+ run(
1548+ arg0,
1549+ arg1,
1550+ )
1551+ })
1552+ return _c
1553+}
1554+
1555+func (_c *MockCAPI_PWStreamReturnBuffer_Call) Return(n int32) *MockCAPI_PWStreamReturnBuffer_Call {
1556+ _c.Call.Return(n)
1557+ return _c
1558+}
1559+
1560+func (_c *MockCAPI_PWStreamReturnBuffer_Call) RunAndReturn(run func(stream unsafe.Pointer, buffer unsafe.Pointer) int32) *MockCAPI_PWStreamReturnBuffer_Call {
1561+ _c.Call.Return(run)
1562+ return _c
1563+}
1564+
7961565 // PWStreamSetActive provides a mock function for the type MockCAPI
7971566 func (_mock *MockCAPI) PWStreamSetActive(stream unsafe.Pointer, active bool) int32 {
7981567 ret := _mock.Called(stream, active)
@@ -849,3 +1618,117 @@ func (_c *MockCAPI_PWStreamSetActive_Call) RunAndReturn(run func(stream unsafe.P
8491618 _c.Call.Return(run)
8501619 return _c
8511620 }
1621+
1622+// PWStreamTriggerProcess provides a mock function for the type MockCAPI
1623+func (_mock *MockCAPI) PWStreamTriggerProcess(stream unsafe.Pointer) int32 {
1624+ ret := _mock.Called(stream)
1625+
1626+ if len(ret) == 0 {
1627+ panic("no return value specified for PWStreamTriggerProcess")
1628+ }
1629+
1630+ var r0 int32
1631+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
1632+ r0 = returnFunc(stream)
1633+ } else {
1634+ r0 = ret.Get(0).(int32)
1635+ }
1636+ return r0
1637+}
1638+
1639+// MockCAPI_PWStreamTriggerProcess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamTriggerProcess'
1640+type MockCAPI_PWStreamTriggerProcess_Call struct {
1641+ *mock.Call
1642+}
1643+
1644+// PWStreamTriggerProcess is a helper method to define mock.On call
1645+// - stream unsafe.Pointer
1646+func (_e *MockCAPI_Expecter) PWStreamTriggerProcess(stream any) *MockCAPI_PWStreamTriggerProcess_Call {
1647+ return &MockCAPI_PWStreamTriggerProcess_Call{Call: _e.mock.On("PWStreamTriggerProcess", stream)}
1648+}
1649+
1650+func (_c *MockCAPI_PWStreamTriggerProcess_Call) Run(run func(stream unsafe.Pointer)) *MockCAPI_PWStreamTriggerProcess_Call {
1651+ _c.Call.Run(func(args mock.Arguments) {
1652+ var arg0 unsafe.Pointer
1653+ if args[0] != nil {
1654+ arg0 = args[0].(unsafe.Pointer)
1655+ }
1656+ run(
1657+ arg0,
1658+ )
1659+ })
1660+ return _c
1661+}
1662+
1663+func (_c *MockCAPI_PWStreamTriggerProcess_Call) Return(n int32) *MockCAPI_PWStreamTriggerProcess_Call {
1664+ _c.Call.Return(n)
1665+ return _c
1666+}
1667+
1668+func (_c *MockCAPI_PWStreamTriggerProcess_Call) RunAndReturn(run func(stream unsafe.Pointer) int32) *MockCAPI_PWStreamTriggerProcess_Call {
1669+ _c.Call.Return(run)
1670+ return _c
1671+}
1672+
1673+// PWStreamUpdateParams provides a mock function for the type MockCAPI
1674+func (_mock *MockCAPI) PWStreamUpdateParams(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32 {
1675+ ret := _mock.Called(stream, params, n_params)
1676+
1677+ if len(ret) == 0 {
1678+ panic("no return value specified for PWStreamUpdateParams")
1679+ }
1680+
1681+ var r0 int32
1682+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uint32) int32); ok {
1683+ r0 = returnFunc(stream, params, n_params)
1684+ } else {
1685+ r0 = ret.Get(0).(int32)
1686+ }
1687+ return r0
1688+}
1689+
1690+// MockCAPI_PWStreamUpdateParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamUpdateParams'
1691+type MockCAPI_PWStreamUpdateParams_Call struct {
1692+ *mock.Call
1693+}
1694+
1695+// PWStreamUpdateParams is a helper method to define mock.On call
1696+// - stream unsafe.Pointer
1697+// - params unsafe.Pointer
1698+// - n_params uint32
1699+func (_e *MockCAPI_Expecter) PWStreamUpdateParams(stream any, params any, n_params any) *MockCAPI_PWStreamUpdateParams_Call {
1700+ return &MockCAPI_PWStreamUpdateParams_Call{Call: _e.mock.On("PWStreamUpdateParams", stream, params, n_params)}
1701+}
1702+
1703+func (_c *MockCAPI_PWStreamUpdateParams_Call) Run(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32)) *MockCAPI_PWStreamUpdateParams_Call {
1704+ _c.Call.Run(func(args mock.Arguments) {
1705+ var arg0 unsafe.Pointer
1706+ if args[0] != nil {
1707+ arg0 = args[0].(unsafe.Pointer)
1708+ }
1709+ var arg1 unsafe.Pointer
1710+ if args[1] != nil {
1711+ arg1 = args[1].(unsafe.Pointer)
1712+ }
1713+ var arg2 uint32
1714+ if args[2] != nil {
1715+ arg2 = args[2].(uint32)
1716+ }
1717+ run(
1718+ arg0,
1719+ arg1,
1720+ arg2,
1721+ )
1722+ })
1723+ return _c
1724+}
1725+
1726+func (_c *MockCAPI_PWStreamUpdateParams_Call) Return(n int32) *MockCAPI_PWStreamUpdateParams_Call {
1727+ _c.Call.Return(n)
1728+ return _c
1729+}
1730+
1731+func (_c *MockCAPI_PWStreamUpdateParams_Call) RunAndReturn(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32) *MockCAPI_PWStreamUpdateParams_Call {
1732+ _c.Call.Return(run)
1733+ return _c
1734+}
@@ -46,6 +46,223 @@ func (_m *MockCAPI) EXPECT() *MockCAPI_Expecter {
46 return &MockCAPI_Expecter{mock: &_m.Mock}46 return &MockCAPI_Expecter{mock: &_m.Mock}
47 }47 }
48 48
49+// PWContextConnect provides a mock function for the type MockCAPI
50+func (_mock *MockCAPI) PWContextConnect(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
51+ ret := _mock.Called(context, props, user_data_size)
52+
53+ if len(ret) == 0 {
54+ panic("no return value specified for PWContextConnect")
55+ }
56+
57+ var r0 unsafe.Pointer
58+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
59+ r0 = returnFunc(context, props, user_data_size)
60+ } else {
61+ r0 = ret.Get(0).(unsafe.Pointer)
62+ }
63+ return r0
64+}
65+
66+// MockCAPI_PWContextConnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextConnect'
67+type MockCAPI_PWContextConnect_Call struct {
68+ *mock.Call
69+}
70+
71+// PWContextConnect is a helper method to define mock.On call
72+// - context unsafe.Pointer
73+// - props unsafe.Pointer
74+// - user_data_size uintptr
75+func (_e *MockCAPI_Expecter) PWContextConnect(context any, props any, user_data_size any) *MockCAPI_PWContextConnect_Call {
76+ return &MockCAPI_PWContextConnect_Call{Call: _e.mock.On("PWContextConnect", context, props, user_data_size)}
77+}
78+
79+func (_c *MockCAPI_PWContextConnect_Call) Run(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockCAPI_PWContextConnect_Call {
80+ _c.Call.Run(func(args mock.Arguments) {
81+ var arg0 unsafe.Pointer
82+ if args[0] != nil {
83+ arg0 = args[0].(unsafe.Pointer)
84+ }
85+ var arg1 unsafe.Pointer
86+ if args[1] != nil {
87+ arg1 = args[1].(unsafe.Pointer)
88+ }
89+ var arg2 uintptr
90+ if args[2] != nil {
91+ arg2 = args[2].(uintptr)
92+ }
93+ run(
94+ arg0,
95+ arg1,
96+ arg2,
97+ )
98+ })
99+ return _c
100+}
101+
102+func (_c *MockCAPI_PWContextConnect_Call) Return(v unsafe.Pointer) *MockCAPI_PWContextConnect_Call {
103+ _c.Call.Return(v)
104+ return _c
105+}
106+
107+func (_c *MockCAPI_PWContextConnect_Call) RunAndReturn(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockCAPI_PWContextConnect_Call {
108+ _c.Call.Return(run)
109+ return _c
110+}
111+
112+// PWContextDestroy provides a mock function for the type MockCAPI
113+func (_mock *MockCAPI) PWContextDestroy(context unsafe.Pointer) {
114+ _mock.Called(context)
115+ return
116+}
117+
118+// MockCAPI_PWContextDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextDestroy'
119+type MockCAPI_PWContextDestroy_Call struct {
120+ *mock.Call
121+}
122+
123+// PWContextDestroy is a helper method to define mock.On call
124+// - context unsafe.Pointer
125+func (_e *MockCAPI_Expecter) PWContextDestroy(context any) *MockCAPI_PWContextDestroy_Call {
126+ return &MockCAPI_PWContextDestroy_Call{Call: _e.mock.On("PWContextDestroy", context)}
127+}
128+
129+func (_c *MockCAPI_PWContextDestroy_Call) Run(run func(context unsafe.Pointer)) *MockCAPI_PWContextDestroy_Call {
130+ _c.Call.Run(func(args mock.Arguments) {
131+ var arg0 unsafe.Pointer
132+ if args[0] != nil {
133+ arg0 = args[0].(unsafe.Pointer)
134+ }
135+ run(
136+ arg0,
137+ )
138+ })
139+ return _c
140+}
141+
142+func (_c *MockCAPI_PWContextDestroy_Call) Return() *MockCAPI_PWContextDestroy_Call {
143+ _c.Call.Return()
144+ return _c
145+}
146+
147+func (_c *MockCAPI_PWContextDestroy_Call) RunAndReturn(run func(context unsafe.Pointer)) *MockCAPI_PWContextDestroy_Call {
148+ _c.Run(run)
149+ return _c
150+}
151+
152+// PWContextNew provides a mock function for the type MockCAPI
153+func (_mock *MockCAPI) PWContextNew(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
154+ ret := _mock.Called(loop, props, user_data_size)
155+
156+ if len(ret) == 0 {
157+ panic("no return value specified for PWContextNew")
158+ }
159+
160+ var r0 unsafe.Pointer
161+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
162+ r0 = returnFunc(loop, props, user_data_size)
163+ } else {
164+ r0 = ret.Get(0).(unsafe.Pointer)
165+ }
166+ return r0
167+}
168+
169+// MockCAPI_PWContextNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextNew'
170+type MockCAPI_PWContextNew_Call struct {
171+ *mock.Call
172+}
173+
174+// PWContextNew is a helper method to define mock.On call
175+// - loop unsafe.Pointer
176+// - props unsafe.Pointer
177+// - user_data_size uintptr
178+func (_e *MockCAPI_Expecter) PWContextNew(loop any, props any, user_data_size any) *MockCAPI_PWContextNew_Call {
179+ return &MockCAPI_PWContextNew_Call{Call: _e.mock.On("PWContextNew", loop, props, user_data_size)}
180+}
181+
182+func (_c *MockCAPI_PWContextNew_Call) Run(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockCAPI_PWContextNew_Call {
183+ _c.Call.Run(func(args mock.Arguments) {
184+ var arg0 unsafe.Pointer
185+ if args[0] != nil {
186+ arg0 = args[0].(unsafe.Pointer)
187+ }
188+ var arg1 unsafe.Pointer
189+ if args[1] != nil {
190+ arg1 = args[1].(unsafe.Pointer)
191+ }
192+ var arg2 uintptr
193+ if args[2] != nil {
194+ arg2 = args[2].(uintptr)
195+ }
196+ run(
197+ arg0,
198+ arg1,
199+ arg2,
200+ )
201+ })
202+ return _c
203+}
204+
205+func (_c *MockCAPI_PWContextNew_Call) Return(v unsafe.Pointer) *MockCAPI_PWContextNew_Call {
206+ _c.Call.Return(v)
207+ return _c
208+}
209+
210+func (_c *MockCAPI_PWContextNew_Call) RunAndReturn(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockCAPI_PWContextNew_Call {
211+ _c.Call.Return(run)
212+ return _c
213+}
214+
215+// PWCoreDisconnect provides a mock function for the type MockCAPI
216+func (_mock *MockCAPI) PWCoreDisconnect(core unsafe.Pointer) int32 {
217+ ret := _mock.Called(core)
218+
219+ if len(ret) == 0 {
220+ panic("no return value specified for PWCoreDisconnect")
221+ }
222+
223+ var r0 int32
224+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
225+ r0 = returnFunc(core)
226+ } else {
227+ r0 = ret.Get(0).(int32)
228+ }
229+ return r0
230+}
231+
232+// MockCAPI_PWCoreDisconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWCoreDisconnect'
233+type MockCAPI_PWCoreDisconnect_Call struct {
234+ *mock.Call
235+}
236+
237+// PWCoreDisconnect is a helper method to define mock.On call
238+// - core unsafe.Pointer
239+func (_e *MockCAPI_Expecter) PWCoreDisconnect(core any) *MockCAPI_PWCoreDisconnect_Call {
240+ return &MockCAPI_PWCoreDisconnect_Call{Call: _e.mock.On("PWCoreDisconnect", core)}
241+}
242+
243+func (_c *MockCAPI_PWCoreDisconnect_Call) Run(run func(core unsafe.Pointer)) *MockCAPI_PWCoreDisconnect_Call {
244+ _c.Call.Run(func(args mock.Arguments) {
245+ var arg0 unsafe.Pointer
246+ if args[0] != nil {
247+ arg0 = args[0].(unsafe.Pointer)
248+ }
249+ run(
250+ arg0,
251+ )
252+ })
253+ return _c
254+}
255+
256+func (_c *MockCAPI_PWCoreDisconnect_Call) Return(n int32) *MockCAPI_PWCoreDisconnect_Call {
257+ _c.Call.Return(n)
258+ return _c
259+}
260+
261+func (_c *MockCAPI_PWCoreDisconnect_Call) RunAndReturn(run func(core unsafe.Pointer) int32) *MockCAPI_PWCoreDisconnect_Call {
262+ _c.Call.Return(run)
263+ return _c
264+}
265+
49 // PWDeinit provides a mock function for the type MockCAPI266 // PWDeinit provides a mock function for the type MockCAPI
50 func (_mock *MockCAPI) PWDeinit() {267 func (_mock *MockCAPI) PWDeinit() {
51 _mock.Called()268 _mock.Called()
@@ -125,6 +342,285 @@ func (_c *MockCAPI_PWInit_Call) RunAndReturn(run func(argc *int32, argv ***byte)
125 return _c342 return _c
126 }343 }
127 344
345+// PWLoopDestroy provides a mock function for the type MockCAPI
346+func (_mock *MockCAPI) PWLoopDestroy(loop unsafe.Pointer) {
347+ _mock.Called(loop)
348+ return
349+}
350+
351+// MockCAPI_PWLoopDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopDestroy'
352+type MockCAPI_PWLoopDestroy_Call struct {
353+ *mock.Call
354+}
355+
356+// PWLoopDestroy is a helper method to define mock.On call
357+// - loop unsafe.Pointer
358+func (_e *MockCAPI_Expecter) PWLoopDestroy(loop any) *MockCAPI_PWLoopDestroy_Call {
359+ return &MockCAPI_PWLoopDestroy_Call{Call: _e.mock.On("PWLoopDestroy", loop)}
360+}
361+
362+func (_c *MockCAPI_PWLoopDestroy_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopDestroy_Call {
363+ _c.Call.Run(func(args mock.Arguments) {
364+ var arg0 unsafe.Pointer
365+ if args[0] != nil {
366+ arg0 = args[0].(unsafe.Pointer)
367+ }
368+ run(
369+ arg0,
370+ )
371+ })
372+ return _c
373+}
374+
375+func (_c *MockCAPI_PWLoopDestroy_Call) Return() *MockCAPI_PWLoopDestroy_Call {
376+ _c.Call.Return()
377+ return _c
378+}
379+
380+func (_c *MockCAPI_PWLoopDestroy_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopDestroy_Call {
381+ _c.Run(run)
382+ return _c
383+}
384+
385+// PWLoopEnter provides a mock function for the type MockCAPI
386+func (_mock *MockCAPI) PWLoopEnter(loop unsafe.Pointer) {
387+ _mock.Called(loop)
388+ return
389+}
390+
391+// MockCAPI_PWLoopEnter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopEnter'
392+type MockCAPI_PWLoopEnter_Call struct {
393+ *mock.Call
394+}
395+
396+// PWLoopEnter is a helper method to define mock.On call
397+// - loop unsafe.Pointer
398+func (_e *MockCAPI_Expecter) PWLoopEnter(loop any) *MockCAPI_PWLoopEnter_Call {
399+ return &MockCAPI_PWLoopEnter_Call{Call: _e.mock.On("PWLoopEnter", loop)}
400+}
401+
402+func (_c *MockCAPI_PWLoopEnter_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopEnter_Call {
403+ _c.Call.Run(func(args mock.Arguments) {
404+ var arg0 unsafe.Pointer
405+ if args[0] != nil {
406+ arg0 = args[0].(unsafe.Pointer)
407+ }
408+ run(
409+ arg0,
410+ )
411+ })
412+ return _c
413+}
414+
415+func (_c *MockCAPI_PWLoopEnter_Call) Return() *MockCAPI_PWLoopEnter_Call {
416+ _c.Call.Return()
417+ return _c
418+}
419+
420+func (_c *MockCAPI_PWLoopEnter_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopEnter_Call {
421+ _c.Run(run)
422+ return _c
423+}
424+
425+// PWLoopGetFd provides a mock function for the type MockCAPI
426+func (_mock *MockCAPI) PWLoopGetFd(loop unsafe.Pointer) int32 {
427+ ret := _mock.Called(loop)
428+
429+ if len(ret) == 0 {
430+ panic("no return value specified for PWLoopGetFd")
431+ }
432+
433+ var r0 int32
434+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
435+ r0 = returnFunc(loop)
436+ } else {
437+ r0 = ret.Get(0).(int32)
438+ }
439+ return r0
440+}
441+
442+// MockCAPI_PWLoopGetFd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopGetFd'
443+type MockCAPI_PWLoopGetFd_Call struct {
444+ *mock.Call
445+}
446+
447+// PWLoopGetFd is a helper method to define mock.On call
448+// - loop unsafe.Pointer
449+func (_e *MockCAPI_Expecter) PWLoopGetFd(loop any) *MockCAPI_PWLoopGetFd_Call {
450+ return &MockCAPI_PWLoopGetFd_Call{Call: _e.mock.On("PWLoopGetFd", loop)}
451+}
452+
453+func (_c *MockCAPI_PWLoopGetFd_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopGetFd_Call {
454+ _c.Call.Run(func(args mock.Arguments) {
455+ var arg0 unsafe.Pointer
456+ if args[0] != nil {
457+ arg0 = args[0].(unsafe.Pointer)
458+ }
459+ run(
460+ arg0,
461+ )
462+ })
463+ return _c
464+}
465+
466+func (_c *MockCAPI_PWLoopGetFd_Call) Return(n int32) *MockCAPI_PWLoopGetFd_Call {
467+ _c.Call.Return(n)
468+ return _c
469+}
470+
471+func (_c *MockCAPI_PWLoopGetFd_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockCAPI_PWLoopGetFd_Call {
472+ _c.Call.Return(run)
473+ return _c
474+}
475+
476+// PWLoopIterate provides a mock function for the type MockCAPI
477+func (_mock *MockCAPI) PWLoopIterate(loop unsafe.Pointer, timeout int32) int32 {
478+ ret := _mock.Called(loop, timeout)
479+
480+ if len(ret) == 0 {
481+ panic("no return value specified for PWLoopIterate")
482+ }
483+
484+ var r0 int32
485+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, int32) int32); ok {
486+ r0 = returnFunc(loop, timeout)
487+ } else {
488+ r0 = ret.Get(0).(int32)
489+ }
490+ return r0
491+}
492+
493+// MockCAPI_PWLoopIterate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopIterate'
494+type MockCAPI_PWLoopIterate_Call struct {
495+ *mock.Call
496+}
497+
498+// PWLoopIterate is a helper method to define mock.On call
499+// - loop unsafe.Pointer
500+// - timeout int32
501+func (_e *MockCAPI_Expecter) PWLoopIterate(loop any, timeout any) *MockCAPI_PWLoopIterate_Call {
502+ return &MockCAPI_PWLoopIterate_Call{Call: _e.mock.On("PWLoopIterate", loop, timeout)}
503+}
504+
505+func (_c *MockCAPI_PWLoopIterate_Call) Run(run func(loop unsafe.Pointer, timeout int32)) *MockCAPI_PWLoopIterate_Call {
506+ _c.Call.Run(func(args mock.Arguments) {
507+ var arg0 unsafe.Pointer
508+ if args[0] != nil {
509+ arg0 = args[0].(unsafe.Pointer)
510+ }
511+ var arg1 int32
512+ if args[1] != nil {
513+ arg1 = args[1].(int32)
514+ }
515+ run(
516+ arg0,
517+ arg1,
518+ )
519+ })
520+ return _c
521+}
522+
523+func (_c *MockCAPI_PWLoopIterate_Call) Return(n int32) *MockCAPI_PWLoopIterate_Call {
524+ _c.Call.Return(n)
525+ return _c
526+}
527+
528+func (_c *MockCAPI_PWLoopIterate_Call) RunAndReturn(run func(loop unsafe.Pointer, timeout int32) int32) *MockCAPI_PWLoopIterate_Call {
529+ _c.Call.Return(run)
530+ return _c
531+}
532+
533+// PWLoopLeave provides a mock function for the type MockCAPI
534+func (_mock *MockCAPI) PWLoopLeave(loop unsafe.Pointer) {
535+ _mock.Called(loop)
536+ return
537+}
538+
539+// MockCAPI_PWLoopLeave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopLeave'
540+type MockCAPI_PWLoopLeave_Call struct {
541+ *mock.Call
542+}
543+
544+// PWLoopLeave is a helper method to define mock.On call
545+// - loop unsafe.Pointer
546+func (_e *MockCAPI_Expecter) PWLoopLeave(loop any) *MockCAPI_PWLoopLeave_Call {
547+ return &MockCAPI_PWLoopLeave_Call{Call: _e.mock.On("PWLoopLeave", loop)}
548+}
549+
550+func (_c *MockCAPI_PWLoopLeave_Call) Run(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopLeave_Call {
551+ _c.Call.Run(func(args mock.Arguments) {
552+ var arg0 unsafe.Pointer
553+ if args[0] != nil {
554+ arg0 = args[0].(unsafe.Pointer)
555+ }
556+ run(
557+ arg0,
558+ )
559+ })
560+ return _c
561+}
562+
563+func (_c *MockCAPI_PWLoopLeave_Call) Return() *MockCAPI_PWLoopLeave_Call {
564+ _c.Call.Return()
565+ return _c
566+}
567+
568+func (_c *MockCAPI_PWLoopLeave_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockCAPI_PWLoopLeave_Call {
569+ _c.Run(run)
570+ return _c
571+}
572+
573+// PWLoopNew provides a mock function for the type MockCAPI
574+func (_mock *MockCAPI) PWLoopNew(props unsafe.Pointer) unsafe.Pointer {
575+ ret := _mock.Called(props)
576+
577+ if len(ret) == 0 {
578+ panic("no return value specified for PWLoopNew")
579+ }
580+
581+ var r0 unsafe.Pointer
582+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) unsafe.Pointer); ok {
583+ r0 = returnFunc(props)
584+ } else {
585+ r0 = ret.Get(0).(unsafe.Pointer)
586+ }
587+ return r0
588+}
589+
590+// MockCAPI_PWLoopNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopNew'
591+type MockCAPI_PWLoopNew_Call struct {
592+ *mock.Call
593+}
594+
595+// PWLoopNew is a helper method to define mock.On call
596+// - props unsafe.Pointer
597+func (_e *MockCAPI_Expecter) PWLoopNew(props any) *MockCAPI_PWLoopNew_Call {
598+ return &MockCAPI_PWLoopNew_Call{Call: _e.mock.On("PWLoopNew", props)}
599+}
600+
601+func (_c *MockCAPI_PWLoopNew_Call) Run(run func(props unsafe.Pointer)) *MockCAPI_PWLoopNew_Call {
602+ _c.Call.Run(func(args mock.Arguments) {
603+ var arg0 unsafe.Pointer
604+ if args[0] != nil {
605+ arg0 = args[0].(unsafe.Pointer)
606+ }
607+ run(
608+ arg0,
609+ )
610+ })
611+ return _c
612+}
613+
614+func (_c *MockCAPI_PWLoopNew_Call) Return(v unsafe.Pointer) *MockCAPI_PWLoopNew_Call {
615+ _c.Call.Return(v)
616+ return _c
617+}
618+
619+func (_c *MockCAPI_PWLoopNew_Call) RunAndReturn(run func(props unsafe.Pointer) unsafe.Pointer) *MockCAPI_PWLoopNew_Call {
620+ _c.Call.Return(run)
621+ return _c
622+}
623+
128 // PWMainLoopDestroy provides a mock function for the type MockCAPI624 // PWMainLoopDestroy provides a mock function for the type MockCAPI
129 func (_mock *MockCAPI) PWMainLoopDestroy(loop unsafe.Pointer) {625 func (_mock *MockCAPI) PWMainLoopDestroy(loop unsafe.Pointer) {
130 _mock.Called(loop)626 _mock.Called(loop)
@@ -364,7 +860,58 @@ func (_c *MockCAPI_PWMainLoopRun_Call) Return(n int32) *MockCAPI_PWMainLoopRun_C
364 return _c860 return _c
365 }861 }
366 862
367-func (_c *MockCAPI_PWMainLoopRun_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockCAPI_PWMainLoopRun_Call {863+func (_c *MockCAPI_PWMainLoopRun_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockCAPI_PWMainLoopRun_Call {
864+ _c.Call.Return(run)
865+ return _c
866+}
867+
868+// PWPropertiesNewString provides a mock function for the type MockCAPI
869+func (_mock *MockCAPI) PWPropertiesNewString(args *byte) unsafe.Pointer {
870+ ret := _mock.Called(args)
871+
872+ if len(ret) == 0 {
873+ panic("no return value specified for PWPropertiesNewString")
874+ }
875+
876+ var r0 unsafe.Pointer
877+ if returnFunc, ok := ret.Get(0).(func(*byte) unsafe.Pointer); ok {
878+ r0 = returnFunc(args)
879+ } else {
880+ r0 = ret.Get(0).(unsafe.Pointer)
881+ }
882+ return r0
883+}
884+
885+// MockCAPI_PWPropertiesNewString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWPropertiesNewString'
886+type MockCAPI_PWPropertiesNewString_Call struct {
887+ *mock.Call
888+}
889+
890+// PWPropertiesNewString is a helper method to define mock.On call
891+// - args *byte
892+func (_e *MockCAPI_Expecter) PWPropertiesNewString(args any) *MockCAPI_PWPropertiesNewString_Call {
893+ return &MockCAPI_PWPropertiesNewString_Call{Call: _e.mock.On("PWPropertiesNewString", args)}
894+}
895+
896+func (_c *MockCAPI_PWPropertiesNewString_Call) Run(run func(args *byte)) *MockCAPI_PWPropertiesNewString_Call {
897+ _c.Call.Run(func(args mock.Arguments) {
898+ var arg0 *byte
899+ if args[0] != nil {
900+ arg0 = args[0].(*byte)
901+ }
902+ run(
903+ arg0,
904+ )
905+ })
906+ return _c
907+}
908+
909+func (_c *MockCAPI_PWPropertiesNewString_Call) Return(v unsafe.Pointer) *MockCAPI_PWPropertiesNewString_Call {
910+ _c.Call.Return(v)
911+ return _c
912+}
913+
914+func (_c *MockCAPI_PWPropertiesNewString_Call) RunAndReturn(run func(args *byte) unsafe.Pointer) *MockCAPI_PWPropertiesNewString_Call {
368 _c.Call.Return(run)915 _c.Call.Return(run)
369 return _c916 return _c
370 }917 }
@@ -661,6 +1208,171 @@ func (_c *MockCAPI_PWStreamDisconnect_Call) RunAndReturn(run func(stream unsafe.
661 return _c1208 return _c
662 }1209 }
663 1210
1211+// PWStreamGetNodeId provides a mock function for the type MockCAPI
1212+func (_mock *MockCAPI) PWStreamGetNodeId(stream unsafe.Pointer) uint32 {
1213+ ret := _mock.Called(stream)
1214+
1215+ if len(ret) == 0 {
1216+ panic("no return value specified for PWStreamGetNodeId")
1217+ }
1218+
1219+ var r0 uint32
1220+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) uint32); ok {
1221+ r0 = returnFunc(stream)
1222+ } else {
1223+ r0 = ret.Get(0).(uint32)
1224+ }
1225+ return r0
1226+}
1227+
1228+// MockCAPI_PWStreamGetNodeId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamGetNodeId'
1229+type MockCAPI_PWStreamGetNodeId_Call struct {
1230+ *mock.Call
1231+}
1232+
1233+// PWStreamGetNodeId is a helper method to define mock.On call
1234+// - stream unsafe.Pointer
1235+func (_e *MockCAPI_Expecter) PWStreamGetNodeId(stream any) *MockCAPI_PWStreamGetNodeId_Call {
1236+ return &MockCAPI_PWStreamGetNodeId_Call{Call: _e.mock.On("PWStreamGetNodeId", stream)}
1237+}
1238+
1239+func (_c *MockCAPI_PWStreamGetNodeId_Call) Run(run func(stream unsafe.Pointer)) *MockCAPI_PWStreamGetNodeId_Call {
1240+ _c.Call.Run(func(args mock.Arguments) {
1241+ var arg0 unsafe.Pointer
1242+ if args[0] != nil {
1243+ arg0 = args[0].(unsafe.Pointer)
1244+ }
1245+ run(
1246+ arg0,
1247+ )
1248+ })
1249+ return _c
1250+}
1251+
1252+func (_c *MockCAPI_PWStreamGetNodeId_Call) Return(v uint32) *MockCAPI_PWStreamGetNodeId_Call {
1253+ _c.Call.Return(v)
1254+ return _c
1255+}
1256+
1257+func (_c *MockCAPI_PWStreamGetNodeId_Call) RunAndReturn(run func(stream unsafe.Pointer) uint32) *MockCAPI_PWStreamGetNodeId_Call {
1258+ _c.Call.Return(run)
1259+ return _c
1260+}
1261+
1262+// PWStreamIsDriving provides a mock function for the type MockCAPI
1263+func (_mock *MockCAPI) PWStreamIsDriving(stream unsafe.Pointer) bool {
1264+ ret := _mock.Called(stream)
1265+
1266+ if len(ret) == 0 {
1267+ panic("no return value specified for PWStreamIsDriving")
1268+ }
1269+
1270+ var r0 bool
1271+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) bool); ok {
1272+ r0 = returnFunc(stream)
1273+ } else {
1274+ r0 = ret.Get(0).(bool)
1275+ }
1276+ return r0
1277+}
1278+
1279+// MockCAPI_PWStreamIsDriving_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamIsDriving'
1280+type MockCAPI_PWStreamIsDriving_Call struct {
1281+ *mock.Call
1282+}
1283+
1284+// PWStreamIsDriving is a helper method to define mock.On call
1285+// - stream unsafe.Pointer
1286+func (_e *MockCAPI_Expecter) PWStreamIsDriving(stream any) *MockCAPI_PWStreamIsDriving_Call {
1287+ return &MockCAPI_PWStreamIsDriving_Call{Call: _e.mock.On("PWStreamIsDriving", stream)}
1288+}
1289+
1290+func (_c *MockCAPI_PWStreamIsDriving_Call) Run(run func(stream unsafe.Pointer)) *MockCAPI_PWStreamIsDriving_Call {
1291+ _c.Call.Run(func(args mock.Arguments) {
1292+ var arg0 unsafe.Pointer
1293+ if args[0] != nil {
1294+ arg0 = args[0].(unsafe.Pointer)
1295+ }
1296+ run(
1297+ arg0,
1298+ )
1299+ })
1300+ return _c
1301+}
1302+
1303+func (_c *MockCAPI_PWStreamIsDriving_Call) Return(b bool) *MockCAPI_PWStreamIsDriving_Call {
1304+ _c.Call.Return(b)
1305+ return _c
1306+}
1307+
1308+func (_c *MockCAPI_PWStreamIsDriving_Call) RunAndReturn(run func(stream unsafe.Pointer) bool) *MockCAPI_PWStreamIsDriving_Call {
1309+ _c.Call.Return(run)
1310+ return _c
1311+}
1312+
1313+// PWStreamNew provides a mock function for the type MockCAPI
1314+func (_mock *MockCAPI) PWStreamNew(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer {
1315+ ret := _mock.Called(core, name, props)
1316+
1317+ if len(ret) == 0 {
1318+ panic("no return value specified for PWStreamNew")
1319+ }
1320+
1321+ var r0 unsafe.Pointer
1322+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, *byte, unsafe.Pointer) unsafe.Pointer); ok {
1323+ r0 = returnFunc(core, name, props)
1324+ } else {
1325+ r0 = ret.Get(0).(unsafe.Pointer)
1326+ }
1327+ return r0
1328+}
1329+
1330+// MockCAPI_PWStreamNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamNew'
1331+type MockCAPI_PWStreamNew_Call struct {
1332+ *mock.Call
1333+}
1334+
1335+// PWStreamNew is a helper method to define mock.On call
1336+// - core unsafe.Pointer
1337+// - name *byte
1338+// - props unsafe.Pointer
1339+func (_e *MockCAPI_Expecter) PWStreamNew(core any, name any, props any) *MockCAPI_PWStreamNew_Call {
1340+ return &MockCAPI_PWStreamNew_Call{Call: _e.mock.On("PWStreamNew", core, name, props)}
1341+}
1342+
1343+func (_c *MockCAPI_PWStreamNew_Call) Run(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer)) *MockCAPI_PWStreamNew_Call {
1344+ _c.Call.Run(func(args mock.Arguments) {
1345+ var arg0 unsafe.Pointer
1346+ if args[0] != nil {
1347+ arg0 = args[0].(unsafe.Pointer)
1348+ }
1349+ var arg1 *byte
1350+ if args[1] != nil {
1351+ arg1 = args[1].(*byte)
1352+ }
1353+ var arg2 unsafe.Pointer
1354+ if args[2] != nil {
1355+ arg2 = args[2].(unsafe.Pointer)
1356+ }
1357+ run(
1358+ arg0,
1359+ arg1,
1360+ arg2,
1361+ )
1362+ })
1363+ return _c
1364+}
1365+
1366+func (_c *MockCAPI_PWStreamNew_Call) Return(v unsafe.Pointer) *MockCAPI_PWStreamNew_Call {
1367+ _c.Call.Return(v)
1368+ return _c
1369+}
1370+
1371+func (_c *MockCAPI_PWStreamNew_Call) RunAndReturn(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer) *MockCAPI_PWStreamNew_Call {
1372+ _c.Call.Return(run)
1373+ return _c
1374+}
1375+
664 // PWStreamNewSimple provides a mock function for the type MockCAPI1376 // PWStreamNewSimple provides a mock function for the type MockCAPI
665 func (_mock *MockCAPI) PWStreamNewSimple(context unsafe.Pointer, name *byte, props unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) unsafe.Pointer {1377 func (_mock *MockCAPI) PWStreamNewSimple(context unsafe.Pointer, name *byte, props unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) unsafe.Pointer {
666 ret := _mock.Called(context, name, props, events, data)1378 ret := _mock.Called(context, name, props, events, data)
@@ -793,6 +1505,63 @@ func (_c *MockCAPI_PWStreamQueueBuffer_Call) RunAndReturn(run func(stream unsafe
793 return _c1505 return _c
794 }1506 }
795 1507
1508+// PWStreamReturnBuffer provides a mock function for the type MockCAPI
1509+func (_mock *MockCAPI) PWStreamReturnBuffer(stream unsafe.Pointer, buffer unsafe.Pointer) int32 {
1510+ ret := _mock.Called(stream, buffer)
1511+
1512+ if len(ret) == 0 {
1513+ panic("no return value specified for PWStreamReturnBuffer")
1514+ }
1515+
1516+ var r0 int32
1517+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer) int32); ok {
1518+ r0 = returnFunc(stream, buffer)
1519+ } else {
1520+ r0 = ret.Get(0).(int32)
1521+ }
1522+ return r0
1523+}
1524+
1525+// MockCAPI_PWStreamReturnBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamReturnBuffer'
1526+type MockCAPI_PWStreamReturnBuffer_Call struct {
1527+ *mock.Call
1528+}
1529+
1530+// PWStreamReturnBuffer is a helper method to define mock.On call
1531+// - stream unsafe.Pointer
1532+// - buffer unsafe.Pointer
1533+func (_e *MockCAPI_Expecter) PWStreamReturnBuffer(stream any, buffer any) *MockCAPI_PWStreamReturnBuffer_Call {
1534+ return &MockCAPI_PWStreamReturnBuffer_Call{Call: _e.mock.On("PWStreamReturnBuffer", stream, buffer)}
1535+}
1536+
1537+func (_c *MockCAPI_PWStreamReturnBuffer_Call) Run(run func(stream unsafe.Pointer, buffer unsafe.Pointer)) *MockCAPI_PWStreamReturnBuffer_Call {
1538+ _c.Call.Run(func(args mock.Arguments) {
1539+ var arg0 unsafe.Pointer
1540+ if args[0] != nil {
1541+ arg0 = args[0].(unsafe.Pointer)
1542+ }
1543+ var arg1 unsafe.Pointer
1544+ if args[1] != nil {
1545+ arg1 = args[1].(unsafe.Pointer)
1546+ }
1547+ run(
1548+ arg0,
1549+ arg1,
1550+ )
1551+ })
1552+ return _c
1553+}
1554+
1555+func (_c *MockCAPI_PWStreamReturnBuffer_Call) Return(n int32) *MockCAPI_PWStreamReturnBuffer_Call {
1556+ _c.Call.Return(n)
1557+ return _c
1558+}
1559+
1560+func (_c *MockCAPI_PWStreamReturnBuffer_Call) RunAndReturn(run func(stream unsafe.Pointer, buffer unsafe.Pointer) int32) *MockCAPI_PWStreamReturnBuffer_Call {
1561+ _c.Call.Return(run)
1562+ return _c
1563+}
1564+
796 // PWStreamSetActive provides a mock function for the type MockCAPI1565 // PWStreamSetActive provides a mock function for the type MockCAPI
797 func (_mock *MockCAPI) PWStreamSetActive(stream unsafe.Pointer, active bool) int32 {1566 func (_mock *MockCAPI) PWStreamSetActive(stream unsafe.Pointer, active bool) int32 {
798 ret := _mock.Called(stream, active)1567 ret := _mock.Called(stream, active)
@@ -849,3 +1618,117 @@ func (_c *MockCAPI_PWStreamSetActive_Call) RunAndReturn(run func(stream unsafe.P
849 _c.Call.Return(run)1618 _c.Call.Return(run)
850 return _c1619 return _c
851 }1620 }
1621+
1622+// PWStreamTriggerProcess provides a mock function for the type MockCAPI
1623+func (_mock *MockCAPI) PWStreamTriggerProcess(stream unsafe.Pointer) int32 {
1624+ ret := _mock.Called(stream)
1625+
1626+ if len(ret) == 0 {
1627+ panic("no return value specified for PWStreamTriggerProcess")
1628+ }
1629+
1630+ var r0 int32
1631+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
1632+ r0 = returnFunc(stream)
1633+ } else {
1634+ r0 = ret.Get(0).(int32)
1635+ }
1636+ return r0
1637+}
1638+
1639+// MockCAPI_PWStreamTriggerProcess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamTriggerProcess'
1640+type MockCAPI_PWStreamTriggerProcess_Call struct {
1641+ *mock.Call
1642+}
1643+
1644+// PWStreamTriggerProcess is a helper method to define mock.On call
1645+// - stream unsafe.Pointer
1646+func (_e *MockCAPI_Expecter) PWStreamTriggerProcess(stream any) *MockCAPI_PWStreamTriggerProcess_Call {
1647+ return &MockCAPI_PWStreamTriggerProcess_Call{Call: _e.mock.On("PWStreamTriggerProcess", stream)}
1648+}
1649+
1650+func (_c *MockCAPI_PWStreamTriggerProcess_Call) Run(run func(stream unsafe.Pointer)) *MockCAPI_PWStreamTriggerProcess_Call {
1651+ _c.Call.Run(func(args mock.Arguments) {
1652+ var arg0 unsafe.Pointer
1653+ if args[0] != nil {
1654+ arg0 = args[0].(unsafe.Pointer)
1655+ }
1656+ run(
1657+ arg0,
1658+ )
1659+ })
1660+ return _c
1661+}
1662+
1663+func (_c *MockCAPI_PWStreamTriggerProcess_Call) Return(n int32) *MockCAPI_PWStreamTriggerProcess_Call {
1664+ _c.Call.Return(n)
1665+ return _c
1666+}
1667+
1668+func (_c *MockCAPI_PWStreamTriggerProcess_Call) RunAndReturn(run func(stream unsafe.Pointer) int32) *MockCAPI_PWStreamTriggerProcess_Call {
1669+ _c.Call.Return(run)
1670+ return _c
1671+}
1672+
1673+// PWStreamUpdateParams provides a mock function for the type MockCAPI
1674+func (_mock *MockCAPI) PWStreamUpdateParams(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32 {
1675+ ret := _mock.Called(stream, params, n_params)
1676+
1677+ if len(ret) == 0 {
1678+ panic("no return value specified for PWStreamUpdateParams")
1679+ }
1680+
1681+ var r0 int32
1682+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uint32) int32); ok {
1683+ r0 = returnFunc(stream, params, n_params)
1684+ } else {
1685+ r0 = ret.Get(0).(int32)
1686+ }
1687+ return r0
1688+}
1689+
1690+// MockCAPI_PWStreamUpdateParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamUpdateParams'
1691+type MockCAPI_PWStreamUpdateParams_Call struct {
1692+ *mock.Call
1693+}
1694+
1695+// PWStreamUpdateParams is a helper method to define mock.On call
1696+// - stream unsafe.Pointer
1697+// - params unsafe.Pointer
1698+// - n_params uint32
1699+func (_e *MockCAPI_Expecter) PWStreamUpdateParams(stream any, params any, n_params any) *MockCAPI_PWStreamUpdateParams_Call {
1700+ return &MockCAPI_PWStreamUpdateParams_Call{Call: _e.mock.On("PWStreamUpdateParams", stream, params, n_params)}
1701+}
1702+
1703+func (_c *MockCAPI_PWStreamUpdateParams_Call) Run(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32)) *MockCAPI_PWStreamUpdateParams_Call {
1704+ _c.Call.Run(func(args mock.Arguments) {
1705+ var arg0 unsafe.Pointer
1706+ if args[0] != nil {
1707+ arg0 = args[0].(unsafe.Pointer)
1708+ }
1709+ var arg1 unsafe.Pointer
1710+ if args[1] != nil {
1711+ arg1 = args[1].(unsafe.Pointer)
1712+ }
1713+ var arg2 uint32
1714+ if args[2] != nil {
1715+ arg2 = args[2].(uint32)
1716+ }
1717+ run(
1718+ arg0,
1719+ arg1,
1720+ arg2,
1721+ )
1722+ })
1723+ return _c
1724+}
1725+
1726+func (_c *MockCAPI_PWStreamUpdateParams_Call) Return(n int32) *MockCAPI_PWStreamUpdateParams_Call {
1727+ _c.Call.Return(n)
1728+ return _c
1729+}
1730+
1731+func (_c *MockCAPI_PWStreamUpdateParams_Call) RunAndReturn(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32) *MockCAPI_PWStreamUpdateParams_Call {
1732+ _c.Call.Return(run)
1733+ return _c
1734+}
A internal/ports/out/mocks/mock_SharedMemAPI.go +165 -0
@@ -0,0 +1,165 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ mock "github.com/stretchr/testify/mock"
9+)
10+
11+// NewMockSharedMemAPI creates a new instance of MockSharedMemAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12+// The first argument is typically a *testing.T value.
13+func NewMockSharedMemAPI(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockSharedMemAPI {
17+ if helper, ok := t.(interface{ Helper() }); ok {
18+ helper.Helper()
19+ }
20+
21+ mock := &MockSharedMemAPI{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() {
25+ if helper, ok := t.(interface{ Helper() }); ok {
26+ helper.Helper()
27+ }
28+ mock.AssertExpectations(t)
29+ })
30+
31+ return mock
32+}
33+
34+// MockSharedMemAPI is an autogenerated mock type for the SharedMemAPI type
35+type MockSharedMemAPI struct {
36+ mock.Mock
37+}
38+
39+type MockSharedMemAPI_Expecter struct {
40+ mock *mock.Mock
41+}
42+
43+func (_m *MockSharedMemAPI) EXPECT() *MockSharedMemAPI_Expecter {
44+ return &MockSharedMemAPI_Expecter{mock: &_m.Mock}
45+}
46+
47+// FreeSharedMem provides a mock function for the type MockSharedMemAPI
48+func (_mock *MockSharedMemAPI) FreeSharedMem(fd int, data []byte) {
49+ _mock.Called(fd, data)
50+ return
51+}
52+
53+// MockSharedMemAPI_FreeSharedMem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FreeSharedMem'
54+type MockSharedMemAPI_FreeSharedMem_Call struct {
55+ *mock.Call
56+}
57+
58+// FreeSharedMem is a helper method to define mock.On call
59+// - fd int
60+// - data []byte
61+func (_e *MockSharedMemAPI_Expecter) FreeSharedMem(fd any, data any) *MockSharedMemAPI_FreeSharedMem_Call {
62+ return &MockSharedMemAPI_FreeSharedMem_Call{Call: _e.mock.On("FreeSharedMem", fd, data)}
63+}
64+
65+func (_c *MockSharedMemAPI_FreeSharedMem_Call) Run(run func(fd int, data []byte)) *MockSharedMemAPI_FreeSharedMem_Call {
66+ _c.Call.Run(func(args mock.Arguments) {
67+ var arg0 int
68+ if args[0] != nil {
69+ arg0 = args[0].(int)
70+ }
71+ var arg1 []byte
72+ if args[1] != nil {
73+ arg1 = args[1].([]byte)
74+ }
75+ run(
76+ arg0,
77+ arg1,
78+ )
79+ })
80+ return _c
81+}
82+
83+func (_c *MockSharedMemAPI_FreeSharedMem_Call) Return() *MockSharedMemAPI_FreeSharedMem_Call {
84+ _c.Call.Return()
85+ return _c
86+}
87+
88+func (_c *MockSharedMemAPI_FreeSharedMem_Call) RunAndReturn(run func(fd int, data []byte)) *MockSharedMemAPI_FreeSharedMem_Call {
89+ _c.Run(run)
90+ return _c
91+}
92+
93+// NewSharedMem provides a mock function for the type MockSharedMemAPI
94+func (_mock *MockSharedMemAPI) NewSharedMem(name string, size int) (int, []byte, error) {
95+ ret := _mock.Called(name, size)
96+
97+ if len(ret) == 0 {
98+ panic("no return value specified for NewSharedMem")
99+ }
100+
101+ var r0 int
102+ var r1 []byte
103+ var r2 error
104+ if returnFunc, ok := ret.Get(0).(func(string, int) (int, []byte, error)); ok {
105+ return returnFunc(name, size)
106+ }
107+ if returnFunc, ok := ret.Get(0).(func(string, int) int); ok {
108+ r0 = returnFunc(name, size)
109+ } else {
110+ r0 = ret.Get(0).(int)
111+ }
112+ if returnFunc, ok := ret.Get(1).(func(string, int) []byte); ok {
113+ r1 = returnFunc(name, size)
114+ } else {
115+ if ret.Get(1) != nil {
116+ r1 = ret.Get(1).([]byte)
117+ }
118+ }
119+ if returnFunc, ok := ret.Get(2).(func(string, int) error); ok {
120+ r2 = returnFunc(name, size)
121+ } else {
122+ r2 = ret.Error(2)
123+ }
124+ return r0, r1, r2
125+}
126+
127+// MockSharedMemAPI_NewSharedMem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewSharedMem'
128+type MockSharedMemAPI_NewSharedMem_Call struct {
129+ *mock.Call
130+}
131+
132+// NewSharedMem is a helper method to define mock.On call
133+// - name string
134+// - size int
135+func (_e *MockSharedMemAPI_Expecter) NewSharedMem(name any, size any) *MockSharedMemAPI_NewSharedMem_Call {
136+ return &MockSharedMemAPI_NewSharedMem_Call{Call: _e.mock.On("NewSharedMem", name, size)}
137+}
138+
139+func (_c *MockSharedMemAPI_NewSharedMem_Call) Run(run func(name string, size int)) *MockSharedMemAPI_NewSharedMem_Call {
140+ _c.Call.Run(func(args mock.Arguments) {
141+ var arg0 string
142+ if args[0] != nil {
143+ arg0 = args[0].(string)
144+ }
145+ var arg1 int
146+ if args[1] != nil {
147+ arg1 = args[1].(int)
148+ }
149+ run(
150+ arg0,
151+ arg1,
152+ )
153+ })
154+ return _c
155+}
156+
157+func (_c *MockSharedMemAPI_NewSharedMem_Call) Return(fd int, data []byte, err error) *MockSharedMemAPI_NewSharedMem_Call {
158+ _c.Call.Return(fd, data, err)
159+ return _c
160+}
161+
162+func (_c *MockSharedMemAPI_NewSharedMem_Call) RunAndReturn(run func(name string, size int) (int, []byte, error)) *MockSharedMemAPI_NewSharedMem_Call {
163+ _c.Call.Return(run)
164+ return _c
165+}
@@ -0,0 +1,165 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ mock "github.com/stretchr/testify/mock"
9+)
10+
11+// NewMockSharedMemAPI creates a new instance of MockSharedMemAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12+// The first argument is typically a *testing.T value.
13+func NewMockSharedMemAPI(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockSharedMemAPI {
17+ if helper, ok := t.(interface{ Helper() }); ok {
18+ helper.Helper()
19+ }
20+
21+ mock := &MockSharedMemAPI{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() {
25+ if helper, ok := t.(interface{ Helper() }); ok {
26+ helper.Helper()
27+ }
28+ mock.AssertExpectations(t)
29+ })
30+
31+ return mock
32+}
33+
34+// MockSharedMemAPI is an autogenerated mock type for the SharedMemAPI type
35+type MockSharedMemAPI struct {
36+ mock.Mock
37+}
38+
39+type MockSharedMemAPI_Expecter struct {
40+ mock *mock.Mock
41+}
42+
43+func (_m *MockSharedMemAPI) EXPECT() *MockSharedMemAPI_Expecter {
44+ return &MockSharedMemAPI_Expecter{mock: &_m.Mock}
45+}
46+
47+// FreeSharedMem provides a mock function for the type MockSharedMemAPI
48+func (_mock *MockSharedMemAPI) FreeSharedMem(fd int, data []byte) {
49+ _mock.Called(fd, data)
50+ return
51+}
52+
53+// MockSharedMemAPI_FreeSharedMem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FreeSharedMem'
54+type MockSharedMemAPI_FreeSharedMem_Call struct {
55+ *mock.Call
56+}
57+
58+// FreeSharedMem is a helper method to define mock.On call
59+// - fd int
60+// - data []byte
61+func (_e *MockSharedMemAPI_Expecter) FreeSharedMem(fd any, data any) *MockSharedMemAPI_FreeSharedMem_Call {
62+ return &MockSharedMemAPI_FreeSharedMem_Call{Call: _e.mock.On("FreeSharedMem", fd, data)}
63+}
64+
65+func (_c *MockSharedMemAPI_FreeSharedMem_Call) Run(run func(fd int, data []byte)) *MockSharedMemAPI_FreeSharedMem_Call {
66+ _c.Call.Run(func(args mock.Arguments) {
67+ var arg0 int
68+ if args[0] != nil {
69+ arg0 = args[0].(int)
70+ }
71+ var arg1 []byte
72+ if args[1] != nil {
73+ arg1 = args[1].([]byte)
74+ }
75+ run(
76+ arg0,
77+ arg1,
78+ )
79+ })
80+ return _c
81+}
82+
83+func (_c *MockSharedMemAPI_FreeSharedMem_Call) Return() *MockSharedMemAPI_FreeSharedMem_Call {
84+ _c.Call.Return()
85+ return _c
86+}
87+
88+func (_c *MockSharedMemAPI_FreeSharedMem_Call) RunAndReturn(run func(fd int, data []byte)) *MockSharedMemAPI_FreeSharedMem_Call {
89+ _c.Run(run)
90+ return _c
91+}
92+
93+// NewSharedMem provides a mock function for the type MockSharedMemAPI
94+func (_mock *MockSharedMemAPI) NewSharedMem(name string, size int) (int, []byte, error) {
95+ ret := _mock.Called(name, size)
96+
97+ if len(ret) == 0 {
98+ panic("no return value specified for NewSharedMem")
99+ }
100+
101+ var r0 int
102+ var r1 []byte
103+ var r2 error
104+ if returnFunc, ok := ret.Get(0).(func(string, int) (int, []byte, error)); ok {
105+ return returnFunc(name, size)
106+ }
107+ if returnFunc, ok := ret.Get(0).(func(string, int) int); ok {
108+ r0 = returnFunc(name, size)
109+ } else {
110+ r0 = ret.Get(0).(int)
111+ }
112+ if returnFunc, ok := ret.Get(1).(func(string, int) []byte); ok {
113+ r1 = returnFunc(name, size)
114+ } else {
115+ if ret.Get(1) != nil {
116+ r1 = ret.Get(1).([]byte)
117+ }
118+ }
119+ if returnFunc, ok := ret.Get(2).(func(string, int) error); ok {
120+ r2 = returnFunc(name, size)
121+ } else {
122+ r2 = ret.Error(2)
123+ }
124+ return r0, r1, r2
125+}
126+
127+// MockSharedMemAPI_NewSharedMem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewSharedMem'
128+type MockSharedMemAPI_NewSharedMem_Call struct {
129+ *mock.Call
130+}
131+
132+// NewSharedMem is a helper method to define mock.On call
133+// - name string
134+// - size int
135+func (_e *MockSharedMemAPI_Expecter) NewSharedMem(name any, size any) *MockSharedMemAPI_NewSharedMem_Call {
136+ return &MockSharedMemAPI_NewSharedMem_Call{Call: _e.mock.On("NewSharedMem", name, size)}
137+}
138+
139+func (_c *MockSharedMemAPI_NewSharedMem_Call) Run(run func(name string, size int)) *MockSharedMemAPI_NewSharedMem_Call {
140+ _c.Call.Run(func(args mock.Arguments) {
141+ var arg0 string
142+ if args[0] != nil {
143+ arg0 = args[0].(string)
144+ }
145+ var arg1 int
146+ if args[1] != nil {
147+ arg1 = args[1].(int)
148+ }
149+ run(
150+ arg0,
151+ arg1,
152+ )
153+ })
154+ return _c
155+}
156+
157+func (_c *MockSharedMemAPI_NewSharedMem_Call) Return(fd int, data []byte, err error) *MockSharedMemAPI_NewSharedMem_Call {
158+ _c.Call.Return(fd, data, err)
159+ return _c
160+}
161+
162+func (_c *MockSharedMemAPI_NewSharedMem_Call) RunAndReturn(run func(name string, size int) (int, []byte, error)) *MockSharedMemAPI_NewSharedMem_Call {
163+ _c.Call.Return(run)
164+ return _c
165+}
A internal/ports/out/mocks/mock_VideoAPI.go +930 -0
@@ -0,0 +1,930 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "unsafe"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockVideoAPI creates a new instance of MockVideoAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockVideoAPI(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockVideoAPI {
19+ if helper, ok := t.(interface{ Helper() }); ok {
20+ helper.Helper()
21+ }
22+
23+ mock := &MockVideoAPI{}
24+ mock.Mock.Test(t)
25+
26+ t.Cleanup(func() {
27+ if helper, ok := t.(interface{ Helper() }); ok {
28+ helper.Helper()
29+ }
30+ mock.AssertExpectations(t)
31+ })
32+
33+ return mock
34+}
35+
36+// MockVideoAPI is an autogenerated mock type for the VideoAPI type
37+type MockVideoAPI struct {
38+ mock.Mock
39+}
40+
41+type MockVideoAPI_Expecter struct {
42+ mock *mock.Mock
43+}
44+
45+func (_m *MockVideoAPI) EXPECT() *MockVideoAPI_Expecter {
46+ return &MockVideoAPI_Expecter{mock: &_m.Mock}
47+}
48+
49+// PWContextConnect provides a mock function for the type MockVideoAPI
50+func (_mock *MockVideoAPI) PWContextConnect(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
51+ ret := _mock.Called(context, props, user_data_size)
52+
53+ if len(ret) == 0 {
54+ panic("no return value specified for PWContextConnect")
55+ }
56+
57+ var r0 unsafe.Pointer
58+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
59+ r0 = returnFunc(context, props, user_data_size)
60+ } else {
61+ r0 = ret.Get(0).(unsafe.Pointer)
62+ }
63+ return r0
64+}
65+
66+// MockVideoAPI_PWContextConnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextConnect'
67+type MockVideoAPI_PWContextConnect_Call struct {
68+ *mock.Call
69+}
70+
71+// PWContextConnect is a helper method to define mock.On call
72+// - context unsafe.Pointer
73+// - props unsafe.Pointer
74+// - user_data_size uintptr
75+func (_e *MockVideoAPI_Expecter) PWContextConnect(context any, props any, user_data_size any) *MockVideoAPI_PWContextConnect_Call {
76+ return &MockVideoAPI_PWContextConnect_Call{Call: _e.mock.On("PWContextConnect", context, props, user_data_size)}
77+}
78+
79+func (_c *MockVideoAPI_PWContextConnect_Call) Run(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockVideoAPI_PWContextConnect_Call {
80+ _c.Call.Run(func(args mock.Arguments) {
81+ var arg0 unsafe.Pointer
82+ if args[0] != nil {
83+ arg0 = args[0].(unsafe.Pointer)
84+ }
85+ var arg1 unsafe.Pointer
86+ if args[1] != nil {
87+ arg1 = args[1].(unsafe.Pointer)
88+ }
89+ var arg2 uintptr
90+ if args[2] != nil {
91+ arg2 = args[2].(uintptr)
92+ }
93+ run(
94+ arg0,
95+ arg1,
96+ arg2,
97+ )
98+ })
99+ return _c
100+}
101+
102+func (_c *MockVideoAPI_PWContextConnect_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWContextConnect_Call {
103+ _c.Call.Return(v)
104+ return _c
105+}
106+
107+func (_c *MockVideoAPI_PWContextConnect_Call) RunAndReturn(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockVideoAPI_PWContextConnect_Call {
108+ _c.Call.Return(run)
109+ return _c
110+}
111+
112+// PWContextDestroy provides a mock function for the type MockVideoAPI
113+func (_mock *MockVideoAPI) PWContextDestroy(context unsafe.Pointer) {
114+ _mock.Called(context)
115+ return
116+}
117+
118+// MockVideoAPI_PWContextDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextDestroy'
119+type MockVideoAPI_PWContextDestroy_Call struct {
120+ *mock.Call
121+}
122+
123+// PWContextDestroy is a helper method to define mock.On call
124+// - context unsafe.Pointer
125+func (_e *MockVideoAPI_Expecter) PWContextDestroy(context any) *MockVideoAPI_PWContextDestroy_Call {
126+ return &MockVideoAPI_PWContextDestroy_Call{Call: _e.mock.On("PWContextDestroy", context)}
127+}
128+
129+func (_c *MockVideoAPI_PWContextDestroy_Call) Run(run func(context unsafe.Pointer)) *MockVideoAPI_PWContextDestroy_Call {
130+ _c.Call.Run(func(args mock.Arguments) {
131+ var arg0 unsafe.Pointer
132+ if args[0] != nil {
133+ arg0 = args[0].(unsafe.Pointer)
134+ }
135+ run(
136+ arg0,
137+ )
138+ })
139+ return _c
140+}
141+
142+func (_c *MockVideoAPI_PWContextDestroy_Call) Return() *MockVideoAPI_PWContextDestroy_Call {
143+ _c.Call.Return()
144+ return _c
145+}
146+
147+func (_c *MockVideoAPI_PWContextDestroy_Call) RunAndReturn(run func(context unsafe.Pointer)) *MockVideoAPI_PWContextDestroy_Call {
148+ _c.Run(run)
149+ return _c
150+}
151+
152+// PWContextNew provides a mock function for the type MockVideoAPI
153+func (_mock *MockVideoAPI) PWContextNew(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
154+ ret := _mock.Called(loop, props, user_data_size)
155+
156+ if len(ret) == 0 {
157+ panic("no return value specified for PWContextNew")
158+ }
159+
160+ var r0 unsafe.Pointer
161+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
162+ r0 = returnFunc(loop, props, user_data_size)
163+ } else {
164+ r0 = ret.Get(0).(unsafe.Pointer)
165+ }
166+ return r0
167+}
168+
169+// MockVideoAPI_PWContextNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextNew'
170+type MockVideoAPI_PWContextNew_Call struct {
171+ *mock.Call
172+}
173+
174+// PWContextNew is a helper method to define mock.On call
175+// - loop unsafe.Pointer
176+// - props unsafe.Pointer
177+// - user_data_size uintptr
178+func (_e *MockVideoAPI_Expecter) PWContextNew(loop any, props any, user_data_size any) *MockVideoAPI_PWContextNew_Call {
179+ return &MockVideoAPI_PWContextNew_Call{Call: _e.mock.On("PWContextNew", loop, props, user_data_size)}
180+}
181+
182+func (_c *MockVideoAPI_PWContextNew_Call) Run(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockVideoAPI_PWContextNew_Call {
183+ _c.Call.Run(func(args mock.Arguments) {
184+ var arg0 unsafe.Pointer
185+ if args[0] != nil {
186+ arg0 = args[0].(unsafe.Pointer)
187+ }
188+ var arg1 unsafe.Pointer
189+ if args[1] != nil {
190+ arg1 = args[1].(unsafe.Pointer)
191+ }
192+ var arg2 uintptr
193+ if args[2] != nil {
194+ arg2 = args[2].(uintptr)
195+ }
196+ run(
197+ arg0,
198+ arg1,
199+ arg2,
200+ )
201+ })
202+ return _c
203+}
204+
205+func (_c *MockVideoAPI_PWContextNew_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWContextNew_Call {
206+ _c.Call.Return(v)
207+ return _c
208+}
209+
210+func (_c *MockVideoAPI_PWContextNew_Call) RunAndReturn(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockVideoAPI_PWContextNew_Call {
211+ _c.Call.Return(run)
212+ return _c
213+}
214+
215+// PWCoreDisconnect provides a mock function for the type MockVideoAPI
216+func (_mock *MockVideoAPI) PWCoreDisconnect(core unsafe.Pointer) int32 {
217+ ret := _mock.Called(core)
218+
219+ if len(ret) == 0 {
220+ panic("no return value specified for PWCoreDisconnect")
221+ }
222+
223+ var r0 int32
224+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
225+ r0 = returnFunc(core)
226+ } else {
227+ r0 = ret.Get(0).(int32)
228+ }
229+ return r0
230+}
231+
232+// MockVideoAPI_PWCoreDisconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWCoreDisconnect'
233+type MockVideoAPI_PWCoreDisconnect_Call struct {
234+ *mock.Call
235+}
236+
237+// PWCoreDisconnect is a helper method to define mock.On call
238+// - core unsafe.Pointer
239+func (_e *MockVideoAPI_Expecter) PWCoreDisconnect(core any) *MockVideoAPI_PWCoreDisconnect_Call {
240+ return &MockVideoAPI_PWCoreDisconnect_Call{Call: _e.mock.On("PWCoreDisconnect", core)}
241+}
242+
243+func (_c *MockVideoAPI_PWCoreDisconnect_Call) Run(run func(core unsafe.Pointer)) *MockVideoAPI_PWCoreDisconnect_Call {
244+ _c.Call.Run(func(args mock.Arguments) {
245+ var arg0 unsafe.Pointer
246+ if args[0] != nil {
247+ arg0 = args[0].(unsafe.Pointer)
248+ }
249+ run(
250+ arg0,
251+ )
252+ })
253+ return _c
254+}
255+
256+func (_c *MockVideoAPI_PWCoreDisconnect_Call) Return(n int32) *MockVideoAPI_PWCoreDisconnect_Call {
257+ _c.Call.Return(n)
258+ return _c
259+}
260+
261+func (_c *MockVideoAPI_PWCoreDisconnect_Call) RunAndReturn(run func(core unsafe.Pointer) int32) *MockVideoAPI_PWCoreDisconnect_Call {
262+ _c.Call.Return(run)
263+ return _c
264+}
265+
266+// PWLoopDestroy provides a mock function for the type MockVideoAPI
267+func (_mock *MockVideoAPI) PWLoopDestroy(loop unsafe.Pointer) {
268+ _mock.Called(loop)
269+ return
270+}
271+
272+// MockVideoAPI_PWLoopDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopDestroy'
273+type MockVideoAPI_PWLoopDestroy_Call struct {
274+ *mock.Call
275+}
276+
277+// PWLoopDestroy is a helper method to define mock.On call
278+// - loop unsafe.Pointer
279+func (_e *MockVideoAPI_Expecter) PWLoopDestroy(loop any) *MockVideoAPI_PWLoopDestroy_Call {
280+ return &MockVideoAPI_PWLoopDestroy_Call{Call: _e.mock.On("PWLoopDestroy", loop)}
281+}
282+
283+func (_c *MockVideoAPI_PWLoopDestroy_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopDestroy_Call {
284+ _c.Call.Run(func(args mock.Arguments) {
285+ var arg0 unsafe.Pointer
286+ if args[0] != nil {
287+ arg0 = args[0].(unsafe.Pointer)
288+ }
289+ run(
290+ arg0,
291+ )
292+ })
293+ return _c
294+}
295+
296+func (_c *MockVideoAPI_PWLoopDestroy_Call) Return() *MockVideoAPI_PWLoopDestroy_Call {
297+ _c.Call.Return()
298+ return _c
299+}
300+
301+func (_c *MockVideoAPI_PWLoopDestroy_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopDestroy_Call {
302+ _c.Run(run)
303+ return _c
304+}
305+
306+// PWLoopEnter provides a mock function for the type MockVideoAPI
307+func (_mock *MockVideoAPI) PWLoopEnter(loop unsafe.Pointer) {
308+ _mock.Called(loop)
309+ return
310+}
311+
312+// MockVideoAPI_PWLoopEnter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopEnter'
313+type MockVideoAPI_PWLoopEnter_Call struct {
314+ *mock.Call
315+}
316+
317+// PWLoopEnter is a helper method to define mock.On call
318+// - loop unsafe.Pointer
319+func (_e *MockVideoAPI_Expecter) PWLoopEnter(loop any) *MockVideoAPI_PWLoopEnter_Call {
320+ return &MockVideoAPI_PWLoopEnter_Call{Call: _e.mock.On("PWLoopEnter", loop)}
321+}
322+
323+func (_c *MockVideoAPI_PWLoopEnter_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopEnter_Call {
324+ _c.Call.Run(func(args mock.Arguments) {
325+ var arg0 unsafe.Pointer
326+ if args[0] != nil {
327+ arg0 = args[0].(unsafe.Pointer)
328+ }
329+ run(
330+ arg0,
331+ )
332+ })
333+ return _c
334+}
335+
336+func (_c *MockVideoAPI_PWLoopEnter_Call) Return() *MockVideoAPI_PWLoopEnter_Call {
337+ _c.Call.Return()
338+ return _c
339+}
340+
341+func (_c *MockVideoAPI_PWLoopEnter_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopEnter_Call {
342+ _c.Run(run)
343+ return _c
344+}
345+
346+// PWLoopGetFd provides a mock function for the type MockVideoAPI
347+func (_mock *MockVideoAPI) PWLoopGetFd(loop unsafe.Pointer) int32 {
348+ ret := _mock.Called(loop)
349+
350+ if len(ret) == 0 {
351+ panic("no return value specified for PWLoopGetFd")
352+ }
353+
354+ var r0 int32
355+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
356+ r0 = returnFunc(loop)
357+ } else {
358+ r0 = ret.Get(0).(int32)
359+ }
360+ return r0
361+}
362+
363+// MockVideoAPI_PWLoopGetFd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopGetFd'
364+type MockVideoAPI_PWLoopGetFd_Call struct {
365+ *mock.Call
366+}
367+
368+// PWLoopGetFd is a helper method to define mock.On call
369+// - loop unsafe.Pointer
370+func (_e *MockVideoAPI_Expecter) PWLoopGetFd(loop any) *MockVideoAPI_PWLoopGetFd_Call {
371+ return &MockVideoAPI_PWLoopGetFd_Call{Call: _e.mock.On("PWLoopGetFd", loop)}
372+}
373+
374+func (_c *MockVideoAPI_PWLoopGetFd_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopGetFd_Call {
375+ _c.Call.Run(func(args mock.Arguments) {
376+ var arg0 unsafe.Pointer
377+ if args[0] != nil {
378+ arg0 = args[0].(unsafe.Pointer)
379+ }
380+ run(
381+ arg0,
382+ )
383+ })
384+ return _c
385+}
386+
387+func (_c *MockVideoAPI_PWLoopGetFd_Call) Return(n int32) *MockVideoAPI_PWLoopGetFd_Call {
388+ _c.Call.Return(n)
389+ return _c
390+}
391+
392+func (_c *MockVideoAPI_PWLoopGetFd_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockVideoAPI_PWLoopGetFd_Call {
393+ _c.Call.Return(run)
394+ return _c
395+}
396+
397+// PWLoopIterate provides a mock function for the type MockVideoAPI
398+func (_mock *MockVideoAPI) PWLoopIterate(loop unsafe.Pointer, timeout int32) int32 {
399+ ret := _mock.Called(loop, timeout)
400+
401+ if len(ret) == 0 {
402+ panic("no return value specified for PWLoopIterate")
403+ }
404+
405+ var r0 int32
406+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, int32) int32); ok {
407+ r0 = returnFunc(loop, timeout)
408+ } else {
409+ r0 = ret.Get(0).(int32)
410+ }
411+ return r0
412+}
413+
414+// MockVideoAPI_PWLoopIterate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopIterate'
415+type MockVideoAPI_PWLoopIterate_Call struct {
416+ *mock.Call
417+}
418+
419+// PWLoopIterate is a helper method to define mock.On call
420+// - loop unsafe.Pointer
421+// - timeout int32
422+func (_e *MockVideoAPI_Expecter) PWLoopIterate(loop any, timeout any) *MockVideoAPI_PWLoopIterate_Call {
423+ return &MockVideoAPI_PWLoopIterate_Call{Call: _e.mock.On("PWLoopIterate", loop, timeout)}
424+}
425+
426+func (_c *MockVideoAPI_PWLoopIterate_Call) Run(run func(loop unsafe.Pointer, timeout int32)) *MockVideoAPI_PWLoopIterate_Call {
427+ _c.Call.Run(func(args mock.Arguments) {
428+ var arg0 unsafe.Pointer
429+ if args[0] != nil {
430+ arg0 = args[0].(unsafe.Pointer)
431+ }
432+ var arg1 int32
433+ if args[1] != nil {
434+ arg1 = args[1].(int32)
435+ }
436+ run(
437+ arg0,
438+ arg1,
439+ )
440+ })
441+ return _c
442+}
443+
444+func (_c *MockVideoAPI_PWLoopIterate_Call) Return(n int32) *MockVideoAPI_PWLoopIterate_Call {
445+ _c.Call.Return(n)
446+ return _c
447+}
448+
449+func (_c *MockVideoAPI_PWLoopIterate_Call) RunAndReturn(run func(loop unsafe.Pointer, timeout int32) int32) *MockVideoAPI_PWLoopIterate_Call {
450+ _c.Call.Return(run)
451+ return _c
452+}
453+
454+// PWLoopLeave provides a mock function for the type MockVideoAPI
455+func (_mock *MockVideoAPI) PWLoopLeave(loop unsafe.Pointer) {
456+ _mock.Called(loop)
457+ return
458+}
459+
460+// MockVideoAPI_PWLoopLeave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopLeave'
461+type MockVideoAPI_PWLoopLeave_Call struct {
462+ *mock.Call
463+}
464+
465+// PWLoopLeave is a helper method to define mock.On call
466+// - loop unsafe.Pointer
467+func (_e *MockVideoAPI_Expecter) PWLoopLeave(loop any) *MockVideoAPI_PWLoopLeave_Call {
468+ return &MockVideoAPI_PWLoopLeave_Call{Call: _e.mock.On("PWLoopLeave", loop)}
469+}
470+
471+func (_c *MockVideoAPI_PWLoopLeave_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopLeave_Call {
472+ _c.Call.Run(func(args mock.Arguments) {
473+ var arg0 unsafe.Pointer
474+ if args[0] != nil {
475+ arg0 = args[0].(unsafe.Pointer)
476+ }
477+ run(
478+ arg0,
479+ )
480+ })
481+ return _c
482+}
483+
484+func (_c *MockVideoAPI_PWLoopLeave_Call) Return() *MockVideoAPI_PWLoopLeave_Call {
485+ _c.Call.Return()
486+ return _c
487+}
488+
489+func (_c *MockVideoAPI_PWLoopLeave_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopLeave_Call {
490+ _c.Run(run)
491+ return _c
492+}
493+
494+// PWLoopNew provides a mock function for the type MockVideoAPI
495+func (_mock *MockVideoAPI) PWLoopNew(props unsafe.Pointer) unsafe.Pointer {
496+ ret := _mock.Called(props)
497+
498+ if len(ret) == 0 {
499+ panic("no return value specified for PWLoopNew")
500+ }
501+
502+ var r0 unsafe.Pointer
503+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) unsafe.Pointer); ok {
504+ r0 = returnFunc(props)
505+ } else {
506+ r0 = ret.Get(0).(unsafe.Pointer)
507+ }
508+ return r0
509+}
510+
511+// MockVideoAPI_PWLoopNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopNew'
512+type MockVideoAPI_PWLoopNew_Call struct {
513+ *mock.Call
514+}
515+
516+// PWLoopNew is a helper method to define mock.On call
517+// - props unsafe.Pointer
518+func (_e *MockVideoAPI_Expecter) PWLoopNew(props any) *MockVideoAPI_PWLoopNew_Call {
519+ return &MockVideoAPI_PWLoopNew_Call{Call: _e.mock.On("PWLoopNew", props)}
520+}
521+
522+func (_c *MockVideoAPI_PWLoopNew_Call) Run(run func(props unsafe.Pointer)) *MockVideoAPI_PWLoopNew_Call {
523+ _c.Call.Run(func(args mock.Arguments) {
524+ var arg0 unsafe.Pointer
525+ if args[0] != nil {
526+ arg0 = args[0].(unsafe.Pointer)
527+ }
528+ run(
529+ arg0,
530+ )
531+ })
532+ return _c
533+}
534+
535+func (_c *MockVideoAPI_PWLoopNew_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWLoopNew_Call {
536+ _c.Call.Return(v)
537+ return _c
538+}
539+
540+func (_c *MockVideoAPI_PWLoopNew_Call) RunAndReturn(run func(props unsafe.Pointer) unsafe.Pointer) *MockVideoAPI_PWLoopNew_Call {
541+ _c.Call.Return(run)
542+ return _c
543+}
544+
545+// PWPropertiesNewString provides a mock function for the type MockVideoAPI
546+func (_mock *MockVideoAPI) PWPropertiesNewString(args *byte) unsafe.Pointer {
547+ ret := _mock.Called(args)
548+
549+ if len(ret) == 0 {
550+ panic("no return value specified for PWPropertiesNewString")
551+ }
552+
553+ var r0 unsafe.Pointer
554+ if returnFunc, ok := ret.Get(0).(func(*byte) unsafe.Pointer); ok {
555+ r0 = returnFunc(args)
556+ } else {
557+ r0 = ret.Get(0).(unsafe.Pointer)
558+ }
559+ return r0
560+}
561+
562+// MockVideoAPI_PWPropertiesNewString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWPropertiesNewString'
563+type MockVideoAPI_PWPropertiesNewString_Call struct {
564+ *mock.Call
565+}
566+
567+// PWPropertiesNewString is a helper method to define mock.On call
568+// - args *byte
569+func (_e *MockVideoAPI_Expecter) PWPropertiesNewString(args any) *MockVideoAPI_PWPropertiesNewString_Call {
570+ return &MockVideoAPI_PWPropertiesNewString_Call{Call: _e.mock.On("PWPropertiesNewString", args)}
571+}
572+
573+func (_c *MockVideoAPI_PWPropertiesNewString_Call) Run(run func(args *byte)) *MockVideoAPI_PWPropertiesNewString_Call {
574+ _c.Call.Run(func(args mock.Arguments) {
575+ var arg0 *byte
576+ if args[0] != nil {
577+ arg0 = args[0].(*byte)
578+ }
579+ run(
580+ arg0,
581+ )
582+ })
583+ return _c
584+}
585+
586+func (_c *MockVideoAPI_PWPropertiesNewString_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWPropertiesNewString_Call {
587+ _c.Call.Return(v)
588+ return _c
589+}
590+
591+func (_c *MockVideoAPI_PWPropertiesNewString_Call) RunAndReturn(run func(args *byte) unsafe.Pointer) *MockVideoAPI_PWPropertiesNewString_Call {
592+ _c.Call.Return(run)
593+ return _c
594+}
595+
596+// PWStreamGetNodeId provides a mock function for the type MockVideoAPI
597+func (_mock *MockVideoAPI) PWStreamGetNodeId(stream unsafe.Pointer) uint32 {
598+ ret := _mock.Called(stream)
599+
600+ if len(ret) == 0 {
601+ panic("no return value specified for PWStreamGetNodeId")
602+ }
603+
604+ var r0 uint32
605+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) uint32); ok {
606+ r0 = returnFunc(stream)
607+ } else {
608+ r0 = ret.Get(0).(uint32)
609+ }
610+ return r0
611+}
612+
613+// MockVideoAPI_PWStreamGetNodeId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamGetNodeId'
614+type MockVideoAPI_PWStreamGetNodeId_Call struct {
615+ *mock.Call
616+}
617+
618+// PWStreamGetNodeId is a helper method to define mock.On call
619+// - stream unsafe.Pointer
620+func (_e *MockVideoAPI_Expecter) PWStreamGetNodeId(stream any) *MockVideoAPI_PWStreamGetNodeId_Call {
621+ return &MockVideoAPI_PWStreamGetNodeId_Call{Call: _e.mock.On("PWStreamGetNodeId", stream)}
622+}
623+
624+func (_c *MockVideoAPI_PWStreamGetNodeId_Call) Run(run func(stream unsafe.Pointer)) *MockVideoAPI_PWStreamGetNodeId_Call {
625+ _c.Call.Run(func(args mock.Arguments) {
626+ var arg0 unsafe.Pointer
627+ if args[0] != nil {
628+ arg0 = args[0].(unsafe.Pointer)
629+ }
630+ run(
631+ arg0,
632+ )
633+ })
634+ return _c
635+}
636+
637+func (_c *MockVideoAPI_PWStreamGetNodeId_Call) Return(v uint32) *MockVideoAPI_PWStreamGetNodeId_Call {
638+ _c.Call.Return(v)
639+ return _c
640+}
641+
642+func (_c *MockVideoAPI_PWStreamGetNodeId_Call) RunAndReturn(run func(stream unsafe.Pointer) uint32) *MockVideoAPI_PWStreamGetNodeId_Call {
643+ _c.Call.Return(run)
644+ return _c
645+}
646+
647+// PWStreamIsDriving provides a mock function for the type MockVideoAPI
648+func (_mock *MockVideoAPI) PWStreamIsDriving(stream unsafe.Pointer) bool {
649+ ret := _mock.Called(stream)
650+
651+ if len(ret) == 0 {
652+ panic("no return value specified for PWStreamIsDriving")
653+ }
654+
655+ var r0 bool
656+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) bool); ok {
657+ r0 = returnFunc(stream)
658+ } else {
659+ r0 = ret.Get(0).(bool)
660+ }
661+ return r0
662+}
663+
664+// MockVideoAPI_PWStreamIsDriving_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamIsDriving'
665+type MockVideoAPI_PWStreamIsDriving_Call struct {
666+ *mock.Call
667+}
668+
669+// PWStreamIsDriving is a helper method to define mock.On call
670+// - stream unsafe.Pointer
671+func (_e *MockVideoAPI_Expecter) PWStreamIsDriving(stream any) *MockVideoAPI_PWStreamIsDriving_Call {
672+ return &MockVideoAPI_PWStreamIsDriving_Call{Call: _e.mock.On("PWStreamIsDriving", stream)}
673+}
674+
675+func (_c *MockVideoAPI_PWStreamIsDriving_Call) Run(run func(stream unsafe.Pointer)) *MockVideoAPI_PWStreamIsDriving_Call {
676+ _c.Call.Run(func(args mock.Arguments) {
677+ var arg0 unsafe.Pointer
678+ if args[0] != nil {
679+ arg0 = args[0].(unsafe.Pointer)
680+ }
681+ run(
682+ arg0,
683+ )
684+ })
685+ return _c
686+}
687+
688+func (_c *MockVideoAPI_PWStreamIsDriving_Call) Return(b bool) *MockVideoAPI_PWStreamIsDriving_Call {
689+ _c.Call.Return(b)
690+ return _c
691+}
692+
693+func (_c *MockVideoAPI_PWStreamIsDriving_Call) RunAndReturn(run func(stream unsafe.Pointer) bool) *MockVideoAPI_PWStreamIsDriving_Call {
694+ _c.Call.Return(run)
695+ return _c
696+}
697+
698+// PWStreamNew provides a mock function for the type MockVideoAPI
699+func (_mock *MockVideoAPI) PWStreamNew(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer {
700+ ret := _mock.Called(core, name, props)
701+
702+ if len(ret) == 0 {
703+ panic("no return value specified for PWStreamNew")
704+ }
705+
706+ var r0 unsafe.Pointer
707+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, *byte, unsafe.Pointer) unsafe.Pointer); ok {
708+ r0 = returnFunc(core, name, props)
709+ } else {
710+ r0 = ret.Get(0).(unsafe.Pointer)
711+ }
712+ return r0
713+}
714+
715+// MockVideoAPI_PWStreamNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamNew'
716+type MockVideoAPI_PWStreamNew_Call struct {
717+ *mock.Call
718+}
719+
720+// PWStreamNew is a helper method to define mock.On call
721+// - core unsafe.Pointer
722+// - name *byte
723+// - props unsafe.Pointer
724+func (_e *MockVideoAPI_Expecter) PWStreamNew(core any, name any, props any) *MockVideoAPI_PWStreamNew_Call {
725+ return &MockVideoAPI_PWStreamNew_Call{Call: _e.mock.On("PWStreamNew", core, name, props)}
726+}
727+
728+func (_c *MockVideoAPI_PWStreamNew_Call) Run(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer)) *MockVideoAPI_PWStreamNew_Call {
729+ _c.Call.Run(func(args mock.Arguments) {
730+ var arg0 unsafe.Pointer
731+ if args[0] != nil {
732+ arg0 = args[0].(unsafe.Pointer)
733+ }
734+ var arg1 *byte
735+ if args[1] != nil {
736+ arg1 = args[1].(*byte)
737+ }
738+ var arg2 unsafe.Pointer
739+ if args[2] != nil {
740+ arg2 = args[2].(unsafe.Pointer)
741+ }
742+ run(
743+ arg0,
744+ arg1,
745+ arg2,
746+ )
747+ })
748+ return _c
749+}
750+
751+func (_c *MockVideoAPI_PWStreamNew_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWStreamNew_Call {
752+ _c.Call.Return(v)
753+ return _c
754+}
755+
756+func (_c *MockVideoAPI_PWStreamNew_Call) RunAndReturn(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer) *MockVideoAPI_PWStreamNew_Call {
757+ _c.Call.Return(run)
758+ return _c
759+}
760+
761+// PWStreamReturnBuffer provides a mock function for the type MockVideoAPI
762+func (_mock *MockVideoAPI) PWStreamReturnBuffer(stream unsafe.Pointer, buffer unsafe.Pointer) int32 {
763+ ret := _mock.Called(stream, buffer)
764+
765+ if len(ret) == 0 {
766+ panic("no return value specified for PWStreamReturnBuffer")
767+ }
768+
769+ var r0 int32
770+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer) int32); ok {
771+ r0 = returnFunc(stream, buffer)
772+ } else {
773+ r0 = ret.Get(0).(int32)
774+ }
775+ return r0
776+}
777+
778+// MockVideoAPI_PWStreamReturnBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamReturnBuffer'
779+type MockVideoAPI_PWStreamReturnBuffer_Call struct {
780+ *mock.Call
781+}
782+
783+// PWStreamReturnBuffer is a helper method to define mock.On call
784+// - stream unsafe.Pointer
785+// - buffer unsafe.Pointer
786+func (_e *MockVideoAPI_Expecter) PWStreamReturnBuffer(stream any, buffer any) *MockVideoAPI_PWStreamReturnBuffer_Call {
787+ return &MockVideoAPI_PWStreamReturnBuffer_Call{Call: _e.mock.On("PWStreamReturnBuffer", stream, buffer)}
788+}
789+
790+func (_c *MockVideoAPI_PWStreamReturnBuffer_Call) Run(run func(stream unsafe.Pointer, buffer unsafe.Pointer)) *MockVideoAPI_PWStreamReturnBuffer_Call {
791+ _c.Call.Run(func(args mock.Arguments) {
792+ var arg0 unsafe.Pointer
793+ if args[0] != nil {
794+ arg0 = args[0].(unsafe.Pointer)
795+ }
796+ var arg1 unsafe.Pointer
797+ if args[1] != nil {
798+ arg1 = args[1].(unsafe.Pointer)
799+ }
800+ run(
801+ arg0,
802+ arg1,
803+ )
804+ })
805+ return _c
806+}
807+
808+func (_c *MockVideoAPI_PWStreamReturnBuffer_Call) Return(n int32) *MockVideoAPI_PWStreamReturnBuffer_Call {
809+ _c.Call.Return(n)
810+ return _c
811+}
812+
813+func (_c *MockVideoAPI_PWStreamReturnBuffer_Call) RunAndReturn(run func(stream unsafe.Pointer, buffer unsafe.Pointer) int32) *MockVideoAPI_PWStreamReturnBuffer_Call {
814+ _c.Call.Return(run)
815+ return _c
816+}
817+
818+// PWStreamTriggerProcess provides a mock function for the type MockVideoAPI
819+func (_mock *MockVideoAPI) PWStreamTriggerProcess(stream unsafe.Pointer) int32 {
820+ ret := _mock.Called(stream)
821+
822+ if len(ret) == 0 {
823+ panic("no return value specified for PWStreamTriggerProcess")
824+ }
825+
826+ var r0 int32
827+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
828+ r0 = returnFunc(stream)
829+ } else {
830+ r0 = ret.Get(0).(int32)
831+ }
832+ return r0
833+}
834+
835+// MockVideoAPI_PWStreamTriggerProcess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamTriggerProcess'
836+type MockVideoAPI_PWStreamTriggerProcess_Call struct {
837+ *mock.Call
838+}
839+
840+// PWStreamTriggerProcess is a helper method to define mock.On call
841+// - stream unsafe.Pointer
842+func (_e *MockVideoAPI_Expecter) PWStreamTriggerProcess(stream any) *MockVideoAPI_PWStreamTriggerProcess_Call {
843+ return &MockVideoAPI_PWStreamTriggerProcess_Call{Call: _e.mock.On("PWStreamTriggerProcess", stream)}
844+}
845+
846+func (_c *MockVideoAPI_PWStreamTriggerProcess_Call) Run(run func(stream unsafe.Pointer)) *MockVideoAPI_PWStreamTriggerProcess_Call {
847+ _c.Call.Run(func(args mock.Arguments) {
848+ var arg0 unsafe.Pointer
849+ if args[0] != nil {
850+ arg0 = args[0].(unsafe.Pointer)
851+ }
852+ run(
853+ arg0,
854+ )
855+ })
856+ return _c
857+}
858+
859+func (_c *MockVideoAPI_PWStreamTriggerProcess_Call) Return(n int32) *MockVideoAPI_PWStreamTriggerProcess_Call {
860+ _c.Call.Return(n)
861+ return _c
862+}
863+
864+func (_c *MockVideoAPI_PWStreamTriggerProcess_Call) RunAndReturn(run func(stream unsafe.Pointer) int32) *MockVideoAPI_PWStreamTriggerProcess_Call {
865+ _c.Call.Return(run)
866+ return _c
867+}
868+
869+// PWStreamUpdateParams provides a mock function for the type MockVideoAPI
870+func (_mock *MockVideoAPI) PWStreamUpdateParams(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32 {
871+ ret := _mock.Called(stream, params, n_params)
872+
873+ if len(ret) == 0 {
874+ panic("no return value specified for PWStreamUpdateParams")
875+ }
876+
877+ var r0 int32
878+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uint32) int32); ok {
879+ r0 = returnFunc(stream, params, n_params)
880+ } else {
881+ r0 = ret.Get(0).(int32)
882+ }
883+ return r0
884+}
885+
886+// MockVideoAPI_PWStreamUpdateParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamUpdateParams'
887+type MockVideoAPI_PWStreamUpdateParams_Call struct {
888+ *mock.Call
889+}
890+
891+// PWStreamUpdateParams is a helper method to define mock.On call
892+// - stream unsafe.Pointer
893+// - params unsafe.Pointer
894+// - n_params uint32
895+func (_e *MockVideoAPI_Expecter) PWStreamUpdateParams(stream any, params any, n_params any) *MockVideoAPI_PWStreamUpdateParams_Call {
896+ return &MockVideoAPI_PWStreamUpdateParams_Call{Call: _e.mock.On("PWStreamUpdateParams", stream, params, n_params)}
897+}
898+
899+func (_c *MockVideoAPI_PWStreamUpdateParams_Call) Run(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32)) *MockVideoAPI_PWStreamUpdateParams_Call {
900+ _c.Call.Run(func(args mock.Arguments) {
901+ var arg0 unsafe.Pointer
902+ if args[0] != nil {
903+ arg0 = args[0].(unsafe.Pointer)
904+ }
905+ var arg1 unsafe.Pointer
906+ if args[1] != nil {
907+ arg1 = args[1].(unsafe.Pointer)
908+ }
909+ var arg2 uint32
910+ if args[2] != nil {
911+ arg2 = args[2].(uint32)
912+ }
913+ run(
914+ arg0,
915+ arg1,
916+ arg2,
917+ )
918+ })
919+ return _c
920+}
921+
922+func (_c *MockVideoAPI_PWStreamUpdateParams_Call) Return(n int32) *MockVideoAPI_PWStreamUpdateParams_Call {
923+ _c.Call.Return(n)
924+ return _c
925+}
926+
927+func (_c *MockVideoAPI_PWStreamUpdateParams_Call) RunAndReturn(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32) *MockVideoAPI_PWStreamUpdateParams_Call {
928+ _c.Call.Return(run)
929+ return _c
930+}
@@ -0,0 +1,930 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "unsafe"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockVideoAPI creates a new instance of MockVideoAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockVideoAPI(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockVideoAPI {
19+ if helper, ok := t.(interface{ Helper() }); ok {
20+ helper.Helper()
21+ }
22+
23+ mock := &MockVideoAPI{}
24+ mock.Mock.Test(t)
25+
26+ t.Cleanup(func() {
27+ if helper, ok := t.(interface{ Helper() }); ok {
28+ helper.Helper()
29+ }
30+ mock.AssertExpectations(t)
31+ })
32+
33+ return mock
34+}
35+
36+// MockVideoAPI is an autogenerated mock type for the VideoAPI type
37+type MockVideoAPI struct {
38+ mock.Mock
39+}
40+
41+type MockVideoAPI_Expecter struct {
42+ mock *mock.Mock
43+}
44+
45+func (_m *MockVideoAPI) EXPECT() *MockVideoAPI_Expecter {
46+ return &MockVideoAPI_Expecter{mock: &_m.Mock}
47+}
48+
49+// PWContextConnect provides a mock function for the type MockVideoAPI
50+func (_mock *MockVideoAPI) PWContextConnect(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
51+ ret := _mock.Called(context, props, user_data_size)
52+
53+ if len(ret) == 0 {
54+ panic("no return value specified for PWContextConnect")
55+ }
56+
57+ var r0 unsafe.Pointer
58+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
59+ r0 = returnFunc(context, props, user_data_size)
60+ } else {
61+ r0 = ret.Get(0).(unsafe.Pointer)
62+ }
63+ return r0
64+}
65+
66+// MockVideoAPI_PWContextConnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextConnect'
67+type MockVideoAPI_PWContextConnect_Call struct {
68+ *mock.Call
69+}
70+
71+// PWContextConnect is a helper method to define mock.On call
72+// - context unsafe.Pointer
73+// - props unsafe.Pointer
74+// - user_data_size uintptr
75+func (_e *MockVideoAPI_Expecter) PWContextConnect(context any, props any, user_data_size any) *MockVideoAPI_PWContextConnect_Call {
76+ return &MockVideoAPI_PWContextConnect_Call{Call: _e.mock.On("PWContextConnect", context, props, user_data_size)}
77+}
78+
79+func (_c *MockVideoAPI_PWContextConnect_Call) Run(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockVideoAPI_PWContextConnect_Call {
80+ _c.Call.Run(func(args mock.Arguments) {
81+ var arg0 unsafe.Pointer
82+ if args[0] != nil {
83+ arg0 = args[0].(unsafe.Pointer)
84+ }
85+ var arg1 unsafe.Pointer
86+ if args[1] != nil {
87+ arg1 = args[1].(unsafe.Pointer)
88+ }
89+ var arg2 uintptr
90+ if args[2] != nil {
91+ arg2 = args[2].(uintptr)
92+ }
93+ run(
94+ arg0,
95+ arg1,
96+ arg2,
97+ )
98+ })
99+ return _c
100+}
101+
102+func (_c *MockVideoAPI_PWContextConnect_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWContextConnect_Call {
103+ _c.Call.Return(v)
104+ return _c
105+}
106+
107+func (_c *MockVideoAPI_PWContextConnect_Call) RunAndReturn(run func(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockVideoAPI_PWContextConnect_Call {
108+ _c.Call.Return(run)
109+ return _c
110+}
111+
112+// PWContextDestroy provides a mock function for the type MockVideoAPI
113+func (_mock *MockVideoAPI) PWContextDestroy(context unsafe.Pointer) {
114+ _mock.Called(context)
115+ return
116+}
117+
118+// MockVideoAPI_PWContextDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextDestroy'
119+type MockVideoAPI_PWContextDestroy_Call struct {
120+ *mock.Call
121+}
122+
123+// PWContextDestroy is a helper method to define mock.On call
124+// - context unsafe.Pointer
125+func (_e *MockVideoAPI_Expecter) PWContextDestroy(context any) *MockVideoAPI_PWContextDestroy_Call {
126+ return &MockVideoAPI_PWContextDestroy_Call{Call: _e.mock.On("PWContextDestroy", context)}
127+}
128+
129+func (_c *MockVideoAPI_PWContextDestroy_Call) Run(run func(context unsafe.Pointer)) *MockVideoAPI_PWContextDestroy_Call {
130+ _c.Call.Run(func(args mock.Arguments) {
131+ var arg0 unsafe.Pointer
132+ if args[0] != nil {
133+ arg0 = args[0].(unsafe.Pointer)
134+ }
135+ run(
136+ arg0,
137+ )
138+ })
139+ return _c
140+}
141+
142+func (_c *MockVideoAPI_PWContextDestroy_Call) Return() *MockVideoAPI_PWContextDestroy_Call {
143+ _c.Call.Return()
144+ return _c
145+}
146+
147+func (_c *MockVideoAPI_PWContextDestroy_Call) RunAndReturn(run func(context unsafe.Pointer)) *MockVideoAPI_PWContextDestroy_Call {
148+ _c.Run(run)
149+ return _c
150+}
151+
152+// PWContextNew provides a mock function for the type MockVideoAPI
153+func (_mock *MockVideoAPI) PWContextNew(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
154+ ret := _mock.Called(loop, props, user_data_size)
155+
156+ if len(ret) == 0 {
157+ panic("no return value specified for PWContextNew")
158+ }
159+
160+ var r0 unsafe.Pointer
161+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uintptr) unsafe.Pointer); ok {
162+ r0 = returnFunc(loop, props, user_data_size)
163+ } else {
164+ r0 = ret.Get(0).(unsafe.Pointer)
165+ }
166+ return r0
167+}
168+
169+// MockVideoAPI_PWContextNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWContextNew'
170+type MockVideoAPI_PWContextNew_Call struct {
171+ *mock.Call
172+}
173+
174+// PWContextNew is a helper method to define mock.On call
175+// - loop unsafe.Pointer
176+// - props unsafe.Pointer
177+// - user_data_size uintptr
178+func (_e *MockVideoAPI_Expecter) PWContextNew(loop any, props any, user_data_size any) *MockVideoAPI_PWContextNew_Call {
179+ return &MockVideoAPI_PWContextNew_Call{Call: _e.mock.On("PWContextNew", loop, props, user_data_size)}
180+}
181+
182+func (_c *MockVideoAPI_PWContextNew_Call) Run(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr)) *MockVideoAPI_PWContextNew_Call {
183+ _c.Call.Run(func(args mock.Arguments) {
184+ var arg0 unsafe.Pointer
185+ if args[0] != nil {
186+ arg0 = args[0].(unsafe.Pointer)
187+ }
188+ var arg1 unsafe.Pointer
189+ if args[1] != nil {
190+ arg1 = args[1].(unsafe.Pointer)
191+ }
192+ var arg2 uintptr
193+ if args[2] != nil {
194+ arg2 = args[2].(uintptr)
195+ }
196+ run(
197+ arg0,
198+ arg1,
199+ arg2,
200+ )
201+ })
202+ return _c
203+}
204+
205+func (_c *MockVideoAPI_PWContextNew_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWContextNew_Call {
206+ _c.Call.Return(v)
207+ return _c
208+}
209+
210+func (_c *MockVideoAPI_PWContextNew_Call) RunAndReturn(run func(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer) *MockVideoAPI_PWContextNew_Call {
211+ _c.Call.Return(run)
212+ return _c
213+}
214+
215+// PWCoreDisconnect provides a mock function for the type MockVideoAPI
216+func (_mock *MockVideoAPI) PWCoreDisconnect(core unsafe.Pointer) int32 {
217+ ret := _mock.Called(core)
218+
219+ if len(ret) == 0 {
220+ panic("no return value specified for PWCoreDisconnect")
221+ }
222+
223+ var r0 int32
224+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
225+ r0 = returnFunc(core)
226+ } else {
227+ r0 = ret.Get(0).(int32)
228+ }
229+ return r0
230+}
231+
232+// MockVideoAPI_PWCoreDisconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWCoreDisconnect'
233+type MockVideoAPI_PWCoreDisconnect_Call struct {
234+ *mock.Call
235+}
236+
237+// PWCoreDisconnect is a helper method to define mock.On call
238+// - core unsafe.Pointer
239+func (_e *MockVideoAPI_Expecter) PWCoreDisconnect(core any) *MockVideoAPI_PWCoreDisconnect_Call {
240+ return &MockVideoAPI_PWCoreDisconnect_Call{Call: _e.mock.On("PWCoreDisconnect", core)}
241+}
242+
243+func (_c *MockVideoAPI_PWCoreDisconnect_Call) Run(run func(core unsafe.Pointer)) *MockVideoAPI_PWCoreDisconnect_Call {
244+ _c.Call.Run(func(args mock.Arguments) {
245+ var arg0 unsafe.Pointer
246+ if args[0] != nil {
247+ arg0 = args[0].(unsafe.Pointer)
248+ }
249+ run(
250+ arg0,
251+ )
252+ })
253+ return _c
254+}
255+
256+func (_c *MockVideoAPI_PWCoreDisconnect_Call) Return(n int32) *MockVideoAPI_PWCoreDisconnect_Call {
257+ _c.Call.Return(n)
258+ return _c
259+}
260+
261+func (_c *MockVideoAPI_PWCoreDisconnect_Call) RunAndReturn(run func(core unsafe.Pointer) int32) *MockVideoAPI_PWCoreDisconnect_Call {
262+ _c.Call.Return(run)
263+ return _c
264+}
265+
266+// PWLoopDestroy provides a mock function for the type MockVideoAPI
267+func (_mock *MockVideoAPI) PWLoopDestroy(loop unsafe.Pointer) {
268+ _mock.Called(loop)
269+ return
270+}
271+
272+// MockVideoAPI_PWLoopDestroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopDestroy'
273+type MockVideoAPI_PWLoopDestroy_Call struct {
274+ *mock.Call
275+}
276+
277+// PWLoopDestroy is a helper method to define mock.On call
278+// - loop unsafe.Pointer
279+func (_e *MockVideoAPI_Expecter) PWLoopDestroy(loop any) *MockVideoAPI_PWLoopDestroy_Call {
280+ return &MockVideoAPI_PWLoopDestroy_Call{Call: _e.mock.On("PWLoopDestroy", loop)}
281+}
282+
283+func (_c *MockVideoAPI_PWLoopDestroy_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopDestroy_Call {
284+ _c.Call.Run(func(args mock.Arguments) {
285+ var arg0 unsafe.Pointer
286+ if args[0] != nil {
287+ arg0 = args[0].(unsafe.Pointer)
288+ }
289+ run(
290+ arg0,
291+ )
292+ })
293+ return _c
294+}
295+
296+func (_c *MockVideoAPI_PWLoopDestroy_Call) Return() *MockVideoAPI_PWLoopDestroy_Call {
297+ _c.Call.Return()
298+ return _c
299+}
300+
301+func (_c *MockVideoAPI_PWLoopDestroy_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopDestroy_Call {
302+ _c.Run(run)
303+ return _c
304+}
305+
306+// PWLoopEnter provides a mock function for the type MockVideoAPI
307+func (_mock *MockVideoAPI) PWLoopEnter(loop unsafe.Pointer) {
308+ _mock.Called(loop)
309+ return
310+}
311+
312+// MockVideoAPI_PWLoopEnter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopEnter'
313+type MockVideoAPI_PWLoopEnter_Call struct {
314+ *mock.Call
315+}
316+
317+// PWLoopEnter is a helper method to define mock.On call
318+// - loop unsafe.Pointer
319+func (_e *MockVideoAPI_Expecter) PWLoopEnter(loop any) *MockVideoAPI_PWLoopEnter_Call {
320+ return &MockVideoAPI_PWLoopEnter_Call{Call: _e.mock.On("PWLoopEnter", loop)}
321+}
322+
323+func (_c *MockVideoAPI_PWLoopEnter_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopEnter_Call {
324+ _c.Call.Run(func(args mock.Arguments) {
325+ var arg0 unsafe.Pointer
326+ if args[0] != nil {
327+ arg0 = args[0].(unsafe.Pointer)
328+ }
329+ run(
330+ arg0,
331+ )
332+ })
333+ return _c
334+}
335+
336+func (_c *MockVideoAPI_PWLoopEnter_Call) Return() *MockVideoAPI_PWLoopEnter_Call {
337+ _c.Call.Return()
338+ return _c
339+}
340+
341+func (_c *MockVideoAPI_PWLoopEnter_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopEnter_Call {
342+ _c.Run(run)
343+ return _c
344+}
345+
346+// PWLoopGetFd provides a mock function for the type MockVideoAPI
347+func (_mock *MockVideoAPI) PWLoopGetFd(loop unsafe.Pointer) int32 {
348+ ret := _mock.Called(loop)
349+
350+ if len(ret) == 0 {
351+ panic("no return value specified for PWLoopGetFd")
352+ }
353+
354+ var r0 int32
355+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
356+ r0 = returnFunc(loop)
357+ } else {
358+ r0 = ret.Get(0).(int32)
359+ }
360+ return r0
361+}
362+
363+// MockVideoAPI_PWLoopGetFd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopGetFd'
364+type MockVideoAPI_PWLoopGetFd_Call struct {
365+ *mock.Call
366+}
367+
368+// PWLoopGetFd is a helper method to define mock.On call
369+// - loop unsafe.Pointer
370+func (_e *MockVideoAPI_Expecter) PWLoopGetFd(loop any) *MockVideoAPI_PWLoopGetFd_Call {
371+ return &MockVideoAPI_PWLoopGetFd_Call{Call: _e.mock.On("PWLoopGetFd", loop)}
372+}
373+
374+func (_c *MockVideoAPI_PWLoopGetFd_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopGetFd_Call {
375+ _c.Call.Run(func(args mock.Arguments) {
376+ var arg0 unsafe.Pointer
377+ if args[0] != nil {
378+ arg0 = args[0].(unsafe.Pointer)
379+ }
380+ run(
381+ arg0,
382+ )
383+ })
384+ return _c
385+}
386+
387+func (_c *MockVideoAPI_PWLoopGetFd_Call) Return(n int32) *MockVideoAPI_PWLoopGetFd_Call {
388+ _c.Call.Return(n)
389+ return _c
390+}
391+
392+func (_c *MockVideoAPI_PWLoopGetFd_Call) RunAndReturn(run func(loop unsafe.Pointer) int32) *MockVideoAPI_PWLoopGetFd_Call {
393+ _c.Call.Return(run)
394+ return _c
395+}
396+
397+// PWLoopIterate provides a mock function for the type MockVideoAPI
398+func (_mock *MockVideoAPI) PWLoopIterate(loop unsafe.Pointer, timeout int32) int32 {
399+ ret := _mock.Called(loop, timeout)
400+
401+ if len(ret) == 0 {
402+ panic("no return value specified for PWLoopIterate")
403+ }
404+
405+ var r0 int32
406+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, int32) int32); ok {
407+ r0 = returnFunc(loop, timeout)
408+ } else {
409+ r0 = ret.Get(0).(int32)
410+ }
411+ return r0
412+}
413+
414+// MockVideoAPI_PWLoopIterate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopIterate'
415+type MockVideoAPI_PWLoopIterate_Call struct {
416+ *mock.Call
417+}
418+
419+// PWLoopIterate is a helper method to define mock.On call
420+// - loop unsafe.Pointer
421+// - timeout int32
422+func (_e *MockVideoAPI_Expecter) PWLoopIterate(loop any, timeout any) *MockVideoAPI_PWLoopIterate_Call {
423+ return &MockVideoAPI_PWLoopIterate_Call{Call: _e.mock.On("PWLoopIterate", loop, timeout)}
424+}
425+
426+func (_c *MockVideoAPI_PWLoopIterate_Call) Run(run func(loop unsafe.Pointer, timeout int32)) *MockVideoAPI_PWLoopIterate_Call {
427+ _c.Call.Run(func(args mock.Arguments) {
428+ var arg0 unsafe.Pointer
429+ if args[0] != nil {
430+ arg0 = args[0].(unsafe.Pointer)
431+ }
432+ var arg1 int32
433+ if args[1] != nil {
434+ arg1 = args[1].(int32)
435+ }
436+ run(
437+ arg0,
438+ arg1,
439+ )
440+ })
441+ return _c
442+}
443+
444+func (_c *MockVideoAPI_PWLoopIterate_Call) Return(n int32) *MockVideoAPI_PWLoopIterate_Call {
445+ _c.Call.Return(n)
446+ return _c
447+}
448+
449+func (_c *MockVideoAPI_PWLoopIterate_Call) RunAndReturn(run func(loop unsafe.Pointer, timeout int32) int32) *MockVideoAPI_PWLoopIterate_Call {
450+ _c.Call.Return(run)
451+ return _c
452+}
453+
454+// PWLoopLeave provides a mock function for the type MockVideoAPI
455+func (_mock *MockVideoAPI) PWLoopLeave(loop unsafe.Pointer) {
456+ _mock.Called(loop)
457+ return
458+}
459+
460+// MockVideoAPI_PWLoopLeave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopLeave'
461+type MockVideoAPI_PWLoopLeave_Call struct {
462+ *mock.Call
463+}
464+
465+// PWLoopLeave is a helper method to define mock.On call
466+// - loop unsafe.Pointer
467+func (_e *MockVideoAPI_Expecter) PWLoopLeave(loop any) *MockVideoAPI_PWLoopLeave_Call {
468+ return &MockVideoAPI_PWLoopLeave_Call{Call: _e.mock.On("PWLoopLeave", loop)}
469+}
470+
471+func (_c *MockVideoAPI_PWLoopLeave_Call) Run(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopLeave_Call {
472+ _c.Call.Run(func(args mock.Arguments) {
473+ var arg0 unsafe.Pointer
474+ if args[0] != nil {
475+ arg0 = args[0].(unsafe.Pointer)
476+ }
477+ run(
478+ arg0,
479+ )
480+ })
481+ return _c
482+}
483+
484+func (_c *MockVideoAPI_PWLoopLeave_Call) Return() *MockVideoAPI_PWLoopLeave_Call {
485+ _c.Call.Return()
486+ return _c
487+}
488+
489+func (_c *MockVideoAPI_PWLoopLeave_Call) RunAndReturn(run func(loop unsafe.Pointer)) *MockVideoAPI_PWLoopLeave_Call {
490+ _c.Run(run)
491+ return _c
492+}
493+
494+// PWLoopNew provides a mock function for the type MockVideoAPI
495+func (_mock *MockVideoAPI) PWLoopNew(props unsafe.Pointer) unsafe.Pointer {
496+ ret := _mock.Called(props)
497+
498+ if len(ret) == 0 {
499+ panic("no return value specified for PWLoopNew")
500+ }
501+
502+ var r0 unsafe.Pointer
503+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) unsafe.Pointer); ok {
504+ r0 = returnFunc(props)
505+ } else {
506+ r0 = ret.Get(0).(unsafe.Pointer)
507+ }
508+ return r0
509+}
510+
511+// MockVideoAPI_PWLoopNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWLoopNew'
512+type MockVideoAPI_PWLoopNew_Call struct {
513+ *mock.Call
514+}
515+
516+// PWLoopNew is a helper method to define mock.On call
517+// - props unsafe.Pointer
518+func (_e *MockVideoAPI_Expecter) PWLoopNew(props any) *MockVideoAPI_PWLoopNew_Call {
519+ return &MockVideoAPI_PWLoopNew_Call{Call: _e.mock.On("PWLoopNew", props)}
520+}
521+
522+func (_c *MockVideoAPI_PWLoopNew_Call) Run(run func(props unsafe.Pointer)) *MockVideoAPI_PWLoopNew_Call {
523+ _c.Call.Run(func(args mock.Arguments) {
524+ var arg0 unsafe.Pointer
525+ if args[0] != nil {
526+ arg0 = args[0].(unsafe.Pointer)
527+ }
528+ run(
529+ arg0,
530+ )
531+ })
532+ return _c
533+}
534+
535+func (_c *MockVideoAPI_PWLoopNew_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWLoopNew_Call {
536+ _c.Call.Return(v)
537+ return _c
538+}
539+
540+func (_c *MockVideoAPI_PWLoopNew_Call) RunAndReturn(run func(props unsafe.Pointer) unsafe.Pointer) *MockVideoAPI_PWLoopNew_Call {
541+ _c.Call.Return(run)
542+ return _c
543+}
544+
545+// PWPropertiesNewString provides a mock function for the type MockVideoAPI
546+func (_mock *MockVideoAPI) PWPropertiesNewString(args *byte) unsafe.Pointer {
547+ ret := _mock.Called(args)
548+
549+ if len(ret) == 0 {
550+ panic("no return value specified for PWPropertiesNewString")
551+ }
552+
553+ var r0 unsafe.Pointer
554+ if returnFunc, ok := ret.Get(0).(func(*byte) unsafe.Pointer); ok {
555+ r0 = returnFunc(args)
556+ } else {
557+ r0 = ret.Get(0).(unsafe.Pointer)
558+ }
559+ return r0
560+}
561+
562+// MockVideoAPI_PWPropertiesNewString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWPropertiesNewString'
563+type MockVideoAPI_PWPropertiesNewString_Call struct {
564+ *mock.Call
565+}
566+
567+// PWPropertiesNewString is a helper method to define mock.On call
568+// - args *byte
569+func (_e *MockVideoAPI_Expecter) PWPropertiesNewString(args any) *MockVideoAPI_PWPropertiesNewString_Call {
570+ return &MockVideoAPI_PWPropertiesNewString_Call{Call: _e.mock.On("PWPropertiesNewString", args)}
571+}
572+
573+func (_c *MockVideoAPI_PWPropertiesNewString_Call) Run(run func(args *byte)) *MockVideoAPI_PWPropertiesNewString_Call {
574+ _c.Call.Run(func(args mock.Arguments) {
575+ var arg0 *byte
576+ if args[0] != nil {
577+ arg0 = args[0].(*byte)
578+ }
579+ run(
580+ arg0,
581+ )
582+ })
583+ return _c
584+}
585+
586+func (_c *MockVideoAPI_PWPropertiesNewString_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWPropertiesNewString_Call {
587+ _c.Call.Return(v)
588+ return _c
589+}
590+
591+func (_c *MockVideoAPI_PWPropertiesNewString_Call) RunAndReturn(run func(args *byte) unsafe.Pointer) *MockVideoAPI_PWPropertiesNewString_Call {
592+ _c.Call.Return(run)
593+ return _c
594+}
595+
596+// PWStreamGetNodeId provides a mock function for the type MockVideoAPI
597+func (_mock *MockVideoAPI) PWStreamGetNodeId(stream unsafe.Pointer) uint32 {
598+ ret := _mock.Called(stream)
599+
600+ if len(ret) == 0 {
601+ panic("no return value specified for PWStreamGetNodeId")
602+ }
603+
604+ var r0 uint32
605+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) uint32); ok {
606+ r0 = returnFunc(stream)
607+ } else {
608+ r0 = ret.Get(0).(uint32)
609+ }
610+ return r0
611+}
612+
613+// MockVideoAPI_PWStreamGetNodeId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamGetNodeId'
614+type MockVideoAPI_PWStreamGetNodeId_Call struct {
615+ *mock.Call
616+}
617+
618+// PWStreamGetNodeId is a helper method to define mock.On call
619+// - stream unsafe.Pointer
620+func (_e *MockVideoAPI_Expecter) PWStreamGetNodeId(stream any) *MockVideoAPI_PWStreamGetNodeId_Call {
621+ return &MockVideoAPI_PWStreamGetNodeId_Call{Call: _e.mock.On("PWStreamGetNodeId", stream)}
622+}
623+
624+func (_c *MockVideoAPI_PWStreamGetNodeId_Call) Run(run func(stream unsafe.Pointer)) *MockVideoAPI_PWStreamGetNodeId_Call {
625+ _c.Call.Run(func(args mock.Arguments) {
626+ var arg0 unsafe.Pointer
627+ if args[0] != nil {
628+ arg0 = args[0].(unsafe.Pointer)
629+ }
630+ run(
631+ arg0,
632+ )
633+ })
634+ return _c
635+}
636+
637+func (_c *MockVideoAPI_PWStreamGetNodeId_Call) Return(v uint32) *MockVideoAPI_PWStreamGetNodeId_Call {
638+ _c.Call.Return(v)
639+ return _c
640+}
641+
642+func (_c *MockVideoAPI_PWStreamGetNodeId_Call) RunAndReturn(run func(stream unsafe.Pointer) uint32) *MockVideoAPI_PWStreamGetNodeId_Call {
643+ _c.Call.Return(run)
644+ return _c
645+}
646+
647+// PWStreamIsDriving provides a mock function for the type MockVideoAPI
648+func (_mock *MockVideoAPI) PWStreamIsDriving(stream unsafe.Pointer) bool {
649+ ret := _mock.Called(stream)
650+
651+ if len(ret) == 0 {
652+ panic("no return value specified for PWStreamIsDriving")
653+ }
654+
655+ var r0 bool
656+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) bool); ok {
657+ r0 = returnFunc(stream)
658+ } else {
659+ r0 = ret.Get(0).(bool)
660+ }
661+ return r0
662+}
663+
664+// MockVideoAPI_PWStreamIsDriving_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamIsDriving'
665+type MockVideoAPI_PWStreamIsDriving_Call struct {
666+ *mock.Call
667+}
668+
669+// PWStreamIsDriving is a helper method to define mock.On call
670+// - stream unsafe.Pointer
671+func (_e *MockVideoAPI_Expecter) PWStreamIsDriving(stream any) *MockVideoAPI_PWStreamIsDriving_Call {
672+ return &MockVideoAPI_PWStreamIsDriving_Call{Call: _e.mock.On("PWStreamIsDriving", stream)}
673+}
674+
675+func (_c *MockVideoAPI_PWStreamIsDriving_Call) Run(run func(stream unsafe.Pointer)) *MockVideoAPI_PWStreamIsDriving_Call {
676+ _c.Call.Run(func(args mock.Arguments) {
677+ var arg0 unsafe.Pointer
678+ if args[0] != nil {
679+ arg0 = args[0].(unsafe.Pointer)
680+ }
681+ run(
682+ arg0,
683+ )
684+ })
685+ return _c
686+}
687+
688+func (_c *MockVideoAPI_PWStreamIsDriving_Call) Return(b bool) *MockVideoAPI_PWStreamIsDriving_Call {
689+ _c.Call.Return(b)
690+ return _c
691+}
692+
693+func (_c *MockVideoAPI_PWStreamIsDriving_Call) RunAndReturn(run func(stream unsafe.Pointer) bool) *MockVideoAPI_PWStreamIsDriving_Call {
694+ _c.Call.Return(run)
695+ return _c
696+}
697+
698+// PWStreamNew provides a mock function for the type MockVideoAPI
699+func (_mock *MockVideoAPI) PWStreamNew(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer {
700+ ret := _mock.Called(core, name, props)
701+
702+ if len(ret) == 0 {
703+ panic("no return value specified for PWStreamNew")
704+ }
705+
706+ var r0 unsafe.Pointer
707+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, *byte, unsafe.Pointer) unsafe.Pointer); ok {
708+ r0 = returnFunc(core, name, props)
709+ } else {
710+ r0 = ret.Get(0).(unsafe.Pointer)
711+ }
712+ return r0
713+}
714+
715+// MockVideoAPI_PWStreamNew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamNew'
716+type MockVideoAPI_PWStreamNew_Call struct {
717+ *mock.Call
718+}
719+
720+// PWStreamNew is a helper method to define mock.On call
721+// - core unsafe.Pointer
722+// - name *byte
723+// - props unsafe.Pointer
724+func (_e *MockVideoAPI_Expecter) PWStreamNew(core any, name any, props any) *MockVideoAPI_PWStreamNew_Call {
725+ return &MockVideoAPI_PWStreamNew_Call{Call: _e.mock.On("PWStreamNew", core, name, props)}
726+}
727+
728+func (_c *MockVideoAPI_PWStreamNew_Call) Run(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer)) *MockVideoAPI_PWStreamNew_Call {
729+ _c.Call.Run(func(args mock.Arguments) {
730+ var arg0 unsafe.Pointer
731+ if args[0] != nil {
732+ arg0 = args[0].(unsafe.Pointer)
733+ }
734+ var arg1 *byte
735+ if args[1] != nil {
736+ arg1 = args[1].(*byte)
737+ }
738+ var arg2 unsafe.Pointer
739+ if args[2] != nil {
740+ arg2 = args[2].(unsafe.Pointer)
741+ }
742+ run(
743+ arg0,
744+ arg1,
745+ arg2,
746+ )
747+ })
748+ return _c
749+}
750+
751+func (_c *MockVideoAPI_PWStreamNew_Call) Return(v unsafe.Pointer) *MockVideoAPI_PWStreamNew_Call {
752+ _c.Call.Return(v)
753+ return _c
754+}
755+
756+func (_c *MockVideoAPI_PWStreamNew_Call) RunAndReturn(run func(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer) *MockVideoAPI_PWStreamNew_Call {
757+ _c.Call.Return(run)
758+ return _c
759+}
760+
761+// PWStreamReturnBuffer provides a mock function for the type MockVideoAPI
762+func (_mock *MockVideoAPI) PWStreamReturnBuffer(stream unsafe.Pointer, buffer unsafe.Pointer) int32 {
763+ ret := _mock.Called(stream, buffer)
764+
765+ if len(ret) == 0 {
766+ panic("no return value specified for PWStreamReturnBuffer")
767+ }
768+
769+ var r0 int32
770+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer) int32); ok {
771+ r0 = returnFunc(stream, buffer)
772+ } else {
773+ r0 = ret.Get(0).(int32)
774+ }
775+ return r0
776+}
777+
778+// MockVideoAPI_PWStreamReturnBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamReturnBuffer'
779+type MockVideoAPI_PWStreamReturnBuffer_Call struct {
780+ *mock.Call
781+}
782+
783+// PWStreamReturnBuffer is a helper method to define mock.On call
784+// - stream unsafe.Pointer
785+// - buffer unsafe.Pointer
786+func (_e *MockVideoAPI_Expecter) PWStreamReturnBuffer(stream any, buffer any) *MockVideoAPI_PWStreamReturnBuffer_Call {
787+ return &MockVideoAPI_PWStreamReturnBuffer_Call{Call: _e.mock.On("PWStreamReturnBuffer", stream, buffer)}
788+}
789+
790+func (_c *MockVideoAPI_PWStreamReturnBuffer_Call) Run(run func(stream unsafe.Pointer, buffer unsafe.Pointer)) *MockVideoAPI_PWStreamReturnBuffer_Call {
791+ _c.Call.Run(func(args mock.Arguments) {
792+ var arg0 unsafe.Pointer
793+ if args[0] != nil {
794+ arg0 = args[0].(unsafe.Pointer)
795+ }
796+ var arg1 unsafe.Pointer
797+ if args[1] != nil {
798+ arg1 = args[1].(unsafe.Pointer)
799+ }
800+ run(
801+ arg0,
802+ arg1,
803+ )
804+ })
805+ return _c
806+}
807+
808+func (_c *MockVideoAPI_PWStreamReturnBuffer_Call) Return(n int32) *MockVideoAPI_PWStreamReturnBuffer_Call {
809+ _c.Call.Return(n)
810+ return _c
811+}
812+
813+func (_c *MockVideoAPI_PWStreamReturnBuffer_Call) RunAndReturn(run func(stream unsafe.Pointer, buffer unsafe.Pointer) int32) *MockVideoAPI_PWStreamReturnBuffer_Call {
814+ _c.Call.Return(run)
815+ return _c
816+}
817+
818+// PWStreamTriggerProcess provides a mock function for the type MockVideoAPI
819+func (_mock *MockVideoAPI) PWStreamTriggerProcess(stream unsafe.Pointer) int32 {
820+ ret := _mock.Called(stream)
821+
822+ if len(ret) == 0 {
823+ panic("no return value specified for PWStreamTriggerProcess")
824+ }
825+
826+ var r0 int32
827+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer) int32); ok {
828+ r0 = returnFunc(stream)
829+ } else {
830+ r0 = ret.Get(0).(int32)
831+ }
832+ return r0
833+}
834+
835+// MockVideoAPI_PWStreamTriggerProcess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamTriggerProcess'
836+type MockVideoAPI_PWStreamTriggerProcess_Call struct {
837+ *mock.Call
838+}
839+
840+// PWStreamTriggerProcess is a helper method to define mock.On call
841+// - stream unsafe.Pointer
842+func (_e *MockVideoAPI_Expecter) PWStreamTriggerProcess(stream any) *MockVideoAPI_PWStreamTriggerProcess_Call {
843+ return &MockVideoAPI_PWStreamTriggerProcess_Call{Call: _e.mock.On("PWStreamTriggerProcess", stream)}
844+}
845+
846+func (_c *MockVideoAPI_PWStreamTriggerProcess_Call) Run(run func(stream unsafe.Pointer)) *MockVideoAPI_PWStreamTriggerProcess_Call {
847+ _c.Call.Run(func(args mock.Arguments) {
848+ var arg0 unsafe.Pointer
849+ if args[0] != nil {
850+ arg0 = args[0].(unsafe.Pointer)
851+ }
852+ run(
853+ arg0,
854+ )
855+ })
856+ return _c
857+}
858+
859+func (_c *MockVideoAPI_PWStreamTriggerProcess_Call) Return(n int32) *MockVideoAPI_PWStreamTriggerProcess_Call {
860+ _c.Call.Return(n)
861+ return _c
862+}
863+
864+func (_c *MockVideoAPI_PWStreamTriggerProcess_Call) RunAndReturn(run func(stream unsafe.Pointer) int32) *MockVideoAPI_PWStreamTriggerProcess_Call {
865+ _c.Call.Return(run)
866+ return _c
867+}
868+
869+// PWStreamUpdateParams provides a mock function for the type MockVideoAPI
870+func (_mock *MockVideoAPI) PWStreamUpdateParams(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32 {
871+ ret := _mock.Called(stream, params, n_params)
872+
873+ if len(ret) == 0 {
874+ panic("no return value specified for PWStreamUpdateParams")
875+ }
876+
877+ var r0 int32
878+ if returnFunc, ok := ret.Get(0).(func(unsafe.Pointer, unsafe.Pointer, uint32) int32); ok {
879+ r0 = returnFunc(stream, params, n_params)
880+ } else {
881+ r0 = ret.Get(0).(int32)
882+ }
883+ return r0
884+}
885+
886+// MockVideoAPI_PWStreamUpdateParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PWStreamUpdateParams'
887+type MockVideoAPI_PWStreamUpdateParams_Call struct {
888+ *mock.Call
889+}
890+
891+// PWStreamUpdateParams is a helper method to define mock.On call
892+// - stream unsafe.Pointer
893+// - params unsafe.Pointer
894+// - n_params uint32
895+func (_e *MockVideoAPI_Expecter) PWStreamUpdateParams(stream any, params any, n_params any) *MockVideoAPI_PWStreamUpdateParams_Call {
896+ return &MockVideoAPI_PWStreamUpdateParams_Call{Call: _e.mock.On("PWStreamUpdateParams", stream, params, n_params)}
897+}
898+
899+func (_c *MockVideoAPI_PWStreamUpdateParams_Call) Run(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32)) *MockVideoAPI_PWStreamUpdateParams_Call {
900+ _c.Call.Run(func(args mock.Arguments) {
901+ var arg0 unsafe.Pointer
902+ if args[0] != nil {
903+ arg0 = args[0].(unsafe.Pointer)
904+ }
905+ var arg1 unsafe.Pointer
906+ if args[1] != nil {
907+ arg1 = args[1].(unsafe.Pointer)
908+ }
909+ var arg2 uint32
910+ if args[2] != nil {
911+ arg2 = args[2].(uint32)
912+ }
913+ run(
914+ arg0,
915+ arg1,
916+ arg2,
917+ )
918+ })
919+ return _c
920+}
921+
922+func (_c *MockVideoAPI_PWStreamUpdateParams_Call) Return(n int32) *MockVideoAPI_PWStreamUpdateParams_Call {
923+ _c.Call.Return(n)
924+ return _c
925+}
926+
927+func (_c *MockVideoAPI_PWStreamUpdateParams_Call) RunAndReturn(run func(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32) *MockVideoAPI_PWStreamUpdateParams_Call {
928+ _c.Call.Return(run)
929+ return _c
930+}
A internal/ports/out/shm.go +11 -0
@@ -0,0 +1,11 @@
1+package out
2+
3+// SharedMemAPI abstracts the anonymous shared memory used for video buffers
4+// so the stream logic can be tested without real memfds.
5+type SharedMemAPI interface {
6+ // NewSharedMem creates a sealed, size-byte memfd and maps it read-write
7+ // and shared. The caller owns fd and data until FreeSharedMem.
8+ NewSharedMem(name string, size int) (fd int, data []byte, err error)
9+ // FreeSharedMem unmaps data and closes fd.
10+ FreeSharedMem(fd int, data []byte)
11+}
@@ -0,0 +1,11 @@
1+package out
2+
3+// SharedMemAPI abstracts the anonymous shared memory used for video buffers
4+// so the stream logic can be tested without real memfds.
5+type SharedMemAPI interface {
6+ // NewSharedMem creates a sealed, size-byte memfd and maps it read-write
7+ // and shared. The caller owns fd and data until FreeSharedMem.
8+ NewSharedMem(name string, size int) (fd int, data []byte, err error)
9+ // FreeSharedMem unmaps data and closes fd.
10+ FreeSharedMem(fd int, data []byte)
11+}
A internal/ports/out/video_gen.go +26 -0 generated file: collapsed

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 8

↑↓ moveenter openesc close