PDA

View Full Version : Phonon + custom media source



wysota
8th July 2008, 20:44
It is very easy to use Phonon to play a movie from a file or over network. But is it possible at the current state or is it planned in a near future to provide a custom media source, for instance generate video frames directly in the application?

A side question is the exact opposite of the previous one - is it possible to provide a custom sink for the media? For instance if I wanted to access each frame of the video and save it to disk as a separate image without showing the video on screen? In theory one could create a custom Effect that would act as a filter, do some work and then pass through the media to the next node, but there are two problems:
1. this would require to have some final sink (hence show the video)
2. I don't think at present one can implement a custom effect

So is Phonon going to be a framework for just viewing existing media in a platform independent way or do/will we have an interface to create/modify/operate on the media that could be used in yet undetermined usecases? Do you Jeff or anyone else have some knowledge (or any comments) about that?

JimDaniel
10th July 2008, 06:26
I would be very interested in knowing this too.

glebovitz
18th July 2008, 17:41
Here is what I know so far. Phonon is a platform independent wrapper around the
platform specific media library. Therefore, implementing different
sources and sinks must be implemented in the media libraries themselves. If you want to create a new media source, your either need to build a phonon back-end for your video generator or add a new source to the underlying media library. At the moment, there appears to be no way to capture frames or inject them into the video widget.

From what I have read, there is some discussion about future releases of the API providing a mechanism for introducing effect call-outs into the media stream processing. This will allow a, for instance, a developer to insert overlays on a video image. Phonon is a contributed third party library for Qt, so it is probably best to follow the phonon discussions at KDE to understand future plans.