Skip to content

Commit

Permalink
Added local project to repository
Browse files Browse the repository at this point in the history
- Direction: C++, QML, QtScript
- Application independence from platforms/[media] library
- Fresh start, clean code structure, same great media player
- Removed QtScript dependency (now QJSEngine)
- Also added build/ to .gitignore
- Fixed window resizing with ApplicationWindow -> MochiWindow
- Only one thing left in the Input class (passing unaccepted input keyPress)
- Added util.{h,cpp} with mimeType conversion reused function
- Re-using QmlApplicationEngine instead of using a separate QJSEngine
- Got Input handler work properly
- Everything seems to work very nicely other than double click, but that won't cause problems unless people want to set Click events AND DoubleClick events, for now I leave it up to the user to figure out.
- Blank methods in different relavent classes
- Still deciding how I'll want to deal with toggleables
- Most submenu's not coded yet
- Created playlist class
- Got the gist of the panel, and the seekbar
- Put some code for Recent and the Playlist (awaiting models)
- Added img resources and re layed out project a bit
- Resources don't need one-liner .pro's we'll just use .qrc's instead
- Nested directories are overrated, I've brought most of them to the front
- Platform does all the platform stuff
- Added icons to Panel Buttons
- They're ugly, I'll let @godly-devotion figure out the styling
- Also fixed some errors in qmake I introduced last commit after sorting headers/sources and not paying attention to \
- Merged new icons and set the window/application icons
- Reorganized QML, removed Window class entirely in replace of Application
- Application exposes methods that are necessary to occur in C++, but remains independent of the other actual components in the program
- FitWindow moved to Application
- Old Window properties moved to Application
- Organized slots to only expose those necessary to the scripting language
- Config app renamed root to emphasize application independence
- Tray icon implemented to a certain extent
- Added archlinux pkgbuilds
- Separated qml definitions by folder
- Window methods exposed via javascript methods
- CreateDialog handles creating and managing qml components for dialogs
- AboutDialog template created
- OpenDialog created
- Fixed namespace issues in MochiTerminal
- Dynamically adding functions to QJSEngine space
- Also added `init` property which should allow users to do their own custom initializations (like creating their own functions and registering them into the QJSEngine)
- Added styling for the bottom panel
- Merged style from mochi-remote
- Setup Menu to obtain key shortcuts from input map
- mimeDataToString -> mimeDataToVariant
- serializeTime in app for time label
- Drag/Drop removed from input() as they depend heavily on player--moved to Window.qml
- Two way Player <-> PlayerEngine bindings
- Fixed player.load
- Implemented player.stop
- player.seek replaced player.time+-amnt
- Implemented frame{,-back}-step
- Added a number of PlayerEngine properties to Player
- Localized mpv/qthelper.hpp with our own modifications
- Modified MpvObject to work asynchronously and ignore property updates caused by us
- Added mpv_properties.txt for use when further expanding functionality
- Altered input to reflect new methods and nicer formatting
- Added enabled properties throughout the interface
- MochiStyle.qml: update colors
- Additions to styling in general and MochiTerminal
- MochiTerminal will soon become its own project, especially given that no one else really has an available QML terminal
- History and Object property completions working but ugly
- Tabs fixed throughout
- MenuBar -> MochiMenuBar with elaborate custom styling
- font.family -> font.normal | font.code
- Further improved mochi-terminal
- Finalized two-way engine/player binding functionality
- Elegant Macro definition solution allows properties to be defined in one place at the same time providing efficient two-way bindings (setEngineProperty doesn't come back, and setPropertyFromEngine doesn't go back)
- Colors changed to match Baka
- Playlist successfully implemented through mpv
- Styles for seekbar and slider normalized
- Improved config
- Fixed non-properly-parented QObjects (e.g. Player)
- Don't save defaults
- Added prototype of MochiPreferencesDialog
- Major improvements and test implementation
- Player M_PROPERTY -> M_PROPERTY_EX
- Added app config option defaults
- Layout: Buttons shouldn't move as timer changes
- Show In Folder
- Show Subtitle Check
- Open Copied Link
- Fullscreen
- Fit Window
- Aspect Ratio
- Font Size
- Hide command-line
- Online Help
- Mute Button visual feedback
- Click time (change formatting)
- Chapter ticks on Seekbar
- Tweaks and more interface implementation
- configurable and working mpv debugging
- mpv engine commands accessible in console
- Most dialogs initially layed out
- More widgets
- Small shortcut and command consistency tweaks
- Many things still need to be addressed but at least it can be executed properly now
- Organized img folder
- Actually added imgs
- Fixed img.qrc
- img: applied color to icons
- Minor fixes around the interface
- Working on menuPopup (WIP)
- Removed the majority of the QML warnings
- Added opacity to buttons (theoretically) for disabled instead of separate images
- Put circle.svg back (for the slider), and made triangle.svg for the menuPopup
- Playlist visual tweaks
- img: renamed some files
- Work in Progress, MochiMenuPopup
- Also fixed dialogs not showing automatically
- WIP: Restructured qmake to support unit testing
- Added test cases for util and config
- Restructured test case definition to support multiple files
- Fixed an error in util serializeTime
- Modified config slightly for testcase
- Wrote config test case which isn't passing because config doesn't work
- Added QML Tests (Separate from CPP tests)
- Added test_qml.qrc and per-folder documentation
- Extended config test-case and got Config class to pass it
- Added Travis Config, more Unit Tests, and better Styling
- Added mac os x to travis builds
- Fix for Mac OS X Icon
- Added jobs based on CPU for Mac OS X Travis Build
- Removed explicit static linking to help Mac OS X's linker
- Added showInFolder for Mac OS X
- s/linux/mac/: util
- Change xcode version to get travis working
- Added some environment variables to fix this
- Verify save and load, remove need for loaded signal on QFileSystemWatcher fail
- Added Input Key & Mouse unit tests
- Click -> LeftClick (not sure why i didn't do this from the start?)
- Fixed an issue with gestures (never saved the start position)
- Adjusted mpv options mute & volume to ao-
- Added name property that gets filename without extension
- Using default spy.wait() timeouts
- Added Player test (WIP)
- Adjusted test_qml to register our QML types
- Various additions and improvements
- Move qmlRegisterType declarations to function: register_qml_types() in src/register.{h,cpp} (used in app/main.cpp and test_qml.cpp)
- Move M_PROPERTY macro from platform into src/property.h (it isn't platform dependent and thus doesn't belong in platform)
- Added input tests for diagonal drag, mouse release, key release (some of which aren't yet implemented which have been passed with expectFail)
- Made mouseDragAndDrop function for mouseDrag+mouseRelease
- Moved setLocale to lib/mpv.cpp
- Added qt5-quickcontrols dependency
- Application Tests and WIP: Implementing Tray
- tst_application.qml
- Small Application redundancy
- Added Menu,MenuItem,MenuSeparator QQuickItems to work like the QtQuick.Controls types (they're implemented in pure Qt and don't seem accessible to C++)
- Menu convertable to QMenu
- Tray Icon setContextMenu using Menu's conversion
- This fixes Tray testing
- Fixed .pro depends (test_cpp,_qml consolidation)
- Improved testing further and mpv
- Each test is its own separate testclass (for variable isolation--my tests begun clashing)
- lib/mpv engine improved to keep playState
- std::bind -> lambdas for visibility
- Added test.webm small test videos (copied from python-mpv)
- Broke up tst_config
- Removed sanity tests..really?
- util/serializeTime -> data driven testing
- Fixed Input integration and some text formatting
- widgets/MochiInput.qml was clashing with components/MochiInput.qml; i've renamed the widgets one to MochiTextInput.qml
- Fix Input test case by setting focus
- Improved config to only write differences
- It now works properly if differences are reverted at runtime
- Ui visual tweaks
- Many improvements to UI
- Triangle colored properly
- Media-title used for window title if available
- Playlist fixed up (sizing mostly)
- Window onClosing warning fixed
- Removed UpdateDialog
- MochiSpinner replaced with MochiSpinBox
- Fixed AboutDialog according to design
- Fixed JumpDialog according to design
- Fixed OpenLocationDialog according to design
- Fixed PreferencesDialog according to design
- Split up PreferencesDialog into individual files for each tab
- disabled -> enabled, fixed disabled button style
- Improved MochiDialog widget styling
- Improved MochiButton widget styling
- Improved MochiCheckBox widget styling
- Improved MochiComboBox widget styling
- Improved MochiRadioButton widget styling
- Improved MochiSpinBox widget styling
- Improved MochiTabBar widget styling
- Improved MochiText widget styling
- Improved MochiTextArea widget styling
- Improved MochiTextButton widget styling
- Improved MochiTextInput widget styling
- Altered M_PROPERTY to allow for property initialization
- Play Button when no file is present
- Fixed Left,Middle,Right Click on buttons
- Normalized import versioning
  • Loading branch information
u8sand committed Jan 3, 2017
1 parent 5c13b7a commit bdefd70
Show file tree
Hide file tree
Showing 166 changed files with 5,733 additions and 55 deletions.
124 changes: 71 additions & 53 deletions .gitignore
@@ -1,57 +1,75 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------

# C extensions
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash

# qtcreator generated files
*.pro.user*

# xemacs temporary files
*.flc

# Vim temporary files
.*.swp

# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*

# MinGW generated files
*.Debug
*.Release

# Python byte code
*.pyc

# Binaries
# --------
*.dll
*.exe

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

47 changes: 47 additions & 0 deletions .travis.yml
@@ -0,0 +1,47 @@
sudo: required

os:
- linux
- osx

language: cpp

compiler:
- gcc

arch:
packages:
- qt5-{declarative,svg,x11extras,translations,tools,quickcontrols}
- xorg-server-xvfb
- noto-fonts
- youtube-dl
- luajit
- mpv-git
script:
- "qmake ."
- "make -j $(grep -c ^processor /proc/cpuinfo)"
- "xvfb-run -s \"-screen 0 640x480x24\" make check"

brew:
packages:
- youtube-dl
- mpv
- qt5
script:
- "export CXX=g++-4.8 CC=gcc-4.8 PKG_CONFIG_PATH=/usr/local/opt/qt5/lib/pkgconfig"
- "/usr/local/Cellar/qt5/5*/bin/qmake"
- "make"
- "make check"

script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -s https://raw.githubusercontent.com/mochi-player/travis/master/arch-travis.sh | ARCH_TRAVIS_VERBOSE=1 bash; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -s https://raw.githubusercontent.com/mochi-player/travis/master/brew-travis.sh | bash; fi

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/6a56faa67f77398d20fd
on_success: change
on_failure: always
on_start: never
email: false
15 changes: 13 additions & 2 deletions README.md
@@ -1,4 +1,15 @@
# mochi-player

[![Join the chat at https://gitter.im/mochi-player/mochi-player](https://badges.gitter.im/mochi-player/mochi-player.svg)](https://gitter.im/mochi-player/mochi-player?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
The mpv based media player
[![Join the chat at https://gitter.im/mochi-player/mochi-player](https://badges.gitter.im/mochi-player/mochi-player.svg)](https://gitter.im/mochi-player/mochi-player?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/mochi-player/mochi-player.svg?branch=qml)](https://travis-ci.org/mochi-player/mochi-player)

The tasty mpv based media player

## Compiling

```
mkdir build
cd build
qmake-qt5 ..
make -j $(grep -c '^processor' /proc/cpuinfo)
```

3 changes: 3 additions & 0 deletions app/README.md
@@ -0,0 +1,3 @@
# /app

Contains main.cpp for building the application. If you're looking for the source code, try `/src`or `/qml`.
13 changes: 13 additions & 0 deletions app/app.pro
@@ -0,0 +1,13 @@
TARGET = mochi-player
VERSION = 2.1.0
TEMPLATE = app
CONFIG += staticlib c++11

SOURCES += $$PWD/main.cpp

include($$PWD/../qml/qml.pri)
include($$PWD/../img/img.pri)
include($$PWD/../src/src.pri)

target.path = /usr/bin/
INSTALLS += target
25 changes: 25 additions & 0 deletions app/main.cpp
@@ -0,0 +1,25 @@
#include <QtQml>
#include <QObject>
#include <QQmlApplicationEngine>
#include <QUrl>

#include "platform.h"
#include "register.h"

int main(int argc, char *argv[]) {
// Consistency for high resolution displays
QApp::setAttribute(Qt::AA_EnableHighDpiScaling);

// Create qt app
QApp app(argc, argv);
app.setObjectName("qt");

// Register custom QML types
register_qml_types();

// Create and load qml engine
QQmlApplicationEngine engine;
engine.load(QUrl("qrc:/component/MochiApplication.qml"));

return app.exec();
}
3 changes: 3 additions & 0 deletions arch/README.md
@@ -0,0 +1,3 @@
# /arch

ArchLinux specific `PKGBUILD` scripts.
56 changes: 56 additions & 0 deletions arch/mochi-player-git/PKGBUILD
@@ -0,0 +1,56 @@
# Maintainer: u8sand <u8sand@gmail.com>
# Contributor: Alfredo Ramos <alfredo dot ramos at yandex dot com>

_pkgname=mochi-player
pkgname=${_pkgname}-git
pkgver=2.1.0
pkgrel=1
pkgdesc='A free and open source, cross-platform, libmpv based multimedia player. Qt5 build. Development version.'
arch=('i686' 'x86_64')
url='http://mochi-player.github.io/'
license=('GPL')

depends=('mpv' 'qt5-declarative' 'qt5-svg')
optdepends=(
'qt5-x11extras: for X11 support'
'qt5-wayland: for wayland support'
'qt5-translations: for localization'
'youtube-dl: for remote video streaming'
'noto-fonts: for proper font support'
'mpv-git: for bleeding-edge mpv features'
)
makedepends=('git' 'qt5-tools')
provides=("${_pkgname}=${pkgver}")
conflicts=("${pkgname}-git")
replaces=("${pkgname}-git")

source=(
"${_pkgname}::git+https://github.com/mochi-player/mochi-player.git"
)
sha512sums=(
"SKIP"
)

pkgver() {
cd ${srcdir}/${_pkgname}
(
set -o pipefail
git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}

prepare() {
mkdir ${srcdir}/build
}

build() {
cd ${srcdir}/build
qmake-qt5 ../${_pkgname}/src -release -spec linux-g++
make -j $(grep -c ^processor /proc/cpuinfo)
}

package() {
cd ${srcdir}/build
make INSTALL_ROOT=${pkgdir} install
}
43 changes: 43 additions & 0 deletions arch/mochi-player/PKGBUILD
@@ -0,0 +1,43 @@
# Maintainer: u8sand <u8sand@gmail.com>
# Contributor: Alfredo Ramos <alfredo dot ramos at yandex dot com>

pkgname=mochi-player
pkgver=2.1.0
pkgrel=1
pkgdesc='A free and open source, cross-platform, libmpv based multimedia player. Qt5 build.'
arch=('i686' 'x86_64')
url='http://mochi-player.github.io/'
license=('GPL')

depends=('mpv' 'qt5-declarative' 'qt5-svg')
optdepends=(
'qt5-x11extras: for X11 support'
'qt5-wayland: for wayland support'
'qt5-translations: for localization'
'youtube-dl: for remote video streaming'
'noto-fonts: for proper font support'
'mpv-git: for bleeding-edge mpv features'
)
makedepends=('git' 'qt5-tools')
provides=("${pkgname}=${pkgver}")
conflicts=("${pkgname}-git")
replaces=("${pkgname}-git")

source=(
"${pkgname}-${pkgver}.tar.gz::https://github.com/mochi-player/mochi-player/archive/v${pkgver}.tar.gz"
)

prepare() {
mkdir ${srcdir}/build
}

build() {
cd ${srcdir}/build
qmake-qt5 ../mochi-player-${pkgver} -release -spec linux-g++
make -j $(grep -c ^processor /proc/cpuinfo)
}

package() {
cd ${srcdir}/build
make INSTALL_ROOT=${pkgdir} install
}
3 changes: 3 additions & 0 deletions img/README.md
@@ -0,0 +1,3 @@
# /img

Image resources used throughout the interface.
1 change: 1 addition & 0 deletions img/add.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/album-art.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/arrow_drop_down.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/circle.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/cmd_clear.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/cmd_help.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/cmd_save.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/edit.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/img.pri
@@ -0,0 +1 @@
RESOURCES += $$PWD/img.qrc

0 comments on commit bdefd70

Please sign in to comment.