27 #include <soundcard.h> 
   29 #include <sys/soundcard.h> 
   36 #include <sys/ioctl.h> 
   46                       const char *audio_device)
 
   51     char *
flip = getenv(
"AUDIO_FLIP_LEFT");
 
   62     if (flip && *flip == 
'1') {
 
   68         if (fcntl(audio_fd, F_SETFL, O_NONBLOCK) < 0) {
 
   75 #define CHECK_IOCTL_ERROR(event)                                              \ 
   77         av_log(s1, AV_LOG_ERROR, #event ": %s\n", av_err2str(AVERROR(errno)));\ 
   85     err = ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &tmp);
 
   91     if (tmp & AFMT_S16_BE) {
 
   93     } 
else if (tmp & AFMT_S16_LE) {
 
   99     if (tmp & AFMT_S16_LE) {
 
  101     } 
else if (tmp & AFMT_S16_BE) {
 
  120     err=ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp);
 
  124     err = ioctl(audio_fd, SNDCTL_DSP_STEREO, &tmp);
 
  128     err = ioctl(audio_fd, SNDCTL_DSP_SPEED, &tmp);
 
  137 #undef CHECK_IOCTL_ERROR 
#define AV_LOG_WARNING
Something somehow does not look correct. 
#define CHECK_IOCTL_ERROR(event)
int avpriv_open(const char *filename, int flags,...)
A wrapper for open() setting O_CLOEXEC. 
#define OSS_AUDIO_BLOCK_SIZE
int ff_oss_audio_open(AVFormatContext *s1, int is_output, const char *audio_device)
Main libavdevice API header. 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered. 
static void flip(AVCodecContext *avctx, AVFrame *frame)
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Libavcodec external API header. 
int ff_oss_audio_close(OSSAudioData *s)
void * priv_data
Format private data.