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: more monotonic, more pts discontinuity 1ab37ad2a24ca8f9fbf6d51eac8f996bd2eefacf Sylvain BERTRAND 2020-09-25 01:34:41
npv: workaround a mesa bug (which leads to linux state corruption) 780e5bec0b90a9e931778cf68fec62a7c5241c13 Sylvain BERTRAND 2020-09-23 15:57:25
npv: fix filter time base handling, prepare discontinuity support 2b7347be805d17a2b6f06e276e897c51431b9c6c Sylvain BERTRAND 2020-09-22 17:38:46
npv: correct coarse sync of vulkan image acquisition a9b52940ff2d567dc6c26b28d86eab54f5876819 Sylvain BERTRAND 2020-09-20 22:00:32
npv: fix channel layout handling and a tad more 88f74f181a567d108874a936fe3d306d34cfefb7 Sylvain BERTRAND 2020-09-19 23:12:04
npv: dynamic audio filter configuration d8a0ff688ddb2abcde22c01a2ae52ea74e9f0f2f Sylvain BERTRAND 2020-09-19 20:54:04
npv:protection against tantrum of media audio 78589150b7c6f1f3cae49b4b4bc8b572c6d8e6b7 Sylvain BERTRAND 2020-09-18 15:26:17
npv/npa:finish to workaround null channel layout 314788563e01d7ffb364a1775ba68619ee3f6c5c Sylvain BERTRAND 2020-09-15 22:50:57
npv: handle empty channel layout 5b5794fc4d5300b671b684a2f41196f66bd1fc4a Sylvain BERTRAND 2020-09-15 22:11:07
npv: tidy mutex locking 1962092d9675f76604414086200e88f6c857346f Sylvain BERTRAND 2020-09-15 00:51:12
npv: less incorrect reprogramming of blits b319e79f4f1b79670f6eef754142cc65c891ad4b Sylvain BERTRAND 2020-09-12 15:14:27
npv:fix osd restoration 8c64f703eca6b8c54b4cb5c95231dd02aa394135 Sylvain BERTRAND 2020-08-29 20:36:12
npv:osd:solo compilation modulo a few warnings 7805bd8f34f913b1535cc81c5be2a3132bd7e0e5 Sylvain BERTRAND 2020-08-29 14:51:35
npv: cleanup and color component fix 44f294e1de96c7974740f1187ebdbe12204884ae Sylvain BERTRAND 2020-08-28 23:48:18
npv:osd:timer, will add more if pertinent 6d34403c2c49bfa6ccf8e7a72e35a69e6f0527c5 Sylvain BERTRAND 2020-08-28 22:47:18
npv/npa: document properly snd_pcm_drain behavior 510ca39ee6a9ac9fcd646484793b7556eaa5972f Sylvain BERTRAND 2020-08-26 17:36:29
npv:remove locale layout dependent key binds f69bbbe529045b4243ece8957c838cb1465352da Sylvain BERTRAND 2020-08-24 21:27:08
npv: global seek based on audio timeline only 3c8fd60fa0a67143fa16ac90565bfcc35a193b6b Sylvain BERTRAND 2020-08-24 18:41:16
npv:_reasonable_ "pedanticage" of the code c5f2644d6eba84bcbcc9b0599c41e1f6733ea95c Sylvain BERTRAND 2020-08-20 16:25:50
npa:some amount of pedanticage 554bd5b07b1a82eabb2622cbf565031bf7af5c6d Sylvain BERTRAND 2020-08-18 19:33:47
Commit 1ab37ad2a24ca8f9fbf6d51eac8f996bd2eefacf - npv: more monotonic, more pts discontinuity
Author: Sylvain BERTRAND
Author date (UTC): 2020-09-25 01:34
Committer name: Sylvain BERTRAND
Committer date (UTC): 2020-09-25 01:34
Parent(s): 780e5bec0b90a9e931778cf68fec62a7c5241c13
Signing key:
Tree: 62bd92766522c9e0c4048a9edcee00ed11c97733
File Lines added Lines deleted
npv/TODO 0 4
npv/config.h 4 0
npv/pipeline/local/code.frag.c 2 2
npv/video/local/code.frag.c 8 18
npv/video/public/code.frag.c 1 1
File npv/TODO changed (mode: 100644) (index 57e3367..db368e4)
1 1 not ordered: not ordered:
2 - we were lied to: presentation/decoding timestamps from a demuxer can be
3 discontinuous without any warning.
4 - forced monotonic video frame selection? may be, probably, more robust in
5 regard to latency spikes.
6 2 - "buffering" indicator (no)? subtitles (mmmmh...)? - "buffering" indicator (no)? subtitles (mmmmh...)?
7 3 - 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
8 4 some yuvX pixel formats to srgb format conversions. do NOT use the vulkan some yuvX pixel formats to srgb format conversions. do NOT use the vulkan
File npv/config.h changed (mode: 100644) (index e28b352..2628bde)
... ... struct npv_x11_bind_t npv_x11_binds[] = {
61 61 #define VOL_DELTA 0.1 /* from 0.0 to 1.0 */ #define VOL_DELTA 0.1 /* from 0.0 to 1.0 */
62 62 #define SEEK_DELTA INT64_C(10) /* 10 seconds */ #define SEEK_DELTA INT64_C(10) /* 10 seconds */
63 63 #define SEEK_DELTA_BIG (INT64_C(4) * INT64_C(60)) /* 4 minutes */ #define SEEK_DELTA_BIG (INT64_C(4) * INT64_C(60)) /* 4 minutes */
64 /*----------------------------------------------------------------------------*/
65 /* kinky internal settings, modify with care */
66 /* the count of decoded video frames in the array, it is "expensive" */
67 #define DEC_FRS_ARRAY_N_MAX 4
64 68 #endif #endif
File npv/pipeline/local/code.frag.c changed (mode: 100644) (index 52d64ed..bef6d57)
... ... STATIC void *audio_thd_entry(void *arg)
144 144 /* /*
145 145 * predecoded video frs are expensive from the perspectives of the cpu and the * predecoded video frs are expensive from the perspectives of the cpu and the
146 146 * mem hierarchy. * mem hierarchy.
147 * 1920 * 1080 * 4 bytes = 8MB. I like powers of 2, then 4.
147 * 1920 * 1080 * 4 bytes = 8MB. we like powers of 2.
148 148 */ */
149 149 STATIC bool have_enough_predecoded_video_frs(void) STATIC bool have_enough_predecoded_video_frs(void)
150 150 { {
 
... ... STATIC bool have_enough_predecoded_video_frs(void)
153 153 npv_video_dec_frs_lock(); npv_video_dec_frs_lock();
154 154 if (npv_video_dec_frs_p.eof_receive) { if (npv_video_dec_frs_p.eof_receive) {
155 155 r = true; r = true;
156 } else if (npv_video_dec_frs_p.n < 4) {
156 } else if (npv_video_dec_frs_p.n < DEC_FRS_ARRAY_N_MAX) {
157 157 r = false; r = false;
158 158 } else /* >= 4 */ } else /* >= 4 */
159 159 r = true; r = true;
File npv/video/local/code.frag.c changed (mode: 100644) (index 7bc1a4c..758aaf2)
... ... STATIC void warningvk(u8 *fmt, ...)
52 52 npv_vk_vwarning(fmt, ap); npv_vk_vwarning(fmt, ap);
53 53 va_end(ap); va_end(ap);
54 54 } }
55 #define NONE 0
55 56 STATIC void init_once_local(void) STATIC void init_once_local(void)
56 57 { {
57 58 u8 i; u8 i;
 
... ... STATIC void init_once_local(void)
76 77 receive_fr_l = avutil_video_fr_ref_alloc(); receive_fr_l = avutil_video_fr_ref_alloc();
77 78 is_swpchn_sem_fence_submitted_l = false; is_swpchn_sem_fence_submitted_l = false;
78 79 } }
80 #undef NONE
79 81 STATIC void scaler_img_create(avutil_video_fr_ref_t *fr) STATIC void scaler_img_create(avutil_video_fr_ref_t *fr)
80 82 { {
81 83 struct vk_img_create_info_t info; struct vk_img_create_info_t info;
 
... ... STATIC void fr_drop(u16 fr)
330 332 } }
331 333 #undef NO_FR #undef NO_FR
332 334 #define NO_FR 0 #define NO_FR 0
333 STATIC void frs_drop(s64 now)
335 STATIC void frs_drop(avutil_video_fr_ref_t *selected_fr)
334 336 { {
335 s64 low;
336 s64 threshold;
337 337 u16 fr; u16 fr;
338 338
339 /*
340 * https://en.wikipedia.org/wiki/Audio_to_video_synchronization
341 * we need to make room in the dec a of predecoded frs, based on the
342 * previous url (20200922), we abitrary choose -30ms.
343 */
344 threshold = (30 * st_p.tb.den) / (st_p.tb.num * 1000);
345 low = now - threshold;
339 if (selected_fr == NO_FR)
340 return;
341 /* drop as many of as possible frames received before the selected one */
346 342 fr = 0; fr = 0;
347 343 loop { loop {
348 s64 pts;
349 struct dec_fr_priv_t *fr_priv;
350
351 if (dec_frs_p.n == fr)
344 if (dec_frs_p.a[fr] == selected_fr)
352 345 break; break;
353
354 pts = dec_frs_p.a[fr]->pts;
355 fr_priv = dec_frs_p.priv_a[fr];
356 346 /* keep the fr the scaler is related to */ /* keep the fr the scaler is related to */
357 if ((dec_frs_p.a[fr] != scaler_p.img.fr) && (pts < low)) {
347 if (dec_frs_p.a[fr] != scaler_p.img.fr) {
358 348 if (dec_frs_p.a[fr] == last_fr_sent_to_pe_l) if (dec_frs_p.a[fr] == last_fr_sent_to_pe_l)
359 349 last_fr_sent_to_pe_l = NO_FR; last_fr_sent_to_pe_l = NO_FR;
360 350 fr_drop(fr); /* do not advance */ fr_drop(fr); /* do not advance */
File npv/video/public/code.frag.c changed (mode: 100644) (index abde336..ee65471)
... ... STATIC void timer_evt(void)
216 216 dec_frs_unlock(); dec_frs_unlock();
217 217 return; return;
218 218 } }
219 frs_drop(now);
220 219 select_fr(now, &fr, &fr_priv); select_fr(now, &fr, &fr_priv);
220 frs_drop(fr);
221 221 dec_frs_unlock(); dec_frs_unlock();
222 222 /* unlock ------------------------------------------------------------*/ /* unlock ------------------------------------------------------------*/
223 223 if (fr == NO_FR) if (fr == NO_FR)
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