1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
== Colors
#f0e6dc #412f2d #934a5b #5a6811
== Names
* camu
- liana
* libalabaster
* libnaunet
- nnwt
* stela
== Webite/Manual
=== Website
* Landing Page
- Video Demo
* Products Page
* Downloads
* Contact
* Source Code
* Design Documents
=== Manual:
* Installation and Usage
== TODO
=== TODAY
- [x] Commit libalabaster build update.
- [x] Commit stela changes.
- [x] Commit ffmpeg build update.
- [x] Small list refactor.
- [x] Commit libnaunet changes.
- [x] Consolidate spng, stb_img, and wuffs into one file with server/client ifdefs.
- [ ] Startup timing information.
- From main() to window_system_main() then everything in desktop_open().
- Might as well work on the cleanup part too.
- [ ] Packet benchmark.
- Create packet, write bunch of ints, send to another thread, thread adds everything.
- [ ] RPC header packing.
- [ ] Look for more obvious packet_stream/rpc optimizations.
=== DMMN
- [ ] List lock.
- [ ] Reconnect/Reseek.
- [ ] Verbose connection logging.
- [ ] List clear.
=== List
- [x] list.c:294 assert.
- Very common in testing with remote client (SINK_LOCAL-only theory still possible).
- [ ] Better name for set_current() type functions.
- [ ] Fix ref counting and unloading.
- [ ] List unset.
- [ ] Cleanup pizzabot.
- [ ] Gapless/Queued.
- Consider case where an entry gets queued on the sink at a point when the list already
expects it to be playing.
- [ ] list_close(): Free resources if no sinks or wait for all sinks to be removed then free resources.
- [ ] End on a paused entry should advance with the next entry starting paused.
- [ ] Allow ended entry to be unpaused (skip to next).
- [ ] Factor in estimated ping.
- Per-sink?
- [ ] Use ended state sink-side?
- Never set ended entry?
- [ ] Docs.
=== Sink
- [x] CTRL+C twice forces SIGINT.
- [ ] Synced pausing is broken when video processing falls massively behind.
- Will cause 'Requested PTS is lower than oldest frame in video_buffer'.
- [ ] Mark entries for removal rather than remove in-place.
- [ ] More optimal command queue.
=== Cache
- See cache/entry.h.
- [ ] EOF when seeking forward in slow http source.
- [ ] HTTP timeout.
=== Liana
- [ ] Node connection pool.
- [ ] One "connection" object should suffice for retrieving duration, handling stream, and loading visual data for client.
=== VCR
- Proper "Whole File" implementation.
- [ ] Track loop count, reset on flush?
- [ ] Reject images.
- [ ] Internalize "packet cache" logic.
=== Codecs
- [ ] Better wuffs support.
- [ ] https://snisurset.net/code/abydos
=== Desktop/CMV
- [ ] Consistent cleanup on errors.
- Start from desktop.c:camu_desktop_open().
- [ ] More visual sink-only status.
- [ ] mpv/libplacebo shaders.
- [ ] Diagonal swipe for pause.
- [ ] Motion blur for next/prev.
- Nintendo switch photo viewer-like.
- [ ] Overlay text for volume.
- [ ] Idle animation.
- https://www.shadertoy.com/view/wtsXRX
=== Renderer
- [ ] vaapi fallback if Vulkan decoding not available.
- [ ] Command queue.
- [ ] Queue creation/deletion.
- [ ] Texture upload.
- [ ] queue_libplacebo rgb24 upload fails on ANV.
- [ ] MOMO frame queue.
- [ ] Log when scaling flips from required to not and vice versa.
=== CMC
- [ ] Browse pane.
- [ ] Tile implementation.
- [ ] Flesh out "user" concept enough to be usable.
=== Portal
- [ ] Post cache thread-safety.
- [ ] https://github.com/lwthiker/curl-impersonate
=== Node
- [ ] Implement node paradigm.
- [ ] Allow cmv to act as a node.
=== libnaunet
- [ ] Native Windows file backend.
- https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataa
=== Stela
- [x] X11/common nix Vulkan.
- [x] GLFW Vulkan destroy surface.
- [-] X11 and GLFW cursor.
- [x] Xcursor
- [-] Fix vaapi on x11.
- It's actually Xwayland lacking dma import extension.
- [ ] Configurable depth and stencil buffer.
- [ ] Consider server-side transcode in terms of the build.
- If video decode specific GPU device wiring is needed, should it be in stela?
- [ ] Latency tweaking.
- Wayland presentation timing.
- https://github.com/ishitatsuyuki/LatencyFleX
=== Other Optimizations
- [ ] Walk up cmv and document program design.
- [ ] Memory pool for al_alloc_object.
- [ ] alloca str_to_c_str.
=== Style
- [ ] Pass on log levels.
- [ ] Rename mutex variables to lock.
=== Tests
- [ ] Emulate slow packet stream connection.
- ev_set_io_collect_interval() in loop.c.
- [ ] Fast open -> shuffle spam -> disconnect deadlock.
- [ ] Simulate ping, connection speed, connection instablitiy.
- [ ] Seek again before slow client can respond to the first seek.
- [ ] al_array_contains
- [ ] al_array_unsorted_search_by_key
=== Build
- [x] Allow forcing ffmpeg-compat.
- 3 levels? latest, 4, 3.
- [x] allow --force-fallback-for=libavcodec.
- [x] Allow selecting window from camu.
- [x] 'guess' option
- [x] Don't require shaderc if libplacebo found.
- [x] Audio optional based on if libpulse/libasound are found.
- [x] libalabaster option for release build with asserts (al_assert only).
=== External
- [ ] miniaudio dsound flush.
- [ ] notcurses ffmpeg flush/reset.
=== camu_db
==== Transfer
- [ ] json.dumps(d).decode('unicode-escape').encode('utf8')
- [ ] Index all posts.
- [ ] Impement remake_post() using raw responses.
- [ ] Estimate size requirement.
- [ ] Re-write database using moves for resources.
==== Status
- [ ] Merge run/* in some way that respects the file dates.
- [ ] Move original pixiv into proper DB.
- [ ] Verify whether pixiv_app returns updated date or created date.
- [ ] Flag with unchecked updated date.
- [ ] Move in twitterN/pixivN temporary directories.
- Clear up significant space.
- Rewrite everything with moves.
- [ ] Setup system for downloading a list of tweet IDs.
- [ ] Download likes.
- [ ] Download missing? Twitter posts.
- [ ] Proper format for TikTok.
- [ ] Proper format for Youtube.
- [ ] Sort out and attempt to source various loose files.
== References
=== egl_resize
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/6547
* https://github.com/KhronosGroup/EGL-Registry/pull/160/files
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18984
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/7217
=== hwdec
* https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/blob/meson-4.4/meson.build
* https://ffmpeg.org/doxygen/trunk/qsv_decode_8c-example.html
* https://github.com/Themaister/Granite/blob/master/video/ffmpeg_hw_device.cpp
* https://trac.ffmpeg.org/wiki/HWAccelIntro
* https://github.com/mpv-player/mpv/blob/master/video/decode/vd_lavc.c#L699
* https://trac.ffmpeg.org/wiki/Hardware/VAAPI
=== subs
* Get subtitles.
ffmpeg -i <path>.mkv -map 0:s:2 -vn -an -codec:s ass <output>.ass
* Detect type.
uchardet subs.srt
* Re-encode subs.
ffmpeg -sub_charenc ISO-8859-1 -i <path>.srt <output>.ass
* Single audio and video streams.
ffmpeg -i <path>.mkv -map 0:v -map 0:a -c:v copy -c:a copy <output>.mkv
* Add subtitles.
ffmpeg -i <path>.mkv -i <path>.ass -map 0:v -map 0:a -map 1:s -c:v copy -c:a copy -c:s copy <output>.mkv
=== No stdlib
https://github.com/mjansson/rpmalloc
=== Android
https://blog.differentpla.net/blog/2022/05/10/nvidia-shield-adb/
https://github.com/brackeen/glfm/blob/main/examples/touch.c
https://developer.android.com/ndk/reference/group/audio#aaudiostream_gettimestamp
https://github.com/googlearchive/android-audio-high-performance/blob/master/aaudio/hello-aaudio/src/main/cpp/PlayAudioEngine.cpp
https://github.com/google/ExoPlayer/blob/release-v1/library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
https://www.youtube.com/watch?v=FJW8nGV4jxY
=== Audio
https://github.com/lipnitsk/mocp/blob/master/equalizer.c#L10
=== cmsb
https://github.com/NixOS/nixpkgs/pull/37730/files
Could help with iteration.
== Ideas/Plans
- [ ] Stela KMS backend.
- [ ] XMB (XrossMediaBar) spiritual succesor.
- [ ] Minecraft mod.
- [ ] Non-TCP (UDP, QUIC?) protocol support.
- [ ] NDS client.
=== JSON parsing lib
- Reference serde_json?
- https://old.reddit.com/r/C_Programming/comments/wjoghd/implementing_an_optional_type_in_c/
- https://github.com/serde-rs/json
- https://old.reddit.com/r/embedded/comments/1byxt04/attribute_packed_in_embedded_systems_pros_and_cons/
- https://www.gnu.org/software/c-intro-and-ref/manual/html_node/Attributes.html
// vim: set ft=asciidoc:
|