Skip to content

Instantly share code, notes, and snippets.

@osdrv
Created February 5, 2012 18:36
Show Gist options
  • Save osdrv/1747090 to your computer and use it in GitHub Desktop.
Save osdrv/1747090 to your computer and use it in GitHub Desktop.
#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