fix build

This commit is contained in:
uncor3
2025-10-18 15:59:46 -07:00
parent c783123b8d
commit 14c1da9a84
3 changed files with 9 additions and 8 deletions
+5 -3
View File
@@ -119,7 +119,7 @@ void AirPlayWindow::setupUI()
// Start with tutorial widget
m_stackedWidget->setCurrentWidget(m_tutorialWidget);
#ifdef Q_OS_LINUX
#ifdef __linux__
m_v4l2_enabled = false; // Disable V4L2 by default
#endif
}
@@ -207,7 +207,7 @@ void AirPlayWindow::updateVideoFrame(QByteArray frameData, int width,
if (frameData.size() != width * height * 3)
return;
#ifdef Q_OS_LINUX
#ifdef __linux__
// V4L2 output if enabled
if (m_v4l2_enabled) {
writeFrameToV4L2((uint8_t *)frameData.data(), width, height);
@@ -269,6 +269,7 @@ void AirPlayWindow::onClientConnectionChanged(bool connected)
showTutorialView();
}
}
#ifdef __linux__
void AirPlayWindow::onV4L2CheckboxToggled(bool enabled)
{
@@ -310,6 +311,7 @@ void AirPlayWindow::onV4L2CheckboxToggled(bool enabled)
closeV4L2();
}
}
#endif
// AirPlayServerThread implementation
AirPlayServerThread::AirPlayServerThread(QObject *parent)
@@ -372,7 +374,7 @@ void AirPlayServerThread::run()
emit statusChanged(false);
}
#ifdef Q_OS_LINUX
#ifdef __linux__
// V4L2 Implementation
void AirPlayWindow::initV4L2(int width, int height, const char *device)
{
+3 -2
View File
@@ -53,8 +53,9 @@ public slots:
private slots:
void onServerStatusChanged(bool running);
#ifdef __linux__
void onV4L2CheckboxToggled(bool enabled);
#endif
private:
void setupUI();
void startAirPlayServer();
@@ -80,7 +81,7 @@ private:
bool m_serverRunning;
bool m_clientConnected = false;
#ifdef Q_OS_LINUX
#ifdef __linux__
public:
// V4L2 members - public for C callback access
int m_v4l2_fd;
+1 -3
View File
@@ -56,9 +56,7 @@ private:
#ifdef __linux__
AvahiService *m_wirelessProvider = nullptr;
#endif
#ifdef __APPLE__
#else
DnssdService *m_wirelessProvider = nullptr;
#endif