vlc-qt fullscreen mode

This forum is about all development around libVLC.
skullhead
New Cone
New Cone
Posts: 1
Joined: 13 Apr 2014 12:01

vlc-qt fullscreen mode

Postby skullhead » 13 Apr 2014 12:50

Hello everyone. I started studying vlc-qt and I have a problem. I have pasted vlcvideowidget in qwidget. Video works, but takes up only a small area in the corner of the main window.
But I need a full-screen mode. How do I make the videoframe takes all the mainwindow? I think it should be easy, but not for such a newbie like me)
I also have the following errors:
[00000000028e98b8] main interface error: no suitable interface module
[0000000002a45dc8] main vout display error: Failed to set on top

Here is the code.

DemoPlayer.cpp

Code: Select all

#include <vlc-qt/Common.h> #include <vlc-qt/Instance.h> #include <vlc-qt/Media.h> #include <vlc-qt/MediaPlayer.h> #include <vlc-qt/WidgetVideo.h> #include "DemoPlayer.h" #include <QtWidgets> DemoPlayer::DemoPlayer(QWidget *parent) : QMainWindow(parent), _videowidget(0), _media(0) { _instance = new VlcInstance(VlcCommon::args(), this); _media = new VlcMedia("C:/promo/repeat.mp4", true, _instance); _player = new VlcMediaPlayer(_instance); _videowidget = new VlcWidgetVideo(_player,this); _player->setVideoWidget(_videowidget); _videowidget->show(); _player->open(_media); _player->play();
main.cpp

Code: Select all

#include <QApplication> #include "DemoPlayer.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); DemoPlayer mainWindow; mainWindow.showfullscreen(); return app.exec(); }
DemoPlayer.h

Code: Select all

#ifndef DEMOPLAYER_H_ #define DEMOPLAYER_H_ #include <QMainWindow> #include <QWidget> class VlcInstance; class VlcMedia; class VlcMediaPlayer; class VlcWidgetVideo; class DemoPlayer : public QMainWindow { Q_OBJECT public: explicit DemoPlayer(QWidget *parent = 0); public: VlcInstance *_instance; VlcMedia *_media; VlcMediaPlayer *_player; VlcWidgetVideo *_videowidget; }; #endif // DEMOPLAYER_H_

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 37 guests