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

Build Error #5

Open
ptrkrlsrd opened this issue Dec 2, 2015 · 5 comments
Open

Build Error #5

ptrkrlsrd opened this issue Dec 2, 2015 · 5 comments

Comments

@ptrkrlsrd
Copy link

Hey,

When I'm trying to build my project I'm getting an error on line 42(in ofxAVFVideoPlayer.h) saying:
Virtual function 'getPixels' has a different return type ('unsigned char *') than the function it overrides (which has return type 'ofPixels_<unsigned char> &')
Am I doing something wrong?

@razvanilin
Copy link

The addon is quite old so I presume it was built for a previous version of OF. I will give it a try too and see if I can make it work

@mosspassion
Copy link

This problem is still present.

I'm using Xcode 7.3.1, openFrameworks v0.9.3. I'm just trying to open up the example.

I need to use newer openFrameworks versions because of another addon I'm using.

@andyinabox
Copy link

I'm on oF v0.9.8, also seeing this issue. It looks like it has something to do with an update to how video pixels are returned in newer versions of oF.

A similar issue popped up in ofxOpenCv. I dug up Arturo's commit that may have addressed the issue, notice that he gets rid of anything that uses ofPixelsRef and in the header changes return types from unsiged char* to ofPixels&.

screenshot 2017-11-15 11 43 23
screenshot 2017-11-15 11 43 32

Trying to see if I can implement similar changes in this addon, but not going very smoothly so far. Not exactly an oF ninja here but I'll submit a PR if I have any luck.

@hamoid
Copy link

hamoid commented Nov 15, 2017

Not sure if this helps, but if something expects unsigned char * from an ofImage, you can do theImage.getPixels().getData().

getPixels() returns a reference, and getData() the old unsigned char *.

@andyinabox
Copy link

Awesome, thanks @hamoid!

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

No branches or pull requests

5 participants