#include "libavutil/parseutils.h"
#include "libavutil/opt.h"
-
+#include "libavformat/internal.h"
#include "avdevice.h"
#include "dshow.h"
return PIX_FMT_YUYV422;
case MKTAG('I', '4', '2', '0'):
return PIX_FMT_YUV420P;
+ case BI_BITFIELDS:
case BI_RGB:
switch(biBitCount) { /* 1-8 are untested */
case 1:
}
}
-static enum SampleFormat sample_fmt_bits_per_sample(int bits)
+static enum AVSampleFormat sample_fmt_bits_per_sample(int bits)
{
switch (bits) {
case 8: return AV_SAMPLE_FMT_U8;
}
static int
-dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap,
+dshow_add_device(AVFormatContext *avctx,
enum dshowDeviceType devtype)
{
struct dshow_ctx *ctx = avctx->priv_data;
codec->bits_per_coded_sample = bih->biBitCount;
} else {
codec->codec_id = CODEC_ID_RAWVIDEO;
- if (bih->biCompression == BI_RGB) {
+ if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
codec->bits_per_coded_sample = bih->biBitCount;
codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
if (codec->extradata) {
codec->channels = fx->nChannels;
}
- av_set_pts_info(st, 64, 1, 10000000);
+ avpriv_set_pts_info(st, 64, 1, 10000000);
ret = 0;
return ret;
}
-static int dshow_read_header(AVFormatContext *avctx, AVFormatParameters *ap)
+static int dshow_read_header(AVFormatContext *avctx)
{
struct dshow_ctx *ctx = avctx->priv_data;
IGraphBuilder *graph = NULL;