]> git.sesse.net Git - bmusb/blobdiff - bmusb/bmusb.h
Add another non-interleaved data copy (intended for VA-API MJPEG uploads).
[bmusb] / bmusb / bmusb.h
index a72ed8b04cc377ea57076ee309123a92cf34f85f..a484496bd6be5cd0aa83512258c0e87f75a79978 100644 (file)
@@ -31,6 +31,7 @@ class FrameAllocator {
        struct Frame {
                uint8_t *data = nullptr;
                uint8_t *data2 = nullptr;  // Only if interleaved == true.
+               uint8_t *data_copy = nullptr;  // Will get a non-interleaved copy if not nullptr.
                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;
@@ -162,7 +163,13 @@ enum PixelFormat {
        // (ie., first all Y', then all Cb, then all Cr). bmusb doesn't
        // produce this, nor does it specify a mechanism to describe
        // the precise details of the format.
-       PixelFormat_8BitYCbCrPlanar
+       PixelFormat_8BitYCbCrPlanar,
+
+       // These exist only so that the type is guaranteed wide enough
+       // to contain values up to 127. CaptureInterface instances
+       // are free to use them as they see fit for private uses.
+       PixelFormat_Unused100 = 100,
+       PixelFormat_Unused127 = 127
 };
 
 typedef std::function<void(uint16_t timecode,