Error with ofxGStreamer on windows7

Dear all, i’m playing with ofxGStreamer but with no luck. i’m using of0.8 with ofxGStreamer from https://github.com/arturoc/ofxGStreamer . The following codes compile successfully but when it runs there are errors.

testApp.h

#pragma once

#include "ofMain.h"

//#define USE_CAMERA

class testApp : public ofBaseApp{

public:
void setup();
void update();
void draw();

void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);

#ifdef USE_CAMERA
	ofVideoGrabber vidGrabber;
#else
	ofVideoPlayer player;
#endif

};

testApp.cpp

#include "testApp.h"

#ifdef USE_CAMERA
#include "ofGstVideoGrabber.h"
#else
#include "ofGstVideoPlayer.h"
#endif

//--------------------------------------------------------------
void testApp::setup(){
#ifdef USE_CAMERA
	vidGrabber.setGrabber(ofPtr<ofGstVideoGrabber>(new ofGstVideoGrabber));
	vidGrabber.setVerbose(true);
	vidGrabber.setDesiredFrameRate(30);
	vidGrabber.initGrabber(640,480);
	
#else
	player.setPlayer(ofPtr<ofGstVideoPlayer>(new ofGstVideoPlayer));
	player.loadMovie("fingers.mov");
	player.play();
#endif
}

//--------------------------------------------------------------
void testApp::update(){
#ifdef USE_CAMERA
	vidGrabber.update();
#else
	player.update();
#endif
}

//--------------------------------------------------------------
void testApp::draw(){
#ifdef USE_CAMERA
	vidGrabber.draw(0,0);
#else
	player.draw(0,0);
#endif
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){

}

//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){

}

when using the camera, the error is:
[error] ofGstVideoGrabber: initGrabber(): no device found, exiting without initializing
[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded

when using a video file, the error is:
[error] ofGstUtils: startPipeline(): unable to pause pipeline
[warning] ofGstUtils: getDurationNanos(): couldn’t query time duration
[error] ofGstVideoPlayer: allocate(): cannot get pipeline caps
[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded

btw, i’ve installed gstreamer-1.0-x86-1.2.2.msi and gstreamer-1.0-devel-x86-1.2.2.msi

Regards

did you add this to your path? C:\gstreamer\1.0\x86\bin
and better to add it as first line in th path variable
however i n my case some of the methods not fully working,i.e setspeed();

yes. the bin directory is added to the path, otherwise the program will complain about the missing of dll when it starts up.
are you also on windows?

are you using the lastest git version of? if not ,you have to change this line of code
in ofGstVideoPlayer.cpp
name = “file://”+ofToDataPath(name,true);
to this:
name = “file:///”+ofToDataPath(name,true);
in oder to make it working.

there’s still no video capture in windows or osx, the videoGrabber still uses the linux specific element and in gstreamer 1.0 for windows there’s actually no grabber element for windows yet, so yes it’s normal that it won’t work. The main advantage of using gstreamer is having faster videoPlayer and you can still use the default videograbber in windows.

@arturo,when using gstreamer 1.2.3 with of,is it using playbin or playbin2?
cheers

playbin2 doesn’t exist anymode in gstreamer 1.0 it was a transitional element in gstreamer 0.10 that was then renamed to playbin in 1.0

thanks man. it works. to make it clear for other people’s reference, one need to change line 41 of ofGstVideoPlayer.cpp, from name = “file://”+ofToDataPath(name,true); to name = “file:///”+ofToDataPath(name,true);

i agree. for the videograbber part, the default one is enough.