Merge commit '4f373a5111f900af54301907132942f95276285c'
[ffmpeg.git] / libavdevice / sndio_enc.c
index 9ad5cad..52b9060 100644 (file)
 #include <stdint.h>
 #include <sndio.h>
 
-#include "avdevice.h"
-#include "sndio_common.h"
+#include "libavutil/internal.h"
+
+
+#include "libavdevice/avdevice.h"
+#include "libavdevice/sndio.h"
 
 static av_cold int audio_write_header(AVFormatContext *s1)
 {
@@ -76,6 +79,13 @@ static int audio_write_trailer(AVFormatContext *s1)
     return 0;
 }
 
+static const AVClass sndio_muxer_class = {
+    .class_name     = "sndio outdev",
+    .item_name      = av_default_item_name,
+    .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
+};
+
 AVOutputFormat ff_sndio_muxer = {
     .name           = "sndio",
     .long_name      = NULL_IF_CONFIG_SMALL("sndio audio playback"),
@@ -83,10 +93,11 @@ AVOutputFormat ff_sndio_muxer = {
     /* XXX: we make the assumption that the soundcard accepts this format */
     /* XXX: find better solution with "preinit" method, needed also in
        other formats */
-    .audio_codec    = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
-    .video_codec    = CODEC_ID_NONE,
+    .audio_codec    = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
+    .video_codec    = AV_CODEC_ID_NONE,
     .write_header   = audio_write_header,
     .write_packet   = audio_write_packet,
     .write_trailer  = audio_write_trailer,
     .flags          = AVFMT_NOFILE,
+    .priv_class     = &sndio_muxer_class,
 };