gstreamer in 007 and CodeBlocks

Hi there,

I got a problem with using gstreamer for 007 in Win 7 CodeBlocks. I tried to follow the guide in this thread

http://forum.openframeworks.cc/t/gstreamer-playback-under-windows/3610/0

However, I kept on getting error message like this:

error: cannot declare field ‘testApp::fingerMovie’ to be of abstract type ‘ofVideoPlayerGst’

I tried by using “ofVideoPlayerGst *fingerMovie;”, however it generated new error like this:

error: request for member ‘loadMovie’ in ‘((testApp*)this)->testApp::fingerMovie’,which is of non-class type ‘ofVideoPlayerGst’.

I’ve been stuck in this for 2 days now, any advice for this matter?

Cheers,

update: I add

ofPixelsRef getPixelsRef() {}

in ofVideoPlayerGst.h, but I got bunch of errors like this:

undefined reference to ‘ofVideoPlayerGst::loadMovie(std::string)’

any help please…

you need to add video/ofGst* to your openframeworks project and recompile it, then compile the example again. also you don’t need to use ofGstVideoPlayer directly instead:

ofVideoPlayer player;

  
player.setPlayer(ofPtr<ofBaseVideoPlayer>(new ofGstVideoPlayer);  

and then use it as you would normally use any other video player

cool. thanks arturo, I’ll give it a try. also, where should I put setPlayer? in testApp.h as well?

no in .cpp in setup before calling anything else on the player

hey arturo, I got error: expected primary-expression before ‘(’ token on the code that I added. what’s this?

sorry it’s missing a ), it should be:

  
    player.setPlayer(ofPtr<ofBaseVideoPlayer>(new ofGstVideoPlayer));   

umm, sorry, still getting the same error. here’s the complete code:

  
  
void testApp::setup() {  
  
  ofBackground (255, 255, 255);  
  
fingerMovie.setPlayer(ofPtr<ofBaseVideoPlayer>(new ofGstVideoPlayer));  
if (fingerMovie.loadMovie("movie.mov")) {  
fingerMovie.setLoopState(OF_LOOP_NORMAL);  
fingerMovie.play();  
tex.allocate(fingerMovie.getWidth(), fingerMovie.getHeight(), GL_RGB);  
}  
  
fingerMovie.setLoopState(OF_LOOP_NORMAL);  
frameByframe = false;  
}  
  

hi Arturo, actually I managed to compile the code in VS 2010 successfully. However, it crashed when I ran the program and it gave me this error message:

The procedure entry point x264_encoder_open could not be licated in the dynamic link library libx264-67.dll.

Is there any solution for this? maybe reinstalling the Gstreamer? I’m using Gstreamer 10.6

mmh, not sure if the gstreamer dll’s are compatible with visual studio. where have you installed gstreamer from?

got it from here code.google.com/p/ossbuild/downloads/detail?name=GStreamer-WinBuilds-SDK-GPL-x86.msi and I followed the guide of building gstreamer example in https://github.com/fishkingsin/ofGstPlayerExample.

so, if that’s the issue, then I should build gstreamer in codeblocks right? is there any source that I can download for it? I think the one I mentioned in my first post in this thread is way too old to use with 007. hmm.

ofGstVideoPlayer should work with 007 without any external class just add ofGst* to your openframeworks project and recompile. i’ve used ossbuild gstreamer under windows codeblocks recently so it works for sure

alright then. so, I can just modify the videoPlayerExample and change the player to Gstreamer and that will work right? I’ll try it later today. thanks for the help arturo :slight_smile:

hi arturo, I’m now working in CodeBlocks and I tried adding this code in the testApp::setup() of the moviePlayerExample

player.setPlayer(ofPtr(new ofGstVideoPlayer));

just to change the player. However, it still gives me the same error as before:

error: expected primary-expression before ‘(’ token

Is there anything I should include? I didn’t add anything, just that one line of code which I assume will change the player instantly.

you probably need to #include “ofGstVideoPlayer.h”

added that, and still getting the same error message. however, that error message disappeared after I use

player.setPlayer(ofPtr(new ofVideoPlayerGst));

however, I got an error message saying:
cannot convert ‘ofVideoPlayerGst*’ to "ofBaseVideoPlayer*’ in initialization.

wonder what went wrong

sorry it should be:

  
  
player.setPlayer(ofPtr<ofGstVideoPlayer>(new ofGstVideoPlayer));   
  

hmm, it gave me

error: ‘ofGstVideoPlayer’ was not declared in this scope

what should I declare and where?

okay, my bad, I did a typo in include ofGstVideoPlayer.h

but then, I got bunch of undefined reference error in ofGstVideoPlayer.cpp :frowning:

have you included ofGst*.cpp and .h in the openframeworks project and recompiled?