Active Topics

 



Notices


Reply
Thread Tools
Posts: 78 | Thanked: 6 times | Joined on Dec 2007
#101
I don't understand how importing gnome from a file that has nothing in it can satisfy the import. Perhaps I don't understand how this all works.
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#102
How can I change gst output in panucci.
I compiled gst mad plugin and can play mp3 files to a2dpsink
gst-launch filesrc location=test.mp3 ! mad ! audioconvert ! sbcenc ! a2dpsink device=XX:XX:XX:XX:XX:XX
Will be very nice if panucci can output to BT headphone via a2dp!!!
It's also possible use headphone's button to pause.
 
Posts: 63 | Thanked: 43 times | Joined on May 2008
#103
Originally Posted by svs57 View Post
How can I change gst output in panucci.
I compiled gst mad plugin and can play mp3 files to a2dpsink
gst-launch filesrc location=test.mp3 ! mad ! audioconvert ! sbcenc ! a2dpsink device=XX:XX:XX:XX:XX:XX
Will be very nice if panucci can output to BT headphone via a2dp!!!
It's also possible use headphone's button to pause.
Wow, that's pretty cool.

In order to get that to work in Panucci you'll need to modify the default pipeline in player.py (look around line 150). I'd love to help but it's exam season atm and I just don't have the time (I'll do my best to answer any question you have).

nick
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#104
I think I need to change line:
self.__player = gst.element_factory_make('playbin', 'player')
How can I use here this pipe?
! mad ! audioconvert ! sbcenc ! a2dpsink
Do I need 4 times call gst.elemeny_factory_make?

Will be fine in future add choose of audio output in panucci configuration.
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#105
I did it!
Now my panucci play via a2dp. Pause button also works
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#106
Originally Posted by svs57 View Post
I did it!
Now my panucci play via a2dp. Pause button also works
Can you please send a patch (either attach it here or even better attach it to the patch/bug tracker in the panucci garage project), so we can have a look at it and maybe integrate your changes into the next panucci release, so all users can benefit from your changes? Thanks.
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#107
Of couse. But there is little problem. I just remove gst playbin and add gst pipeline with my BT headphone address. You have to add to panucci config
1. a2dp output or not
2. BT address of headphone
Users can choose what sound output they will use.
Then you need gst mad plugins. I'llattach it here.
ungzip it and put to /usr/lib/gstreamer-0.10/libgstmad.so
And add package depends on libmad0 from http://repository.maemo.org diablo/free

Here is the patch

diff player.py*
148,150c148,162
< self.__player = gst.element_factory_make('playbin', 'player')
< self.__volume_control = self.__player
< self.__player.set_property( 'uri', 'file://' + filepath )
---
> self.__player = gst.Pipeline('player')
> # self.__player = gst.element_factory_make('playbin', 'player')
> # self.__volume_control = self.__player
> # self.__player.set_property( 'uri', 'file://' + filepath )
> source = gst.element_factory_make("filesrc", "file-source" )
> decoder = gst.element_factory_make("mad", "mp3-decoder" )
> conv = gst.element_factory_make("audioconvert", "converter" )
> sbcenc = gst.element_factory_make("sbcenc", "sbcenc" )
> sink = gst.element_factory_make("a2dpsink", "a2dpsink" )
> self.__player.add(
> source, decoder, conv, sbcenc, sink )
> gst.element_link_many(
> source, decoder, conv, sbcenc, sink )
> self.__player.get_by_name("a2dpsink").set_property ("device", "XX:XX:XX:XX:XX:XX" )
> self.__player.get_by_name("file-source").set_property("location", filepath )
Attached Files
File Type: gz libgstmad.so.gz (56.2 KB, 150 views)
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#108
ps
Here is script for pause playing using BT button.
I start it from xterm. But will be better if it work as daemon.
It works if start it in foreground. But doesn't work in background.
I don't know why

#!/usr/bin/env python2.5

from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

import dbus
import gobject
import os

dbus_loop = gobject.MainLoop()
bus = dbus.SessionBus()

def on_button_pressed (sender=None):
os.system('dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause')


headset = bus.get_object('com.nokia.osso_hp_ls_controller', '/com/nokia/osso_hp_ls_controller')
headset_iface = dbus.Interface(headset, dbus_interface='com.nokia.osso_hp_ls_controller.he adset')
headset_iface.connect_to_signal('button_pressed', on_button_pressed, sender_keyword='sender')

dbus_loop.run()
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#109
ps
Also depends of bluez-utils >=3.28-0osso6
 
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#110
I have one problem.
I start panucci. It open main window and I see last saved possition in file.
If I send panucci playPause via dbus It start playing from begining but not from saved place.

dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause

If I just tap play button it play from saved position.
What is the difference between dbus call and play button?
 
Reply

Tags
barbiestrsand


 
Forum Jump


All times are GMT. The time now is 14:34.