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

Fails to compile when there is no audio support #483

Open
gyroninja opened this issue Dec 17, 2017 · 5 comments
Open

Fails to compile when there is no audio support #483

gyroninja opened this issue Dec 17, 2017 · 5 comments
Labels

Comments

@gyroninja
Copy link

When I tried to compile toxic without audio support it failed to compile. There were errors in video_call.c trying to use variables that only exist when audio support is enabled.

@JFreegman
Copy link
Owner

Can you post the errors please

@gyroninja
Copy link
Author

toxic/src/video_call.c:223:28: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘is_call’; did you mean ‘is_chat’?
             if ( windows[i].is_call && windows[i].num == friend_number ) {
                            ^
toxic/src/video_call.c: In function ‘cmd_video’:
toxic/src/video_call.c:267:15: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘is_call’; did you mean ‘is_chat’?
     if ( !self->is_call ) {
               ^~
toxic/src/video_call.c: In function ‘cmd_ccur_video_device’:
toxic/src/video_call.c:398:14: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘is_call’; did you mean ‘is_chat’?
     if ( self->is_call ) {
              ^~
toxic/src/video_call.c:413:9: error: ‘ToxWindow {aka struct ToxWindow}’ has no member named ‘video_device_selection’
     self->video_device_selection[type] = selection;
         ^~
make: *** [Makefile:75: toxic/build/video_call.o] Error 1```

@JFreegman
Copy link
Owner

Sorry it's taken so long to get back to this. Are you still having this problem? I can't reproduce it.

@gyroninja
Copy link
Author

I don't use that system anymore, but I believe that issue is still there.
is_call is defined only if audio is enabled. If you have video enabled it will compile this
The issue stems from the assumption that if video is enabled audio is enabled, but that is not necessarily the case.
IIRC it was pretty simple to reproduce. You just needed to edit this to always fail.

@JFreegman
Copy link
Owner

The issue stems from the assumption that if video is enabled audio is enabled, but that is not necessarily the case.

That makes sense. I never considered someone might try to compile with video but not audio. Thanks.

@JFreegman JFreegman added the bug label Jan 25, 2024
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Nov 1, 2024
…m calls

Fixes `video_call.c:58:16: error: no member named 'av' in 'struct Toxic'` during build when `libx11`, `libvpx` and `openal-soft` all happened to be installed in the prefix before compiling `toxic` (the manifestation of JFreegman/toxic#483 in termux-packages)

This one is a bit of a far-out suggestion, but I noticed that audio **receiving** (openal playback) and video **receiving** (x11 render video stream) both **do** work if I actually install this build in Termux, open Termux:X11, open a terminal in Termux:X11, set up a Tox client on a desktop PC, add the client on Termux as a friend, start a call with it, set my microphone and webcam on the desktop PC client, turn on my camera on the desktop PC client, and watch and listen for the output on the Android device.

neither video **sending** (v4l2 recording) nor audio **sending** (openal recording) work, so the Termux:X11 client is only able to hear and see the other call participants and other participants can't hear or see the Termux:X11 client (though chat messages work), but I wondered whether that means that the X11 and openal support both have to remain completely disabled, or if it is worth it at all to enable them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants