Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync projectM time to gstreamer PTS time #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

revmischa
Copy link
Contributor

No description provided.

@kblaschke
Copy link
Member

kblaschke commented Jul 1, 2024

Note this relies on an unreleased 4.2 API addition, so the build system should provide proper checks and possibly disable the use of the projectm_set_frame_time() function if it is being built againt libprojectM < 4.2, or make v4.2 a hard requirement for gst-projectm.

You could also weak-link it when possible or use GetProcAddress/dlsym to resolve this function and check the availability at runtime.

@revmischa
Copy link
Contributor Author

Note this relies on an unreleased 4.2 API addition, so the build system should provide proper checks and possibly disable the use of the projectm_set_frame_time() function if it is being built againt libprojectM < 4.2, or make v4.2 a hard requirement for gst-projectm.

You could also weak-link it when possible or use GetProcAddress/dlsym to resolve this function and check the availability at runtime.

Gotcha, can we do a 4.2.0 release?

@kblaschke
Copy link
Member

kblaschke commented Jul 6, 2024

Gotcha, can we do a 4.2.0 release?

Still some important and useful features to go like the debug API, user sprites and user-defined transitions, but it looks like I have lots of time to spare over the coming weeks, so I'll see what I can do to get things ready!
Quite a few features, but they're all relatively easy to implement. Any help is always highly appreciated.

@@ -13,6 +13,11 @@ find_package(projectM4 REQUIRED)
find_package(GStreamer REQUIRED COMPONENTS gstreamer-audio gstreamer-gl gstreamer-pbutils gstreamer-video)
find_package(GLIB2 REQUIRED)

if(projectM4_VERSION VERSION_LESS 4.2.0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have CMake check this directly in the find_package() command using this (rather weird) syntax:

find_package(projectM4 4.2.0...< REQUIRED)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to like that
CMake Error at CMakeLists.txt:12 (find_package):
find_package called with invalid argument "4.1.0...<"

The docs aren't super helpful to me https://cmake.org/cmake/help/latest/command/find_package.html#find-package-version-format

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the docs are relatively vague. I guess the upper limit can't be excluded, which I should have seen. This syntax here is probably the right one, it basically says "minimum 4.2.0, and everything before 5.0".

find_package(projectM4 4.2.0...<5.0.0 REQUIRED)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really, you have to specify the upper limit? that's fucked

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconvenient for sure. You could in theory just put 9999 there, but I'd also prefer a notation like >=4.2.0 or even a comma/semicolon-separated list of ranges so you may exclude certain versions, e.g. bugged ones, like >=1.0.0...<1.5.0,>=1.5.3 to exclude versions from 1.5.0 up to 1.5.2 if those have a bug that was fixed in 1.5.3. But it is what it is. Putting 5.0.0 there should suffice, as the projectM-4 package will never reach this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants