path: root/src/main.c
AgeCommit message (Collapse)AuthorFilesLines
2017-12-31osmo-gapk: use more convenient name for the source fileVadim Yanitskiy1-679/+0
Since GAPK package contains a library and the representative osmo-gapk application, the 'main.c' looks a bit confusing. Let's use the common naming scheme.
2017-12-31osmo-gapk: create a common shutdown functionVadim Yanitskiy1-14/+18
Previously the code intended to shutdown the osmo-gapk application was repeated two times. It's better to have a single function.
2017-12-31osmo-gapk: add an option to enable / disable benchmarkVadim Yanitskiy1-3/+13
If the codec benchmarking is required in particular case, it could be activated by a special command line option introduced by this change.
2017-12-31benchmark: add functions to get cycle and frame countVadim Yanitskiy1-19/+21
To simplify the benchrarking process via the library API, this change introduces two new functions, which are intended to provide total cycle and frame count.
2017-12-31benchmark: allocate memory dynamicallyVadim Yanitskiy1-1/+10
Having statically allocated memory for benchmark data of every codec causes high memory usage, especially if actual benchmarking is not required for a particular use case. Instead of that, let's provide an optional opportunity to enable benchmarking for a particular codec by calling the osmo_gapk_bench_enable(). The required amount of memory would be allocated, and then can be freed by calling the osmo_gapk_bench_free() or manually.
2017-12-31benchmark: move benchmark_dump() outside the libraryVadim Yanitskiy1-0/+33
The benchmark_dump() is only used by the osmo-gapk binary, and is intended to prepare and print benchmarking results to stderr, what is most likely unusable for the library users.
2017-12-31Add an 'osmo_gapk' prefix to the exposed symbolsVadim Yanitskiy1-37/+38
To avoid a naming conflict between libosmogapk and other projects during linkage, all the exposed symbols should have an unique prefix. Let's use 'osmo_gapk' for that.
2017-12-31Install GAPK headers to '${includedir}/osmocom/gapk/'Vadim Yanitskiy1-4/+4
To be able to use the library, external applications need to know, which symbols are exposed. This information is provided by header files, which are being installed to a system's ${includedir} since this change.
2017-05-28print_help(): Fix formatting of help textHarald Welte1-4/+2
2017-05-28print meaningful error messages if something goes wrong in main/pqHarald Welte1-7/+24
2017-05-28Add ALSA input/output support to GAPKHarald Welte1-3/+43
The ALSA source/sink uses the pcm-s16le format.
2015-12-30main: Fixup the help screenSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <>
2014-05-08Add cycle benchmarking supportHarald Welte1-0/+3
This enables benchmarking of the codec. It will print the amount of CPU cycles needed for encoding/decoding a single 20ms frame on average.
2013-02-11gapk: make sure the output file is closed/flushed on ctrl+cHarald Welte1-1/+21
This is useful particularly in case you are reading from RTP and writing to a file, and don't want truncated codec frames in your file.
2013-02-11gapk: Add support for RTP input/output streamsHarald Welte1-8/+108
Instead of having only file-based I/O, this enables gapk to receive and send RTP streams, e.g. from live GSM network equipment like sysmoBTS/nanoBTS. Support is currently simplistic. On transmit, there is hard-coded codec type of full-rate GSM. On receive-side, we should auto-detect the format based on frame size and/or payload type, but we don't do that yet at all.
2013-02-11gapk main: move fh_in and fh_out to sub-structures in a unionHarald Welte1-16/+31
this is done in preparation to provide something else but file input/output.
2010-11-11Add a real main method to does the jobSylvain Munaut1-1/+405
Signed-off-by: Sylvain Munaut <>
2010-10-24Initial skeleton importSylvain Munaut1-0/+23
Signed-off-by: Sylvain Munaut <>