]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/openal-dec.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavdevice / openal-dec.c
index efe40f6f8f8e241cf003fd0de079e7a49799de75..17256ca0668488aab9b735da8c32303e2983bf92 100644 (file)
@@ -25,6 +25,7 @@
 #include <AL/alc.h>
 
 #include "libavutil/opt.h"
+#include "libavformat/internal.h"
 #include "avdevice.h"
 
 typedef struct {
@@ -145,13 +146,13 @@ static int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
     if (error = al_get_error(ad->device, &error_msg)) goto fail;
 
     /* Create stream */
-    if (!(st = av_new_stream(ctx, 0))) {
+    if (!(st = avformat_new_stream(ctx, NULL))) {
         error = AVERROR(ENOMEM);
         goto fail;
     }
 
     /* We work in microseconds */
-    av_set_pts_info(st, 64, 1, 1000000);
+    avpriv_set_pts_info(st, 64, 1, 1000000);
 
     /* Set codec parameters */
     codec = st->codec;
@@ -221,12 +222,12 @@ static int read_close(AVFormatContext* ctx)
 #define OFFSET(x) offsetof(al_data, x)
 
 static const AVOption options[] = {
-    {"channels", "set number of channels",     OFFSET(channels),     FF_OPT_TYPE_INT, {.dbl=2},     1, 2,      AV_OPT_FLAG_DECODING_PARAM },
-    {"sample_rate", "set sample rate",         OFFSET(sample_rate),  FF_OPT_TYPE_INT, {.dbl=44100}, 1, 192000, AV_OPT_FLAG_DECODING_PARAM },
-    {"sample_size", "set sample size",         OFFSET(sample_size),  FF_OPT_TYPE_INT, {.dbl=16},    8, 16,     AV_OPT_FLAG_DECODING_PARAM },
-    {"list_devices", "list available devices", OFFSET(list_devices), FF_OPT_TYPE_INT, {.dbl=0},     0, 1,      AV_OPT_FLAG_DECODING_PARAM, "list_devices"  },
-    {"true",  "", 0, FF_OPT_TYPE_CONST, {.dbl=1}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
-    {"false", "", 0, FF_OPT_TYPE_CONST, {.dbl=0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
+    {"channels", "set number of channels",     OFFSET(channels),     AV_OPT_TYPE_INT, {.dbl=2},     1, 2,      AV_OPT_FLAG_DECODING_PARAM },
+    {"sample_rate", "set sample rate",         OFFSET(sample_rate),  AV_OPT_TYPE_INT, {.dbl=44100}, 1, 192000, AV_OPT_FLAG_DECODING_PARAM },
+    {"sample_size", "set sample size",         OFFSET(sample_size),  AV_OPT_TYPE_INT, {.dbl=16},    8, 16,     AV_OPT_FLAG_DECODING_PARAM },
+    {"list_devices", "list available devices", OFFSET(list_devices), AV_OPT_TYPE_INT, {.dbl=0},     0, 1,      AV_OPT_FLAG_DECODING_PARAM, "list_devices"  },
+    {"true",  "", 0, AV_OPT_TYPE_CONST, {.dbl=1}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
+    {"false", "", 0, AV_OPT_TYPE_CONST, {.dbl=0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
     {NULL},
 };