Luca Abeni <[EMAIL PROTECTED]> added the comment:

Alsa support: internal header (to be placed in libavformat)

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue247>
______________________________________________________
#ifndef ALSA_AUDIO_H
#define ALSA_AUDIO_H

#define AUDIO_BLOCK_SIZE 4 * 4096

/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
        other formats */
#ifdef WORDS_BIGENDIAN
#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16BE
#else
#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16LE
#endif
#define DEFAULT_DEVICE "hw:0,0"


typedef struct {
    snd_pcm_t *h;
    unsigned int sample_rate;
    int channels;
    int frame_size; /* in bytes ! */
    int codec_id;
} AlsaData;

int ff_alsa_supported_codec_id(enum CodecID codec_id);
int ff_alsa_open(AVFormatContext *s, int mode);
int ff_alsa_close(AlsaData *s);
int ff_alsa_xrun_recover(AVFormatContext *s1, int err);

#endif /* ALSA_AUDIO_H */

Reply via email to