]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/alsa-audio.h
lavc: allow decoders to override frame parameters.
[ffmpeg] / libavdevice / alsa-audio.h
index ee43463696210ac86dc76888124efed3eec9f591..26eaee6acf6e938c1ce91934f67bc34675ce77c1 100644 (file)
 /* XXX: we make the assumption that the soundcard accepts this format */
 /* XXX: find better solution with "preinit" method, needed also in
         other formats */
-#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
 
 #define ALSA_BUFFER_SIZE_MAX 32768
 
-typedef struct {
+typedef struct AlsaData {
     AVClass *class;
     snd_pcm_t *h;
     int frame_size;  ///< preferred size for reads and writes
@@ -62,15 +62,15 @@ typedef struct {
  * @param sample_rate in: requested sample rate;
  *                    out: actually selected sample rate
  * @param channels number of channels
- * @param codec_id in: requested CodecID or CODEC_ID_NONE;
- *                 out: actually selected CodecID, changed only if
- *                 CODEC_ID_NONE was requested
+ * @param codec_id in: requested AVCodecID or AV_CODEC_ID_NONE;
+ *                 out: actually selected AVCodecID, changed only if
+ *                 AV_CODEC_ID_NONE was requested
  *
  * @return 0 if OK, AVERROR_xxx on error
  */
 int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
                  unsigned int *sample_rate,
-                 int channels, enum CodecID *codec_id);
+                 int channels, enum AVCodecID *codec_id);
 
 /**
  * Close the ALSA PCM.