Libav 0.7.1
Enumerations | Functions
libavutil/samplefmt.h File Reference
#include "avutil.h"

Go to the source code of this file.

Enumerations

enum  AVSampleFormat {
  AV_SAMPLE_FMT_NONE = -1, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
  AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NB
}
 all in native-endian format More...

Functions

const char * av_get_sample_fmt_name (enum AVSampleFormat sample_fmt)
 Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
enum AVSampleFormat av_get_sample_fmt (const char *name)
 Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.
char * av_get_sample_fmt_string (char *buf, int buf_size, enum AVSampleFormat sample_fmt)
 Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is negative.
attribute_deprecated int av_get_bits_per_sample_fmt (enum AVSampleFormat sample_fmt)
int av_get_bytes_per_sample (enum AVSampleFormat sample_fmt)
 Return number of bytes per sample.

Enumeration Type Documentation

all in native-endian format

Enumerator:
AV_SAMPLE_FMT_NONE 
AV_SAMPLE_FMT_U8 

unsigned 8 bits

AV_SAMPLE_FMT_S16 

signed 16 bits

AV_SAMPLE_FMT_S32 

signed 32 bits

AV_SAMPLE_FMT_FLT 

float

AV_SAMPLE_FMT_DBL 

double

AV_SAMPLE_FMT_NB 

Number of sample formats. DO NOT USE if linking dynamically.

Definition at line 27 of file samplefmt.h.


Function Documentation

attribute_deprecated int av_get_bits_per_sample_fmt ( enum AVSampleFormat  sample_fmt)
int av_get_bytes_per_sample ( enum AVSampleFormat  sample_fmt)

Return number of bytes per sample.

Parameters:
sample_fmtthe sample format
Returns:
number of bytes per sample or zero if unknown for the given sample format

Definition at line 69 of file samplefmt.c.

Referenced by output_packet().

enum AVSampleFormat av_get_sample_fmt ( const char *  name)

Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.

Definition at line 46 of file samplefmt.c.

Referenced by avcodec_get_sample_fmt(), and opt_audio_sample_fmt().

const char* av_get_sample_fmt_name ( enum AVSampleFormat  sample_fmt)

Return the name of sample_fmt, or NULL if sample_fmt is not recognized.

Definition at line 39 of file samplefmt.c.

Referenced by audio_decode_frame(), av_audio_resample_init(), avcodec_get_sample_fmt_name(), avcodec_string(), choose_sample_fmt(), do_audio_out(), dprint_options(), ff_dlog_link(), and print_digraph().

char* av_get_sample_fmt_string ( char *  buf,
int  buf_size,
enum AVSampleFormat  sample_fmt 
)

Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is negative.

Parameters:
bufthe buffer where to write the string
buf_sizethe size of buf
sample_fmtthe number of the sample format to print the corresponding info string, or a negative value to print the corresponding header.
Returns:
the pointer to the filled buffer or NULL if sample_fmt is unknown or in case of other errors

Definition at line 56 of file samplefmt.c.

Referenced by avcodec_sample_fmt_string(), and opt_audio_sample_fmt().