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

List:       kde-multimedia
Subject:    Re: artsplug new version
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2000-05-21 21:52:34
[Download RAW message or body]

   Hi!

On Sun, May 21, 2000 at 10:23:49PM +0200, Martin Vogt wrote:
> on this loction is a new artsplug version.
> 
> http://www.rhrk.uni-kl.de/~mvogt/linux/kmpg/links.html
> 
> please read the README _carefully_. 
> You now can make direct instances of the players,
> recompile is not necessary.
> 
> I have a invented a new MY_REGISTER_IMPLEMENTATION
> macro, to work around compile errors/conflicts in arts.
> 
> -->The static method instanceNameSkel() does still not work
>    in arts if you derive from more interface.

It works if you write

class DecoderBaseObject_impl:
  virtual public DecoderBaseObject_skel,
  virtual public Arts::StdSynthModule {                                         

in decoderBaseObject_impl.h. I can't say that I fully understand why ;)
I thought that if you use virtual inheritance in base classes once, the
behaviour will propagate automatically on all children? And isn't using
multiple inheritance without virtual a bad idea, always, as some data
members may not be properly merged (but duplicated)? Hmmm.

By the way, here is some example code about "seeking with miracles" for
your artsplay.cpp:  ;-)

// this should seek to the position 30.5 seconds after the start of the file
poTimeMiracle.seconds = 30;
poTimeMiracle.ms = 500;
poTimeMiracle.custom = -1;
play.seek(poTimeMiracle);

The class isn't much of a class, it's just autogenerated from mcopidl for a
struct with the four members seconds, ms, custom, costumUnit (see kmedia2.idl).

About customUnit: if you have a PlayObject that measures itself in frames,
for instance a video, a legal seek command might be

poTimeMiracle.seconds = -1;
poTimeMiracle.ms = -1;
poTimeMiracle.custom = 45;
poTimeMiracle.customUnit = "frame";
play.seek(poTimeMiracle);

to seek to frame 45 of the animation.

The only special effect MCOP struct types offer are constructor where you
can specify all data members at once, so you can write the above as

play.seek(poTime(30,500,-1,""));		// seek to second 30.5
play.seek(poTime(-1,-1,45,"frame"));	// seek to frame 45

   Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-         
_______________________________________________
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