Skip to content

Commit

Permalink
simple packageconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Nov 23, 2023
1 parent 4a5abe3 commit 718ffa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
15 changes: 5 additions & 10 deletions app/util/qopenhd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,11 @@ bool QOpenHD::is_platform_rpi()

bool QOpenHD::is_platform_rock()
{
const char* rockPlatformPath = "/usr/local/share/openhd/platform/rock/";
struct stat info;
if (stat(rockPlatformPath, &info) != 0) {
return false;
}
if (info.st_mode & S_IFDIR) {
return true;
} else {
return false;
}
#ifdef IS_PLATFORM_ROCK
return true;
#else
return false;
#endif
}

void QOpenHD::keep_screen_on(bool on)
Expand Down
3 changes: 3 additions & 0 deletions app/videostreaming/avcodec/avcodec_video.pri
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ CONFIG += link_pkgconfig
packagesExist(mmal) {
DEFINES += IS_PLATFORM_RPI
}
packagesExist(mali) {
DEFINES += IS_PLATFORM_ROCK
}

# can be used in c++, also set to be exposed in qml
DEFINES += QOPENHD_ENABLE_VIDEO_VIA_AVCODEC

0 comments on commit 718ffa5

Please sign in to comment.