Hello.
I’m working on a color tracking project that enables me sending the x, y coordinates of the tracked object using OSC to SuperCollider. This works pretty well.
I tried succesless the library ofxIpVideoGrabber and ofxIpCamera. I’m a newbie to OF and fiddling around with both libraries I couldn’t access my Ip-Camera.
I use Linux.
Before I implement the code to the project I would like to connect to my ip-camera.
So, there I’m already struggling.
I’m working with CodeBlocks and I don’t know how to setup a project with the included files in the ofxIpVideoGrabbers example folder. What I did, until now, is I setting up a new project using the projectGenerator and place it into the ofxIpVideoGrabber folder.
The example of the ofxIpVideoGrabber library includes files named main.cpp, ofApp.cpp and ofApp.h.
Do I add this files simply to the src folder and replace the main.cpp with the one of the example folder?
Until now all my trials fail.
Thanks Martin
Next step:
I downloaded the “ofxHttpUtils” addon and now the complier holds at #include “ofxGui.h”.
I changed the “ofxGui.h” to “ofxAxisGui.h” and now the complier stops at line 26 of the " ofxAxisGui.h"
(…/…/…/addons/ofxAxisGrabber/src/ofxAxisGui.h|26|error: ofxButton does not name a type.
Thanks Martin
you need to include ofxGui in the example. that addon is included in the project, are you using the latest version of openFrameworks? ofxGui only exists since 0.8.0
My addons.make file has three entrances:
ofxAxisGrabber
ofxHttpUtils
ofxGui
If I open your project with CodeBlocks the included addons are not visible. But this is also when I open an other addon example. If I create a new project with the ProjectGenerator the addons are visible.
I’m writing an application that reads a lot of IP Cameras (not AXIS, but Arecont, with mjpeg stream). The app is based on ofxIPVideoGrabber and compiled in OSX.
It runs fine but sometimes randomly hangs because something related to threads. I suppose that other people has he same problem. How could I to solve it? Another library?
I’ve tried also with ofxWatchDog but doesn’t work with ofxPVideoGrabber.
Is the ofxAxisGrabber.h up-to-date for the dev branch of OF ?
I’m having some experiments about ipCameras…
I got all those compilations problems when compiling the example :
/Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.h:27:19: Virtual function 'getPixels' has a different return type ('unsigned char *') than the function it overrides (which has return type 'ofPixels_<unsigned char> &')
/Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:114:44: Cannot initialize a parameter of type 'ofPixelFormat' with an rvalue of type 'int'
/Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:341:13: No member named 'getPixelsRef' in 'ofGstVideoUtils'; did you mean 'getPixels'?
Full log below :
clang: warning: -lpthread: 'linker' input unused
In file included from /Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:8:
../../../addons/ofxAxisGrabber/src/ofxAxisGrabber.h:27:19: error: virtual function 'getPixels' has a different return type ('unsigned char *') than the function it overrides (which has return type 'ofPixels_<unsigned char> &')
unsigned char * getPixels();
^
In file included from /Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:8:
In file included from ../../../addons/ofxAxisGrabber/src/ofxAxisGrabber.h:11:
../../../libs/openFrameworks/types/ofBaseTypes.h:120:25: note: overridden virtual function is here
virtual ofPixels_<T> & getPixels()=0;
^
/Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:114:44: error: cannot initialize a parameter of type 'ofPixelFormat' with an rvalue of type 'int'
bool ret = gst.setPipeline(pipeline.str(),24,true,w,h);
^~
In file included from /Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:8:
In file included from ../../../addons/ofxAxisGrabber/src/ofxAxisGrabber.h:15:
../../../libs/openFrameworks/video/ofGstUtils.h:150:53: note: passing argument to parameter 'pixelFormat' here
bool setPipeline(string pipeline, ofPixelFormat pixelFormat=OF_PIXELS_RGB, bool isStream=false, int w=-1, int h=-1);
^
/Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:337:9: warning: 'operator unsigned char *' is deprecated [-Wdeprecated-declarations]
return gst.getPixels();
^
In file included from /Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:8:
In file included from ../../../addons/ofxAxisGrabber/src/ofxAxisGrabber.h:11:
In file included from ../../../libs/openFrameworks/types/ofBaseTypes.h:7:
In file included from ../../../libs/openFrameworks/3d/ofMesh.h:12:
In file included from ../../../libs/openFrameworks/gl/ofGLUtils.h:13:
../../../libs/openFrameworks/graphics/ofPixels.h:74:154: note: 'operator unsigned char *' has been explicitly marked deprecated here
OF_DEPRECATED_MSG("Accessing pixels as unsigned char*, instead use ofPixels or getPixels().getPixels() if you are really trying to access the raw data",operator PixelType*());
^
In file included from /Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:8:
In file included from ../../../addons/ofxAxisGrabber/src/ofxAxisGrabber.h:11:
In file included from ../../../libs/openFrameworks/types/ofBaseTypes.h:2:
../../../libs/openFrameworks/utils/ofConstants.h:40:50: note: expanded from macro 'OF_DEPRECATED_MSG'
#define OF_DEPRECATED_MSG(message, func) func __attribute__ ((deprecated))
^
/Users/dudleysmith/Dude_s_Place/_OF/openFrameworks/addons/ofxAxisGrabber/src/ofxAxisGrabber.cpp:341:13: error: no member named 'getPixelsRef' in 'ofGstVideoUtils'; did you mean 'getPixels'?
return gst.getPixelsRef();
^~~~~~~~~~~~
getPixels
1 warning and 3 errors generated.
no, we are changing the api a bit for 0.9 and among other things any class that implements ofBaseVideo will stop working. the changes are pretty simple, things like adding const to some methods or parameters or renaming getPixelsRef to getPixels, getTextureReference to getTexture…
anyway ofxAxisGrabber is not adapted yet to the new api