Showing the changes to libavdevice/decklink_common.cpp (1 of 1 file). Show all
Unified · Split
| @@ -33,6 +33,7 @@ extern "C" { · 32 unmodified lines | ||
| 33 | 33 | #include "libavformat/avformat.h" |
| 34 | 34 | #include "libavformat/internal.h" |
| 35 | 35 | #include "libavutil/imgutils.h" |
| 36 | +#include "libavutil/bswap.h" | |
| 36 | 37 | } |
| 37 | 38 | |
| 38 | 39 | #include "decklink_common.h" |
| @@ -276,6 +277,7 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct · 237 unmodified lines | ||
| 276 | 277 | struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; |
| 277 | 278 | IDeckLinkDisplayModeIterator *itermode; |
| 278 | 279 | IDeckLinkDisplayMode *mode; |
| 280 | + uint32_t format_code; | |
| 279 | 281 | int i=0; |
| 280 | 282 | HRESULT res; |
| 281 | 283 | |
| @@ -297,13 +299,14 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct · 15 unmodified lines | ||
| 297 | 299 | return AVERROR(EIO); |
| 298 | 300 | } |
| 299 | 301 | |
| 300 | − av_log(avctx, AV_LOG_INFO, "Supported formats for '%s':\n", | |
| 302 | + av_log(avctx, AV_LOG_INFO, "Supported formats for '%s':\n\tmode\tformat_code\tdescription", | |
| 301 | 303 | avctx->filename); |
| 302 | 304 | while (itermode->Next(&mode) == S_OK) { |
| 303 | 305 | BMDTimeValue tb_num, tb_den; |
| 304 | 306 | mode->GetFrameRate(&tb_num, &tb_den); |
| 305 | − av_log(avctx, AV_LOG_INFO, "\t%d\t%ldx%ld at %d/%d fps", | |
| 306 | − ++i,mode->GetWidth(), mode->GetHeight(), | |
| 307 | + format_code = av_bswap32(mode->GetDisplayMode()); | |
| 308 | + av_log(avctx, AV_LOG_INFO, "\n\t%d\t%.4s\t\t%ldx%ld at %d/%d fps", | |
| 309 | + ++i, (char*) &format_code, mode->GetWidth(), mode->GetHeight(), | |
| 307 | 310 | (int) tb_den, (int) tb_num); |
| 308 | 311 | switch (mode->GetFieldDominance()) { |
| 309 | 312 | case bmdLowerFieldFirst: |
| @@ -311,9 +314,9 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct · 1 unmodified line | ||
| 311 | 314 | case bmdUpperFieldFirst: |
| 312 | 315 | av_log(avctx, AV_LOG_INFO, " (interlaced, upper field first)"); break; |
| 313 | 316 | } |
| 314 | − av_log(avctx, AV_LOG_INFO, "\n"); | |
| 315 | 317 | mode->Release(); |
| 316 | 318 | } |
| 319 | + av_log(avctx, AV_LOG_INFO, "\n"); | |
| 317 | 320 | |
| 318 | 321 | itermode->Release(); |
| 319 | 322 | |