Git Product home page Git Product logo

Comments (9)

leadedge avatar leadedge commented on July 29, 2024

io.h is for "_access" which is simply to find whether a file exists or not. The change was due to a problem using path functions in shlwapi.dll which fail with Openframeworks 12.0. We can't use an Openframeworks function because the core of the addon must work without it. Can you suggest another function that tests for file existence?

from ofxndi.

eduardfrigola avatar eduardfrigola commented on July 29, 2024

There seems to be access without the underscore. Documentation here

I think is as simple as adding io.h inside the conditional compile of TARGET_WIN32 Similar to this line as _acces method is just called here and is inside a compile conditional that appears here.

from ofxndi.

eduardfrigola avatar eduardfrigola commented on July 29, 2024

Now I see that ofxNDIsender::SetFormat(NDIlib_FourCC_video_type_e format) uses _acces and other windows related functions. I will try to reimplement that for macOS compatibility.

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

Yes I see.

"_access" is only used for a Windows target and so #include <io.h> can be conditional. I tested it and it works.

The purpose of the file existence check is to allow the NDI dll to be located in the executable folder without depending on runtime installation. The OSX/Linux part just uses the NDI runtime and so there is no need to use "access" or spend any time on it.

I am looking now at a video timecode function. It's a simple change and avoids the need for any overloads. I will find out the result shortly. Can you give me some idea on how you use the timecode value.

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

I fixed the #include <io.h> problem as mentioned. It should still work for OSX because "_access" is not used. At the same time I included two functions in ofxNDIreceive with very little change to the original SendImage functions -

uint64_t GetVideoTimecode() , double GetVideoFrameTime()

I updated the example source and binaries. The receiver shows the received frame interval.

from ofxndi.

eduardfrigola avatar eduardfrigola commented on July 29, 2024

Still not able to compile with latest commit.
Missing a closing curly braces for those lines:

#elif defined(TARGET_OSX) || defined(TARGET_LINUX)
if (m_hNDILib) {
dlclose(m_hNDILib);
#endif

Also you are redeclaring m_hNDILib (already declared in .h file) in

void *m_hNDILib = dlopen(ndi_path.c_str(), RTLD_LOCAL | RTLD_LAZY);

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

Thanks for the heads up. Meanwhile you can fix these things to get going. This code is kindly contributed and I cant test with OSX. Have a happy new year.

from ofxndi.

eduardfrigola avatar eduardfrigola commented on July 29, 2024

Sure! Working well on my branch, posting here so anyone that encounters issues with macos have some more information. Happy new year for you too!

from ofxndi.

eduardfrigola avatar eduardfrigola commented on July 29, 2024

After commit 73354d2 compiles correctly on macos.

Thanks!

from ofxndi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.