Hello I have built VLC Qt Library in QT 5.5.1 on Ubuntu. Now I want to add snapshot feature in it. Is there anyway or any idea? Please mention. If you have even little bit of idea.
Asked
Active
Viewed 386 times
1
-
1[There is](https://wiki.videolan.org/Take_a_snapshot/) already a way of taking snapshots in VLC, isn't there? – Tarod Sep 12 '16 at 12:06
1 Answers
0
you should use the VlcVideo class in this library. at first create a new object from this class. then use this function:
bool VlcVideo::takeSnapshot ( const QString & path ) const
you can find more details about the VlcVideo class from this link: https://vlc-qt.tano.si/reference/1.1/classVlcVideo.html#a4f3a741285dd9030f76bb996eaa011d4
a very simple code can be like this:
#include "MayClass.h"
#include "VLCQtCore/Video.h"
void MayClass::initMembers()
{
_instance = new VlcInstance(VlcCommon::args(), this);
_player = new VlcMediaPlayer(_instance);
_video = new VlcVideo(_player);
}
void MayClass::takeSnapShot(QString filename)
{
_video->takeSnapshot(filename);
}