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: 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
hacking again on it after a rather long time cc09df4f340c9f906e0de9520d2c803ea6936769 Sylvain BERTRAND 2020-08-16 18:14:14
Commit 780e5bec0b90a9e931778cf68fec62a7c5241c13 - npv: workaround a mesa bug (which leads to linux state corruption)
Author: Sylvain BERTRAND
Author date (UTC): 2020-09-23 15:57
Committer name: Sylvain BERTRAND
Committer date (UTC): 2020-09-23 15:57
Parent(s): 2b7347be805d17a2b6f06e276e897c51431b9c6c
Signing key:
Tree: 48cd54cb1c0548f26ee68db0f7e1ad8bac8c81ae
File Lines added Lines deleted
npv/video/local/code.frag.c 20 2
npv/video/local/state.frag.c 1 0
npv/video/namespace/main.c 4 0
npv/video/public/code.frag.c 3 2
File npv/video/local/code.frag.c changed (mode: 100644) (index 71655cc..7bc1a4c)
... ... STATIC void init_once_local(void)
74 74 ++i; ++i;
75 75 } }
76 76 receive_fr_l = avutil_video_fr_ref_alloc(); receive_fr_l = avutil_video_fr_ref_alloc();
77 is_swpchn_sem_fence_submitted_l = false;
77 78 } }
78 79 STATIC void scaler_img_create(avutil_video_fr_ref_t *fr) STATIC void scaler_img_create(avutil_video_fr_ref_t *fr)
79 80 { {
 
... ... STATIC void blits_request_update(void)
543 544 ++i; ++i;
544 545 } }
545 546 } }
546 STATIC bool are_sems_available(void)
547 STATIC bool is_swpchn_sem_consistent(void)
547 548 { {
548 549 s32 r; s32 r;
550
551 /* nothing submitted then nothing to check */
552 if (!is_swpchn_sem_fence_submitted_l)
553 return true;
549 554 /* coarse synchronization (we could use a pool of semaphores/fences) */ /* coarse synchronization (we could use a pool of semaphores/fences) */
550 555 vk_get_fence_status(); vk_get_fence_status();
551 556 if (r == vk_not_ready) if (r == vk_not_ready)
 
... ... STATIC bool are_sems_available(void)
555 560 /* vk_success */ /* vk_success */
556 561 vk_reset_fences(); vk_reset_fences();
557 562 IF_FATALVVK("%d:device:%p:unable to reset the fence\n", r, npv_vk_surf_p.dev.vk, npv_vk_surf_p.dev.fence); IF_FATALVVK("%d:device:%p:unable to reset the fence\n", r, npv_vk_surf_p.dev.vk, npv_vk_surf_p.dev.fence);
563 is_swpchn_sem_fence_submitted_l = false;
558 564 return true; return true;
559 565 } }
560 566 #define READY 0 #define READY 0
 
... ... STATIC u8 swpchn_next_img(u32 *swpchn_img) { loop
576 582 * of a fence. * of a fence.
577 583 */ */
578 584 vk_acquire_next_img(&info, swpchn_img); vk_acquire_next_img(&info, swpchn_img);
579 if (r == vk_not_ready)
585 /*
586 * XXX: MESA BUG:
587 * should _NOT_ return vk_timeout for timeout == 0
588 *
589 * src/vulkan/wsi/wsi_common_x11.c:x11_acquire_next_image_from_queue
590 * this func does not return vk_not_ready on timeout == 0
591 */
592 if (r == vk_not_ready || r == vk_timeout)
580 593 return NOT_READY; return NOT_READY;
581 594 else if (r == vk_out_of_date || r == vk_suboptimal) { else if (r == vk_out_of_date || r == vk_suboptimal) {
595 vk_q_wait_idle(); /* very violent, hopefully not too long */
596 IF_FATALVVK("%d:queue:%p:unable to wait for idle or completion to prepare for a swpchn update\n", r, npv_vk_surf_p.dev.q);
582 597 npv_vk_swpchn_update(); npv_vk_swpchn_update();
583 598 blits_request_update(); blits_request_update();
584 599 continue; continue;
 
... ... STATIC u8 send_to_pe(u32 swpchn_img)
617 632 /* XXX: coarse synchronization happens here */ /* XXX: coarse synchronization happens here */
618 633 vk_q_submit(&submit_info, npv_vk_surf_p.dev.fence); vk_q_submit(&submit_info, npv_vk_surf_p.dev.fence);
619 634 IF_FATALVVK("%d:queue:%p:unable to submit the image pre-recorded command buffer\n", r, npv_vk_surf_p.dev.q); IF_FATALVVK("%d:queue:%p:unable to submit the image pre-recorded command buffer\n", r, npv_vk_surf_p.dev.q);
635 is_swpchn_sem_fence_submitted_l = true;
620 636 /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
621 637 idxs[0] = swpchn_img; idxs[0] = swpchn_img;
622 638 memset(&present_info, 0, sizeof(present_info)); memset(&present_info, 0, sizeof(present_info));
 
... ... STATIC u8 send_to_pe(u32 swpchn_img)
633 649 present_info.results = 0; present_info.results = 0;
634 650 vk_q_present(&present_info); vk_q_present(&present_info);
635 651 if (r == vk_out_of_date || r == vk_suboptimal) { if (r == vk_out_of_date || r == vk_suboptimal) {
652 vk_q_wait_idle(); /* very violent, hopefully not too long */
653 IF_FATALVVK("%d:queue:%p:unable to wait for idle or completion to prepare for a swpchn update\n", r, npv_vk_surf_p.dev.q);
636 654 npv_vk_swpchn_update(); npv_vk_swpchn_update();
637 655 blits_request_update(); blits_request_update();
638 656 return SWPCHN_UPDATED; return SWPCHN_UPDATED;
File npv/video/local/state.frag.c changed (mode: 100644) (index f62d490..ec8e788)
... ... STATIC struct {
16 16 bool update_requested; bool update_requested;
17 17 } blit_l[npv_vk_swpchn_imgs_n_max]; } blit_l[npv_vk_swpchn_imgs_n_max];
18 18 STATIC avutil_video_fr_ref_t *last_fr_sent_to_pe_l; STATIC avutil_video_fr_ref_t *last_fr_sent_to_pe_l;
19 STATIC bool is_swpchn_sem_fence_submitted_l;
File npv/video/namespace/main.c changed (mode: 100644) (index 2780159..bf28b16)
23 23 #define img_mem_barrier_run_once npv_video_img_mem_barrier_run_once #define img_mem_barrier_run_once npv_video_img_mem_barrier_run_once
24 24 #define init_once_local npv_video_init_once_local #define init_once_local npv_video_init_once_local
25 25 #define init_once_public npv_video_init_once_public #define init_once_public npv_video_init_once_public
26 #define is_swpchn_sem_consistent npv_video_is_swpchn_sem_consistent
27 #define is_swpchn_sem_fence_submitted_l npv_video_is_swpchn_sem_fence_submitted_l
26 28 #define last_fr_sent_to_pe_l npv_video_last_fr_sent_to_pe_l #define last_fr_sent_to_pe_l npv_video_last_fr_sent_to_pe_l
27 29 #define match_mem_type npv_video_match_mem_type #define match_mem_type npv_video_match_mem_type
28 30 #define poutff npv_video_poutff #define poutff npv_video_poutff
 
70 72 #undef img_mem_barrier_run_once #undef img_mem_barrier_run_once
71 73 #undef init_once_local #undef init_once_local
72 74 #undef init_once_public #undef init_once_public
75 #undef is_swpchn_sem_consistent
76 #undef is_swpchn_sem_fence_submitted_l
73 77 #undef last_fr_sent_to_pe_l #undef last_fr_sent_to_pe_l
74 78 #undef match_mem_type #undef match_mem_type
75 79 #undef poutff #undef poutff
File npv/video/public/code.frag.c changed (mode: 100644) (index c8b403b..abde336)
... ... STATIC void timer_evt(void)
225 225 /* in pause, we "redraw" the same img all the time */ /* in pause, we "redraw" the same img all the time */
226 226 if (!npv_paused_p && fr == last_fr_sent_to_pe_l) if (!npv_paused_p && fr == last_fr_sent_to_pe_l)
227 227 return; return;
228 if (npv_thdsws_is_busy(scaler_p.ctx))
228 if (npv_thdsws_is_busy(scaler_p.ctx)) {
229 229 return; return;
230 }
230 231 if (scaler_p.img.fr != fr) { if (scaler_p.img.fr != fr) {
231 232 start_scaling(fr, fr_priv); start_scaling(fr, fr_priv);
232 233 return; return;
 
... ... STATIC void timer_evt(void)
234 235 if (npv_paused_p) if (npv_paused_p)
235 236 npv_video_osd_rop_restore(); npv_video_osd_rop_restore();
236 237 npv_video_osd_rop_blend(now); npv_video_osd_rop_blend(now);
237 if (!are_sems_available())
238 if (!is_swpchn_sem_consistent())
238 239 return; return;
239 240 loop { /* because the swpchn can change for many reasons */ loop { /* because the swpchn can change for many reasons */
240 241 r = swpchn_next_img(&swpchn_img); r = swpchn_next_img(&swpchn_img);
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