#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavutil/imgutils.h"
+#include "libavutil/bswap.h"
}
#include "decklink_common.h"
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
IDeckLinkDisplayModeIterator *itermode;
IDeckLinkDisplayMode *mode;
+ uint32_t format_code;
int i=0;
HRESULT res;
return AVERROR(EIO);
}
- av_log(avctx, AV_LOG_INFO, "Supported formats for '%s':\n",
+ av_log(avctx, AV_LOG_INFO, "Supported formats for '%s':\n\tmode\tformat_code\tdescription",
avctx->filename);
while (itermode->Next(&mode) == S_OK) {
BMDTimeValue tb_num, tb_den;
mode->GetFrameRate(&tb_num, &tb_den);
- av_log(avctx, AV_LOG_INFO, "\t%d\t%ldx%ld at %d/%d fps",
- ++i,mode->GetWidth(), mode->GetHeight(),
+ format_code = av_bswap32(mode->GetDisplayMode());
+ av_log(avctx, AV_LOG_INFO, "\n\t%d\t%.4s\t\t%ldx%ld at %d/%d fps",
+ ++i, (char*) &format_code, mode->GetWidth(), mode->GetHeight(),
(int) tb_den, (int) tb_num);
switch (mode->GetFieldDominance()) {
case bmdLowerFieldFirst:
case bmdUpperFieldFirst:
av_log(avctx, AV_LOG_INFO, " (interlaced, upper field first)"); break;
}
- av_log(avctx, AV_LOG_INFO, "\n");
mode->Release();
}
+ av_log(avctx, AV_LOG_INFO, "\n");
itermode->Release();