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:pts debug tracing, ffmpeg dev tantrum 8c3bf9cf42fc3419b64c232f905c5c580d6a1942 Sylvain BERTRAND 2021-05-06 18:37:35
npa: forgot zero-ing before cmp ceff7a70798b604bdb876a92ba0c446e3ede8a5b Sylvain BERTRAND 2021-04-15 20:15:07
npv: namespace love cb385e293aeb094073963c46022f3c430b6bf9c1 Sylvain BERTRAND 2021-01-16 18:37:11
conservative handling of vulkan linear filtering 7736b342c3566ac3ffa7a83ff1c7985e5595265f Sylvain BERTRAND 2021-01-15 18:18:02
npv: spurious AND faulty image creation flag e7d0d4e9efa15781b323cd092989bc0b95331875 Sylvain BERTRAND 2021-01-15 02:01:16
npa: buffering 9b2ec327646a289dae3e4cbb31b4857bf612d7e2 Sylvain BERTRAND 2020-11-06 17:20:56
npa: tons of love 68a79110ca4a6f5bdb41ed90e421b6f46c1c1877 Sylvain BERTRAND 2020-11-06 15:20:13
npv: spurious unsigned 5b4e039ffd921438a37112f0b4108480366f4d6d Sylvain BERTRAND 2020-11-06 04:31:18
npv: backward discontinuity handling 0fc81a53996993992dd86a96a26afd2aab0ac366 Sylvain BERTRAND 2020-09-25 16:14:26
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
Commit 8c3bf9cf42fc3419b64c232f905c5c580d6a1942 - npv:pts debug tracing, ffmpeg dev tantrum
Author: Sylvain BERTRAND
Author date (UTC): 2021-05-06 18:37
Committer name: Sylvain BERTRAND
Committer date (UTC): 2021-05-06 18:37
Parent(s): ceff7a70798b604bdb876a92ba0c446e3ede8a5b
Signer:
Signing key:
Signing status: N
Tree: dbb34b6741e72f05cdcfa46437da9d9de02ac3a4
File Lines added Lines deleted
npa/npa.c 1 1
npv/TODO 10 0
npv/audio/filt/main.c 3 2
npv/audio/public/code.frag.c 4 0
npv/config.h 10 1
npv/local/code.frag.c 3 0
npv/main.c 3 2
npv/namespace/ffmpeg.h 1 1
npv/public/state.frag.h 3 0
npv/video/local/code.frag.c 8 0
npv/xcb/local/code.frag.c 6 0
npv/xcb/main.c 3 3
File npa/npa.c changed (mode: 100644) (index e1eaab7..815cddf)
123 123 #define av_bufsrc_add_frs_flags av_buffersrc_add_frame_flags #define av_bufsrc_add_frs_flags av_buffersrc_add_frame_flags
124 124 #define AV_BUFSRC_FLAG_KEEP_REF AV_BUFFERSRC_FLAG_KEEP_REF #define AV_BUFSRC_FLAG_KEEP_REF AV_BUFFERSRC_FLAG_KEEP_REF
125 125 #define AV_BUFSRC_FLAG_PUSH AV_BUFFERSRC_FLAG_PUSH #define AV_BUFSRC_FLAG_PUSH AV_BUFFERSRC_FLAG_PUSH
126 #define av_codec AVCodec
126 #define av_codec const AVCodec
127 127 #define av_codec_ctx AVCodecContext #define av_codec_ctx AVCodecContext
128 128 #define av_dump_fmt av_dump_format #define av_dump_fmt av_dump_format
129 129 #define av_duration_estimation_method AVDurationEstimationMethod #define av_duration_estimation_method AVDurationEstimationMethod
File npv/TODO changed (mode: 100644) (index db368e4..1e32934)
1 1 not ordered: not ordered:
2 - some live streams can have the audio and video unsynced up to 10 seconds with
3 missing tons of video frames.
4 To support those rare and horrible streams, what seems to be a reasonable
5 work around:
6 - always presume monotonic decoding of frames, monotonic as presentation
7 order, not pts monotonic.
8 - once the array of frames reached a specified limit, do buffer the
9 video demuxed packets.
10 - it would means that outside of transient discontinuity handling,
11 usually based on the audio, only the "too old" frames would be dropped.
2 12 - "buffering" indicator (no)? subtitles (mmmmh...)? - "buffering" indicator (no)? subtitles (mmmmh...)?
3 13 - 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
4 14 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/audio/filt/main.c changed (mode: 100644) (index b9e009d..d16c120)
14 14 #include <libavutil/opt.h> #include <libavutil/opt.h>
15 15 #include <libavutil/channel_layout.h> #include <libavutil/channel_layout.h>
16 16 #include "npv/c_fixing.h" #include "npv/c_fixing.h"
17 /*----------------------------------------------------------------------------*/
18 #include "npv/config.h"
19 /*----------------------------------------------------------------------------*/
17 20 #include "npv/global.h" #include "npv/global.h"
18 21 #include "npv/public.h" #include "npv/public.h"
19 22 #include "npv/audio/public.h" #include "npv/audio/public.h"
20 23 #include "npv/audio/filt/public.h" #include "npv/audio/filt/public.h"
21 24 /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
22 #include "npv/config.h"
23 /*----------------------------------------------------------------------------*/
24 25 #include "npv/namespace/ffmpeg.h" #include "npv/namespace/ffmpeg.h"
25 26 #include "npv/audio/namespace/ffmpeg.h" #include "npv/audio/namespace/ffmpeg.h"
26 27 #include "npv/audio/filt/namespace/public.h" #include "npv/audio/filt/namespace/public.h"
File npv/audio/public/code.frag.c changed (mode: 100644) (index 8a2da33..8032c17)
... ... STATIC u8 dec_set_try_receive(void)
37 37 if (r == AVUTIL_AVERROR(EAGAIN)) if (r == AVUTIL_AVERROR(EAGAIN))
38 38 return AGAIN; return AGAIN;
39 39 else if (r == 0) { else if (r == 0) {
40 #ifdef NPV_DEBUG
41 if (npv_debug_p)
42 npv_perr("DEBUG:audio:received set pts=%ld\n", dec_sets_p.a[last]->pts);
43 #endif
40 44 ++dec_sets_p.n; ++dec_sets_p.n;
41 45 return HAVE_DEC_SET; return HAVE_DEC_SET;
42 46 } else if (r == AVUTIL_AVERROR_EOF) { } else if (r == AVUTIL_AVERROR_EOF) {
File npv/config.h changed (mode: 100644) (index 1830bf5..54fc3c1)
1 1 #ifndef NPV_CONFIG_H #ifndef NPV_CONFIG_H
2 2 #define NPV_CONFIG_H #define NPV_CONFIG_H
3 /*----------------------------------------------------------------------------*/
4 #undef NPV_DEBUG
5 /*----------------------------------------------------------------------------*/
3 6 #include <stdlib.h> #include <stdlib.h>
4 7 #include "npv/c_fixing.h" #include "npv/c_fixing.h"
5 8 /* NotoSansSymbols2 is the only one with the play and pause symbols */ /* NotoSansSymbols2 is the only one with the play and pause symbols */
 
... ... STATIC void npv_cmd_mute(void);
25 28 STATIC void npv_cmd_osd_timer_toggle(void); STATIC void npv_cmd_osd_timer_toggle(void);
26 29 STATIC void npv_cmd_pause(void); STATIC void npv_cmd_pause(void);
27 30 STATIC void npv_cmd_fullscreen_toggle(void); STATIC void npv_cmd_fullscreen_toggle(void);
31 #ifdef NPV_DEBUG
32 STATIC void npv_cmd_debug_toggle(void);
33 #endif
28 34 /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
29 35 /* for documentation and example */ /* for documentation and example */
30 36 #define LINUX_KEY_ESC 0x01 #define LINUX_KEY_ESC 0x01
 
... ... struct npv_x11_bind_t npv_x11_binds[] = {
50 56 X11_BIND(0x74, "arrow down", npv_cmd_vol_down), X11_BIND(0x74, "arrow down", npv_cmd_vol_down),
51 57 X11_BIND(0x48, "f6", npv_cmd_mute), X11_BIND(0x48, "f6", npv_cmd_mute),
52 58 X11_BIND(0x43, "f1", npv_cmd_osd_timer_toggle), X11_BIND(0x43, "f1", npv_cmd_osd_timer_toggle),
53 X11_BIND(0x5f, "f11", npv_cmd_fullscreen_toggle)
59 X11_BIND(0x5f, "f11", npv_cmd_fullscreen_toggle),
60 #ifdef NPV_DEBUG
61 X11_BIND(0x60, "f12", npv_cmd_debug_toggle)
62 #endif
54 63 }; };
55 64 #undef X11_BIND #undef X11_BIND
56 65 #undef LINUX_KEY_ESC #undef LINUX_KEY_ESC
File npv/local/code.frag.c changed (mode: 100644) (index 3f5d5c1..fedbd62)
... ... int main(int argc, u8 **args)
783 783 setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
784 784 /* av_log_set_level(AV_LOG_VERBOSE); */ /* av_log_set_level(AV_LOG_VERBOSE); */
785 785 /* av_log_set_level(AV_LOG_DEBUG); */ /* av_log_set_level(AV_LOG_DEBUG); */
786 #ifdef NPV_DEBUG
787 npv_debug_p = false;
788 #endif
786 789 start_fullscreen = false; start_fullscreen = false;
787 790 win_width = WIDTH_NOT_DEFINED; win_width = WIDTH_NOT_DEFINED;
788 791 win_height = HEIGHT_NOT_DEFINED; win_height = HEIGHT_NOT_DEFINED;
File npv/main.c changed (mode: 100644) (index ffef877..01453c7)
31 31 #include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
32 32 /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
33 33 #include "npv/c_fixing.h" #include "npv/c_fixing.h"
34 /*---------------------------------------------------------------------------*/
35 #include "config.h"
36 /*---------------------------------------------------------------------------*/
34 37 #include "npv/global.h" #include "npv/global.h"
35 38 #include "npv/public.h" #include "npv/public.h"
36 39 #include "npv/fmt/public.h" #include "npv/fmt/public.h"
 
51 54 #include "npv/namespace/public.h" #include "npv/namespace/public.h"
52 55 #include "npv/namespace/main.c" #include "npv/namespace/main.c"
53 56 /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
54 #include "config.h"
55 /*---------------------------------------------------------------------------*/
56 57 #include "npv/local/state.frag.c" #include "npv/local/state.frag.c"
57 58 #include "npv/local/code.frag.c" #include "npv/local/code.frag.c"
58 59 #include "npv/public/code.frag.c" #include "npv/public/code.frag.c"
File npv/namespace/ffmpeg.h changed (mode: 100644) (index 1e1b61b..c3446ea)
23 23 #define AVUTIL_NOPTS_VALUE AV_NOPTS_VALUE #define AVUTIL_NOPTS_VALUE AV_NOPTS_VALUE
24 24 #define AVUTIL_PIX_FMT_RGB32 AV_PIX_FMT_RGB32 #define AVUTIL_PIX_FMT_RGB32 AV_PIX_FMT_RGB32
25 25 /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
26 #define avcodec_codec_t AVCodec
26 #define avcodec_codec_t const AVCodec
27 27 #define avcodec_codec_ctx_t AVCodecContext #define avcodec_codec_ctx_t AVCodecContext
28 28 #define avcodec_find_dec avcodec_find_decoder #define avcodec_find_dec avcodec_find_decoder
29 29 #define avcodec_send_pkt avcodec_send_packet #define avcodec_send_pkt avcodec_send_packet
File npv/public/state.frag.h changed (mode: 100644) (index d42064a..7e4c5ac)
1 1 STATIC int ep_fd_p; STATIC int ep_fd_p;
2 2 STATIC bool paused_p; STATIC bool paused_p;
3 #ifdef NPV_DEBUG
4 STATIC bool npv_debug_p;
5 #endif
File npv/video/local/code.frag.c changed (mode: 100644) (index de9a584..d6f7e54)
... ... STATIC void select_fr(s64 now, avutil_video_fr_ref_t **selected_fr,
410 410 fr_idx = 0; fr_idx = 0;
411 411 *selected_fr = NO_FR; *selected_fr = NO_FR;
412 412 selected_fr_delta = S64_MAX; selected_fr_delta = S64_MAX;
413 #ifdef NPV_DEBUG
414 if (npv_debug_p)
415 npv_perr("DEBUG:%s:scanning %u(max=%u) frames, now=%ld\n", __func__, dec_frs_p.n, dec_frs_p.n_max, now);
416 #endif
413 417 loop { loop {
414 418 u64 delta; u64 delta;
415 419
416 420 if (fr_idx == dec_frs_p.n) if (fr_idx == dec_frs_p.n)
417 421 break; break;
418 422 delta = s64_abs(now - (s64)dec_frs_p.a[fr_idx]->pts); delta = s64_abs(now - (s64)dec_frs_p.a[fr_idx]->pts);
423 #ifdef NPV_DEBUG
424 if (npv_debug_p)
425 npv_perr("DEBUG:%s:frame %u pts=%ld delta=%lu/%lu ms\n", __func__, fr_idx, (s64)dec_frs_p.a[fr_idx]->pts, delta, (delta * (u64)st_p.tb.num * 1000) / (u64)st_p.tb.den);
426 #endif
419 427 if (delta < selected_fr_delta) { if (delta < selected_fr_delta) {
420 428 *selected_fr = dec_frs_p.a[fr_idx]; *selected_fr = dec_frs_p.a[fr_idx];
421 429 *selected_fr_priv = dec_frs_p.priv_a[fr_idx]; *selected_fr_priv = dec_frs_p.priv_a[fr_idx];
File npv/xcb/local/code.frag.c changed (mode: 100644) (index 1695161..67b52aa)
... ... STATIC void npv_xcb_fullscreen_init_once(bool start_fullscreen)
478 478 npv_xcb_fullscreen_action(NET_WM_STATE_ADD); npv_xcb_fullscreen_action(NET_WM_STATE_ADD);
479 479 } }
480 480 #undef NET_WM_STATE_ADD #undef NET_WM_STATE_ADD
481 #ifdef NPV_DEBUG
482 STATIC void npv_cmd_debug_toggle(void)
483 {
484 npv_debug_p = !npv_debug_p;
485 }
486 #endif
File npv/xcb/main.c changed (mode: 100644) (index f0e085b..f3c324c)
15 15 #include <xcb/xcb.h> #include <xcb/xcb.h>
16 16 #include <xcb/xfixes.h> #include <xcb/xfixes.h>
17 17 #include "npv/c_fixing.h" #include "npv/c_fixing.h"
18 /*----------------------------------------------------------------------------*/
19 #include "npv/config.h"
20 /*----------------------------------------------------------------------------*/
18 21 #include "npv/global.h" #include "npv/global.h"
19 22 #include "npv/public.h" #include "npv/public.h"
20 23 #include "npv/xcb/public.h" #include "npv/xcb/public.h"
21 24 #include "npv/video/public.h" #include "npv/video/public.h"
22 /*----------------------------------------------------------------------------*/
23 #include "npv/config.h"
24 /*----------------------------------------------------------------------------*/
25 25 #include "npv/xcb/local/state.frag.c" #include "npv/xcb/local/state.frag.c"
26 26 /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
27 27 #include "npv/xcb/local/code.frag.c" #include "npv/xcb/local/code.frag.c"
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