openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

ofDirectShowPlayer docs show a draw() method

Open rwebber opened this issue 8 years ago • 2 comments

The docs list a draw method. see: http://openframeworks.cc/documentation/video/ofDirectShowPlayer/#show_draw

I don't see any other options, so I assume this is sort of a critical omission.

rwebber avatar Apr 05 '17 19:04 rwebber

The video player implementations don't always have draw functions, but are pointed by ofVideoPlayer in a platform dependent way. It's not a critical omission, but a documentation mistake since ofVideoPlayer / ofBaseVideoDraws are in charge of actually doing the drawing. That said, we should figure out why the docs were generated in this way and if the updates in 0.10.+ fix it.

bakercp avatar May 22 '17 03:05 bakercp

Hi @bakercp,

It's been quite a while since this topic was created. I am currently using ofDirectShowPlayer because ofVideoPlayer encounters issues processing audio on my machine. I have detailed the issue here: link to forum post.

I am trying to draw ofDirectShowPlayer and was wondering if you could recommend a more efficient approach than the following:

.h

ofDirectShowPlayer video;
ofTexture videoTexture;

draw()

videoTexture.loadData(video.getPixels());
videoTexture.draw(0, 0, ofGetWidth(), ofGetHeight());

This method is quite CPU intensive. Any suggestions for improving performance would be greatly appreciated.

Thank you!

Vamoss avatar Jun 20 '24 13:06 Vamoss