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

List:       kde-multimedia
Subject:    MPEG embedding + aRts API RFC
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-09-21 13:52:40
[Download RAW message or body]

I'm trying to get MPEG videos decently embedded in my app and I am 
encountering a lot of problems. I am using KDE 2.2 branch. I started with 
backporting Niko's VideoPlayObject and the associated stuff to my KDE 2.2, 
which compiled ok, and _sometimes_ even worked well.

(For clarity: unlike my other mail regarding Red Hat, this is on a SuSE box. 
That box doesn't have a sound card to help me solving the other problem, 
unfortunately.)

The issues that I have now are roughly the following:
- The video embedding stuff is part of Kaboodle, instead of kdelibs / 
kmultimedialibs. I was quite surprised to see that there seems to be nothing 
like a Qt widget in entire aRts. I understand that the core of aRts cannot 
have any Qt dependency, but I actually expected to find either a 
ArtsPlayWidget or an ArtsPlayPart (KPart). That would make it _much_ more 
easy to use aRts in KDE apps.
Is there something like this already that I missed? Or is this simply not 
there yet? Since the VideoPlayObjects are new and this is less needed for 
audio-only I can imagine that this is not implemented yet. But I'd like to 
make sure first.

If this still has to be done then I'd like to see something along the way of 
a base KPart ArtsPlayPart and derived an ArtsVideoPlayPart. Both parts would 
have play/pause/etc. buttons that can optionally be turned off, much like the 
media player Active-X component in Windows. The main widget can either remain 
0x0 pixels for audio (so it is essentially an invisible widget), or show some 
image like Windows does. For videos that part obviously shows the video...

- 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 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.

* 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 :-)

* 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 
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...

Does anyone have ideas here? /me especially eyes at Martin and Niko.

Thanks in advance,

Martijn
_______________________________________________
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