VLC Qt4 Interface

This forum is about all development around libVLC.
GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

VLC Qt4 Interface

Postby GEFORCEXTREME » 14 Apr 2010 12:05

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC Qt4 Interface

Postby Jean-Baptiste Kempf » 14 Apr 2010 12:13

What kind of dialog do you need/want?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

Re: VLC Qt4 Interface

Postby GEFORCEXTREME » 14 Apr 2010 12:33

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.

GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

Re: VLC Qt4 Interface

Postby GEFORCEXTREME » 14 Apr 2010 12:37

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC Qt4 Interface

Postby Jean-Baptiste Kempf » 14 Apr 2010 13:55

Probably modify the transcode dialog to add these options?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC Qt4 Interface

Postby Rémi Denis-Courmont » 14 Apr 2010 18:10

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

Re: VLC Qt4 Interface

Postby GEFORCEXTREME » 15 Apr 2010 03:32

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC Qt4 Interface

Postby Rémi Denis-Courmont » 15 Apr 2010 17:01

No, I can't. I did not write that component.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

Re: VLC Qt4 Interface

Postby GEFORCEXTREME » 17 Apr 2010 00:11

Hi Remi Denis-Courmont, thank you very much. I will try to learn it by other means. Thank you again. :-)

Vaselinessa
Blank Cone
Blank Cone
Posts: 48
Joined: 03 Apr 2011 02:26
Location: Sacramento, CA

Re: VLC Qt4 Interface

Postby Vaselinessa » 26 Mar 2012 06:12

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests