]> git.sesse.net Git - bmusb/blobdiff - bmusb/bmusb.h
Support other sample rates than 48 kHz.
[bmusb] / bmusb / bmusb.h
index 83677afdbdeb69fb0f606db17f7811cc7ccacd09..6d6f097413c43bb10b549bba0ba7e7c5296e39e8 100644 (file)
@@ -126,6 +126,7 @@ struct AudioFormat {
        uint16_t id = 0;  // For debugging/logging only.
        unsigned bits_per_sample = 0;
        unsigned num_channels = 0;
+       unsigned sample_rate = 48000;
 };
 
 enum PixelFormat {
@@ -151,7 +152,11 @@ enum PixelFormat {
        // Note that unlike true v210, there is no guarantee about
        // 128-byte line alignment (or lack thereof); you should check
        // the stride member of VideoFormat.
-       PixelFormat_10BitYCbCr
+       PixelFormat_10BitYCbCr,
+
+       // 8-bit 4:4:4:4 BGRA (in that order). bmusb itself doesn't
+       // produce this, but it is useful to represent e.g. synthetic inputs.
+       PixelFormat_8BitBGRA
 };
 
 typedef std::function<void(uint16_t timecode,