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

List:       xine-devel
Subject:    Re: [xine-devel] xine_set_param (xine_stream_t *, ...) affects all streams... !?
From:       Ewald Snel <ewald () rambo ! its ! tudelft ! nl>
Date:       2003-02-23 16:38:26
[Download RAW message or body]

Hi Michael,

[...]

> Isn't it possible to use one xine_t for the thumbnails, but create a new
> one for every instance of an actual player? I don't know any aRts or
> KDE internals, so this might be a ridiculous question...

Yes, that would be possible. The player code is in a separate .cpp file.

[...]

> Would having this in public API look nice to you?
>
> xine_clock_t *xine_clock_init(void);
> xine_clock_dispose(xine_clock_t *);
> xine_stream_attach_clock(xine_stream_t *, xine_clock_t *);
> xine_stream_detach_clock(xine_stream_t *);

Thanks, that would solve this problem. :)

Perhaps these functions do not need to become part of the *public* API. The 
xine_stream_master_slave() API call could also be used for this purpose, 
where 'XINE_MASTER_SLAVE_CLOCK' would give the slave it's own clock. This 
would detach the stream from the global clock.

int xine_stream_master_slave( ... ) {
  if ((affection & XINE_MASTER_SLAVE_CLOCK) && master == NULL) {
    if (slave->clock == NULL) {
      slave->clock = xine_clock_init();
      xine_stream_attach_clock(slave, slave->clock);
    }
  } else if (slave->clock != NULL) {
    xine_stream_detach_clock (slave, slave->clock);
    xine_clock_dispose (slave);
    slave->clock = NULL;
  }
  if (master != NULL) {
    ...
  }
  return 1;
}

The xine_dispose() function would also have to be modified to destroy the 
clock (if not NULL).

> Michael

Thanks.
bye,

ewald



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic