Skip to content

Commit

Permalink
replay/camera: use existing YUV_BUFFER_COUNT (commaai#23297)
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee authored Dec 23, 2021
1 parent a1ac773 commit 94e435c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions selfdrive/ui/replay/camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include <cassert>
#include <iostream>

const int YUV_BUF_COUNT = 50;

CameraServer::CameraServer(std::pair<int, int> camera_size[MAX_CAMERAS], bool send_yuv) : send_yuv(send_yuv) {
for (int i = 0; i < MAX_CAMERAS; ++i) {
std::tie(cameras_[i].width, cameras_[i].height) = camera_size[i];
Expand All @@ -29,7 +27,7 @@ void CameraServer::startVipcServer() {
std::cout << "camera[" << cam.type << "] frame size " << cam.width << "x" << cam.height << std::endl;
vipc_server_->create_buffers(cam.rgb_type, UI_BUF_COUNT, true, cam.width, cam.height);
if (send_yuv) {
vipc_server_->create_buffers(cam.yuv_type, YUV_BUF_COUNT, false, cam.width, cam.height);
vipc_server_->create_buffers(cam.yuv_type, YUV_BUFFER_COUNT, false, cam.width, cam.height);
}
if (!cam.thread.joinable()) {
cam.thread = std::thread(&CameraServer::cameraThread, this, std::ref(cam));
Expand Down

0 comments on commit 94e435c

Please sign in to comment.