summaryrefslogtreecommitdiff
path: root/libavdevice/alsa-audio.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-05-23 19:03:10 +0200
committerAnton Khirnov <anton@khirnov.net>2011-05-25 15:20:26 +0200
commit2ea8faf39ff6f21c2faaf8f9bd060a6636ea65fc (patch)
tree67ab0ad4cc926bf454d7e5f0a7db905161348003 /libavdevice/alsa-audio.h
parent003e63b6df7ba08cce18c1830df9c49dd3f0f391 (diff)
ALSA: add channels and sample_rate private options.
Diffstat (limited to 'libavdevice/alsa-audio.h')
-rw-r--r--libavdevice/alsa-audio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index 7a1b01811b..32c07426ef 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -33,6 +33,7 @@
#include <alsa/asoundlib.h>
#include "config.h"
#include "libavformat/avformat.h"
+#include "libavutil/log.h"
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
@@ -40,9 +41,12 @@
#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
typedef struct {
+ AVClass *class;
snd_pcm_t *h;
int frame_size; ///< preferred size for reads and writes
int period_size; ///< bytes per sample * channels
+ int sample_rate; ///< sample rate set by user
+ int channels; ///< number of channels set by user
} AlsaData;
/**