Can play music
This commit is contained in:
commit
4c0c76cde4
|
@ -0,0 +1,4 @@
|
|||
java.lib.path=
|
||||
platform.active=Python_2.6.4
|
||||
python.lib.path=
|
||||
src.dir=src
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.python.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://nbpython.dev.java.net/ns/php-project/1">
|
||||
<name>ocarina</name>
|
||||
<sources>
|
||||
<root id="src.dir"/>
|
||||
</sources>
|
||||
<tests/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
rm -r ./*/*.pyc
|
||||
rm -r ./*/*/*.pyc
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
# This is a simple test plugin, to make sure everything is working
|
||||
|
||||
__author__="bjschuma"
|
||||
__date__ ="$Dec 21, 2009 11:58:37 PM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "test"
|
||||
app = "scion"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
from bt.file import *
|
||||
import gst
|
||||
|
||||
import settings
|
||||
global pipeline
|
||||
pipeline = None
|
||||
|
||||
|
||||
|
||||
def load(filename):
|
||||
filename = expandPath(filename)
|
||||
if checkPath(filename) == False:
|
||||
return
|
||||
|
||||
write("loading file: "+filename)
|
||||
bin = gst.element_factory_make("playbin", None)
|
||||
bin.set_property("uri", "file://"+filename)
|
||||
bin.set_state(gst.STATE_PAUSED)
|
||||
|
||||
global pipeline
|
||||
pipeline = gst.Pipeline("player")
|
||||
pipeline.add(bin)
|
||||
|
||||
|
||||
|
||||
def play():
|
||||
global pipeline
|
||||
pipeline.set_state(gst.STATE_PLAYING)
|
||||
|
||||
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
global pipeline
|
||||
pipeline = gst.Pipeline()
|
||||
pipeline.set_state(gst.STATE_NULL)
|
||||
write(songs)
|
||||
if len(songs) > 0:
|
||||
load(songs[0])
|
||||
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
global pipeline
|
||||
pipeline.set_state(gst.STATE_NULL)
|
||||
|
||||
|
||||
|
||||
# Called when the plugin needs to perform some action
|
||||
def run(args=None):
|
||||
pass
|
|
@ -0,0 +1,53 @@
|
|||
# This is a simple test plugin, to make sure everything is working
|
||||
|
||||
__author__="bjschuma"
|
||||
__date__ ="$Dec 21, 2009 10:35:01 PM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "audio"
|
||||
app = "ocarina"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
from bt.message import write
|
||||
from bt.file import *
|
||||
import settings
|
||||
|
||||
#from tools import gstream
|
||||
import gstreamer
|
||||
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
pass
|
||||
#write("Example plugin has been changed",True)
|
||||
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
pass
|
||||
|
||||
|
||||
|
||||
# Called when the plugin needs to perform some action
|
||||
def run(args=None):
|
||||
if args == None:
|
||||
return
|
||||
|
||||
gstreamer.load(args[0])
|
||||
#filename = expandPath(args[0])
|
||||
#if checkPath(filename) == False:
|
||||
# return
|
||||
|
||||
#write("loading file: "+filename)
|
||||
#bin = gst.element_factory_make("playbin", None)
|
||||
#bin.set_property("uri", "file://"+filename)
|
||||
#bin.set_state(gst.STATE_PAUSED)
|
||||
|
||||
#pipeline = gst.Pipeline("player")
|
||||
#pipeline.add(bin)
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#! /usr/bin/python
|
||||
|
||||
# To change this template, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
__author__="bjschuma"
|
||||
__date__ ="$Dec 21, 2009 9:18:52 PM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "ocarina"
|
||||
app = "ocarina"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
import settings
|
||||
from bt.message import write
|
||||
from manager import manager
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
write("Ocarina has been started",True)
|
||||
#write("Example plugin has been changed",True)
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
write("Ocarina has been stopped",True)
|
||||
|
||||
|
||||
# Called when the plugin needs to perform some action
|
||||
def run(args=None):
|
||||
pass
|
|
@ -0,0 +1,31 @@
|
|||
# This is a simple test plugin, to make sure everything is working
|
||||
|
||||
__author__="bjschuma"
|
||||
__date__ ="$Dec 22, 2009 12:05:02 AM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "test"
|
||||
app = "scion"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
from bt.message import write
|
||||
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)
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
write("Example plugin has been stopped",True)
|
||||
|
||||
|
||||
# Called when the plugin needs to perform some action
|
||||
def run(args=None):
|
||||
gstreamer.play()
|
|
@ -0,0 +1,4 @@
|
|||
# To change this template, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# This is a simple test plugin, to make sure everything is working
|
||||
|
||||
__author__="bjschuma"
|
||||
__date__ ="$Dec 21, 2009 8:43:01 PM$"
|
||||
|
||||
|
||||
global name, app, type, path, opt
|
||||
name = "library"
|
||||
app = "ocarina"
|
||||
type = "core"
|
||||
path = ""
|
||||
opt = []
|
||||
|
||||
from bt.message import write
|
||||
|
||||
|
||||
# Called every time the plugin is enabled
|
||||
def open():
|
||||
write("Example plugin has been started",True)
|
||||
#write("Example plugin has been changed",True)
|
||||
|
||||
|
||||
# Called every time the plugin is stopped
|
||||
def close():
|
||||
write("Example plugin has been stopped",True)
|
||||
|
||||
|
||||
# Called when the plugin needs to perform some action
|
||||
def run(args=None):
|
||||
pass
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
PLUG=`pwd`/`dirname $0`"/core"
|
||||
cd && `which scion` "-p $PLUG" $*
|
Loading…
Reference in New Issue