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

Commit

Permalink
Fixes to VOD playback, included libs in prj
Browse files Browse the repository at this point in the history
  • Loading branch information
Antti Lamminsalo committed Mar 13, 2016
1 parent db0656f commit 0ffdc30
Show file tree
Hide file tree
Showing 17 changed files with 2,598 additions and 25 deletions.
3 changes: 3 additions & 0 deletions distfiles/qt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

[Platforms]
WindowsArguments = dpiawareness=2
Binary file added libs/libeay32.dll
Binary file not shown.
Binary file added libs/libmpv.dll.a
Binary file not shown.
Binary file added libs/libssl32.dll
Binary file not shown.
Binary file added libs/mpv-1.dll
Binary file not shown.
Binary file added libs/ssleay32.dll
Binary file not shown.
44 changes: 40 additions & 4 deletions orion.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
#-------------------------------------------------

QT += opengl qml quick network
QT += gui opengl qml quick network

TARGET = orion

Expand Down Expand Up @@ -57,7 +57,10 @@ HEADERS += src/model/channel.h \
src/model/vodmanager.h \
src/network/vodsearchoperation.h \
src/network/urls.h \
src/network/vodstreamextractoperation.h
src/network/vodstreamextractoperation.h \
src/player/mpv/client.h \
src/player/mpv/opengl_cb.h \
src/player/mpv/qthelper.hpp

QMAKE_CXXFLAGS += -std=c++11 -Wall -O2

Expand All @@ -75,15 +78,48 @@ unix: {

QMAKE_EXTRA_TARGETS += first copydata
}

#QMAKE_POST_LINK += $quote($(COPY) $PWD/distfiles * $OUT_PWD
}

RESOURCES += \
src/qml/qml.qrc

# Copies the given files to the destination directory
defineTest(copyToDestdir) {
files = $$1

for(FILE, files) {
DDIR = $$DESTDIR

# Replace slashes in paths with backslashes for Windows
win32:FILE ~= s,/,\\,g
win32:DDIR ~= s,/,\\,g

QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}

export(QMAKE_POST_LINK)
}

win32: {
LIBS += -LC:/libmpv/32 -lmpv.dll
INCLUDEPATH += C:/libmpv/include
LIBS += -L$${PWD}/libs/ -lmpv.dll
RC_ICONS = distfiles/orion.ico

EXTRA_BINFILES = $$PWD/libs/mpv-1.dll \
$$PWD/distfiles/qt.conf \
$$PWD/libs/libssl32.dll \
$$PWD/libs/ssleay32.dll \
$$PWD/libs/libeay32.dll

EXTRA_BINFILES_WIN = $${EXTRA_BINFILES}
EXTRA_BINFILES_WIN ~= s,/,\\,g
DESTDIR_WIN = $$OUT_PWD/release
DESTDIR_WIN ~= s,/,\\,g
for(FILE,EXTRA_BINFILES_WIN){
QMAKE_POST_LINK +=$$quote(cmd /c copy /y $${FILE} $${DESTDIR_WIN}$$escape_expand(\n\t))
}

}

#CONFIG(release): DEFINES += QT_NO_DEBUG_OUTPUT
323 changes: 323 additions & 0 deletions orion.pro.user

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/customapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ bool CustomApp::event(QEvent *e)
} else {
QApplication::event(e);
}

return true;
}
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

int main(int argc, char *argv[])
{
//Force using "auto" value for QT_DEVICE_PIXEL_RATIO env var
qputenv("QT_DEVICE_PIXEL_RATIO",QByteArray("auto"));

CustomApp app(argc, argv);

//Single application solution
Expand All @@ -39,7 +42,6 @@ int main(int argc, char *argv[])
tray->setIcon(appIcon);

QObject::connect(tray, SIGNAL(closeEventTriggered()), &app, SLOT(quit()));
//QObject::connect()

ChannelManager *cman = new ChannelManager();
cman->checkResources();
Expand All @@ -57,6 +59,9 @@ int main(int argc, char *argv[])

#endif

//dpiMultiplier /= QGuiApplication::primaryScreen()->devicePixelRatio();

qDebug() << "Pixel ratio " << QGuiApplication::primaryScreen()->devicePixelRatio();
qDebug() <<"DPI mult: "<< dpiMultiplier;

//Invokable network operations for player
Expand Down
Loading

0 comments on commit 0ffdc30

Please sign in to comment.