Can pause music

This commit is contained in:
bjschuma 2009-12-22 00:37:52 -05:00
parent 4c0c76cde4
commit b37085501e
4 changed files with 43 additions and 9 deletions

View File

@ -5,8 +5,8 @@ __date__ ="$Dec 21, 2009 11:58:37 PM$"
global name, app, type, path, opt
name = "test"
app = "scion"
name = "gstreamer"
app = "ocarina"
type = "core"
path = ""
opt = []
@ -41,6 +41,11 @@ def play():
pipeline.set_state(gst.STATE_PLAYING)
def pause():
global pipeline
pipeline.set_state(gst.STATE_PAUSED)
# Called every time the plugin is enabled
@ -48,9 +53,10 @@ def open():
global pipeline
pipeline = gst.Pipeline()
pipeline.set_state(gst.STATE_NULL)
write(songs)
songs = settings.get("args")
if len(songs) > 0:
load(songs[0])
settings.replace("args", [])

View File

@ -5,7 +5,7 @@ __date__ ="$Dec 21, 2009 10:35:01 PM$"
global name, app, type, path, opt
name = "audio"
name = "load"
app = "ocarina"
type = "core"
path = ""

29
src/core/pause.py Normal file
View File

@ -0,0 +1,29 @@
# This is a simple test plugin, to make sure everything is working
__author__="bjschuma"
__date__ ="$Dec 22, 2009 12:29:58 AM$"
global name, app, type, path, opt
name = "pause"
app = "ocarina"
type = "core"
path = ""
opt = []
import gstreamer
# Called every time the plugin is enabled
def open():
pass
# Called every time the plugin is stopped
def close():
pass
# Called when the plugin needs to perform some action
def run(args=None):
gstreamer.pause()

View File

@ -5,8 +5,8 @@ __date__ ="$Dec 22, 2009 12:05:02 AM$"
global name, app, type, path, opt
name = "test"
app = "scion"
name = "play"
app = "ocarina"
type = "core"
path = ""
opt = []
@ -17,13 +17,12 @@ import gstreamer
# Called every time the plugin is enabled
def open():
write("Example plugin has been started",True)
#write("Example plugin has been changed",True)
pass
# Called every time the plugin is stopped
def close():
write("Example plugin has been stopped",True)
pass
# Called when the plugin needs to perform some action