xine-lib 1.2.13-20230125hg15249
Functions | Variables
buffer_types.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include <xine/xine_internal.h>
#include "bswap.h"

Functions

uint32_t _x_formattag_to_buf_audio (uint32_t formattag)
 Returns the BUF_AUDIO_xxx for the given formattag.
 
uint32_t _x_fourcc_to_buf_video (uint32_t formattag)
 Returns the BUF_VIDEO_xxx for the given fourcc.
 
const char * _x_buf_video_name (uint32_t buf_type)
 Returns video codec name given the buffer type.
 
const char * _x_buf_audio_name (uint32_t buf_type)
 Returns audio codec name given the buffer type.
 
static void code_to_text (char ascii[5], uint32_t code)
 
void _x_report_video_fourcc (xine_t *xine, const char *module, uint32_t code)
 
void _x_report_audio_format_tag (xine_t *xine, const char *module, uint32_t code)
 
void _x_bmiheader_le2me (xine_bmiheader *bih)
 
void _x_waveformatex_le2me (xine_waveformatex *wavex)
 
size_t _x_tag32_me2str (char *s, uint32_t tag)
 Make string from machine endian 32bit tag, eg a fourcc or a chunk ID.
 

Variables

static const uint32_t sorted_audio_tags []
 
static const uint32_t sorted_audio_4ccs []
 
static const uint32_t sorted_video_tags []
 
static const uint32_t sorted_video_4ccs []
 
static const char *const video_names []
 
static const char *const audio_names []
 

Function Documentation

◆ _x_bmiheader_le2me()

void _x_bmiheader_le2me ( xine_bmiheader * bih)

◆ _x_buf_audio_name()

const char * _x_buf_audio_name ( uint32_t buf_type)

Returns audio codec name given the buffer type.

Parameters
buf_typeOne of the BUF_AUDIO_xxx values.
See also
_x_buf_video_name

References audio_names, BUF_AUDIO_BASE, and buf_type.

Referenced by asf_read_header(), and audio_decoder_loop().

◆ _x_buf_video_name()

const char * _x_buf_video_name ( uint32_t buf_type)

Returns video codec name given the buffer type.

Parameters
buf_typeOne of the BUF_VIDEO_xxx values.
See also
_x_buf_audio_name

References buf_type, BUF_VIDEO_BASE, and video_names.

Referenced by asf_read_header(), and video_decoder_loop().

◆ _x_formattag_to_buf_audio()

uint32_t _x_formattag_to_buf_audio ( uint32_t formattag)

Returns the BUF_AUDIO_xxx for the given formattag.

Parameters
formattagg32-bit format tag value in machine endianness
See also
_x_fourcc_to_buf_video

References BE_FOURCC, sorted_audio_4ccs, and sorted_audio_tags.

Referenced by asf_read_header(), decode_audio_header(), open_ac3_file(), open_dts_file(), open_nsv_file(), open_ra_file(), open_smjpeg_file(), open_wav_file(), parse_track_entry(), parse_trak_atom(), and real_parse_headers().

◆ _x_fourcc_to_buf_video()

uint32_t _x_fourcc_to_buf_video ( uint32_t fourcc_int)

Returns the BUF_VIDEO_xxx for the given fourcc.

Parameters
fourcc_int32-bit FOURCC value in machine endianness
See also
_x_formattag_to_buf_audio

example: fourcc_int = *(uint32_t *)fourcc_char;

References sorted_video_4ccs, and sorted_video_tags.

Referenced by asf_read_header(), decode_dshow_header(), decode_video_header(), demux_qt_send_headers(), open_film_file(), open_nsv_file(), open_smjpeg_file(), parse_track_entry(), and real_parse_headers().

◆ _x_report_audio_format_tag()

void _x_report_audio_format_tag ( xine_t * xine,
const char * module,
uint32_t code )

◆ _x_report_video_fourcc()

void _x_report_video_fourcc ( xine_t * xine,
const char * module,
uint32_t code )

◆ _x_tag32_me2str()

size_t _x_tag32_me2str ( char * s,
uint32_t tag )

Make string from machine endian 32bit tag, eg a fourcc or a chunk ID.

Parameters
sPointer to string buffer of at least 20 bytes.
tagThe 32bit tag value in native byte order.
Returns
The length of target string written to s, without the trailing \0.

References tab_hex, and z.

Referenced by asf_read_header(), demux_ts_get_reg_desc(), ff_handle_buffer(), ff_handle_mpeg12_buffer(), parse_trak_atom(), real_parse_audio_specific_data(), and real_parse_headers().

◆ _x_waveformatex_le2me()

void _x_waveformatex_le2me ( xine_waveformatex * wavex)

◆ code_to_text()

static void code_to_text ( char ascii[5],
uint32_t code )
static

Variable Documentation

◆ audio_names

const char* const audio_names[]
static

Referenced by _x_buf_audio_name().

◆ sorted_audio_4ccs

const uint32_t sorted_audio_4ccs[]
static

◆ sorted_audio_tags

const uint32_t sorted_audio_tags[]
static

◆ sorted_video_4ccs

const uint32_t sorted_video_4ccs[]
static

Referenced by _x_fourcc_to_buf_video().

◆ sorted_video_tags

const uint32_t sorted_video_tags[]
static
Initial value:
= {
0x0001, BUF_VIDEO_MSRLE,
0x0002, BUF_VIDEO_MSRLE
}
#define BUF_VIDEO_MSRLE
Definition buffer.h:123

Referenced by _x_fourcc_to_buf_video().

◆ video_names

const char* const video_names[]
static

Referenced by _x_buf_video_name().