From 7bcde3d5a2936822adf5e623879b6b581fb40d8d Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Sat, 6 Oct 2012 17:32:44 -0700 Subject: [PATCH 1/2] Allow movie filename to be a URL. --- src/ofxThreadedVideo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ofxThreadedVideo.cpp b/src/ofxThreadedVideo.cpp index 582b58a..be9d6e6 100644 --- a/src/ofxThreadedVideo.cpp +++ b/src/ofxThreadedVideo.cpp @@ -103,9 +103,8 @@ bool ofxThreadedVideo::loadMovie(string fileName){ } // put the movie path in a queue - pathsToLoad.push(ofToDataPath(fileName)); + pathsToLoad.push(fileName); return true; - } //-------------------------------------------------------------- @@ -288,8 +287,12 @@ void ofxThreadedVideo::threadedFunction(){ loadVideoID = getNextLoadID(); + if (loadPath.find("http://") == string::npos) + loadPath = ofToDataPath(loadPath); + paths[loadVideoID] = loadPath; loadPath = ""; + #ifdef TARGET_OSX vector pathParts = ofSplitString(paths[loadVideoID], "/"); #else From 7706926c44b9b5fde973925e84c2feb99a7f9a06 Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Sat, 6 Oct 2012 17:34:53 -0700 Subject: [PATCH 2/2] Added check for https:// --- src/ofxThreadedVideo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ofxThreadedVideo.cpp b/src/ofxThreadedVideo.cpp index be9d6e6..183c241 100644 --- a/src/ofxThreadedVideo.cpp +++ b/src/ofxThreadedVideo.cpp @@ -287,7 +287,7 @@ void ofxThreadedVideo::threadedFunction(){ loadVideoID = getNextLoadID(); - if (loadPath.find("http://") == string::npos) + if (loadPath.find("http://") == string::npos && loadPath.find("https://") == string::npos) loadPath = ofToDataPath(loadPath); paths[loadVideoID] = loadPath;