]> git.sesse.net Git - bmusb/blobdiff - bmusb.cpp
Make drivers capable of delivering a list of modes, and setting them.
[bmusb] / bmusb.cpp
index 3e31c01a771a1cbdd62471ee1f86fbd81b32338c..1eeedce846e57530939731d2f5ca4ca41b6620a8 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1230,3 +1230,18 @@ bool decode_video_format(uint16_t video_format, VideoFormat *decoded_video_forma
        decoded_video_format->frame_rate_den = 1;
        return false;
 }
+
+vector<VideoMode> BMUSBCapture::get_available_video_modes() const
+{
+       // The USB3 cards autodetect, and seem to have no provision for forcing modes.
+       VideoMode auto_mode;
+       auto_mode.id = 0;
+       auto_mode.name = "Autodetect";
+       auto_mode.autodetect = true;
+       return { auto_mode };
+}
+
+void BMUSBCapture::set_video_mode(uint32_t video_mode_id)
+{
+       assert(video_mode_id == 0);  // Matches get_available_video_modes().
+}