summaryrefslogtreecommitdiff
path: root/buffer_tree.h (follow)
Commit message (Collapse)AuthorAge
* Switch to SPDX identifiers.Andre Noll2026-03-17
| | | | | | | | Generated with sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h followed by manually tweaking the result a bit. No license change intended.
* Improve buffer tree documentation.Andre Noll2025-10-08
| | | | | Minor improvements to the API description in buffer_tree.h, a lot of \a and \p removal in buffer_tree.c, and the addition of some missing \ref statements.
* btr: Streamline the documentation of buffer_tree.h.Andre Noll2024-05-08
| | | | Nothing major, just a few minor English issues.
* Constify buffer tree API.Andre Noll2024-05-08
| | | | | | A lot of functions of the buffer tree API don't modify the memory referenced by the pointers passed. This patch marks these pointer arguments as constant.
* Shorten copyright notice.Andre Noll2017-09-22
| | | | | | | | | | | | | | | | | | | | | The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
* Update year in copyright headers.Andre Noll2015-01-12
| | | | | | | | | | | | | | | | Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
* doc: Change email address to maan@tuebingen.mpg.deAndre Noll2014-08-18
| | | | | | | | | | | | | | The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
* Change copyright year to 2014.Andre Noll2014-02-22
| | | | | | | | | This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
* buffer_tree: Improve btr_splice_out_node().Andre Noll2013-09-29
| | | | | | This changes btr_splice_out_node() to take a pointer to a btrn, just like btr_remove_node(). This allows to set the variable to NULL after the node has been spliced out. The callers are updated accordingly.
* Change copyright year to 2013.Andre Noll2013-03-25
| | | | Better late than never.
* check_wav: Ask parent nodes before falling back to defaults.Andre Noll2012-11-25
| | | | | | | | | | | | | This instructs the ->execute handler of the check_wav task to ask its parent nodes for the channel count, sample rate and sample format in case no wav header was found and no value for the query was given at the command line. Currently this can never succeed, since the only parent node of the check_wav task is the stdin task, which has no clue about these things. However, once check_wav is being used by the resample filter, one parent might be a decoder which can tell. This requires to add the new public btr_parent() to buffer_tree.c to let the check_wav node obtain the node to start the search from.
* Merge branch 't/btr_improvements'Andre Noll2012-07-19
|\ | | | | | | | | | | | | | | 146316 btr_exec_up(): Also ask given node. 6d9c35 btr: Introduce btr_add_output_dont_free(). 4ac313 btr: Remove btr_free_node(). Has been cooking in next for a week.
| * btr: Introduce btr_add_output_dont_free().Andre Noll2012-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, all buffers which are fed to a buffer tree must be allocated on the heap since the buffer tree code automatically frees the buffer once its refcount dropped to zero. The new afh receiver, however, mmaps the audio file and likes to feed chunks of this memory map into the buffer tree. This is currently impossible because such buffers must not be freed. This patch adds the new public function btr_add_output_dont_free() which works like btr_add_output() but sets the new dont_free bit which prevents the buffer from being deallocated. Also btr_inplace_ok() is changed to return "false" whenever there exists a buffer in the input queue with the dont_free bit set.
| * btr: Remove btr_free_node().Andre Noll2012-07-08
| | | | | | | | | | | | | | | | | | This has turned out to be source for bugs. Deallocate everything in btr_remove_node() hence making removing the node and freeing its resources an atomic operation. To avoid dangling pointers to freed btrn nodes, the argument of btr_remove_node() is changed to to struct btr_node **btrnp.
* | buffer_tree.h: Fix gcc warning.Andre Noll2012-06-26
|/ | | | | | | | | "loglevel" is declared as a global variable elsewhere, and gcc-3.3.3 complains beacuse of this: buffer_tree.h:199: warning: declaration of `loglevel' shadows a global declaration Just call the thing "ll".
* Change year in copyright message to 2012.Andre Noll2012-01-07
|
* btr: Introduce btr_next_buffer_omit().Andre Noll2011-11-13
| | | | This function is useful for the flac decoder.
* Replace 2010 in copyright message by 2011.Andre Noll2011-01-17
|
* audiod: Handle crashes of para_server more robustly.Andre Noll2010-10-10
| | | | | | | | | | | | In case para_server dies unexpectedly, para_audiod may still have a partial status item in the buffer tree node of the client task which can lead to a busy loop. Fix this by flushing the input queue and invalidate the current audio format to prevent recreating a buffer tree before the status task resumes. There is already flush_input_queue() in buffer_tree.c but that can't be called by audiod.c as it is a static function. Make it public and rename it to btr_drain() which is shorter and more to the point and has the usual btr_ prefix.
* Change year in COPYRIGHT to 2010.Andre Noll2010-04-05
| | | | Hey, this is earlier than last year :)
* btr: Rename btr_bytes_pending() and make it public.Andre Noll2010-02-14
| | | | | | The oggvorbis decoder needs to know this info, so make it public. As we have already btr_get_input_queue_size() it is natural to rename btr_bytes_pending() to btr_get_output_queue_size().
* Introduce btr_pool_get_buffers().Andre Noll2010-02-13
| | | | | | | | | This allows the users of the buffer pool API to obtain references to both parts of the buffer pool area in case there is free space available at the end of the area as well as at the beginning. This is needed for reading from file descriptors where reading less than a full datagram would discard the remaining part (DCCP and UDP).
* [btr] Complete source code documentation.Andre Noll2010-01-19
|
* [btr] Add more documentation.Andre Noll2010-01-19
|
* [btr] Documentation update.Andre Noll2010-01-17
|
* [btr] Add more documentation.Andre Noll2010-01-15
|
* [btr] Add more documentation.Andre Noll2010-01-15
|
* btr support for para_client.Andre Noll2010-01-15
| | | | | | | | | | The use of the client code in audiod requires a node to be inserted as the _parent_ of some existing node, which was not neccessary before. Therefore a new btrn pointer for the child node is added to struct btr_node_description and btr_new_node() is adjusted accordingly. The patch also adds a small helper sched_request_barrier() to the scheduler.
* Add documentation of struct btr_node and btr_pool.Andre Noll2010-01-14
|
* Introduce btr_node_description.Andre Noll2010-01-14
| | | | | | | | | As the number of arguments to btr_new_node() grows, the code becomes hard to read, especially since some callers must set many of the arguments to NULL. Using a pointer to a struct has the additional advantage that adding new parameters does no longer require to touch all callers.
* [btr] Export btr_pool_size().Andre Noll2010-01-10
|
* Fix stream grabbing.Andre Noll2010-01-10
| | | | | | | | The new code uses a buffer tree node which is inserted into an existing buffer tree if possible, or put to the inactive list. The grab command now takes the name of an existing parent node. The new grab client node will be inserted as a child of this parent node.
* Add btr pool support to the fecdec filter.Andre Noll2010-01-09
| | | | | | | | | | | | | | | The consumers of the output of fecdec are typically the decoders which have requirements on the minimal amount of data available in one chunk. Using a buffer pool minimizes the number of memcpy() operations needed during btr_merge when the current buffer is too small. To fit the needs of fecdec, a new function btr_copy() is introduced which copies a data buffer into the btr pool area and generates btr buffers and references. btr_add_output_pool() had to be adjusted a bit and all callers have been changed to match. The patch also adds a new field "name" to the buffer_pool structure. This makes the log output more readable.
* Implement buffer tree pool support.Andre Noll2010-01-09
| | | | | Using a buffer pool avoids quite some uses of memcpy() and memmove(). This patch also switches over the http receiver to use buffer pools.
* Switch audiod over to the buffer tree API.Andre Noll2010-01-07
| | | | Still a bit rough and there are too many btr merges.
* [btr] Add the node type parameter to btr_node_status().Andre Noll2010-01-05
| | | | | | This allows to have a single function which can be called from both the pre_select and the post_select methods of all receivers/ filters/writers and from the stdin and stdout tasks.
* [btr] Split btr_del_node() into two functions.Andre Noll2010-01-05
| | | | | Also, close filter/receiver nodes in filter.c/recv.c instead of in each post_select().
* Introduce btr_node_status() and add btr support to the file writer.Andre Noll2010-01-05
|
* Add btr support for the amp filter.Andre Noll2010-01-03
|
* [btr:] Add btr_log_tree().Andre Noll2010-01-03
|
* [btr:] Rename btr_merge().Andre Noll2010-01-03
|
* Consolidate decoder code by introducing prepare_filter_node().Andre Noll2010-01-03
|
* [btr]: Add btr_merge_to().Andre Noll2010-01-03
|
* btr_slice_out_node() cleanup.Andre Noll2009-12-31
|
* Add btr support to filter code.Andre Noll2009-12-31
| | | | | A bit rough and only the mp3dec filter kind of works. Execute support for mp3dec is also missing.
* para_write: Make check for wav header work with btr.Andre Noll2009-12-30
|
* buffer_tree: Add code to splice out a node of the buffer tree.Andre Noll2009-12-29
|
* write/alsa: Add btr support.Andre Noll2009-12-29
| | | | | | | Not yet finished. Supporting btr required some changes in the buffer tree code as well.
* stdin.c: btr preparations.Andre Noll2009-12-29
|
* btr: Make it kind of work for http recv + stdout.Andre Noll2009-12-29
|