Commit Graph

12 Commits

Author SHA1 Message Date
Vadim Yanitskiy 408be3638b procqueue: add item type enum (source, sink, proc)
There are currently three types of prcessing queue items:

  - source (file, alsa, rtp)
  - proc (format, codec)
  - sink (file, alsa, rtp)

Let's assign corresponding type for each item.
This would facilitate logging and the queue checking.
2017-12-31 12:20:59 +01:00
Vadim Yanitskiy 3c20dac38c libosmogapk: use talloc for memory management 2017-12-31 12:20:59 +01:00
Vadim Yanitskiy 1f6f807bb3 procqueue: add processing state callback
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-31 12:20:59 +01:00
Vadim Yanitskiy c35ba8a725 libosmogapk: use Osmocom logging framework
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-31 12:20:59 +01:00
Vadim Yanitskiy a8d46571ce Add an 'osmo_gapk' prefix to the exposed symbols
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-31 12:20:59 +01:00
Vadim Yanitskiy 30209ceddd Install GAPK headers to '${includedir}/osmocom/gapk/'
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-12-31 12:20:59 +01:00
Harald Welte 0c655bce25 direct all log statements to stderr to avoid breaking stdout data out
The tool has the capability to be used in a pipe, so stdout should
recevie nothing else but actual codec/pcm data.
2017-05-28 19:44:26 +02:00
Harald Welte bd42eba35d Print some useful information while putting together the procqueue 2017-05-28 14:30:05 +02:00
Harald Welte 5912848d2e prepare gapk for dealing with variable-length frames
The existing architecture was modelled around fixed-length codec frame
sizes, which of course fails with multi-rate codecs such as AMR.
2017-05-28 10:44:06 +02:00
Harald Welte 07d691314c RTP: give meaningful error messages if something fails
In fact, it should probably be better to silently ignore all those
errors as opposed to aborting the entire processing queue?  But that's
for another patch...
2017-05-28 01:56:33 +02:00
Harald Welte f3d2ad6a19 add some more comments throughout the code 2017-05-27 16:42:14 +02:00
Harald Welte ce94d971e1 gapk: Add support for RTP input/output streams
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-11 11:38:23 +01:00