detached 9591cf9

feat: replace stub player API with typed config surface

commit
9591cf926ca73510a51ffd5785e25ac236104397
author
brice · · 2026-04-09 14:16 UTC
parent
330a0fb
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +131 -0
A pipewire/mocks/mock_PlaybackStream.go +131 -0
@@ -0,0 +1,131 @@
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+// NewMockPlaybackStream creates a new instance of MockPlaybackStream. 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 NewMockPlaybackStream(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockPlaybackStream {
17+ mock := &MockPlaybackStream{}
18+ mock.Mock.Test(t)
19+
20+ t.Cleanup(func() { mock.AssertExpectations(t) })
21+
22+ return mock
23+}
24+
25+// MockPlaybackStream is an autogenerated mock type for the PlaybackStream type
26+type MockPlaybackStream struct {
27+ mock.Mock
28+}
29+
30+type MockPlaybackStream_Expecter struct {
31+ mock *mock.Mock
32+}
33+
34+func (_m *MockPlaybackStream) EXPECT() *MockPlaybackStream_Expecter {
35+ return &MockPlaybackStream_Expecter{mock: &_m.Mock}
36+}
37+
38+// Close provides a mock function for the type MockPlaybackStream
39+func (_mock *MockPlaybackStream) Close() error {
40+ ret := _mock.Called()
41+
42+ if len(ret) == 0 {
43+ panic("no return value specified for Close")
44+ }
45+
46+ var r0 error
47+ if returnFunc, ok := ret.Get(0).(func() error); ok {
48+ r0 = returnFunc()
49+ } else {
50+ r0 = ret.Error(0)
51+ }
52+ return r0
53+}
54+
55+// MockPlaybackStream_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
56+type MockPlaybackStream_Close_Call struct {
57+ *mock.Call
58+}
59+
60+// Close is a helper method to define mock.On call
61+func (_e *MockPlaybackStream_Expecter) Close() *MockPlaybackStream_Close_Call {
62+ return &MockPlaybackStream_Close_Call{Call: _e.mock.On("Close")}
63+}
64+
65+func (_c *MockPlaybackStream_Close_Call) Run(run func()) *MockPlaybackStream_Close_Call {
66+ _c.Call.Run(func(args mock.Arguments) {
67+ run()
68+ })
69+ return _c
70+}
71+
72+func (_c *MockPlaybackStream_Close_Call) Return(err error) *MockPlaybackStream_Close_Call {
73+ _c.Call.Return(err)
74+ return _c
75+}
76+
77+func (_c *MockPlaybackStream_Close_Call) RunAndReturn(run func() error) *MockPlaybackStream_Close_Call {
78+ _c.Call.Return(run)
79+ return _c
80+}
81+
82+// Write provides a mock function for the type MockPlaybackStream
83+func (_mock *MockPlaybackStream) Write(samples [][]float32) error {
84+ ret := _mock.Called(samples)
85+
86+ if len(ret) == 0 {
87+ panic("no return value specified for Write")
88+ }
89+
90+ var r0 error
91+ if returnFunc, ok := ret.Get(0).(func([][]float32) error); ok {
92+ r0 = returnFunc(samples)
93+ } else {
94+ r0 = ret.Error(0)
95+ }
96+ return r0
97+}
98+
99+// MockPlaybackStream_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
100+type MockPlaybackStream_Write_Call struct {
101+ *mock.Call
102+}
103+
104+// Write is a helper method to define mock.On call
105+// - samples [][]float32
106+func (_e *MockPlaybackStream_Expecter) Write(samples interface{}) *MockPlaybackStream_Write_Call {
107+ return &MockPlaybackStream_Write_Call{Call: _e.mock.On("Write", samples)}
108+}
109+
110+func (_c *MockPlaybackStream_Write_Call) Run(run func(samples [][]float32)) *MockPlaybackStream_Write_Call {
111+ _c.Call.Run(func(args mock.Arguments) {
112+ var arg0 [][]float32
113+ if args[0] != nil {
114+ arg0 = args[0].([][]float32)
115+ }
116+ run(
117+ arg0,
118+ )
119+ })
120+ return _c
121+}
122+
123+func (_c *MockPlaybackStream_Write_Call) Return(err error) *MockPlaybackStream_Write_Call {
124+ _c.Call.Return(err)
125+ return _c
126+}
127+
128+func (_c *MockPlaybackStream_Write_Call) RunAndReturn(run func(samples [][]float32) error) *MockPlaybackStream_Write_Call {
129+ _c.Call.Return(run)
130+ return _c
131+}
@@ -0,0 +1,131 @@
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+// NewMockPlaybackStream creates a new instance of MockPlaybackStream. 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 NewMockPlaybackStream(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockPlaybackStream {
17+ mock := &MockPlaybackStream{}
18+ mock.Mock.Test(t)
19+
20+ t.Cleanup(func() { mock.AssertExpectations(t) })
21+
22+ return mock
23+}
24+
25+// MockPlaybackStream is an autogenerated mock type for the PlaybackStream type
26+type MockPlaybackStream struct {
27+ mock.Mock
28+}
29+
30+type MockPlaybackStream_Expecter struct {
31+ mock *mock.Mock
32+}
33+
34+func (_m *MockPlaybackStream) EXPECT() *MockPlaybackStream_Expecter {
35+ return &MockPlaybackStream_Expecter{mock: &_m.Mock}
36+}
37+
38+// Close provides a mock function for the type MockPlaybackStream
39+func (_mock *MockPlaybackStream) Close() error {
40+ ret := _mock.Called()
41+
42+ if len(ret) == 0 {
43+ panic("no return value specified for Close")
44+ }
45+
46+ var r0 error
47+ if returnFunc, ok := ret.Get(0).(func() error); ok {
48+ r0 = returnFunc()
49+ } else {
50+ r0 = ret.Error(0)
51+ }
52+ return r0
53+}
54+
55+// MockPlaybackStream_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
56+type MockPlaybackStream_Close_Call struct {
57+ *mock.Call
58+}
59+
60+// Close is a helper method to define mock.On call
61+func (_e *MockPlaybackStream_Expecter) Close() *MockPlaybackStream_Close_Call {
62+ return &MockPlaybackStream_Close_Call{Call: _e.mock.On("Close")}
63+}
64+
65+func (_c *MockPlaybackStream_Close_Call) Run(run func()) *MockPlaybackStream_Close_Call {
66+ _c.Call.Run(func(args mock.Arguments) {
67+ run()
68+ })
69+ return _c
70+}
71+
72+func (_c *MockPlaybackStream_Close_Call) Return(err error) *MockPlaybackStream_Close_Call {
73+ _c.Call.Return(err)
74+ return _c
75+}
76+
77+func (_c *MockPlaybackStream_Close_Call) RunAndReturn(run func() error) *MockPlaybackStream_Close_Call {
78+ _c.Call.Return(run)
79+ return _c
80+}
81+
82+// Write provides a mock function for the type MockPlaybackStream
83+func (_mock *MockPlaybackStream) Write(samples [][]float32) error {
84+ ret := _mock.Called(samples)
85+
86+ if len(ret) == 0 {
87+ panic("no return value specified for Write")
88+ }
89+
90+ var r0 error
91+ if returnFunc, ok := ret.Get(0).(func([][]float32) error); ok {
92+ r0 = returnFunc(samples)
93+ } else {
94+ r0 = ret.Error(0)
95+ }
96+ return r0
97+}
98+
99+// MockPlaybackStream_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
100+type MockPlaybackStream_Write_Call struct {
101+ *mock.Call
102+}
103+
104+// Write is a helper method to define mock.On call
105+// - samples [][]float32
106+func (_e *MockPlaybackStream_Expecter) Write(samples interface{}) *MockPlaybackStream_Write_Call {
107+ return &MockPlaybackStream_Write_Call{Call: _e.mock.On("Write", samples)}
108+}
109+
110+func (_c *MockPlaybackStream_Write_Call) Run(run func(samples [][]float32)) *MockPlaybackStream_Write_Call {
111+ _c.Call.Run(func(args mock.Arguments) {
112+ var arg0 [][]float32
113+ if args[0] != nil {
114+ arg0 = args[0].([][]float32)
115+ }
116+ run(
117+ arg0,
118+ )
119+ })
120+ return _c
121+}
122+
123+func (_c *MockPlaybackStream_Write_Call) Return(err error) *MockPlaybackStream_Write_Call {
124+ _c.Call.Return(err)
125+ return _c
126+}
127+
128+func (_c *MockPlaybackStream_Write_Call) RunAndReturn(run func(samples [][]float32) error) *MockPlaybackStream_Write_Call {
129+ _c.Call.Return(run)
130+ return _c
131+}

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