#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include <VideoDecodeAcceleration/VDADecoder.h>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    void start();
    void parse(char *data, int size, int nalSize);

    static void callback(void *decompressionOutputRefCon, CFDictionaryRef frameInfo, OSStatus status, uint32_t infoFlags, CVImageBufferRef imageBuffer);

    bool vdaCreated;
    bool extraUpdated;

    std::vector<char> sps;
    std::vector<char> pps;

    VDADecoder decoder;

    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
