== 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. - [x] Commit subproject changes. - [-] Sink errored buffer improvement. - [-] More checks for VIDEO_EMPTY() || VIDEO_ENDED() for better experience. - This was an actual correctness issue. - [x] Checking buffer states needs a lock, check asserts. - [x] Commit fixes. - [x] Commit changes. - [x] cache selection in meson_options - [x] al_atomic_* -> atomic_* - [ ] Remove entry->ended from sink. - [ ] libnaunet zlib wrap - [ ] Pass over logging. - [ ] list_remove(). - [ ] Do ntp like latency evaluation. - [ ] packet_cache_v2. - [ ] Implement queued. - [ ] Command line argument test in libnaunet. - [ ] Header cleanup. - [ ] https://github.com/JuliaStrings/utf8proc/blob/master/utf8proc.h - [ ] ustr for ui elements. - [ ] remove wstr. - [ ] Packet benchmark. - Create packet, write bunch of ints, send to another thread, thread adds everything. - [ ] Startup timing information. - From main() to window_system_main() then everything in desktop_open(). - Might as well work on the cleanup part too. - [ ] RPC header packing. - [ ] Look for more obvious packet_stream/rpc optimizations. == Emscripten Sink - [ ] WebSocket packet_stream. - [ ] Server-side WebSocket and TCP. - nn_multiplex handles WebSocket upgrade. - [ ] Analyze thread-safety requirements of nn_signal usage. - [ ] Sink - [ ] VCR - [ ] Should still be able to rely on miniaudio. - [ ] MOMO should be comptabible with WebGL. === 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. - [ ] Don't use file_mapped for large files. - [ ] EOF when seeking forward in slow http source. - [ ] HTTP timeout. === Liana - [ ] Invalid connection handling. - [ ] Clearest way to "cut off connection immediately". - [ ] Max packet size (invalid header). - [ ] 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 - [ ] Negotiate codec with sinks. - [ ] 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 - [ ] queue_libplacebo rgb24 upload fails on ANV and Wine(wined3d), at least. - [ ] vaapi fallback if Vulkan decoding not available. - [ ] Command queue. - [ ] Queue creation/deletion. - [ ] Texture upload. - [ ] 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. === libalabaster - [x] Thread-safe rand(). - [x] AL_THREAD_LOCAL_SRAND - [ ] Scrap trying to use stdlib rand() and copy a prng algorithm from somewhere. - Worrying about predicting the state in libc is actually dumb. - https://prng.di.unimi.it/xoroshiro64starstar.c - https://prng.di.unimi.it/ === 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. - [ ] Wayland xkb. - https://wayland-book.com/seat/keyboard.html - https://xkbcommon.org/doc/current/xkbcommon_8h.html#a638bf7a52db06f383ce5a4ef99dfe539 - https://github.com/glfw/glfw/blob/8e15281d34a8b9ee9271ccce38177a3d812456f8/src/wl_window.c#L1880 - [ ] 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 - [x] Sporadic buffer errors. - [ ] 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 ==== Test cases // BUFFER_QUEUED -> BUFFER_INIT in CLIENT_REMOVE_BUFFERS. // - Ended audio or video only-entry processes a seek right after being skipped from. // - In switch_to(), because it's ended, remove_entry_buffers() is not called on this entry. // - During the seek within CLIENT_REMOVE_BUFFERS (this point before this change), // we don't touch an empty buffer's state. An empty buffer that was QUEUED stays QUEUED. // - CLIENT_RECONNECTED has no effect because the entry is not current. // - Now, if this entry is ever switch_to()'d, add_or_queue_entry() will assert // because a buffer's state being QUEUED at that point is invalid. === 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). - [ ] Update simple build and test in README. - [ ] Fix mingw64 initial build (shaderc compile). - [ ] Change git clone depth of subproject wraps based on build configuration. - [ ] Web build. === External - [ ] miniaudio dsound flush. - [ ] notcurses ffmpeg flush/reset. === camu_db ==== Transfer - [ ] Compare all raw_responses that are identical except not relevant timestamps. - [ ] 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 - [ ] Generate following list for pixiv and twitter, do twitter one-shots in twitter7/8. - [ ] List all pixiv ids in database, compare against current following list. - [ ] 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 .mkv -map 0:s:2 -vn -an -codec:s ass .ass * Detect type. uchardet subs.srt * Re-encode subs. ffmpeg -sub_charenc ISO-8859-1 -i .srt .ass * Single audio and video streams. ffmpeg -i .mkv -map 0:v -map 0:a -c:v copy -c:a copy .mkv * Add subtitles. ffmpeg -i .mkv -i .ass -map 0:v -map 0:a -map 1:s -c:v copy -c:a copy -c:s copy .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: