-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from jvcleave/develop
Develop
- Loading branch information
Showing
10 changed files
with
157 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Attempt to load a config.make file. | ||
# If none is found, project defaults in config.project.make will be used. | ||
ifneq ($(wildcard config.make),) | ||
include config.make | ||
endif | ||
|
||
# make sure the the OF_ROOT location is defined | ||
ifndef OF_ROOT | ||
OF_ROOT=../../.. | ||
endif | ||
|
||
# call the project makefile! | ||
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ofxOMXPlayer |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "ofMain.h" | ||
#include "ofApp.h" | ||
|
||
int main() | ||
{ | ||
ofSetupOpenGL(1280, 720, OF_WINDOW); | ||
ofRunApp( new ofApp()); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#include "ofApp.h" | ||
|
||
//-------------------------------------------------------------- | ||
void ofApp::setup() | ||
{ | ||
ofSetLogLevel(OF_LOG_VERBOSE); | ||
|
||
string v1 = "https://devimages.apple.com.edgekey.net/samplecode/avfoundationMedia/AVFoundationQueuePlayer_HLS2/master.m3u8"; | ||
string v2 = "rtsp://192.168.200.43:1935/vod/sample.mp4"; | ||
string v3 = "http://192.168.200.43:1935/vod/mp4:sample.mp4/playlist.m3u8"; | ||
string v4 = "http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"; | ||
|
||
|
||
string videoPath = v1; | ||
|
||
//Somewhat like ofFboSettings we may have a lot of options so this is the current model | ||
ofxOMXPlayerSettings settings; | ||
settings.videoPath = videoPath; | ||
settings.useHDMIForAudio = true; //default true | ||
settings.enableTexture = true; //default true | ||
settings.enableLooping = true; //default true | ||
settings.enableAudio = true; //default true, save resources by disabling | ||
//settings.doFlipTexture = true; //default false | ||
|
||
|
||
//so either pass in the settings | ||
omxPlayer.setup(settings); | ||
|
||
//or live with the defaults | ||
//omxPlayer.loadMovie(videoPath); | ||
|
||
} | ||
|
||
|
||
|
||
//-------------------------------------------------------------- | ||
void ofApp::update() | ||
{ | ||
|
||
} | ||
|
||
|
||
//-------------------------------------------------------------- | ||
void ofApp::draw(){ | ||
if(!omxPlayer.isTextureEnabled()) | ||
{ | ||
return; | ||
} | ||
|
||
omxPlayer.draw(0, 0, ofGetWidth(), ofGetHeight()); | ||
|
||
//draw a smaller version in the lower right | ||
int scaledHeight = omxPlayer.getHeight()/4; | ||
int scaledWidth = omxPlayer.getWidth()/4; | ||
omxPlayer.draw(ofGetWidth()-scaledWidth, ofGetHeight()-scaledHeight, scaledWidth, scaledHeight); | ||
|
||
ofDrawBitmapStringHighlight(omxPlayer.getInfo(), 60, 60, ofColor(ofColor::black, 90), ofColor::yellow); | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "ofMain.h" | ||
#include "ofxOMXPlayer.h" | ||
|
||
class ofApp : public ofBaseApp{ | ||
|
||
public: | ||
|
||
void setup(); | ||
void update(); | ||
void draw(); | ||
|
||
ofxOMXPlayer omxPlayer; | ||
|
||
}; | ||
|
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,7 @@ class ofxOMXPlayerEngine: public OMXThread | |
{ | ||
return doLooping; | ||
} | ||
bool doRestart; | ||
private: | ||
|
||
|
||
|