]> git.sesse.net Git - nageru/blobdiff - mixer.h
Fix an off-by-one in the indexing.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index 821ceb2f5f606ad48133f7d8475f1fe7d40af12a..00b10f8c5a056ee77ed5c7e13000f83ec32414e8 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -238,13 +238,14 @@ public:
 
        std::string get_card_description(unsigned card_index) const {
                assert(card_index < num_cards);
-               return cards[card_index].usb->get_description();
+               return cards[card_index].capture->get_description();
        }
 
 private:
+       void configure_card(unsigned card_index, const QSurfaceFormat &format, CaptureInterface *capture);
        void bm_frame(unsigned card_index, uint16_t timecode,
                FrameAllocator::Frame video_frame, size_t video_offset, VideoFormat video_format,
-               FrameAllocator::Frame audio_frame, size_t audio_offset, uint16_t audio_format);
+               FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format);
        void place_rectangle(movit::Effect *resample_effect, movit::Effect *padding_effect, float x0, float y0, float x1, float y1);
        void thread_func();
        void audio_thread_func();
@@ -273,7 +274,7 @@ private:
 
        std::mutex bmusb_mutex;
        struct CaptureCard {
-               BMUSBCapture *usb;
+               CaptureInterface *capture;
                std::unique_ptr<PBOFrameAllocator> frame_allocator;
 
                // Stuff for the OpenGL context (for texture uploading).