+ // If the frame was started (data_copy != nullptr) but will not be finished
+ // (MJPEG decoding was turned off in the meantime), you'll need to call finish_frame()
+ // to release any VA-API resources.
+ void finish_frame(RefCountedFrame frame);
+
+ bool using_vaapi() const { return va_dpy != nullptr; }
+
+ // Returns -1 for inactive (ie., don't encode frames for this card right now).
+ int get_mjpeg_stream_for_card(unsigned card_index);
+