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

[sh4lt] Implementation of input and output devices #1557

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

nicobou
Copy link
Contributor

@nicobou nicobou commented Aug 1, 2024

This adds support of Sh4lt as Gfx input and output. Sh4lt is a Shmdata fork with several improvements (access through "label", timecode, monitoring, and improved data description API).

The code is mostly a mimic of the already existing Shmdata Gfx Input and Output, but adapted according to the Sh4lt API.

It has been tested with the following GStreamer pipelines:

  • gst-launch-1.0 sh4ltsrc label=score_output do-timestamp=true ! videoconvert ! xvimagesink sync=true
  • gst-launch-1.0 -v videotestsrc pattern=0 ! video/x-raw, format=ABGR, width=1920, height=1080, framerate=30/1 ! sh4ltsink label=to_score

@jcelerier
Copy link
Member

arf, I don't know why Github does not allow me to run all the CI pipelines on this, investigating..

@jcelerier
Copy link
Member

Wops, got a fair bit of CI pipelines failing.

/__w/score/score/src/plugins/score-plugin-gfx/Gfx/Sh4lt/Sh4ltOutputDevice.cpp: In member function ‘virtual void Gfx::Sh4ltOutputNode::createOutput(score::gfx::GraphicsApi, std::function<void()>, std::function<void()>, std::function<void()>)’:
/__w/score/score/src/plugins/score-plugin-gfx/Gfx/Sh4lt/Sh4ltOutputDevice.cpp:189:14: error: ‘sh4lt::shtype’ has not been declared
  189 |       sh4lt::shtype::shtype_from_gst_caps(
      |              ^~~~~~
At global scope:
In file included from /Users/runner/work/score/score/3rdparty/sh4lt/sh4lt/time.cpp:15:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:800:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__chrono/formatter.h:23:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__chrono/ostream.h:30:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/format_functions.h:29:
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_floating_point.h:648:8: error: no member named 'std' in namespace 'std'; did you mean simply 'std'?
  if (!_VSTD::isfinite(__value)) [[unlikely]]
       ^
 /__w/score/score/3rdparty/sh4lt/sh4lt/time.cpp:29:10: error: no matching function for call to 'duration_cast'
  return std::chrono::duration_cast<std::chrono::nanoseconds, int64_t>(
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ossia-sdk-rpi-aarch64/pi/llvm-16-aarch64/include/c++/v1/__chrono/duration.h:125:1: note: candidate template ignored: could not match 'long' against 'long long'
duration_cast(const duration<_Rep, _Period>& __fd)
^
In file included from /build/CMakeFiles/sh4lt.dir/Unity/unity_0_cxx.cxx:61:
/__w/score/score/3rdparty/sh4lt/sh4lt/time.cpp:35:10: error: no matching function for call to 'duration_cast'
  return std::chrono::duration_cast<std::chrono::nanoseconds, int64_t>(
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ossia-sdk-rpi-aarch64/pi/llvm-16-aarch64/include/c++/v1/__chrono/duration.h:125:1: note: candidate template ignored: could not match 'long' against 'long long'
duration_cast(const duration<_Rep, _Period>& __fd)

@nicobou
Copy link
Contributor Author

nicobou commented Aug 2, 2024

oh thanks for the TL;DR

I tried several CI pipelines through docker, it should be better now. Let's see what the CI says now 🤞

@jcelerier
Copy link
Member

my computer happened to inadvertently reboot under macOS thus I could try to fix the remaining build failures there : https://gitlab.com/sh4lt/sh4lt/-/merge_requests/34

@jcelerier
Copy link
Member

also @aklevy I think we could add the logo to the website when it's merged if you have a bit of time ! https://gitlab.com/uploads/-/system/project/avatar/60555302/Sh4lt-300x300.png

@nicobou
Copy link
Contributor Author

nicobou commented Aug 3, 2024

my computer happened to inadvertently reboot under macOS thus I could try to fix the remaining build failures there : https://gitlab.com/sh4lt/sh4lt/-/merge_requests/34

oh thanks :) the PR is updated with this.

@nicobou
Copy link
Contributor Author

nicobou commented Aug 3, 2024

also @aklevy I think we could add the logo to the website when it's merged if you have a bit of time ! https://gitlab.com/uploads/-/system/project/avatar/60555302/Sh4lt-300x300.png

I will be my pleasure :)

@jcelerier
Copy link
Member

looks like it works ! thanks !

@jcelerier jcelerier merged commit c0776f3 into ossia:master Aug 3, 2024
52 of 56 checks passed
@nicobou
Copy link
Contributor Author

nicobou commented Aug 3, 2024

\o/

samamou pushed a commit that referenced this pull request Sep 4, 2024
Co-authored-by: Nicolas Bouillot <[email protected]>
Co-authored-by: Jean-Michaël Celerier <[email protected]>
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