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

List:       kde-multimedia
Subject:    Re: MPEG embedding + aRts API RFC
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2001-09-21 15:24:37
[Download RAW message or body]

On Fri, Sep 21, 2001 at 03:52:40PM +0200, Martijn Klingens wrote:
> 
> 
> - The actual embedding works by querying mpeglib for the X11 Window ID. This 
> works. But is quirky and extremely ugly because the window is drawn first as 
> top level window and then swallowed by videoembed.cpp. Would it be possible 
> to change mpeglib/arts in such a way that the window is first created, then 
> embedded and _THEN_ shown, i.e. it is not shown before it is embedded?
> 

I'm currently working on a replacement of the rendering system,
which should do that.

> I tried a few approaches but all seemed to fail.
> * Since mpeglib is not Qt code the signal/slot mechanism is not available to 
> mpeglib for making a simple callback call.
> 
Its easier to create an ARTS PlayObject, and controll the decoder
with calls through arts.

What excatly do you want to do?

> * I tried extending the mpeglib API, but I got stuck trying to find out where 
> the aRts code actually accesses MPEGlib. Multiple inheritance certainly 
> killed me here trying to find out what class is where and does what. A few 
> hints are clearly helpful here :-)

<docmode>

Input:

                InputStream
                    |
            File,CDI,HTTP,CDDA,Bufferstream

Output:                                 Audio/Video/Sync subsystem 
                                        +-----------------------+
                OutputStream -- pointers| to - X11Subsystem     |
                    |                   |   - DSPWrapper        |
                    |                   |   - Audio/Video Sync  |
                DSPX11OutputStream      |                       |
                    |                   +-----------------------+
                ArtsOutputStream

 
                    

Decoder:
                 DecoderPlugin (starts a thread)
                     |
              mp3,wav,mpegdemux,mpegvideodecoder


An mpegvideodecoder is build upon an demuxer,an mp3 player and an
videoplayer and looks like this:

                     BufferStream---> Mp3plugin
  Input ->   demux                                     OutputStream
                     BufferStream---> MpegvideoPlugin 
                       
This means : 3 threads running.
</docmode>

The arts wrappers for this system are in kdemultimedia/mpeglib_artsplug

> 
> * I tried converting the X11 rendering code to a new Qt rendering class, but 
> that also horribly broke because of mpeglib's multithreaded nature. My Qt is 

Don't link QT to mpeglib unless you use QT with mt support.
Btw: The rendering code is really ugly, which is the main reason 
     the replacement.

> certainly not MT (KDE 2.2 after all) and even if it was then I could not do 
> what I'd like. The main function contained the QApplication and hence the X11 
> thread. But the rendering code tried to access X11 from another thread. I 
> know virtually nothing about X, but I am quite sure that X is not capable of 
> handling requests from multiple threads. And the rain of errors that I got 
> clearly suggested the same...

It can. XInitThreads()

regards,

Martin

_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@mail.kde.org
http://mail.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