X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bmusb.h;h=9eb3ff4f716a4ede88c997f65131c6fe69232179;hb=89136643760d7da0c94c4d4fb1ec778f9cefb97f;hp=96a2257f8549279dc0000c7b31dfb2df8709e62a;hpb=cd863aa837174f6a3fa5862323d82dab8f0030f8;p=bmusb diff --git a/bmusb.h b/bmusb.h index 96a2257..9eb3ff4 100644 --- a/bmusb.h +++ b/bmusb.h @@ -25,6 +25,7 @@ class FrameAllocator { uint8_t *data2 = nullptr; // Only if interleaved == true. size_t len = 0; // Number of bytes we actually have. size_t size = 0; // Number of bytes we have room for. + size_t overflow = 0; void *userdata = nullptr; FrameAllocator *owner = nullptr; @@ -63,8 +64,8 @@ typedef std::function iso_xfrs; }; +// Get details for the given video format; returns false if detection was incomplete. +// Note: Frame rate is _frame_ rate, not field rate. So 1080i60 gets 30/1, _not_ 60/1. +bool decode_video_format(uint16_t video_format, int *width, int *height, int *frame_rate_nom, int *frame_rate_den, bool *interlaced); + #endif