Ok, i had not work on the last week, first, I dont want to work, and second, I have to do my paper for my school, but today I feel inspired and the Python God comes to me and fix some things about christine.
First, the Import to Queue works, this is
... [More]
to import a file to the queue (next audio or video to be played) without importing it to the main playlist.
And second, Play video works again, I haven't work with this since christine was upgraded from gstreamer 0.8 to 0.10, and now it plays video again, but some issues will happen since I had just work on it today and some videos downloaded from video.google.com seems to doesn't work, I wonder that it is because gstreamer or the discoverer class wrote by me.
So this is a screenshot, and there is a video on video.google, but it still is unavailable for some google reasons.
Just imagine a video playing in the black square :-p.
And click on the image to see it bigger
[Less]
|
Ok, i had not work on the last week, first, I dont want to work, and second, I have to do my paper for my school, but today I feel inspired and the Python God comes to me and fix some things about christine.
First, the Import to Queue works, this is
... [More]
to import a file to the queue (next audio or video to be played) without importing it to the main playlist.
And second, Play video works again, I haven't work with this since christine was upgraded from gstreamer 0.8 to 0.10, and now it plays video again, but some issues will happen since I had just work on it today and some videos downloaded from video.google.com seems to doesn't work, I wonder that it is because gstreamer or the discoverer class wrote by me.
So this is a screenshot, and there is a video on video.google, but it still is unavailable for some google reasons.
Just imagine a video playing in the black square .
And click on the image to see it bigger
[Less]
|
|
|
|
|
En un post anterior mencionaba sobre las canas verdes que me estaba sacando Christine porque se me colgaba cuando utilizaba el discoverer para obtener los tags de los archivos a reproducir.... mmmm, ni modos, lo tuve que quitar y hacer mi propio
... [More]
discoverer:
class discoverer:
def __init__(self):
print "discoverer: new instance"
self.discoverer = gst.element_factory_make("playbin")
self.discoverer.set_property("audio-sink",gst.element_factory_make("esdsink"))
self.discoverer.set_property("video-sink",gst.element_factory_make("xvimagesink"))
self.discoverer.set_property("volume",0.0)
self.bus = self.discoverer.get_bus()
def set_location(self,file):
self.tags = {}
self.discoverer.set_property("uri","file://%s"%file)
self.discoverer.set_state(gst.STATE_READY)
self.discoverer.set_state(gst.STATE_PAUSED)
self.discoverer.set_state(gst.STATE_PLAYING)
self.discoverer.set_state(gst.STATE_PAUSED)
def found_tags_cb(self,tags):
if len(tags.keys()) > 0:
for i in tags.keys():
self.tags[i] = tags[i]
#print self.tags
def get_location(self):
path = self.discoverer.get_property("uri")
if path != None:
path = path[7:]
return path
def get_tag(self,key):
try:
return self.tags[key]
except:
return ""
Apenas lo hice hoy y aun me faltan algunas cosas como el determinar si el archivo es de audio o video, pero me funciona bien, y ya hoy pude importar mi colección de musica colocando los tags correctos en la lista:
Cabe mencionar que en esta clase, es necesario conectar el bus (self.discoverer.bus) con un manejador para que cuando se envie el mensaje gst.MESSAGE_TAG utilice el metodo parse_tag propio del mensaje y que estos tags sean enviados a discoverer.found_tags_cb.
def message_handler(self,a,b):
d = self.discoverer
t = b.type
if t == gst.MESSAGE_TAG:
self.discoverer.found_tags_cb(b.parse_tag())
[Less]
|
En un post anterior mencionaba sobre las canas verdes que me estaba sacando Christine porque se me colgaba cuando utilizaba el discoverer para obtener los tags de los archivos a reproducir.... mmmm, ni modos, lo tuve que quitar y hacer mi propio
... [More]
discoverer:
class discoverer:
def __init__(self):
print "discoverer: new instance"
self.discoverer = gst.element_factory_make("playbin")
self.discoverer.set_property("audio-sink",gst.element_factory_make("esdsink"))
self.discoverer.set_property("video-sink",gst.element_factory_make("xvimagesink"))
self.discoverer.set_property("volume",0.0)
self.bus = self.discoverer.get_bus()
def set_location(self,file):
self.tags = {}
self.discoverer.set_property("uri","file://%s"%file)
self.discoverer.set_state(gst.STATE_READY)
self.discoverer.set_state(gst.STATE_PAUSED)
self.discoverer.set_state(gst.STATE_PLAYING)
self.discoverer.set_state(gst.STATE_PAUSED)
def found_tags_cb(self,tags):
if len(tags.keys()) > 0:
for i in tags.keys():
self.tags[i] = tags[i]
#print self.tags
def get_location(self):
path = self.discoverer.get_property("uri")
if path != None:
path = path[7:]
return path
def get_tag(self,key):
try:
return self.tags[key]
except:
return ""
Apenas lo hice hoy y aun me faltan algunas cosas como el determinar si el archivo es de audio o video, pero me funciona bien, y ya hoy pude importar mi colecci???????n de musica colocando los tags correctos en la lista:
Cabe mencionar que en esta clase, es necesario conectar el bus (self.discoverer.bus) con un manejador para que cuando se envie el mensaje gst.MESSAGE_TAG utilice el metodo parse_tag propio del mensaje y que estos tags sean enviados a discoverer.found_tags_cb.
def message_handler(self,a,b):
d = self.discoverer
t = b.type
if t == gst.MESSAGE_TAG:
self.discoverer.found_tags_cb(b.parse_tag())
[Less]
|
En un post anterior mencionaba sobre las canas verdes que me estaba sacando Christine porque se me colgaba cuando utilizaba el discoverer para obtener los tags de los archivos a reproducir.... mmmm, ni modos, lo tuve que quitar y hacer mi propio
... [More]
discoverer:
class discoverer:
def __init__(self):
print "discoverer: new instance"
self.discoverer = gst.element_factory_make("playbin")
self.discoverer.set_property("audio-sink",gst.element_factory_make("esdsink"))
self.discoverer.set_property("video-sink",gst.element_factory_make("xvimagesink"))
self.discoverer.set_property("volume",0.0)
self.bus = self.discoverer.get_bus()
def set_location(self,file):
self.tags = {}
self.discoverer.set_property("uri","file://%s"%file)
self.discoverer.set_state(gst.STATE_READY)
self.discoverer.set_state(gst.STATE_PAUSED)
self.discoverer.set_state(gst.STATE_PLAYING)
self.discoverer.set_state(gst.STATE_PAUSED)
def found_tags_cb(self,tags):
if len(tags.keys()) > 0:
for i in tags.keys():
self.tags[i] = tags[i]
#print self.tags
def get_location(self):
path = self.discoverer.get_property("uri")
if path != None:
path = path[7:]
return path
def get_tag(self,key):
try:
return self.tags[key]
except:
return ""
Apenas lo hice hoy y aun me faltan algunas cosas como el determinar si el archivo es de audio o video, pero me funciona bien, y ya hoy pude importar mi colecci???????n de musica colocando los tags correctos en la lista:
Cabe mencionar que en esta clase, es necesario conectar el bus (self.discoverer.bus) con un manejador para que cuando se envie el mensaje gst.MESSAGE_TAG utilice el metodo parse_tag propio del mensaje y que estos tags sean enviados a discoverer.found_tags_cb.
def message_handler(self,a,b):
d = self.discoverer
t = b.type
if t == gst.MESSAGE_TAG:
self.discoverer.found_tags_cb(b.parse_tag())
[Less]
|
En la ultima semana no he trabajado mucho sobre Christine, me toy dando el respectivo break para no caer en esto . Christine ahi va poco a poco, el problema es que no se por que mendiga razon se cuelga :-S.
Mientras jala con mp3 todo va perfecto
... [More]
, pero al aventarse a reproducir ogg, la cosa se puede colgar, por un error raro de no se que cosa.
Fatal Python error: GC object already tracked
Supongo que es al usar la clase gst.extend.discoverer.Discoverer, lo que hace esta clase es tomar como parametro de inicialización el archivo a leer, y le saca las entrañas (etiquetas, bitrate, etc.. ) aparte de definir si es un archivo de audio o de video. En fin... Si no fuera porque gstreamer tarda (en mi opinion) demasiado para obtener las etiquetas de un archivo (y se cuelga de vez en cuando), todo iria perfecto.
[Less]
|