Page 1 of 1

VLC Qt4 Interface

Posted: 14 Apr 2010 12:05
by GEFORCEXTREME
Hi, I would like to add a Qt4 dialog that runs when a certain VLC module is run. I would like the dialog to appear when the x264 module is run. How do I do this? Adding the source code to Modules.am? Any idea on this would be very much appreciated. Thank you.

Re: VLC Qt4 Interface

Posted: 14 Apr 2010 12:13
by Jean-Baptiste Kempf
What kind of dialog do you need/want?

Re: VLC Qt4 Interface

Posted: 14 Apr 2010 12:33
by GEFORCEXTREME
I want a GUI dialog that lets user select transcoding levels (low, medium, high), and then apply the settings appropriately.
Where do I start? I don't know much about GUI programming and VLC. Would be glad if someone offer me some directions.

From Qt's guide, I get the following code.

#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}

For a simple program like above, how do I "port" it to VLC so when x264's module is opened, a simply GUI label like above ("Hello Qt!") display? I'm planning to add the code to VLC's x264.c but quickly notice I can't do that because it is not C++. I tried adding a new cpp file to Modules.am at VLC/modules/codec but I can't make because it says cannot find QApplication and QLabel. I tried adding the code to VLC/modules/GUI/qt4 and it make successfully but how do I and where do I add a code to "show" the dialog?

Thank you very much, J-B.

Re: VLC Qt4 Interface

Posted: 14 Apr 2010 12:37
by GEFORCEXTREME
Also, is it the correct way of modifying VLC by adding code to a specific module code (for example, x264.c), is there a more appropriate way? Please help, thank you.

Re: VLC Qt4 Interface

Posted: 14 Apr 2010 13:55
by Jean-Baptiste Kempf
Probably modify the transcode dialog to add these options?

Re: VLC Qt4 Interface

Posted: 14 Apr 2010 18:10
by Rémi Denis-Courmont
Simple dialogs can be added using the functions in include/vlc_dialog.h but that's really rudimentary. For complex dialogs, you can use the extension dialog mechanism, but it requires a lot of boilerplate code.

Re: VLC Qt4 Interface

Posted: 15 Apr 2010 03:32
by GEFORCEXTREME
Hi Remi Denis-Courmont, can you explain what is extension dialog and boilerplate code? Or give me some links I can refer. Thank you, Remi and J-B. Thank you.

Re: VLC Qt4 Interface

Posted: 15 Apr 2010 17:01
by Rémi Denis-Courmont
No, I can't. I did not write that component.

Re: VLC Qt4 Interface

Posted: 17 Apr 2010 00:11
by GEFORCEXTREME
Hi Remi Denis-Courmont, thank you very much. I will try to learn it by other means. Thank you again. :-)

Re: VLC Qt4 Interface

Posted: 26 Mar 2012 06:12
by Vaselinessa
Hi Remi Denis-Courmont, thank you very much. I will try to learn it by other means. Thank you again. :-)
GEFORCEXTREME, have you found anything on this matter? Can you point me to reading material or relevant source files/functions?

I see the file include/vlc_extensions.h, but I could use the benefit of any experience you may have on the matter. It's not apparent to me how to proceed, since I can find no definitions or even types for the funciton params.