MayaPosch / NymphCast

Audio and video casting system with support for custom applications.
http://nyanko.ws/nymphcast.php
BSD 3-Clause "New" or "Revised" License
2.41k stars 81 forks source link

Nymphcast Player - Manually add Remote Server #60

Closed mapl closed 1 year ago

mapl commented 2 years ago

Remote NymphcastServer discovery is only possible right now when you're both Player and Server are on the same IP Subnet.

I want to ask how to manually add an arbitrary DNS Name or an IPv4/IPv6 address to the Player.

Thanks :)

MayaPosch commented 2 years ago

Manually connecting to a remote receiver was superseded by the fully automated service discovery approach, but I can see that there are valid use cases for manually defining a remote.

I have added a new dialogue (accessible via the Player menu: Remotes -> Manage custom...) that allows the definition of new remotes by hand. These are also saved to disk just like e.g. the playlist and other state, so that they persist between Player sessions.

I have only tested that the remote gets added and persisted, and there is no validation (yet) that the entered IP addresses and such are correct/reachable. Which is to say that it will likely Just Work (tm), but may still contain traces of bugs :)

MayaPosch commented 2 years ago

After testing this feature in more depth and fixing an issue found (list order in the remote drop-down), I consider this feature to be complete.

Please open a new ticket for any new issues fond.

mapl commented 2 years ago

This feature Implementation was outstandingly fast!

When I tried it out (compiled it and copied the binary to my existing Nymphcast Player Installation, because of DLL dependencies etc.), I needed to enter the receiver's IPv6 Address to the IPv4 Field to get it working. I guess there is a small bug.

Not sure yet about DNS Hostnames. Would need to test this as well.

MayaPosch commented 2 years ago

You're right that IPv6 addresses are currently not being used by the NC Player. Currently it does not use anything other than the default port either, which is an additional issue.

I'm reopening this issue while working on a solution for how to handle the IPv4 vs IPv6 issue. Internally it concerns just any valid string representing an IP address or hostname (so yes, DHS hostnames should work), so the question is mostly how to best present this to the user.

Maybe a single 'remote address' field is sufficient? Though having fields for multiple IPs/hostnames (with a default?) could be useful too.

What would your expectations as a user be?

mapl commented 2 years ago

Yep, I think a simple Hostfield should be sufficient to either cover a static IPv4/IPv6 and/or DNS HostName/FQDN per remote entry.

MayaPosch commented 2 years ago

The dialogue has been changed to just have a single identifier & IP/DNS name in addition to the port.

Please let me know if there is anything still missing/not working :)

In addition, NymphRPC has been updated to intercept non-existing host addresses. Upgrading its library is recommended.

mapl commented 2 years ago

I successfully compiled the Player from master with MSVC, but I had to set an additional env var "set path=%path%;C:\vcpkg\installed\x64-windows\tools\qt5\bin" because "qmake" was not found.

Setup NCP: Poco is already installed at "c:\vcpkg\installed\x64-windows\include\Poco". Setup NCP: Using POCO_ROOT=c:\vcpkg\installed\x64-windows Setup NCP: Qt is already installed at "c:\vcpkg\installed\x64-windows\include\Qt5". Setup NCP: Using QT5_ROOT=c:\vcpkg\installed\x64-windows Setup NCP: NymphRPC has been installed at "C:\Libraries\NymphRPC". Setup NCP: LibNymphCast has been installed at "C:\Libraries\LibNymphCast".

Building program 'NymphCastPlayer.exe' with Configuration: "- LIB_STATIC : '0'" "- LIB_CONFIG : 'Release'" "- LIB_BITS : '64'" "- LIB_CPPSTD : '-std:c++latest'" "- LIB_WARNING : ''" "- LIB_OPTIMIZATION : '-O2'" "- LIB_LNKCRT : '-MD'" "- BIN_FOLDER : 'build/x86_64-w64-msvc/Release'" "- OBJ_FOLDER : 'obj/static/x86_64-w64-msvc/Release'" "- QT5_ROOT : 'c:\vcpkg\installed\x64-windows'" "- QT5_INCLUDE_FIX : 'qt5/'" "- POCO_ROOT : 'c:\vcpkg\installed\x64-windows'" "- NYMPHRPC_ROOT : 'C:\Libraries\NymphRPC'" "- LIBNYMPHCAST_ROOT: 'C:\Libraries\LibNymphCast'" "- INSTALL_PREFIX : 'C:\Programs\NymphCastPlayer'" "- LIB_LIBCPATH : 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64'" "- LIB_SDKUMPATH : 'C:\Program Files (x86)\Windows Kits\10\LIB\10.0.19041.0\um\X64'" "- LIB_SDKUCRTPATH : 'C:\Program Files (x86)\Windows Kits\10\LIB\10.0.19041.0\ucrt\X64'"

    md "build/x86_64-w64-msvc/Release" > nul 2>&1
    md "obj/static/x86_64-w64-msvc/Release/litehtml/src/gumbo" > nul 2>&1
    cd obj/static/x86_64-w64-msvc/Release & qmake -nocache ../../../..

c:\msys64\home\admin\NymphCast\player\NymphCastPlayer>

I copied the newly built nymphcastplayer.exe to an existing Player Installation from releases but now some DLLs are not found when trying to execute it.

Even after coping those dll to the player installation, it fails to run.

MayaPosch commented 1 year ago

Please open a new issue ticket if there are still issues with compilation that are related to the project itself.