summaryrefslogtreecommitdiffstats
path: root/freej/python/playeffect.src
diff options
context:
space:
mode:
Diffstat (limited to 'freej/python/playeffect.src')
-rw-r--r--freej/python/playeffect.src33
1 files changed, 17 insertions, 16 deletions
diff --git a/freej/python/playeffect.src b/freej/python/playeffect.src
index fa034a6..2340f8b 100644
--- a/freej/python/playeffect.src
+++ b/freej/python/playeffect.src
@@ -1,43 +1,44 @@
- # system wide useful modules
+# FreeJ python - file play and filter example
+
import threading
import time
import sys
import freej
- # initializes FreeJ creating a Contex
+# initialize FreeJ creating a Contex
cx = freej.Context()
- # creates a screen of given size
-scr = freej.SdlScreen( 400, 300 )
+# create an output Screen
+scr = freej.SdlScreen()
+scr.init(400, 300, 32)
- # adds the screen
-cx.add_screen(scr)
+# adds the Screen to the Context
+cx.add_screen( scr )
- # refreshes the list of available filter effects
+# refreshes the list of available filter effects
cx.plugger.refresh(cx)
- # check that we have an argument
+# check that we have an argument
if(sys.argv.__len__()<2):
print "[!] this script needs an argument: file to play"
quit()
- # opens the file given on commandline as a layer
+# opens the file given on commandline as a layer
lay = cx.open(sys.argv[1])
-
- # gets the vertigo filter effect
+# gets the vertigo filter effect
filt = cx.filters["vertigo"]
- # adds the filter to the layer
+# adds the filter to the layer
lay.add_filter( filt )
- # start the layer thread
+# start the layer thread
lay.start()
- # adds the layer to the freej context
-cx.add_layer(lay)
+# adds the layer to the freej context
+scr.add_layer(lay)
- # starts freej in a separate thread
+# starts freej in a separate thread
th = threading.Thread(target = cx.start , name = "freej")
th.start();