[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Streaming support
From: Nikolas Zimmermann <wildfox () kde ! org>
Date: 2001-04-23 18:51:43
[Download RAW message or body]
Hi guys,
as i finished the aRts-Part of the Streaming support
i would like to give you a short overview what is new
and what has been changed.
aRts-Core
--------------
1. Arts::InputStream (new)
The idea behind Arts::InputStream is that you have
an inputstream and a playobject, and you "connect" them.
The Arts::InputStream cares now on how to get the data
(ie. via KIO in my KIOInputStream, or via ::open in filereader)
and sending them as MCOP Packets and the playobject
just processes the received packets and plays them.
2. SoundServerV2 (changed)
I added those functions:
+ Arts::PlayObject createPlayObjectForURL(const std::string&
url, const std::string& mimetype, bool createBUS);
+ Arts::PlayObject createPlayObjectForStream(Arts::InputStream
instream, bool createBUS);
Example of the first one:
PlayObject bar = server.createPlayObjectForURL("/home/nikoz/foo.mp3",
"audio/x-mp3", true);
Parameters:
url ? straightforward
mimetype ? you know what it is :)
createBUS: specifies wheter to create a Synth_BUS_UPLINK or not
(needed if you wanna connect ie. a playobject with a stereoeffectstack, like
Noatun does)
The second call is used internally in the KDE module.
In there, i do:
Arts::KIOInputStream instream;
instream.openURL(url.path().latin1());
return new KPlayObject(m_server.createPlayObjectForStream(instream,
createBUS), true);
The KPlayObject is another issue :)
but the interessting thing is the KIOInputStream, if you create a
KIOInputStream you say instream.openURL(somekurl.path().latin1())
then the KIOInputStream is prepared for reading from that URL....
the SoundServerV2 call, createPlayObjectForStream, creates a PlayObject now
and the playobject is called with newobject.streamMedia(instream).
The PlayObject does now instream.streamStart() and the KIO job starts
and data is sent now by the KIOInputStream.....
Easy as pie ? no :)
KDE-Core
--------------
First of all i need to say that libartskde is "just" a
KDE-aRts _Wrapper_. It allows the developer to use things like
KURL and QString instead of std::string's, internally it means more
than this.
We are able to use KDE Technology like KMimeType and KIO.
With the KMimeType we can very easily find out the mimetype of
a file or an url, very cool!
To make it even more easier you don't need to deal anymore with
Arts::PlayObject's etc..
you use Arts::Dispatcher, KPlayObject, KPlayObjectFactory and of course
a Arts::SoundServerV2 to get full streaming support etc...
For code see in kdelibs/arts/kde/README
I hoped you understood everything!
Questions ?
Comments ?
Bye
Bye
Niko
--
Nikolas Zimmermann
wildfox@kde.org
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic