]> git.sesse.net Git - nageru/blobdiff - futatabi/video_stream.h
When sending original frames, do the reading in the queueing thread.
[nageru] / futatabi / video_stream.h
index 03f82d6fbb93d8ce96e12b1cdc5167108dec3971..1b3358735344adbc009ccccf2eb5ca710ba60f95 100644 (file)
@@ -111,7 +111,15 @@ private:
 
                int64_t output_pts;
                enum Type { ORIGINAL, FADED, INTERPOLATED, FADED_INTERPOLATED, REFRESH } type;
-               FrameOnDisk frame1;  // The only frame for original frames.
+
+               // For original frames only. Made move-only so we know explicitly
+               // we don't copy these ~200 kB files around inadvertedly.
+               //
+               // TODO: Consider using vector<uint8_t> instead, so we save one copy.
+               std::unique_ptr<std::string> encoded_jpeg;
+
+               // For everything except original frames.
+               FrameOnDisk frame1;
 
                // For fades only (including fades against interpolated frames).
                FrameOnDisk secondary_frame;