[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: PlayObject changes
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2000-07-19 15:11:40
[Download RAW message or body]

On Wed, Jul 19, 2000 at 11:57:52AM +0200, Stefan Westerfeld wrote:
>    Hi!
> 
> On Tue, Jul 18, 2000 at 09:46:55PM +0200, Martin Vogt wrote:
> > >  > this should also seek back to the beginning, see below. If you use pause(),
> > >  > the PlayObject will be PAUSED, and if you do play() again, it will be PLAYING
> > 
> > Hm. I have implemented a different bahaviour.
> > after a halt() the PlayObject is reseted to the same default
> > as after a new PlayObject().
> > 
> > This allows to do a loadMedia(file) after the halt.
> >
> > If you call play() after a halt this gives a segfault.
> > (which is the same behaviour as after a new :-)
> 
> I don't see why you need the halt() here. If you *really* want to support
> reloading media, why you don't simply can call play() pause() halt() as
> usual, and if you call loadMedia() at any time, the PlayObject will stop
> everything that is going on, and load the new media?
> 

Then we define 

loadMedia=halt()+open

> 
> I think that the PlayObject interface should only be about playing things,
> not about loading them. The reason is simply that the way things are loaded
> may be changed in KDE2.1 (like support loading from chained streams, like
> http through gzip decompression or whatever), but the way things will be
> played will remain untouched by this.
>
You are right, this is better, but we have this small problem
that a complete construct of a new Playobject is too time
intensive.
I leave it to you to make the loadMedia call private in
PlayObject.

 
> You offer the user the play, stop and pause buttons, and highlight play if
> state is posPlaying, pause if state is posPaused and nothing otherwise.
> If the user pushes play, you call play(), if he pushes pause, you call
> pause(), and if he pushes stop, you call halt(). This should be easy to
> understand for both, authors of PlayObjects and authors of players.
>

This needs to add a

if (something == NULL) return

to all public methods.

 
> 
> However, note that this also severly breaks if somebody has your mp3 codec,
> but another mp4 codec, and you try to mix mp3 and mp4 files in the jukebox.
>
Yes, this is the reason why we should  
not have loadMedia.

regards,

Martin

_______________________________________________
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