1 #ifndef NPV_AUDIO_MAIN_C
2 #define NPV_AUDIO_MAIN_C
4 * code protected with a GNU affero GPLv3 license
5 * copyright (C) 2020 Sylvain BERTRAND
15 #include <sys/timerfd.h>
16 #include <sys/epoll.h>
17 #include <libavcodec/avcodec.h>
18 #include <libavutil/avutil.h>
19 #include <libavutil/channel_layout.h>
20 #include <libavutil/error.h>
21 #include <libavutil/frame.h>
22 #include <libavutil/rational.h>
23 #include <libavutil/samplefmt.h>
24 #include <libavutil/opt.h>
25 #include <alsa/asoundlib.h>
26 #include "npv/c_fixing.h"
27 #include "npv/global.h"
28 #include "npv/public.h"
29 #include "npv/pkt_q/public.h"
30 #include "npv/fmt/public.h"
31 #include "npv/audio/public.h"
32 #include "npv/audio/filt/public.h"
33 #include "npv/video/public.h"
34 #include "npv/clk/public.h"
35 /*----------------------------------------------------------------------------*/
36 #include "npv/config.h"
37 /*----------------------------------------------------------------------------*/
38 #include "npv/namespace/ffmpeg.h"
39 #include "npv/audio/namespace/ffmpeg.h"
40 #include "npv/namespace/alsa.h"
41 #include "npv/audio/namespace/public.h"
42 #include "npv/audio/namespace/main.c"
43 /*----------------------------------------------------------------------------*/
45 * XXX: we don't know how the alsa silence machinery works, then we use brutal
48 /*----------------------------------------------------------------------------*/
49 #define DRAINING_TIMER_INTERVAL_NSECS_N 100000000 /* 0.1 sec */
50 /*----------------------------------------------------------------------------*/
51 #include "npv/audio/local/state.frag.c"
52 /*----------------------------------------------------------------------------*/
53 #include "npv/audio/local/code.frag.c"
54 #include "npv/audio/public/code.frag.c"
55 /*----------------------------------------------------------------------------*/
56 #undef DRAINING_TIMER_INTERVAL_NSECS_N
57 /*---------------------------------------------------------------------------*/
59 #include "npv/namespace/ffmpeg.h"
60 #include "npv/audio/namespace/ffmpeg.h"
61 #include "npv/namespace/alsa.h"
62 #include "npv/audio/namespace/public.h"
63 #include "npv/audio/namespace/main.c"