Created
February 5, 2012 18:36
-
-
Save osdrv/1747090 to your computer and use it in GitHub Desktop.
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 "cinder/app/AppBasic.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/url.h" | |
#include "cinder/qtime/QuickTime.h" | |
#define DISPLAY_WIDTH 1480 | |
#define DISPLAY_HEIGHT 800 | |
#define STREAM_URL "http://zz.zz.zz.zz/master.m3u8?cid=some_cool_id" | |
//#define STREAM_URL "http://some_internal_domain/video.mp4" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
using namespace ci::qtime; | |
class MyApp : public AppBasic { | |
MovieLoader ml; | |
MovieGl glv; | |
public: | |
void prepareSettings( Settings *settings ); | |
void setup(); | |
void update(); | |
void draw(); | |
}; | |
void MyApp::prepareSettings( Settings *settings ) { | |
settings->setWindowSize( DISPLAY_WIDTH, DISPLAY_HEIGHT ); | |
settings->setFrameRate( 60.0f ); | |
} | |
void MyApp::setup() { | |
Url u( STREAM_URL ); | |
this->ml = MovieLoader( u ); | |
this->glv = MovieGl( this->ml ); | |
this->glv.play(); | |
} | |
void MyApp::update() { | |
} | |
void MyApp::draw() { | |
gl::clear( Color( 1, 1, 1 ) ); | |
gl::draw( this->glv.getTexture() ); | |
} | |
CINDER_APP_BASIC( MyApp, RendererGl ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment