Created
May 18, 2014 11:08
-
-
Save fishkingsin/256f200c7b2f49caf8de to your computer and use it in GitHub Desktop.
openframeworks + ofxGstreamer + ARDrone Video Stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofApp.h" | |
#include "ofGstVideoPlayer.h" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
ofGstVideoPlayer* gstPlayer = new ofGstVideoPlayer(); | |
player.setPlayer(ofPtr<ofGstVideoPlayer>(gstPlayer)); | |
ofGstVideoUtils *gstUtil = gstPlayer->getGstVideoUtils(); | |
gstUtil->setPipeline("tcpclientsrc host=192.168.1.1 port=5555 ! h264parse ! decodebin ! videoconvert ! videoscale",24,true,640,360); | |
gstUtil->startPipeline(); | |
player.play(); | |
} | |
//-------------------------------------------------------------- | |
void ofApp::update(){ | |
player.update(); | |
} | |
//-------------------------------------------------------------- | |
void ofApp::draw(){ | |
player.draw(0,0); | |
} | |
//-------------------------------------------------------------- | |
void ofApp::keyPressed(int key){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::keyReleased(int key){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseMoved(int x, int y ){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseDragged(int x, int y, int button){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mousePressed(int x, int y, int button){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::mouseReleased(int x, int y, int button){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::windowResized(int w, int h){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::gotMessage(ofMessage msg){ | |
} | |
//-------------------------------------------------------------- | |
void ofApp::dragEvent(ofDragInfo dragInfo){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment