xine-lib: xine-lib-1.2.13/src/xine-engine/buffer.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
buffer.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <pthread.h>`
`#include <xine/buffer.h>`
`#include <xine/xineutils.h>`
`#include <xine/xine_internal.h>`
`#include "xine_private.h"`

## Data Structures
struct | _fifo_buffer_t
struct | be_ei_t

## Macros
#define | LOG_MODULE "buffer"
#define | LOG_VERBOSE
#define | LARGE_NUM 0x7fffffff

## Functions
static void | _fifo_mark_native (_fifo_buffer_t *fifo)
static int | _fifo_is_native (_fifo_buffer_t *fifo)
static void | _fifo_mux_init (_fifo_buffer_t *fifo)
static void | _fifo_mux_last (_fifo_buffer_t *fifo)
static void | fbc_dummy (fifo_buffer_t *fifo, void *data)
int | xine_fbc_set (fifo_buffer_t *_fifo, int on)
static int | _fbc_avail (_fifo_buffer_t *fifo)
static void | _fbc_reset (_fifo_buffer_t *fifo)
static void | _fbc_sub (_fifo_buffer_t *fifo, int n)
static void | buffer_pool_free (buf_element_t *element)
static buf_element_t * | _buffer_pool_size_alloc (_fifo_buffer_t *fifo, int n)
static buf_element_t * | buffer_pool_size_alloc (fifo_buffer_t *_fifo, size_t size)
static buf_element_t * | buffer_pool_alloc (fifo_buffer_t *_fifo)
static buf_element_t * | buffer_pool_realloc (buf_element_t *buf, size_t new_size)
static buf_element_t * | buffer_pool_try_alloc (fifo_buffer_t *_fifo)
static void | fifo_buffer_put (fifo_buffer_t *_fifo, buf_element_t *element)
static void | dummy_fifo_buffer_put (fifo_buffer_t *_fifo, buf_element_t *element)
static void | fifo_buffer_insert (fifo_buffer_t *_fifo, buf_element_t *element)
static void | dummy_fifo_buffer_insert (fifo_buffer_t *fifo, buf_element_t *element)
static buf_element_t * | fifo_buffer_get (fifo_buffer_t *_fifo)
static buf_element_t * | fifo_buffer_tget (fifo_buffer_t *_fifo, xine_ticket_t *ticket)
static void | fifo_buffer_clear (fifo_buffer_t *_fifo)
static void | _fifo_buffer_all_clear (_fifo_buffer_t *fifo)
static int | fifo_buffer_size (fifo_buffer_t *_fifo)
static uint32_t | fifo_buffer_data_size (fifo_buffer_t *_fifo)
static int | fifo_buffer_num_free (fifo_buffer_t *_fifo)
static void | fifo_buffer_dispose (fifo_buffer_t *_fifo)
static void | fifo_register_alloc_cb (fifo_buffer_t *_fifo, void(*cb)(fifo_buffer_t *fifo, void *data_cb), void *data_cb)
static void | fifo_register_put_cb (fifo_buffer_t *_fifo, void(*cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb), void *data_cb)
static void | fifo_register_get_cb (fifo_buffer_t *_fifo, void(*cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb), void *data_cb)
static void | fifo_unregister_alloc_cb (fifo_buffer_t *_fifo, void(*cb)(fifo_buffer_t *fifo, void *data_cb))
static void | fifo_unregister_put_cb (fifo_buffer_t *_fifo, void(*cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb))
static void | fifo_unregister_get_cb (fifo_buffer_t *_fifo, void(*cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb))
fifo_buffer_t * | _x_fifo_buffer_new (int num_buffers, uint32_t buf_size)
| Allocate and initialise new (empty) FIFO buffers.
fifo_buffer_t * | _x_dummy_fifo_buffer_new (int num_buffers, uint32_t buf_size)
| Allocate and initialise new dummy FIFO buffers.
void | _x_free_buf_elements (buf_element_t *head)
| Free chained list of buffer elements.

## Variables
static const uint8_t | _fifo_buf_type_index [256]

## Macro Definition Documentation

## ◆ LARGE_NUM

#define LARGE_NUM 0x7fffffff

Referenced by _buffer_pool_size_alloc(), and _x_fifo_buffer_new().

## ◆ LOG_MODULE

#define LOG_MODULE "buffer"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Function Documentation

## ◆ _buffer_pool_size_alloc()

static buf_element_t * _buffer_pool_size_alloc | ( | _fifo_buffer_t * | fifo,
|  | int | n )
| static

References _fbc_avail(), _x_extra_info_reset(), fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_buf_size, fifo_buffer_s::buffer_pool_cond_not_empty, fifo_buffer_s::buffer_pool_large_wait, fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::buffer_pool_num_free, fifo_buffer_s::buffer_pool_num_waiters, fifo_buffer_s::buffer_pool_top, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, be_ei_t::elem, buf_element_s::extra_info, LARGE_NUM, buf_element_s::max_size, buf_element_s::mem, be_ei_t::nbufs, buf_element_s::next, buf_element_s::pts, and buf_element_s::size.

Referenced by buffer_pool_realloc(), and buffer_pool_size_alloc().

## ◆ _fbc_avail()

static int _fbc_avail | ( | _fifo_buffer_t * | fifo | ) |
| static

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_num_free, and fbc_dummy().

Referenced by _buffer_pool_size_alloc(), buffer_pool_alloc(), and buffer_pool_free().

## ◆ _fbc_reset()

static void _fbc_reset | ( | _fifo_buffer_t * | fifo | ) |
| static

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_capacity, and fbc_dummy().

Referenced by fifo_buffer_clear().

## ◆ _fbc_sub()

static void _fbc_sub | ( | _fifo_buffer_t * | fifo,
|  | int | n )
| static

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, and fbc_dummy().

Referenced by buffer_pool_free().

## ◆ _fifo_buffer_all_clear()

static void _fifo_buffer_all_clear | ( | _fifo_buffer_t * | fifo | ) |
| static

References _fifo_mux_last(), _fifo_buffer_t::b, buffer_pool_free(), be_ei_t::elem, fifo_buffer_s::fifo_data_size, fifo_buffer_s::fifo_size, fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::last, fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, NULL, and buf_element_s::source.

Referenced by fifo_buffer_dispose().

## ◆ _fifo_is_native()

static int _fifo_is_native | ( | _fifo_buffer_t * | fifo | ) |
| static

References _fifo_buffer_t::b, _fifo_buffer_t::fds, and fifo_buffer_s::fifo_data_size.

Referenced by _fifo_mux_last(), buffer_pool_alloc(), buffer_pool_realloc(), buffer_pool_size_alloc(), buffer_pool_try_alloc(), fifo_buffer_dispose(), fifo_buffer_get(), fifo_buffer_insert(), fifo_buffer_put(), and fifo_buffer_tget().

## ◆ _fifo_mark_native()

static void _fifo_mark_native | ( | _fifo_buffer_t * | fifo | ) |
| static

References _fifo_buffer_t::b, _fifo_buffer_t::fds, and fifo_buffer_s::fifo_data_size.

Referenced by _x_fifo_buffer_new().

## ◆ _fifo_mux_init()

static void _fifo_mux_init | ( | _fifo_buffer_t * | fifo | ) |
| static

References _fifo_buffer_t::b, fifo_buffer_s::first, and _fifo_buffer_t::last_add.

Referenced by _x_fifo_buffer_new().

## ◆ _fifo_mux_last()

static void _fifo_mux_last | ( | _fifo_buffer_t * | fifo | ) |
| static

References _fifo_is_native(), _fifo_buffer_t::b, fifo_buffer_s::first, fifo_buffer_s::last, _fifo_buffer_t::last_add, and buf_element_s::next.

Referenced by _fifo_buffer_all_clear(), and fifo_buffer_clear().

## ◆ _x_dummy_fifo_buffer_new()

fifo_buffer_t * _x_dummy_fifo_buffer_new | ( | int | num_buffers,
|  | uint32_t | buf_size )

Allocate and initialise new dummy FIFO buffers.

Parameters

  num_buffer | Number of dummy buffers to allocate.
  buf_size | Size of each buffer.

Only used by video and audio decoder loops.

References _x_fifo_buffer_new(), dummy_fifo_buffer_insert(), dummy_fifo_buffer_put(), and put.

Referenced by _x_audio_decoder_init(), and _x_video_decoder_init().

## ◆ _x_fifo_buffer_new()

fifo_buffer_t * _x_fifo_buffer_new | ( | int | num_buffers,
|  | uint32_t | buf_size )

Allocate and initialise new (empty) FIFO buffers.

Parameters

  num_buffer | Number of buffers to allocate.
  buf_size | Size of each buffer.

Only used by video and audio decoder loops.

References _fifo_mark_native(), _fifo_mux_init(), fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, buffer_pool_alloc(), fifo_buffer_s::buffer_pool_alloc, fifo_buffer_s::buffer_pool_base, fifo_buffer_s::buffer_pool_buf_size, fifo_buffer_s::buffer_pool_capacity, fifo_buffer_s::buffer_pool_cond_not_empty, buffer_pool_free(), fifo_buffer_s::buffer_pool_large_wait, fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::buffer_pool_num_free, fifo_buffer_s::buffer_pool_num_waiters, buffer_pool_realloc(), fifo_buffer_s::buffer_pool_realloc, buffer_pool_size_alloc(), fifo_buffer_s::buffer_pool_size_alloc, fifo_buffer_s::buffer_pool_top, buffer_pool_try_alloc(), fifo_buffer_s::buffer_pool_try_alloc, fifo_buffer_s::clear, fifo_buffer_s::data_size, fifo_buffer_s::dispose, be_ei_t::ei, be_ei_t::elem, buf_element_s::extra_info, fifo_buffer_clear(), fifo_buffer_data_size(), fifo_buffer_dispose(), fifo_buffer_get(), fifo_buffer_insert(), fifo_buffer_num_free(), fifo_buffer_put(), fifo_buffer_size(), fifo_buffer_tget(), fifo_buffer_s::fifo_num_waiters, fifo_register_alloc_cb(), fifo_register_get_cb(), fifo_register_put_cb(), fifo_buffer_s::fifo_size, fifo_unregister_alloc_cb(), fifo_unregister_get_cb(), fifo_unregister_put_cb(), fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::get, fifo_buffer_s::get_cb, fifo_buffer_s::get_cb_data, fifo_buffer_s::insert, LARGE_NUM, fifo_buffer_s::last, buf_element_s::max_size, buf_element_s::mem, fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, fifo_buffer_s::not_empty, NULL, fifo_buffer_s::num_free, fifo_buffer_s::put, fifo_buffer_s::put_cb, fifo_buffer_s::put_cb_data, fifo_buffer_s::register_alloc_cb, fifo_buffer_s::register_get_cb, fifo_buffer_s::register_put_cb, fifo_buffer_s::size, buf_element_s::source, fifo_buffer_s::tget, fifo_buffer_s::unregister_alloc_cb, fifo_buffer_s::unregister_get_cb, fifo_buffer_s::unregister_put_cb, and xine_mallocz_aligned().

Referenced by _x_audio_decoder_init(), _x_dummy_fifo_buffer_new(), and _x_video_decoder_init().

## ◆ _x_free_buf_elements()

void _x_free_buf_elements | ( | buf_element_t * | head | ) |

Free chained list of buffer elements.

Parameters

  head | List to free. May be NULL.

References buf_element_s::free_buffer, buf_element_s::next, and NULL.

Referenced by audio_decoder_loop().

## ◆ buffer_pool_alloc()

static buf_element_t * buffer_pool_alloc | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fbc_avail(), _fifo_is_native(), _x_extra_info_reset(), fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_buf_size, fifo_buffer_s::buffer_pool_cond_not_empty, fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::buffer_pool_num_free, fifo_buffer_s::buffer_pool_num_waiters, fifo_buffer_s::buffer_pool_top, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, be_ei_t::elem, buf_element_s::extra_info, buf_element_s::max_size, buf_element_s::mem, be_ei_t::nbufs, buf_element_s::next, buf_element_s::pts, and buf_element_s::size.

Referenced by _x_fifo_buffer_new().

## ◆ buffer_pool_free()

static void buffer_pool_free | ( | buf_element_t * | element | ) |
| static

References _, _fbc_avail(), _fbc_sub(), _x_abort, _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_capacity, fifo_buffer_s::buffer_pool_cond_not_empty, fifo_buffer_s::buffer_pool_large_wait, fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::buffer_pool_num_free, fifo_buffer_s::buffer_pool_num_waiters, fifo_buffer_s::buffer_pool_top, be_ei_t::elem, be_ei_t::nbufs, buf_element_s::next, and buf_element_s::source.

Referenced by _fifo_buffer_all_clear(), _x_fifo_buffer_new(), buffer_pool_realloc(), fifo_buffer_clear(), fifo_buffer_get(), fifo_buffer_insert(), fifo_buffer_put(), and fifo_buffer_tget().

## ◆ buffer_pool_realloc()

static buf_element_t * buffer_pool_realloc | ( | buf_element_t * | buf,
|  | size_t | new_size )
| static

References _buffer_pool_size_alloc(), _fifo_is_native(), _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_alloc, fifo_buffer_s::buffer_pool_buf_size, fifo_buffer_s::buffer_pool_capacity, buffer_pool_free(), fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::buffer_pool_num_free, fifo_buffer_s::buffer_pool_top, be_ei_t::elem, buf_element_s::free_buffer, buf_element_s::max_size, be_ei_t::nbufs, buf_element_s::next, NULL, and buf_element_s::source.

Referenced by _x_fifo_buffer_new().

## ◆ buffer_pool_size_alloc()

static buf_element_t * buffer_pool_size_alloc | ( | fifo_buffer_t * | _fifo,
|  | size_t | size )
| static

References _buffer_pool_size_alloc(), _fifo_is_native(), _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_alloc, fifo_buffer_s::buffer_pool_buf_size, fifo_buffer_s::buffer_pool_capacity, and fifo_buffer_s::buffer_pool_mutex.

Referenced by _x_fifo_buffer_new().

## ◆ buffer_pool_try_alloc()

static buf_element_t * buffer_pool_try_alloc | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fifo_is_native(), _x_extra_info_reset(), _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_buf_size, fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::buffer_pool_num_free, fifo_buffer_s::buffer_pool_top, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, be_ei_t::elem, buf_element_s::extra_info, buf_element_s::max_size, buf_element_s::mem, be_ei_t::nbufs, buf_element_s::next, NULL, buf_element_s::pts, and buf_element_s::size.

Referenced by _x_fifo_buffer_new().

## ◆ dummy_fifo_buffer_insert()

static void dummy_fifo_buffer_insert | ( | fifo_buffer_t * | fifo,
|  | buf_element_t * | element )
| static

References buf_element_s::free_buffer.

Referenced by _x_dummy_fifo_buffer_new().

## ◆ dummy_fifo_buffer_put()

static void dummy_fifo_buffer_put | ( | fifo_buffer_t * | _fifo,
|  | buf_element_t * | element )
| static

References _fifo_buffer_t::b, buf_element_s::free_buffer, fifo_buffer_s::mutex, fifo_buffer_s::put_cb, and fifo_buffer_s::put_cb_data.

Referenced by _x_dummy_fifo_buffer_new().

## ◆ fbc_dummy()

static void fbc_dummy | ( | fifo_buffer_t * | fifo,
|  | void * | data )
| static

Referenced by _fbc_avail(), _fbc_reset(), _fbc_sub(), fifo_register_alloc_cb(), and xine_fbc_set().

## ◆ fifo_buffer_clear()

static void fifo_buffer_clear | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fbc_reset(), _fifo_mux_last(), _fifo_buffer_t::b, BUF_CONTROL_BASE, BUF_MAJOR_MASK, buffer_pool_free(), be_ei_t::elem, fifo_buffer_s::fifo_data_size, fifo_buffer_s::fifo_size, fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::last, fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, NULL, buf_element_s::size, and buf_element_s::type.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_data_size()

static uint32_t fifo_buffer_data_size | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fifo_buffer_t::b, fifo_buffer_s::fifo_data_size, and fifo_buffer_s::mutex.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_dispose()

static void fifo_buffer_dispose | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fifo_buffer_all_clear(), _fifo_is_native(), _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_base, fifo_buffer_s::buffer_pool_cond_not_empty, fifo_buffer_s::buffer_pool_mutex, fifo_buffer_s::mutex, fifo_buffer_s::not_empty, and xine_free_aligned().

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_get()

static buf_element_t * fifo_buffer_get | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fifo_is_native(), _fifo_buffer_t::b, buffer_pool_free(), fifo_buffer_s::fifo_data_size, fifo_buffer_s::fifo_num_waiters, fifo_buffer_s::fifo_size, fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::get_cb, fifo_buffer_s::get_cb_data, fifo_buffer_s::last, _fifo_buffer_t::last_add, fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, fifo_buffer_s::not_empty, NULL, and buf_element_s::size.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_insert()

static void fifo_buffer_insert | ( | fifo_buffer_t * | _fifo,
|  | buf_element_t * | element )
| static

References _fifo_is_native(), _fifo_buffer_t::b, buffer_pool_free(), fifo_buffer_s::fifo_data_size, fifo_buffer_s::fifo_num_waiters, fifo_buffer_s::fifo_size, fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::last, _fifo_buffer_t::last_add, fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, fifo_buffer_s::not_empty, and buf_element_s::size.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_num_free()

static int fifo_buffer_num_free | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_mutex, and fifo_buffer_s::buffer_pool_num_free.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_put()

static void fifo_buffer_put | ( | fifo_buffer_t * | _fifo,
|  | buf_element_t * | element )
| static

References _fifo_buf_type_index, _fifo_is_native(), _fifo_buffer_t::b, BUF_FLAG_MERGE, fifo_buffer_s::buffer_pool_capacity, buffer_pool_free(), buf_element_s::decoder_flags, fifo_buffer_s::fifo_data_size, fifo_buffer_s::fifo_num_waiters, fifo_buffer_s::fifo_size, fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::last, _fifo_buffer_t::last_add, fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, fifo_buffer_s::not_empty, NULL, buf_element_s::pts, fifo_buffer_s::put_cb, fifo_buffer_s::put_cb_data, buf_element_s::size, buf_element_s::type, and type.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_size()

static int fifo_buffer_size | ( | fifo_buffer_t * | _fifo | ) |
| static

References _fifo_buffer_t::b, fifo_buffer_s::fifo_size, and fifo_buffer_s::mutex.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_buffer_tget()

static buf_element_t * fifo_buffer_tget | ( | fifo_buffer_t * | _fifo,
|  | xine_ticket_t * | ticket )
| static

References _fifo_is_native(), xine_ticket_s::acquire, _fifo_buffer_t::b, buffer_pool_free(), fifo_buffer_s::fifo_data_size, fifo_buffer_s::fifo_num_waiters, fifo_buffer_s::fifo_size, fifo_buffer_s::first, buf_element_s::free_buffer, fifo_buffer_s::get_cb, fifo_buffer_s::get_cb_data, fifo_buffer_s::last, _fifo_buffer_t::last_add, mode(), fifo_buffer_s::mutex, be_ei_t::nbufs, buf_element_s::next, fifo_buffer_s::not_empty, NULL, xine_ticket_s::release, buf_element_s::size, and xine_ticket_s::ticket_revoked.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_register_alloc_cb()

static void fifo_register_alloc_cb | ( | fifo_buffer_t * | _fifo,
|  | void(* | cb )(fifo_buffer_t *fifo, void *data_cb),
|  | void * | data_cb )
| static

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, BUF_MAX_CALLBACKS, fbc_dummy(), fifo_buffer_s::mutex, and NULL.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_register_get_cb()

static void fifo_register_get_cb | ( | fifo_buffer_t * | _fifo,
|  | void(* | cb )(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb),
|  | void * | data_cb )
| static

References BUF_MAX_CALLBACKS, fifo_buffer_s::get_cb, fifo_buffer_s::get_cb_data, fifo_buffer_s::mutex, and NULL.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_register_put_cb()

static void fifo_register_put_cb | ( | fifo_buffer_t * | _fifo,
|  | void(* | cb )(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb),
|  | void * | data_cb )
| static

References BUF_MAX_CALLBACKS, fifo_buffer_s::mutex, NULL, fifo_buffer_s::put_cb, and fifo_buffer_s::put_cb_data.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_unregister_alloc_cb()

static void fifo_unregister_alloc_cb | ( | fifo_buffer_t * | _fifo,
|  | void(* | cb )(fifo_buffer_t *fifo, void *data_cb) )
| static

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, and fifo_buffer_s::mutex.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_unregister_get_cb()

static void fifo_unregister_get_cb | ( | fifo_buffer_t * | _fifo,
|  | void(* | cb )(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb) )
| static

References fifo_buffer_s::get_cb, fifo_buffer_s::get_cb_data, and fifo_buffer_s::mutex.

Referenced by _x_fifo_buffer_new().

## ◆ fifo_unregister_put_cb()

static void fifo_unregister_put_cb | ( | fifo_buffer_t * | _fifo,
|  | void(* | cb )(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb) )
| static

References fifo_buffer_s::mutex, fifo_buffer_s::put_cb, and fifo_buffer_s::put_cb_data.

Referenced by _x_fifo_buffer_new().

## ◆ xine_fbc_set()

int xine_fbc_set | ( | fifo_buffer_t * | _fifo,
|  | int | on )

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, _fifo_buffer_t::b, fifo_buffer_s::buffer_pool_capacity, fbc_dummy(), fifo_buffer_s::mutex, and NULL.

Referenced by play_internal().

## Variable Documentation

## ◆ _fifo_buf_type_index

const uint8_t _fifo_buf_type_index[256]
| static

Initial value:
= {
[BUF_AUDIO_BASE >> 24] = 1,
[BUF_VIDEO_BASE >> 24] = 1,
[BUF_SPU_BASE >> 24] = 2
}
BUF_AUDIO_BASE
#define BUF_AUDIO_BASE
Definition buffer.h:207
BUF_SPU_BASE
#define BUF_SPU_BASE
Definition buffer.h:286
BUF_VIDEO_BASE
#define BUF_VIDEO_BASE
Definition buffer.h:89

TJ. NOTE: vdr-libxineoutput issue #1: some versions of vdr-libxineoutput use their own replacement of _x_fifo_buffer_new (). this involves use of an incomplete fifo_buffer_t with our native methods copied from stream->video_fifo. test for nativity, and fall back to very old behaviour if not. vdr-libxineoutput issue #2: we will get some custom buf types, most notably 0x0f010000 CONTROL_BUF_BLANK 0x05010000 BUF_NETWORK_BLOCK 0x05020000 BUF_LOCAL_BLOCK make sure to treat them like control bufs which keeps put order.

Referenced by fifo_buffer_put().