ofDirectShowPlayer causes an unresolved external symbol error

Hi there!

I’m trying to use ofDirectShowPlayer to play video for an Oculus application I’m developing. When I compile in debug mode there is this error:

LNK2019: unresolved external symbol “public: void __cdecl ofDirectShowPlayer::draw(float,float)” (?draw@ofDirectShowPlayer@@QEAAXMM@Z) referenced in function “public: void __cdecl content::update(int,float)” (?update@content@@QEAAXHM@Z)

It is relative to the file content.obj which is relative to content.cpp, one of the classes I created for the project. I’m assuming from what I read in the documentation that ofDirectShowPlayer is working the same way as ofVideoPlayer does. Is this correct? Is it necessary to do some other stuff? And also, what is the difference between using one or the other for a Windows application?

I’m using:
Windows 7
OF 0.9.0 - 64bit - Visual Studio 2015

Thanks a lot!

I believe the ofDirectShowPlayer doesn’t have a draw function. The draw is handled by the ofVideoPlayer which has the texture.

You could use getPixels() to get the pixels and load it into an ofTexture or just use ofVideoPlayer which will let you draw too

yes you don’t need to use ofDirectShowPlayer directly, it’s just an internal class that OF uses to provide video in windows but you should only need to use ofVideoPlayer

Oh I see! That’s what I wasn’t sure about, so I’ll use ofVideoPlayer instead, thank you!