Media.h 984 Bytes
Newer Older
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#ifndef MEDIA_H
#define MEDIA_H

#include <QString>
#include <QImage>

#include "VLCMedia.h"
#include "VLCInstance.h"
#include "VLCMediaPlayer.h"

#include "Image.h"

class       Media
{
public:
    Media(const QString& mrl);
    ~Media();

    static void             lock(LibVLCpp::Media::DataCtx* dataCtx, void **pp_ret);
    static void             unlock(LibVLCpp::Media::DataCtx* dataCtx);
21
    QImage*                 takeSnapshot(unsigned int width, unsigned int heigth);
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
22 23

    QImage&                 getImage();
24 25 26
    //FIXME into bool
    int                     isPlaying();
    int                     isSeekable();
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
27

28 29 30

    //FIXME
private: public:
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
31 32 33 34 35
    LibVLCpp::Media*            _vlcMedia;
    LibVLCpp::MediaPlayer*      _vlcMediaPlayer;
    LibVLCpp::Instance*         _instance;
    QString                     _mrl;

36
    QImage*                     _snapshot;
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
37 38 39 40 41 42 43 44

    uchar*                      _pixelBuffer;
    QImage*                     _image;


};

#endif // MEDIA_H