v0.2.0 4c97002

stream_ops.go RawHistoryFolder

1package out
2
3import "unsafe"
4
5// PlaybackFormat describes the audio format used when connecting a playback
6// stream.
7type PlaybackFormat struct {
8	SampleRate      int
9	Channels        int
10	FramesPerBuffer int
11}
12
13// StreamOps defines the outbound interface for PipeWire stream lifecycle
14// operations that the player needs. This abstracts the raw C API so the
15// player can be tested without a real PipeWire daemon.
16type StreamOps interface {
17	// CreatePlaybackStream creates a new playback stream attached to the given
18	// main loop. The onProcess callback is invoked by PipeWire each time the
19	// stream needs more audio data. Returns the stream pointer or an error.
20	CreatePlaybackStream(loopPtr unsafe.Pointer, name string, onProcess func()) (streamPtr unsafe.Pointer, err error)
21
22	// ConnectPlaybackStream connects the stream for playback output using the
23	// supplied format.
24	ConnectPlaybackStream(streamPtr unsafe.Pointer, format PlaybackFormat) error
25
26	// SetStreamActive activates or deactivates the stream.
27	SetStreamActive(streamPtr unsafe.Pointer, active bool) error
28
29	// DequeueBuffer dequeues a buffer from the stream for writing.
30	// Returns nil if no buffer is available.
31	DequeueBuffer(streamPtr unsafe.Pointer) unsafe.Pointer
32
33	// QueueBuffer queues a filled buffer back to the stream.
34	QueueBuffer(streamPtr unsafe.Pointer, bufPtr unsafe.Pointer) error
35
36	// DisconnectStream disconnects the stream.
37	// Returns an error if the operation fails.
38	DisconnectStream(streamPtr unsafe.Pointer) error
39
40	// DestroyStream destroys the stream and frees its resources.
41	DestroyStream(streamPtr unsafe.Pointer)
42
43	// CreateMainLoop creates a new PipeWire main loop.
44	// Returns the loop pointer or an error.
45	CreateMainLoop() (loopPtr unsafe.Pointer, err error)
46
47	// RunMainLoop runs the main loop (blocks until quit).
48	// Returns an error if the loop fails to run.
49	RunMainLoop(loopPtr unsafe.Pointer) error
50
51	// QuitMainLoop signals the main loop to stop.
52	QuitMainLoop(loopPtr unsafe.Pointer)
53
54	// DestroyMainLoop destroys the main loop.
55	DestroyMainLoop(loopPtr unsafe.Pointer)
56}

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