On Tue, 2006-10-10 at 15:03 +0200, Dirk Meyer wrote:
> 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.
And that's easy enough to implement, too.
> 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)
As an aside, there should be a generic open() function in kaa.popcorn
that will return a suitable player given the mrl.
> | player.set_property(POST_PROCESSING, True)
> | player.set_stream_property(DEINTERLACE, True)
> | player.play()
Unfortunately, it's even more complicated than this. Because with xine,
it's useful to _always_ have the tvtime plugin in the filter chain, no
matter what the content is, whereas with mplayer, a deinterlacing filter
will always deinterlace, even if the content is progressive or
telecined.
Plus, with your way, we lose the ability to specify and manage filter
chains. Maybe we don't want that flexibility. Or, maybe we should
provide that flexibility, and offer a simpler API on top of that.
I think there should be a player-specific api for specifying filters,
for maximum flexibility, when it's needed. Then we layer on top an
abstraction of the more common filters, where certain things can be
tweaked via config file. For example:
player.insert_video_filter('deinterlace', quality = 'high')
player.append_video_filter('expand', osd = True, aspect = 4/3.0)
player.set_video_out_device('xv')
player.set_audio_out_device('alsa', passthrough = True)
Then the config could specify things like the various qualities for
deinterlace.
xine.filters.deinterlace['high'].method = GreedyH
xine.filters.deinterlace['medium'].method = Greedy2Frame
xine.filters.deinterlace['low'].method = LinearBlend
xine.filters.deinterlace['low'].cheapmode = True
xine.filters.deinterlace['low'].fullfps = False
mplayer.filters.deinterlace['high'].method = kerndeint
mplayer.filters.deinterlace['medium'].method = pp=lb
It would also specify defaults:
popcorn.video.device = xv
popcorn.video.filters.deinterlace = high
popcorn.audio.device = alsa
popcorn.audio.passthrough = True
The hard part here is finding a list of common filters and their
parameters, and determining what should be exposed via config setting,
and then determining sensible defaults for those. But that's not
impossible.
Jason.
-------------------------------------------------------------------------
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