]> git.sesse.net Git - nageru/blobdiff - nageru/mixer.cpp
Unify all the FRAME_SIZE #defines.
[nageru] / nageru / mixer.cpp
index 9978906a26b6f7d85a540a6ce612371a218248db..d9088fda0d83fdd703f7415dee88f38236b09ca5 100644 (file)
@@ -618,7 +618,7 @@ void Mixer::configure_card(unsigned card_index, CaptureInterface *capture, CardT
        if (is_active) {
                card->capture->set_frame_callback(bind(&Mixer::bm_frame, this, card_index, _1, _2, _3, _4, _5, _6, _7));
                if (card->frame_allocator == nullptr) {
-                       card->frame_allocator.reset(new PBOFrameAllocator(pixel_format, 8 << 20, global_flags.width, global_flags.height, card_index, mjpeg_encoder.get()));  // 8 MB.
+                       card->frame_allocator.reset(new PBOFrameAllocator(pixel_format, FRAME_SIZE, global_flags.width, global_flags.height, card_index, mjpeg_encoder.get()));
                } else {
                        // The format could have changed, but we cannot reset the allocator
                        // and create a new one from scratch, since there may be allocated
@@ -627,7 +627,7 @@ void Mixer::configure_card(unsigned card_index, CaptureInterface *capture, CardT
                        // any old ones as they come back. This takes the mutex while
                        // allocating, but nothing should really be sending frames in there
                        // right now anyway (start_bm_capture() has not been called yet).
-                       card->frame_allocator->reconfigure(pixel_format, 8 << 20, global_flags.width, global_flags.height, card_index, mjpeg_encoder.get());
+                       card->frame_allocator->reconfigure(pixel_format, FRAME_SIZE, global_flags.width, global_flags.height, card_index, mjpeg_encoder.get());
                }
                card->capture->set_video_frame_allocator(card->frame_allocator.get());
                if (card->surface == nullptr) {