aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2017-12-31libosmogapk: introduce the internal root talloc contextVadim Yanitskiy1-0/+1
In order to simplify memory leak debugging, this change introduces the library's internal talloc context that may be changed by external application by calling the osmo_gapk_set_talloc_ctx().
2017-12-31procqueue: add processing state callbackVadim Yanitskiy1-0/+1
In some cases it's required to wait for some queue items to finish processing. For example, the ALSA sink writes the audio samples to the buffer in non-blocking mode, so as soon as all of them will be written, a program may finish execution, causing the playback abort. To prevent that, this change extends the library's API, allowing each queue item to have a processing state callback that returns a positive integer if processing is not finished yet, and 0 otherwise.
2017-12-31libosmogapk: use Osmocom logging frameworkVadim Yanitskiy3-0/+51
Since this change, the libosmogapk uses the Osmocom logging framework. By default, logging is disabled and could be enabled by the external applications calling the osmo_gapk_log_init() with a desired log target as an argument.
2017-12-31procqueue: use linuxlist to store queue itemsVadim Yanitskiy1-2/+6
The usage of linuxlist is more flexible than having a limited array of pointers. This approach allows to have as much items in a processing queue as required.
2017-12-31procqueue: store output buffers inside queue itemsVadim Yanitskiy1-1/+2
An output buffer belongs to its queue item, so it will be more correctly to store its pointer inside the osmo_gapk_pq_item.
2017-12-31procqueue: use unsigned int for I/O frame size fieldsVadim Yanitskiy1-2/+2
A frame size cannot be negative, so 'unsigned' is more suitable for frame size fields.
2017-12-31benchmark: add functions to get cycle and frame countVadim Yanitskiy1-0/+5
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 Yanitskiy2-2/+6
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: get rid of 'static inline' definitionVadim Yanitskiy1-18/+16
The usage of a 'static inline' function definition in the 'bench.h' is resulting in separate independent function definitions in each translation unit from which the header is included. This is increasing the size of compiled code unnecessarily.
2017-12-31benchmark: move benchmark impl to a private headerVadim Yanitskiy3-25/+54
There is no need to expose the implementation details of both BENCHMARK_START and BENCHMARK_STOP macros via public header. This change moves them to a separate private header 'bench.h'.
2017-12-31benchmark: move benchmark_dump() outside the libraryVadim Yanitskiy1-2/+0
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 Yanitskiy4-62/+82
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-31procqueue: expose the processing queue struct definitionVadim Yanitskiy1-2/+9
To be able to use processing queues from outside, the pq struct should be shared in the corresponding header file.
2017-12-31Use '#pragma once' instead of include guardVadim Yanitskiy7-29/+8
The most compilers today do support the '#pragma once', which is designed to cause the current source file to be included only once in a single compilation. One has several advantages, including: less code, avoidance of name clashes, and sometimes improvement in compilation speed. See: https://en.wikipedia.org/wiki/Pragma_once for details.
2017-12-31Install GAPK headers to '${includedir}/osmocom/gapk/'Vadim Yanitskiy8-12/+16
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-28Add support for RTP with GSM-HR payload according to RFC5993Harald Welte1-0/+2
This is incompatible with the ETSI TS 101 318 format!
2017-05-28Add support for RTP with GSM-HR payload according to ETSI TS 101 318Harald Welte1-0/+3
2017-05-28Add "rtp-efr" format support for RTP payload according to RFC3551 4.5.9Harald Welte1-0/+2
The RTP EFR payload is a bit like the FR payload: one nibble magic marker, then followed by the actual codec bits. So we need to add/remove that magic marker and shift the remainder by one nibble.
2017-05-28Fix HR codec block sizesHarald Welte1-0/+2
The ETSI reference codec actually uses an array of 20/22 16bit values rather than a "canonical" format. The conversion is what fmt_hr_ref.c is doing. However, codec_hr.c must then subsequently not check for the canonical input/output sizes, but those specific to it.
2017-05-28Add AMR codec supportHarald Welte2-0/+5
After merging this change, there is support for the AMR codec (by means of libopencore-amr, which is already used for EFR). In terms of gapk formats, we introdude * the "amr-opencore" format, which serves both as the canonical format, and as the input format to opencore-amrnb itself. * the "rtp-amr" format, which is the payload of RFC4867 octet-aligned mode You can use the following command for a real-time RTP playback for AMR frames: ./gapk -I 0.0.0.0/30000 -f rtp-amr -A default -g rawpcm-s16le
2017-05-28more API documentationHarald Welte3-0/+26
2017-05-28prepare gapk for dealing with variable-length framesHarald Welte3-3/+3
The existing architecture was modelled around fixed-length codec frame sizes, which of course fails with multi-rate codecs such as AMR.
2017-05-28introduce #defines for canonical length + use themHarald Welte1-0/+5
2017-05-28Add ALSA input/output support to GAPKHarald Welte1-0/+3
The ALSA source/sink uses the pcm-s16le format.
2016-01-01benchmark: Fix cpuid clobberingSylvain Munaut1-2/+2
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-11-05ensure all gapk header files are included in 'dist'v0.3Harald Welte1-1/+5
2014-05-08Add cycle benchmarking supportHarald Welte2-0/+198
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: Add support for RTP input/output streamsHarald Welte1-0/+5
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.
2011-02-25format/fmt_ti: Add support for EFR variantSylvain Munaut1-0/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-02-25format/fmt_ti: Add support for HR variantSylvain Munaut1-0/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-02-25format: Add support for the TI calypso/locosto dumped buffer formatSylvain Munaut1-0/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-12[1/4] HR support: Add autotools skeleton for libgsmhrSylvain Munaut3-0/+45
Not functional yet, just the autotools magic to make a library Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11format: Add support for Raw PCM Signed 16 bits Little EndianSylvain Munaut1-0/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11procqueue: Add Codec tasksSylvain Munaut1-0/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11procqueue: Add format conversion tasksSylvain Munaut1-0/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11procqueue: Add file related tasksSylvain Munaut1-0/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11procqueue: Add some mechanism to queue 'processing items' on the framesSylvain Munaut1-0/+43
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11format: Add function to get format by nameSylvain Munaut1-0/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11codec: Add fields in struct codec_desc to support encoding/decodingSylvain Munaut1-0/+13
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11format: Add support for .amr files encapsulating EFR dataSylvain Munaut1-0/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11format: Add fields in format descriptor for fixed headersSylvain Munaut1-0/+3
Very simple header support, but that's all we need for AMR Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11format: Add support for the file read/written by the Racal 6103E ms test setSylvain Munaut1-0/+5
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-05format: Add support for the 3GPP HR reference vocoder file/frame formatsSylvain Munaut1-0/+4
Yes ... they use a different format for the decoder input than for the encoder output ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-05format: Add support for classic .gsm file/frame formatSylvain Munaut1-0/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-05format: Add initial format frameworkSylvain Munaut1-0/+48
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-29codec: Add preliminary codecs definitions for HR/FR/EFRSylvain Munaut2-1/+43
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-29utils: Add various bit manipulation related utilitesSylvain Munaut3-0/+106
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-24Initial skeleton importSylvain Munaut1-0/+0
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>