sylware / nyanmp (public) (License: AGPLv3) (since 2020-02-12) (hash sha1)
intended to become a collection of media players for gnu/linux based on ffmpeg, alsa, vulkan, x11, wayland, etc.
List of commits:
Subject Hash Author Date (UTC)
npv: move to a shared video/audio limit 53d5990ce4a87715a106095dde83e6658c3c1642 Sylvain BERTRAND 2022-08-30 17:58:39
npv: my iap hls peering with twitch.tv is accute trash 4ab8caadb41ac42482f8c7a43725054067674fe3 Sylvain BERTRAND 2022-08-30 17:17:21
npv: alsa, POLLERR is XRUN 73c89d6529123fca081c4f55d1a57eab4ede7b90 Sylvain BERTRAND 2022-06-30 15:43:27
npv: may help IAPs with bad peerings 7ec70f67d779a478f065f0e92259e52f8315d113 Sylvain BERTRAND 2022-06-30 15:42:47
move to new ffmpeg channel layout handling 938790d0c657278f405c4f57987d2274c5ada9b7 Sylvain BERTRAND 2022-03-20 22:18:01
npa: fine grained volume control 89279ea0c7dcaf7a718c9a57ecb6b08a0ccfbcb9 Sylvain BERTRAND 2022-02-15 23:24:36
npv: add fine grained volume control 06bc3b77b065f35f294659db520f66e7e8094c8c Sylvain BERTRAND 2022-02-15 18:47:34
npv: move to freetype SDF rendering 972a3027fec3b69a1e10405cc0da35b5194b6f46 Sylvain BERTRAND 2021-12-27 20:54:53
npv:osd:ascii only mode for the timer 3de3158fc3300f8a9c6f75fcca76b512331b8c2f Sylvain BERTRAND 2021-10-30 19:18:38
npv: default to dejavu instead of noto 708f3166a09fd7ba815ec47907cabfb1af4d26c5 Sylvain BERTRAND 2021-10-10 17:05:17
npv: live mode and ready the code for indicators.. if ever... 2d6ddb83edd6f08e99fbe01dc60a354b5e5a2afe Sylvain BERTRAND 2021-07-23 13:17:47
npv: don't block the muted state 0c29e9329ec5db6bed191b2b4caffff8166bd11f Sylvain BERTRAND 2021-07-21 21:34:37
npv: now we have enough perspective, make states internal 62f6b1bf62fc083762f036ddde1f29dd23baf814 Sylvain BERTRAND 2021-07-21 20:12:36
npv/npa: add gcc4 atomic support d9676b20984dcbfd8df4afbf85178c8ff4295e4f Sylvain BERTRAND 2021-06-18 15:04:01
npv: better reuse of ffmpeg references, stats 4bb1b9ab45609f8e5113cc7613ebc1d09499561b Sylvain BERTRAND 2021-05-20 18:24:32
npv: avoid stale frames fb20683b7cb91622b639b05e8b324d13edc72522 Sylvain BERTRAND 2021-05-16 20:51:34
npv: inverted resync logic and rate limiter 9e772be0d5e19dc4dcef05ee2b4ce47c42788f8e Sylvain BERTRAND 2021-05-16 18:06:23
npv:trying to work around nasty live streams 544ddd3381ad56363bb275ae59419e97e8c86895 Sylvain BERTRAND 2021-05-14 15:45:19
npv:spurious braces e8678920198c6795420c54a839b92e5d301b4183 Sylvain BERTRAND 2021-05-06 20:55:38
npv:pts debug tracing, ffmpeg dev tantrum 8c3bf9cf42fc3419b64c232f905c5c580d6a1942 Sylvain BERTRAND 2021-05-06 18:37:35
Commit 53d5990ce4a87715a106095dde83e6658c3c1642 - npv: move to a shared video/audio limit
Author: Sylvain BERTRAND
Author date (UTC): 2022-08-30 17:58
Committer name: Sylvain BERTRAND
Committer date (UTC): 2022-08-30 17:58
Parent(s): 4ab8caadb41ac42482f8c7a43725054067674fe3
Signer:
Signing key:
Signing status: N
Tree: ac450e02bd623d90df1931afc2d228d95b20a686
File Lines added Lines deleted
npv/TODO 0 1
npv/audio/public/code.frag.c 1 1
npv/config.h 3 0
npv/fmt/local/code.frag.c 1 4
npv/fmt/public/code.frag.c 6 8
npv/local/code.frag.c 3 5
npv/pipeline/public.h 3 6
npv/pipeline/public/code.frag.c 8 18
npv/video/public/code.frag.c 1 1
File npv/TODO changed (mode: 100644) (index 0158304..90608f3)
1 1 not ordered: not ordered:
2 - move to a shared audio/video prefill
3 2 - try to workaround as much as possible the nasty live streams out there. - try to workaround as much as possible the nasty live streams out there.
4 3 - "buffering" indicator (no)? subtitles (mmmmh...)? - "buffering" indicator (no)? subtitles (mmmmh...)?
5 4 - use vulkan shaders (no glsl or hlsl), compute or not, in order to perform - use vulkan shaders (no glsl or hlsl), compute or not, in order to perform
File npv/audio/public/code.frag.c changed (mode: 100644) (index 8d25d49..d87b021)
... ... STATIC void pkts_send(void) { loop
342 342 fatal("error while sending a packet to the decoder\n"); fatal("error while sending a packet to the decoder\n");
343 343 /* r == 0 */ /* r == 0 */
344 344 npv_pipeline_limits_lock(); npv_pipeline_limits_lock();
345 npv_pipeline_limits_p.pkts.audio_bytes_n -= pr->sz;
345 npv_pipeline_limits_p.pkts.bytes_n -= pr->sz;
346 346 npv_pipeline_limits_unlock(); npv_pipeline_limits_unlock();
347 347
348 348 npv_pkt_q_deq(pkt_q_p); npv_pkt_q_deq(pkt_q_p);
File npv/config.h changed (mode: 100644) (index 706648e..6b052c1)
... ... struct npv_x11_bind_t npv_x11_binds[] = {
101 101 * to avoid hammering the peering links though. * to avoid hammering the peering links though.
102 102 */ */
103 103 #define FMT_RETRIES_N 100 #define FMT_RETRIES_N 100
104
105 /* 10MB is roughly 8s of a 10Mb stream */
106 #define PIPELINE_BYTES_N_MAX 10000000
104 107 #endif #endif
File npv/fmt/local/code.frag.c changed (mode: 100644) (index 27a391b..e214a51)
... ... STATIC bool did_reached_limits(void)
30 30 bool r; bool r;
31 31
32 32 npv_pipeline_limits_lock(); npv_pipeline_limits_lock();
33 if (npv_pipeline_limits_p.pkts.audio_bytes_n
34 >= npv_pipeline_limits_p.pkts.limit.audio_bytes_n
35 && npv_pipeline_limits_p.pkts.video_bytes_n
36 >= npv_pipeline_limits_p.pkts.limit.video_bytes_n)
33 if (npv_pipeline_limits_p.pkts.bytes_n >= npv_pipeline_limits_p.pkts.limit.bytes_n)
37 34 r = true; r = true;
38 35 else else
39 36 r = false; r = false;
File npv/fmt/public/code.frag.c changed (mode: 100644) (index 874b4e9..6ed0961)
... ... STATIC u8 pkts_read_and_q(void) { loop
65 65 /* r == 0 */ /* r == 0 */
66 66 if (pkt_l->st_idx == npv_audio_st_p.idx) { if (pkt_l->st_idx == npv_audio_st_p.idx) {
67 67 npv_pipeline_limits_lock(); npv_pipeline_limits_lock();
68 npv_pipeline_limits_p.pkts.audio_bytes_n += (u64)pkt_l->sz;
69 if (npv_pipeline_limits_p.pkts.prefill.audio_bytes_rem > 0)
70 npv_pipeline_limits_p.pkts.prefill.audio_bytes_rem -=
71 (s64)pkt_l->sz;
68 npv_pipeline_limits_p.pkts.bytes_n += (u64)pkt_l->sz;
69 if (npv_pipeline_limits_p.pkts.prefill.bytes_rem > 0)
70 npv_pipeline_limits_p.pkts.prefill.bytes_rem -= (s64)pkt_l->sz;
72 71 npv_pipeline_limits_unlock(); npv_pipeline_limits_unlock();
73 72
74 73 npv_pkt_q_lock(npv_audio_pkt_q_p); npv_pkt_q_lock(npv_audio_pkt_q_p);
 
... ... STATIC u8 pkts_read_and_q(void) { loop
77 76 npv_pkt_q_unlock(npv_audio_pkt_q_p); npv_pkt_q_unlock(npv_audio_pkt_q_p);
78 77 } else if (pkt_l->st_idx == npv_video_st_p.idx) { } else if (pkt_l->st_idx == npv_video_st_p.idx) {
79 78 npv_pipeline_limits_lock(); npv_pipeline_limits_lock();
80 npv_pipeline_limits_p.pkts.video_bytes_n += (u64)pkt_l->sz;
81 if (npv_pipeline_limits_p.pkts.prefill.video_bytes_rem > 0)
82 npv_pipeline_limits_p.pkts.prefill.video_bytes_rem -=
83 (s64)pkt_l->sz;
79 npv_pipeline_limits_p.pkts.bytes_n += (u64)pkt_l->sz;
80 if (npv_pipeline_limits_p.pkts.prefill.bytes_rem > 0)
81 npv_pipeline_limits_p.pkts.prefill.bytes_rem -= (s64)pkt_l->sz;
84 82 npv_pipeline_limits_unlock(); npv_pipeline_limits_unlock();
85 83
86 84 npv_pkt_q_lock(npv_video_pkt_q_p); npv_pkt_q_lock(npv_video_pkt_q_p);
File npv/local/code.frag.c changed (mode: 100644) (index 984f4bd..2d98097)
... ... STATIC void predecode_wait_start(void)
241 241 #define PREDECODE 2 #define PREDECODE 2
242 242 STATIC void prefill_chk(void) STATIC void prefill_chk(void)
243 243 { {
244 s64 prefill_audio;
245 s64 prefill_video;
244 s64 prefill;
246 245 struct itimerspec t; struct itimerspec t;
247 246 int r; int r;
248 247
249 248 npv_pipeline_limits_lock(); npv_pipeline_limits_lock();
250 prefill_audio = npv_pipeline_limits_p.pkts.prefill.audio_bytes_rem;
251 prefill_video = npv_pipeline_limits_p.pkts.prefill.video_bytes_rem;
249 prefill = npv_pipeline_limits_p.pkts.prefill.bytes_rem;
252 250 npv_pipeline_limits_unlock(); npv_pipeline_limits_unlock();
253 if (prefill_audio <= 0 && prefill_video <= 0) {
251 if (prefill <= 0) {
254 252 /* prefill is done, switch to predecode */ /* prefill is done, switch to predecode */
255 253 atomic_store(&pre_x_p, PREDECODE); atomic_store(&pre_x_p, PREDECODE);
256 254 predecode_wait_start(); predecode_wait_start();
File npv/pipeline/public.h changed (mode: 100644) (index 4a3affe..ce1d9a3)
12 12 struct limits_t { struct limits_t {
13 13 pthread_mutex_t mutex; pthread_mutex_t mutex;
14 14 struct { struct {
15 u64 audio_bytes_n;
16 u64 video_bytes_n;
15 u64 bytes_n;
17 16 struct { struct {
18 u64 audio_bytes_n; /* arbitrary, init-ed once */
19 u64 video_bytes_n; /* arbitrary, init-ed once */
17 u64 bytes_n; /* arbitrary, init-ed once */
20 18 } limit; } limit;
21 19 struct { struct {
22 20 u8 percent; u8 percent;
23 s64 audio_bytes_rem;
24 s64 video_bytes_rem;
21 s64 bytes_rem;
25 22 } prefill; } prefill;
26 23 } pkts; } pkts;
27 24 }; };
File npv/pipeline/public/code.frag.c changed (mode: 100644) (index e922715..be4a0a1)
1 1 STATIC void limits_reset(void) STATIC void limits_reset(void)
2 2 { {
3 limits_p.pkts.audio_bytes_n = 0;
4 limits_p.pkts.video_bytes_n = 0;
5 /* TODO: nah, move to a shared audio/video quantities */
6 /* hardcoded for now: arbitrary rough estimates */
7 /* ~8s of 200kb audio */
8 limits_p.pkts.limit.audio_bytes_n = 200000 / 8 * 8;
9 /* ~8s of 10Mb video */
10 limits_p.pkts.limit.video_bytes_n = 10000000 / 8 * 8;
3 limits_p.pkts.bytes_n = 0;
4 limits_p.pkts.limit.bytes_n = PIPELINE_BYTES_N_MAX;
11 5 } }
12 6 STATIC void prefill_reset(u8 percent) STATIC void prefill_reset(u8 percent)
13 7 { {
14 8 if (percent > 100) if (percent > 100)
15 fatal("invalid prefill of %u%% for the buffer of packet queues\n", percent);
9 fatal("invalid prefill of %u%% for the buffer for packet queues\n", percent);
16 10 if (percent != 0) { if (percent != 0) {
17 limits_p.pkts.prefill.audio_bytes_rem =
18 limits_p.pkts.limit.audio_bytes_n * percent / 100;
19 pout("prefill size for the audio packet queue buffer is %u%%/%"PRId64" bytes\n", percent, limits_p.pkts.prefill.audio_bytes_rem);
20 limits_p.pkts.prefill.video_bytes_rem =
21 limits_p.pkts.limit.video_bytes_n * percent / 100;
22 pout("prefill size for the video packet queue buffer is %u%%/%"PRId64" bytes\n", percent, limits_p.pkts.prefill.video_bytes_rem);
11 limits_p.pkts.prefill.bytes_rem =
12 limits_p.pkts.limit.bytes_n * percent / 100;
13 pout("prefill size for the buffer for packet queues is %u%%/%"PRId64" bytes (100%%=%"PRId64" bytes)\n", percent, limits_p.pkts.prefill.bytes_rem, PIPELINE_BYTES_N_MAX);
23 14 } else { } else {
24 limits_p.pkts.prefill.audio_bytes_rem = 0;
25 limits_p.pkts.prefill.video_bytes_rem = 0;
26 pout("prefill for the packet queue buffers is disabled\n");
15 limits_p.pkts.prefill.bytes_rem = 0;
16 pout("prefill for the buffer for packet queues is disabled\n");
27 17 } }
28 18 } }
29 19 STATIC void init_once(void) STATIC void init_once(void)
File npv/video/public/code.frag.c changed (mode: 100644) (index fe609ce..b499e34)
... ... STATIC void pkts_send(void) { loop
301 301 fatal("error while sending a packet to the decoder\n"); fatal("error while sending a packet to the decoder\n");
302 302 /* r == 0 */ /* r == 0 */
303 303 npv_pipeline_limits_lock(); npv_pipeline_limits_lock();
304 npv_pipeline_limits_p.pkts.video_bytes_n -= pr->sz;
304 npv_pipeline_limits_p.pkts.bytes_n -= pr->sz;
305 305 npv_pipeline_limits_unlock(); npv_pipeline_limits_unlock();
306 306
307 307 npv_pkt_q_deq(pkt_q_p); npv_pkt_q_deq(pkt_q_p);
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/nyanmp

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/nyanmp

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/nyanmp

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main