[vlc-devel] How to use QNetworkAccessManager from vlc media player source code

fayyaz lodhi fayyazkl at gmail.com
Mon Dec 10 12:59:40 CET 2012


Hi there,

I am customizing vlc source code and needed to use QNetworkAccessManager
from Qt OpenDialog.

I am trying to use
this<http://stackoverflow.com/questions/7218851/making-an-http-get-under-qt>
code
sample

void MainWindow::requestShowPage(){
    QNetworkAccessManager *manager = new QNetworkAccessManager(this);
    connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(requestReceived(QNetworkReply*)));
manager->get(QNetworkRequest(QUrl("http://google.com")));}
void MainWindow::requestReceived(QNetworkReply* reply){
    QString replyText;
    replyText.fromAscii(reply->readAll());

    ui->txt_debug->appendPlainText(replyText);}

My primary problem is that vlc fails to load UI even if there is a single

QNetworkAccessManager *manager = new QNetworkAccessManager(this);

call in this qt dialog.

Following is the output produced on vlc console

./vlc[0x19c9388] main libvlc: Running app with the default interface.
[0x1f82988] main interface error: corrupt module:
/VLC/vlc-2.0.4/modules/gui/qt4/.libs/libqt4_plugin.so[0x2586748] main
generic error: corrupt module:
/VLC/vlc-2.0.4/modules/gui/qt4/.libs/libqt4_plugin.so[0x1f82988]
skins2 interface error: no suitable dialogs provider found (hint:
compile the qt4 plugin, and make sure it is loaded
properly)[0x1f82988] skins2 interface error: cannot instantiate qt4
dialogs provider[0x1f82988] [cli] lua interface: Listening on host
"*console".

Simply omitting the QNetworkAccessManager brings the UI back again.

a. Is their any thing special regarding QNetworkAccessManager usage
scenarios i.e. it should be created globally or something. I went through
its documentation. But didn't find any thing.

b. Are there any special conventions with respect to Qt or it's use with
VLC that i am missing. I am significantly experienced in c/c++ and Linux
but new to QT.

Would really appreciate if any assistance can be provided.

Working on Linux / mint/ ubuntu platform
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20121210/41b9a487/attachment.html>


More information about the vlc-devel mailing list