zenomt / rtmfp-cpp

Secure Real-Time Media Flow Protocol (RTMFP) Library in C++
https://www.rfc-editor.org/rfc/rfc7016.html
MIT License
36 stars 8 forks source link

Discussion are not working creating an issue for Windows port here. #11

Closed al-sabr closed 1 year ago

al-sabr commented 1 year ago

Greetings !

I started a Windows port but came to a roadblock because I have no experience with Socket porting from Unix to Windows but somehow I found the bits an pieces from around the web and added new files and modified CMakeLists.txt file to take into consideration WIN32 with vcpkg for Visual Studio 2019 project generation.

I hope that it is going to lead somewhere.

https://github.com/al-sabr/rtmfp-cpp/tree/win32-port

Best Regards

al-sabr commented 1 year ago

Here is the compilation result:

https://pastebin.com/a5jq1BPh

al-sabr commented 1 year ago

Latest push compiles full but the code is not 100% good or working I need help.

zenomt commented 1 year ago

hi @al-sabr . i'm not sure why Discussions isn't working. are you sure you were logged in? i looked with a different account and i had the option to "create a new discussion" (in case it was limited to only the repo owner/me).

regarding Windows: i don't have access to a Windows system and so i would be uncomfortable adding Windows-specific code (especially since i wouldn't be able to tell if i broke something).

i would be willing to add some "if/if-not WIN32" to the CMakeLists.txt file to exclude some source files from building on Windows (EDIT or to set Windows-specific build flags, as i see in your repo). but i would prefer Windows-specific source files to be in a separate repo. i'd be happy to link to such a repo in the README.

i'm not a CMake guru, but i believe you could make your Windows CMakeLists.txt reference the main RTMFP repo by location/commit-id as a dependency, and it would get pulled in. then your Windows-specific one would be the top-level CMakeLists.txt for building a Windows library.

al-sabr commented 1 year ago

Hi @zenomt I'm glad you saw my messages and you are right I am using another Browser which is not working well with GitHub. I will try with Opera. I was able to make your project fully CMake compliant with total compilation. I had to do some modifications in your code but I think that there's something like 5% work left to do for the Windows part in the following files:

You can correct me if I am wrong be my guest :D

https://github.com/al-sabr/rtmfp-cpp/blob/win32-port/src/PerformerWindowsPlatformAdapter.cpp https://github.com/al-sabr/rtmfp-cpp/blob/win32-port/src/WindowsPlatformAdapter.cpp

If you do the necessary changes I will try to compile it and test the new features.

I also added all CMake Win32 and UNIX conditions in CMakeLists.txt and few of the C++ source files.

Have a look at : https://github.com/al-sabr/rtmfp-cpp/commits/win32-port

Best Regards

al-sabr commented 1 year ago

Creating a new thread in discussions