//-------------------------------------------------------------- StreamAsset::StreamAsset(AssetManagerInterface* man, const string& _name, StreamType _type, string _url, string _username, string _password) : BaseMediaAsset(man) { canSource = true; assetType = MEDIA_ASSET_STREAM; streamType = _type; addAlias(_name); url = _url; username = _username; password = _password; isIpVideo = streamType == STREAM_TYPE_IPCAM; if(isIpVideo) { ipcam = ofPtr<ofxIpVideoGrabber>(new ofxIpVideoGrabber()); ipcam->setURI(url); ipcam->setUsername(username); ipcam->setPassword(password); } else { qtcam = ofPtr<ofVideoPlayer>(new ofVideoPlayer()); qtcam->loadMovie(url); // TODO: construct correct user/pass string } addOscMethod("open"); addOscMethod("close"); }
//-------------------------------------------------------------- AssetMetaData::AssetMetaData() : ofxOscRouterNode("meta") { description = ""; addOscMethod("add"); addOscMethod("remove"); addOscMethod("change"); addOscMethod("description"); }
//-------------------------------------------------------------- LayerSink::LayerSink(LayerManagerInterface* _lmi, const string& name) : ofxOscRouterNode(name) { lmi = _lmi; addOscMethod("sink"); addOscMethod("unsink"); addOscMethod("clear"); addOscMethod("stretchmode"); addOscMethod("clipping"); scaleMode = OF_SCALEMODE_FIT; // scaleMode = FIT; }
//-------------------------------------------------------------- GrabberAsset::GrabberAsset(AssetManagerInterface* man, const string& _name, int _devId, int _width, int _height) : BaseMediaAsset(man){ canSource = true; assetType = MEDIA_ASSET_GRABBER; addAlias(_name); width = _width; height = _height; devId = _devId; grabber = ofPtr<ofVideoGrabber>(new ofVideoGrabber()); addOscMethod("open"); addOscMethod("close"); // grabber->initGrabber(width, height); }
void Danseur::initialiseOscMethodes() { addOscMethod("position"); addOscMethod("dessinable"); addOscMethod("animable"); addOscMethod("apparait"); addOscMethod("disparait"); addOscMethod("alpha"); addOscMethod("duration"); addOscMethod("offset"); addOscMethod("grand"); addOscMethod("afficherTemps"); addOscMethod("afficherXPos"); addOscMethod("afficherYPos"); addOscMethod("afficherAngle"); addOscMethod("afficherConstante"); addOscMethod("afficherAll"); addOscMethod("stopCounter"); addOscMethod("vitesseRotation"); }
//-------------------------------------------------------------- PlayerAsset::PlayerAsset(AssetManagerInterface* man, const string& _name) : BaseMediaAsset(man), PlayerAssetInterface(man) { canSource = true; assetType = MEDIA_ASSET_PLAYER; addAlias(_name); player = ofPtr<ofxVideoBufferPlayer>(new ofxVideoBufferPlayer()); currentAssetLink = NULL; //addOscMethod("buffer"); addOscMethod("play"); addOscMethod("start"); addOscMethod("stop"); addOscMethod("pause"); addOscMethod("loopmode"); addOscMethod("looppoints"); addOscMethod("looppointstart"); addOscMethod("looppointend"); addOscMethod("looppointsn"); addOscMethod("looppointstartn"); addOscMethod("looppointendn"); addOscMethod("frame"); addOscMethod("framen"); addOscMethod("speed"); addOscMethod("dump"); }
void Xenakis::initialiseOscMethodes() { addOscMethod("nombre"); addOscMethod("delay"); }
void Perpendiculaire::initialiseOscMethodes() { addOscMethod("showSymbole"); addOscMethod("positionRelative"); }
void MultiplesTangentes::initialiseOscMethodes() { addOscMethod("nombre"); }
//-------------------------------------------------------------- LayerTransform::LayerTransform() : ofxEnablerInterface(true), ofxOscRouterNode("transform") { addOscNodeAlias("t"); addOscNodeAlias("xform"); addOscMethod("position"); addOscMethod("p"); addOscMethod("anchorpoint"); addOscMethod("a"); addOscMethod("rotate"); addOscMethod("r"); addOscMethod("scale"); addOscMethod("s"); addOscMethod("opacity"); addOscMethod("o"); addOscMethod("size"); addOscMethod("sz"); addOscMethod("width"); addOscMethod("w"); addOscMethod("height"); addOscMethod("h"); size = ofPoint(640,480); position = ofxClampedPoint(ofPoint(0.0f,0.0f,0.0f)); bIsPositionNormalized = false; anchorPoint = ofxClampedPoint(ofPoint(0.5f,0.5f,0.5f)); bIsAnchorPointNormalized = true; rotation = ofxClampedPoint(ofPoint(0.0f,0.0f,0.0f)); bIsRotationNormalized = false; scale = ofxClampedPoint(ofPoint(1.0f, 1.0f, 1.0f)); orientation = ofxClampedPoint(ofPoint(1.0f, 1.0f, 1.0f)); opacity = 255; }