Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
Seek preview (#252)
Browse files Browse the repository at this point in the history
* appveyor compile openssl, mpv

* fix fullscreen to maximized state

* [mpv] use render api instead of deprecated opengl-cb

* add vod seek preview image
  • Loading branch information
mrgreywater authored and alamminsalo committed Oct 15, 2018
1 parent 2a26a76 commit c4b6cbb
Show file tree
Hide file tree
Showing 20 changed files with 638 additions and 374 deletions.
7 changes: 2 additions & 5 deletions orion.pro
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ mpv {
#DEFINES += DEBUG_LIBMPV
DEFINES += MPV_PLAYER
DEFINES += PLAYER_BACKEND=\\\"mpv\\\"
SOURCES += src/player/mpvrenderer.cpp \
src/player/mpvobject.cpp

HEADERS += src/player/mpvobject.h \
src/player/mpvrenderer.h
SOURCES += src/player/mpvobject.cpp
HEADERS += src/player/mpvobject.h

LIBS += -lmpv
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#endif

#ifdef MPV_PLAYER
#include "player/mpvrenderer.h"
#include "player/mpvobject.h"
#endif

inline void noisyFailureMsgHandler(QtMsgType /*type*/, const QMessageLogContext &/*context*/, const QString &/*msg*/)
Expand Down
32 changes: 11 additions & 21 deletions src/model/vod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,7 @@

#include "vod.h"

Vod::Vod()
{
title = "";
id = "";
game = "";
duration = 0;
views = 0;
preview = "";
createdAt = "";
}

Vod::Vod(Vod &other)
{
title = other.title;
id = other.id;
game = other.game;
views = other.views;
preview = other.preview;
duration = other.duration;
createdAt = other.createdAt;
}
Vod::Vod() { }

QString Vod::getPreview() const
{
Expand Down Expand Up @@ -105,3 +85,13 @@ void Vod::setCreatedAt(const QString &value)
{
createdAt = value;
}

QString Vod::getSeekPreviews() const
{
return seekPreviews;
}

void Vod::setSeekPreviews(const QString &value)
{
seekPreviews = value;
}
19 changes: 11 additions & 8 deletions src/model/vod.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@

class Vod
{
QString title;
QString id;
QString game;
quint32 duration;
quint64 views;
QString preview;
QString createdAt;
QString title = "";
QString id = "";
QString game = "";
quint32 duration = 0;
quint64 views = 0;
QString preview = "";
QString createdAt = "";
QString seekPreviews = "";

public:
Vod();
Vod(Vod &other);
Vod(Vod &other) = default;
~Vod(){};

QString getPreview() const;
Expand All @@ -47,6 +48,8 @@ class Vod
void setTitle(const QString &value);
QString getCreatedAt() const;
void setCreatedAt(const QString &value);
QString getSeekPreviews() const;
void setSeekPreviews(const QString &value);
};

#endif // VOD_H
6 changes: 6 additions & 0 deletions src/model/vodlistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ QVariant VodListModel::data(const QModelIndex &index, int role) const

case CreatedAt:
var.setValue(vod->getCreatedAt());
break;

case SeekPreviews:
var.setValue(vod->getSeekPreviews());
break;
}
}

Expand All @@ -89,6 +94,7 @@ QHash<int, QByteArray> VodListModel::roleNames() const
roles[Duration] = "duration";
roles[Views] = "views";
roles[CreatedAt] = "createdAt";
roles[SeekPreviews] = "seekPreviews";
return roles;
}

Expand Down
3 changes: 2 additions & 1 deletion src/model/vodlistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class VodListModel: public QAbstractListModel
Game,
Duration,
Views,
CreatedAt
CreatedAt,
SeekPreviews,
};

Qt::ItemFlags flags(const QModelIndex &index) const;
Expand Down
Loading

0 comments on commit c4b6cbb

Please sign in to comment.