Phonon java binding

Kevin Krammer kevin.krammer at gmx.at
Fri Jan 23 10:47:33 GMT 2009


On Friday 23 January 2009, Aekold Helbrass wrote:

> Hm, I understand. Ok, let Jambi to be binding rather than wrapper. But
> I don't want really to know how Phonon works internally, I want to
> know public API of Phonon. Guys from Amarok and Dragonplayer are using
> it, are they?

These teams write media players and don't want to be bound to a specific media 
stack. Phonon gives them an API to use without caring about which media stack 
actually does the work.

> Xine was just an example, xine.h shows me everything I can use and
> bind, may be there is some *.h files for Phonon to? I have already
> wrote xine binding, and I need help with Phonon, not xine.

http://websvn.kde.org/trunk/kdesupport/phonon/includes/Phonon/
and part of the phonon development package of your distribution.

> because of Sun ignoring the desktop. But there is a problem with
> non-KDE sound applications, including Amarok 1.4. It is not using
> Phonon, it is using xine directly. And when it plays - no other KDE4
> sounds can reach sound system. In other direction - when KDE4 plays
> something - Amarok 1.4 fails.

This has actually nothing to do with Phonon at all.
If more than one application needs to play sound, the system needs to be able 
to mix the streams. This can either happen in the sound hardware, its driver 
or in a sound server.
Some hardware and/or driver can not provide "multi open", i.e. allowing more 
than one process access to the device. In such cases higher level sound 
mixing is needed, e.g. in the form of the ALSA dmix plugin or in form of a 
sound server like aRts, ESD or PulseAudio.

Media stacks like xine or gstreamer have configuration options for all these 
techniques. If applications using the same or different stacks seem to 
prevent each other from playing sound, either their configuration or that of 
the operating system is broken.

> On Thu, Jan 22, 2009 at 8:35 PM, Kevin Krammer <kevin.krammer at gmx.at> wrote:
> >> I am java developer and it is interesting for me to develop some java
> >> bindings for phonon, so java apps will work correctly with phonon
> >> sound system. And I need a bit of your help...
> >
> > Judging by the other postings in this thread I guess that this is rather
> > a misunderstanding.
> >
> > Phonon is not a sound system it is a multimedia API.
> > If a Java developer wants to use this API, Jambi is the way to go.
> > If a Java developer wants to do their own API, they probably want to
> > interface with the different multimedia processing frameworks directly.
> > If a Java developer wants to just code a multimedia using application,
> > they probably want to use the Java Media Framework.
>
> When you're using KDE4 desktop I can see no difference between
> multimedia API and sound system, because Phonon blocks sound from
> other applications.

No, it doesn't.
If the sound system used by Phonon blocks sound, the configuration of that 
system or even somewhere below in the operating system is broken.

As I said this is most likely still a misunderstanding.
Try to think about Phonon more in terms like AWT where widgets are rendered by 
native peers rather than AWT itself.
If the native peer of a Phonon object misbehaves it would do that even without 
Phonon. If the native object monopolizes the sound output, it will also keep 
a second Phonon application from working correctly.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20090123/b5c5923c/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list