For a long time the RTP payload type was hard-coded for outgoing
frames. The problem is that according to RFC 3551 only GSM FR has
a static payload type value (see table 4, value 3). For other
codecs the payload type may be negotiated between the both
sides dynamically (i.e. in range 96-127).
Let's allow a binary/API user to configure this manually.
Change-Id: Ia07ed4e13b4a70c8bb4181564a8190861fd269da
Closes: OS#2482
Let's use the common string representation for item category
names, defined in the shared header, instead of defining
them in every file.
Change-Id: Ie0c449d77fa383cad27f67b8ce902bd071342dbb
This change adds two meta-information fields to the processing
queue item structure. Both of them will be used for more
detailed logging and for the human-readable processing
queue description.
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.
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.
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.
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.
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.
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...
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.