xine-lib: xine-lib-1.2.12/src/xine-engine/buffer_types.c File Reference

xine-lib 1.2.12

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. More...
uint32_t | _x_fourcc_to_buf_video (uint32_t formattag)
| Returns the BUF_VIDEO_xxx for the given fourcc. More...
const char * | _x_buf_video_name (uint32_t buf_type)
| Returns video codec name given the buffer type. More...
const char * | _x_buf_audio_name (uint32_t buf_type)
| Returns audio codec name given the buffer type. More...
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. More...

## 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 | ) |

Convert xine_bmiheader struct from little endian

References xine_bmiheader::biBitCount, xine_bmiheader::biClrImportant, xine_bmiheader::biClrUsed, xine_bmiheader::biHeight, xine_bmiheader::biPlanes, xine_bmiheader::biSize, xine_bmiheader::biSizeImage, xine_bmiheader::biWidth, xine_bmiheader::biXPelsPerMeter, xine_bmiheader::biYPelsPerMeter, le2me_16, and le2me_32.

Referenced by asf_read_header(), and parse_track_entry().

## ◆ _x_buf_audio_name()

const char * _x_buf_audio_name | ( | uint32_t | buf_type | ) |

Returns audio codec name given the buffer type.

Parameters

  buf_type | One 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_type | One 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

  formattagg | 32-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_int | 32-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
| ) |  |

References _, code, code_to_text(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by asf_read_header(), decode_audio_header(), demux_qt_send_headers(), open_nsv_file(), open_smjpeg_file(), and parse_track_entry().

## ◆ _x_report_video_fourcc()

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

Unknown FourCC reporting functions

References _, code, code_to_text(), XINE_VERBOSITY_LOG, and xprintf.

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_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

  s | Pointer to string buffer of at least 20 bytes.
  tag | The 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 | ) |

Convert xine_waveformatex struct from little endian

References xine_waveformatex::cbSize, le2me_16, le2me_32, xine_waveformatex::nAvgBytesPerSec, xine_waveformatex::nBlockAlign, xine_waveformatex::nChannels, xine_waveformatex::nSamplesPerSec, xine_waveformatex::wBitsPerSample, and xine_waveformatex::wFormatTag.

Referenced by asf_read_header(), open_ac3_file(), open_dts_file(), open_wav_file(), parse_track_entry(), and parse_trak_atom().

## ◆ code_to_text()

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

References code.

Referenced by _x_report_audio_format_tag(), and _x_report_video_fourcc().

## 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

Referenced by _x_formattag_to_buf_audio().

## ◆ sorted_audio_tags

const uint32_t sorted_audio_tags[]
| static

Referenced by _x_formattag_to_buf_audio().

## ◆ 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
}
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().