Commit Graph

16 Commits

Author SHA1 Message Date
Martin Hauke ee62e46019 Fix typos
Change-Id: Ie8054f3d484fe5d82cc5d91f159906a470fc4511
2019-07-17 22:45:14 +02:00
Vadim Yanitskiy 6f34c8f301 procqueue: introduce and use shared cat_name definitions
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
2018-01-15 00:25:44 +06:00
Vadim Yanitskiy 9e7e889278 procqueue: use queue / item names in logging 2017-12-31 12:20:59 +01:00
Vadim Yanitskiy 459791c488 procqueue: add item catedory and sub-category fields
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.
2017-12-31 12:20:59 +01:00
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 ac3517e715 alsa/file input: return -1 on eof (short read)
This will permit for a more graceful error than the next element in the
processing chain complaining that there's a 0-length input.
2017-05-28 20:06:01 +02: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 f3d2ad6a19 add some more comments throughout the code 2017-05-27 16:42:14 +02:00
Sylvain Munaut d9fb0e37c8 procqueue: Add file related tasks
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-11 20:45:24 +01:00