summaryrefslogtreecommitdiff
path: root/liveengineUnmapped/src/playlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'liveengineUnmapped/src/playlist.cpp')
-rwxr-xr-xliveengineUnmapped/src/playlist.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/liveengineUnmapped/src/playlist.cpp b/liveengineUnmapped/src/playlist.cpp
index 61987d1..ce3beba 100755
--- a/liveengineUnmapped/src/playlist.cpp
+++ b/liveengineUnmapped/src/playlist.cpp
@@ -1,18 +1,18 @@
-#include "playlist.h"
-
-playlist::playlist()
+#include "playlist.h"
+
+playlist::playlist()
{
name="";
thumbnail.allocate(128,128,GL_RGB);
- thumbnailed=false;
+ thumbnailed=false;
}
void playlist::load(string _name){
//printf("loading %s\n",_name.c_str());
- if( !XML.loadFile(_name) ){
- printf("unable to load %s check data/ folder\n",_name.c_str());
+ if( !XML.loadFile(_name) ){
+ printf("unable to load %s check data/ folder\n",_name.c_str());
}else {
//printf("starting loader thread\n");
loadimg(); //how to do this from the worker thread???
@@ -29,38 +29,38 @@ void playlist::threadedFunction(){
unlock();
printf("unlocking thread\n");
}
-}
+}
void playlist::loadLayers(){
int numLayers=0;
layers.clear();
name=XML.getAttribute("playlist", "name", "");
float speed=XML.getAttribute("playlist", "speed", 0);
- if(XML.pushTag("playlist")) {
- numLayers=XML.getNumTags("svglayer");
- if(numLayers) {
- for (int i=0;i<numLayers;i++) {
- string s=XML.getAttribute("svglayer", "file", "",i);
- printf("loading %s: \n",s.c_str());
- layers[XML.getAttribute("svglayer", "note", 0,i)]=new svglayer(XML.getAttribute("svglayer", "file", "",i));
+ if(XML.pushTag("playlist")) {
+ numLayers=XML.getNumTags("svglayer");
+ if(numLayers) {
+ for (int i=0;i<numLayers;i++) {
+ string s=XML.getAttribute("svglayer", "file", "",i);
+ printf("loading %s: \n",s.c_str());
+ layers[XML.getAttribute("svglayer", "note", 0,i)]=new svglayer(XML.getAttribute("svglayer", "file", "",i));
}
- thumbnailed=false;
+ thumbnailed=false;
}
- numLayers=XML.getNumTags("movlayer");
- if(numLayers) {
- for (int i=0;i<numLayers;i++) {
- string s=XML.getAttribute("movlayer", "file", "",i);
+ numLayers=XML.getNumTags("movlayer");
+ if(numLayers) {
+ for (int i=0;i<numLayers;i++) {
+ string s=XML.getAttribute("movlayer", "file", "",i);
printf("loading %s: \n",s.c_str());
int note=XML.getAttribute("movlayer", "note", 0,i);
- int endnote=XML.getAttribute("movlayer", "endnote", 0,i);
+ int endnote=XML.getAttribute("movlayer", "endnote", 0,i);
layers[note]=new videolayer(XML.getAttribute("movlayer", "file", "",i),note,endnote,speed);
if (endnote>note) {
for (int j=note+1;j<endnote;j++) {
layers[j]=layers[note];
}
- }
+ }
}
- thumbnailed=false;
+ thumbnailed=false;
}
numLayers=XML.getNumTags("imglayer");
if(numLayers) {
@@ -81,7 +81,7 @@ void playlist::loadLayers(){
}
thumbnailed=false;
}
- XML.popTag();
+ XML.popTag();
}
}
@@ -106,22 +106,22 @@ void playlist::makeThumbnail(){
void playlist::loadimg(){
int numLayers=0;
layers.clear();
- if(XML.pushTag("playlist")) {
- numLayers=XML.getNumTags("imglayer");
- if(numLayers) {
- for (int i=0;i<numLayers;i++) {
- string s=XML.getAttribute("imglayer", "file", "",i);
- printf("%s: ",s.c_str());
- layers[XML.getAttribute("imglayer", "note", 0,i)]=new imglayer(XML.getAttribute("imglayer", "file", "",i));
- }
- }
+ if(XML.pushTag("playlist")) {
+ numLayers=XML.getNumTags("imglayer");
+ if(numLayers) {
+ for (int i=0;i<numLayers;i++) {
+ string s=XML.getAttribute("imglayer", "file", "",i);
+ printf("%s: ",s.c_str());
+ layers[XML.getAttribute("imglayer", "note", 0,i)]=new imglayer(XML.getAttribute("imglayer", "file", "",i));
+ }
+ }
else printf("no IMG layers loaded!\n");
- XML.popTag();
+ XML.popTag();
}
}
-
-playlist::~playlist()
-{
- //dtor
-}
+
+playlist::~playlist()
+{
+ //dtor
+}