Hi,

I was thinking about the kaa.popcorn api. The problem is that xine,
mplayer and gstreamer are very different and we want to support most
of the special features. Right now the following works:

| player = kaa.popcorn.Player()
| player.open(file)
| player.play()

You can also pause, seek while playing and stop. I want to add seek
between open and play to add some sort of resume playback, but that is
not the point of this mail.

The problem is: how to enable deinterlace, post processing and stuff
like that. Post processing is something I want to set for all files,
deinterlace is something only for specific items. And what mplayer
args should be used to do this? What xine deinterlacer?

Here a proposal: the player has two extra functions: set_property and
set_stream_property. When using set_property, the property will be set
for the current stream (if already loaded) and all the following. And
set_stream_property will only work on the current stream. Example:

| player = kaa.popcorn.Player()
| player.open(file1)
| player.set_property(POST_PROCESSING, True)
| player.set_stream_property(DEINTERLACE, True)
| player.play()

file1 will have post processing and deinterlacing

| player.open(file2)
| player.play()

file2 still has post processing, deinterlacing is False

| player.open(file3)
| player.set_stream_property(POST_PROCESSING, False)
| player.play()

file3 has no post processing

| player.open(file4)
| player.play()

file4 has post processing again because the property changes are
stream only.

This could work for most filter we want to support in kaa.popcorn. But
we still don't know how to do the post processing or deinterlacing.
This is something that could move into the config file and the config
itelsef is defined by the backends:

| mplayer.deinterlace = -vf de
| mplayer.post_processing = -vf pp
| xine.deinterlace = greedy

From the outside we only set DEINTERLACE = True and the player backend
knows how to do that. IMHO it is not needed to use different
deinterlacer for different files. This would make the API to
complicated. 

This leaves only on problem to kaa.popcorn: how to configure audio and
video output. Again, similar. Audio could either be:

| audio.device = alsa|oss
| audio.digital_out = True
| audio.speaker = 5

Based on that, kaa.popcorn could generate the needec ommand lines. On
the other hand we could use a backend specific setting

| mplayer.audio.device = alsa
| mplayer.audio.options = -channel 6

But the first one looks cleaner to me. For video we could have
different settings for each player based on the display the player
gets. If the player gets a X11Window as playing window, we are in X
mode. On the other hand the user could provide a FBWindow and
DFBWindow. This could result in the follwing config:

| mplayer.video.x11.device = x11
| mplayer.video.x11.options = -whatever
| mplayer.video.fb.device = mga
| mplayer.video.fb.options = 
| mplayer.video.dfb.device = dfbmga
| mplayer.video.dfb.options = -fs

What do you think? Am I missing something here? Comments please.


Dischi

-- 
Conversation, n.:
        A vocal competition in which the one who is catching his breath
        is called the listener.

Attachment: pgpq982EXd5H5.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to