diff --git a/.gitignore b/.gitignore
index f147edf..d40d484 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,52 +1,128 @@
-# C++ objects and libs
-*.slo
-*.lo
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
*.o
-*.a
-*.la
-*.lai
*.so
*.so.*
-*.dll
-*.dylib
+*.so.debug
+*.run
+*.AppImage
+*.framework
-# Qt-es
-object_script.*.Release
-object_script.*.Debug
-*_plugin_import.cpp
-/.qmake.cache
-/.qmake.stash
-*.pro.user
-*.pro.user.*
-*.qbs.user
-*.qbs.user.*
+# Packages #
+############
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+*.xz
+
+# Logs and databases #
+######################
+*.log
+*.sql
+*.sqlite
+vgcore.*
+
+# OS generated files #
+######################
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+Icon?
+ehthumbs.db
+Thumbs.db
+*~
+*_resource.rc
+
+# Ignore files generated by Qt #
+################################
+*.a
*.moc
moc_*.cpp
-moc_*.h
-qrc_*.cpp
ui_*.h
-*.qmlc
-*.jsc
+*.obj
+*.dylib
Makefile*
-*build-*
-*.qm
*.prl
-
-# Qt unit tests
-target_wrapper.*
-
-# QtCreator
+*.app
+*.pro.user*
+*.qmlproject.user*
*.autosave
+*.qmlc
+.qmake.stash
+.qmake.cache
+callgrind.out.*
+*.debug
+*.plugin
+*_qmlcache.qrc
+test.o-*
+object_script.*
-# QtCreator Qml
-*.qmlproject.user
-*.qmlproject.user.*
+# Ignore files generated by Python #
+####################################
+__pycache__
+*.pyc
-# QtCreator CMake
-CMakeLists.txt.user*
+# Android files #
+#################
+android-build
+android-*-deployment-settings.json
-# QtCreator 4.8< compilation database
-compile_commands.json
+# VIM temporary files #
+#######################
+.*.swp
-# QtCreator local machine specific files for imported projects
-*creator.user*
+# Kate temporary files #
+#######################
+.*.kate-swp
+
+# KDevelop generated files #
+############################
+.kdev4
+*.kdev4
+
+# MinGW files #
+###############
+*.Debug
+*.Release
+
+# MSVC files #
+##############
+*.exp
+*.ilk
+*.lib
+*.pdb
+
+# Failed patch #
+################
+*.orig
+*.rej
+
+# Project Files #
+#################
+AkVCamAssistant
+
+# Ignore Directories #
+######################
+build
+debug
+release
+
+# Ignore Auto Generated Files #
+###############################
+*_auto*
+
+# Ignore Private Files and Folders #
+####################################
+*_priv
+*_priv.*
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..b0b0333
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,81 @@
+# akvcam Individual Contributor License Agreement #
+
+Thank you for your interest in contributing to akvcam ("We" or "Us").
+
+This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by email, following the instructions at CONTRIBUTING.md. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.
+
+You are accepting this agreement by making a pull request to the repository.
+
+## 1. Definitions ##
+
+"You" means the individual who Submits a Contribution to Us.
+
+"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, please follow the instructions in CONTRIBUTING.md.
+
+"Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You.
+
+"Material" means the work of authorship which is made available by Us to third parties. When this Agreement covers more than one software project, the Material means the work of authorship to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material.
+
+"Submit" means any form of electronic, verbal, or written communication sent to Us or our representatives, including but not limited to electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Us for the purpose of discussing and improving the Material, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
+
+"Submission Date" means the date on which You Submit a Contribution to Us.
+
+"Effective Date" means the date You execute this Agreement or the date You first Submit a Contribution to Us, whichever is earlier.
+
+"Media" means any portion of a Contribution which is not software.
+
+## 2. Grant of Rights ##
+
+### 2.1 Copyright License ###
+
+(a) You retain ownership of the Copyright in Your Contribution and have the same rights to use or license the Contribution which You would have had without entering into the Agreement.
+
+(b) To the maximum extent permitted by the relevant law, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable license under the Copyright covering the Contribution, with the right to sublicense such rights through multiple tiers of sublicensees, to reproduce, modify, display, perform and distribute the Contribution as part of the Material; provided that this license is conditioned upon compliance with Section 2.3.
+
+### 2.2 Patent License ###
+
+For patent claims including, without limitation, method, process, and apparatus claims which You own, control or have the right to grant, now or in the future, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable patent license, with the right to sublicense these rights to multiple tiers of sublicensees, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with the Material (and portions of such combination). This license is granted only to the extent that the exercise of the licensed rights infringes such patent claims; and provided that this license is conditioned upon compliance with Section 2.3.
+
+### 2.3 Outbound License ###
+
+As a condition on the grant of rights in Sections 2.1 and 2.2, We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or any licenses on the Free Software Foundation's list of "Recommended copyleft licenses" on or after the Effective Date, whether or not such licenses are subsequently disapproved (including any right to adopt any future version of a license if permitted).
+
+In addition, We may use the following licenses for Media in the Contribution: Creative Commons Attribution Share Alike 3.0 (including any right to adopt any future version of a license if permitted).
+
+**2.4 Moral Rights.** If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against Us or our successors in interest, or any of our licensees, either direct or indirect.
+
+**2.5 Our Rights.** You acknowledge that We are not obligated to use Your Contribution as part of the Material and may decide to include any Contribution We consider appropriate.
+
+**2.6 Reservation of Rights.** Any rights not expressly licensed under this section are expressly reserved by You.
+
+## 3. Agreement ##
+
+You confirm that:
+
+(a) You have the legal authority to enter into this Agreement.
+
+(b) You own the Copyright and patent claims covering the Contribution which are required to grant the rights under Section 2.
+
+(c) The grant of rights under Section 2 does not violate any grant of rights which You have made to third parties, including Your employer. If You are an employee, You have had Your employer approve this Agreement or sign the Entity version of this document. If You are less than eighteen years old, please have Your parents or guardian sign the Agreement.
+
+(d) You have followed the instructions in CONTRIBUTING.md, if You do not own the Copyright in the entire work of authorship Submitted.
+
+## 4. Disclaimer ##
+
+EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
+
+## 5. Consequential Damage Waiver ##
+
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
+
+## 6. Miscellaneous ##
+
+6.1 This Agreement will be governed by and construed in accordance with the laws of Argentina excluding its conflicts of law provisions. Under certain circumstances, the governing law in this section might be superseded by the United Nations Convention on Contracts for the International Sale of Goods ("UN Convention") and the parties intend to avoid the application of the UN Convention to this Agreement and, thus, exclude the application of the UN Convention in its entirety to this Agreement.
+
+6.2 This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings.
+
+6.3 If You or We assign the rights or obligations received through this Agreement to a third party, as a condition of the assignment, that third party must agree in writing to abide by all the rights and obligations in the Agreement.
+
+6.4 The failure of either party to require performance by the other party of any provision of this Agreement in one situation shall not affect the right of a party to require such performance at any time in the future. A waiver of performance under a provision in one situation shall not be considered a waiver of the performance of the provision in the future or a waiver of the provision in its entirety.
+
+6.5 If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and which is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law.
diff --git a/LICENSE b/COPYING
similarity index 99%
rename from LICENSE
rename to COPYING
index f288702..94a9ed0 100644
--- a/LICENSE
+++ b/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
-.
+.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
-.
+.
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..23d2e24
--- /dev/null
+++ b/ISSUE_TEMPLATE.md
@@ -0,0 +1,58 @@
+# README
+
+Some considerations before doing anything:
+
+* Search the [issues list](https://github.com/webcamoid/akvirtualcamera/issues) for similar topics before opening a new one.
+* If you know how to fix the problem, consider doing a [pull request](https://github.com/webcamoid/akvirtualcamera/pulls) instead of opening a new issue.
+* Only report problems in [latest](https://github.com/webcamoid/akvirtualcamera/releases) and [development](https://github.com/webcamoid/akvirtualcamera/) version. Reporting issues related to older versions will be rejected.
+* Use [gist](https://gist.github.com/) to post logs longer than 1024 characters.
+* akvirtualcamera as project, is not affiliated or endorsed to any distribution, report packaging problems in their respective issue tracker.
+* Respect the templates, we need as much information as possible.
+* Don't open an issue and disappear, we need you at least the first week to clear up missing information.
+* Missing information makes useless and unsolvable an issue report.
+* You are our debbuger, eyes and hands, if an issue is not reproducible then you will be the only person able to solve it.
+* Take a seat and wait for your turn, as many others that has their issues open, or much better try fixing it your self and collaborate with the solution :smile:
+
+Choose one of the templates bellow that fit better your issue.
+
+# Reporting a problem?
+
+## Summary
+
+Write here a brief description of the problem.
+
+## Current Behavior
+
+Describe the problem the best as you can, don't omit information.
+
+## Expected Behavior
+
+How it should have work?
+
+## Steps to Reproduce
+
+If akvirtualcamera crashed, try to reproduce the crash several times to be sure where is the problem. Write the steps to reproduce the issue bellow:
+
+1. Open this
+2. Click that
+3. Drag those
+4. ...
+
+## Suggestions and tips
+
+How would you solve the problem?
+
+## Your Environment
+
+* akvirtualcamera inormation: (version) (architecture)
+* Operating System information: (name) (numeric version and codename if applied) (architecture)
+* Any other useful information: (logs, gdb backtrace, valgrind logs, screenshots, hardware, etc.)
+
+# Want a new feature?
+
+Describe your idea the best as you can, include sketches, mockups and diagrams if required.
+Be patient, take in mind that there may be other priorities. Your idea will be accepted if fit in project goals.
+
+# Questinons and other matters?
+
+Go ahead!
diff --git a/Manager/Manager.pro b/Manager/Manager.pro
new file mode 100644
index 0000000..3a21c44
--- /dev/null
+++ b/Manager/Manager.pro
@@ -0,0 +1,80 @@
+# akvirtualcamera, virtual camera for Mac and Windows.
+# Copyright (C) 2020 Gonzalo Exequiel Pedone
+#
+# akvirtualcamera is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# akvirtualcamera is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with akvirtualcamera. If not, see .
+#
+# Web-Site: http://webcamoid.github.io/
+
+exists(commons.pri) {
+ include(commons.pri)
+} else {
+ exists(../commons.pri) {
+ include(../commons.pri)
+ } else {
+ error("commons.pri file not found.")
+ }
+}
+
+win32: include(../dshow/dshow.pri)
+macx: include(../cmio/cmio.pri)
+include(../VCamUtils/VCamUtils.pri)
+
+TEMPLATE = app
+CONFIG += console link_prl
+CONFIG -= app_bundle
+CONFIG -= qt
+
+DESTDIR = $${OUT_PWD}/$${BIN_DIR}
+
+TARGET = manager
+
+SOURCES = \
+ main.cpp
+
+INCLUDEPATH += \
+ .. \
+ ../..
+
+win32: LIBS += \
+ -L$${OUT_PWD}/../dshow/VCamIPC/$${BIN_DIR} -lVCamIPC \
+ -L$${OUT_PWD}/../dshow/PlatformUtils/$${BIN_DIR} -lPlatformUtils \
+ -ladvapi32 \
+ -lgdi32 \
+ -lstrmiids \
+ -luuid \
+ -lole32 \
+ -loleaut32 \
+ -lshell32
+macx: LIBS += \
+ -L$${OUT_PWD}/../cmio/VCamIPC/$${BIN_DIR} -lVCamIPC \
+ -framework CoreFoundation \
+ -framework CoreMedia \
+ -framework CoreMediaIO \
+ -framework CoreVideo \
+ -framework Foundation \
+ -framework IOKit \
+ -framework IOSurface
+LIBS += \
+ -L$${OUT_PWD}/VCamUtils/$${BIN_DIR} -lVCamUtils
+
+isEmpty(STATIC_BUILD) | isEqual(STATIC_BUILD, 0) {
+ win32-g++: QMAKE_LFLAGS = -static -static-libgcc -static-libstdc++
+}
+
+win32: QMAKE_POST_LINK = \
+ $$sprintf($$QMAKE_MKDIR_CMD, $$shell_path($${OUT_PWD}/../dshow/VirtualCamera/$${DSHOW_PLUGIN_NAME}.plugin/$$normalizedArch(TARGET_ARCH))) $${CMD_SEP} \
+ $(COPY) $$shell_path($${OUT_PWD}/$${BIN_DIR}/$${TARGET}.exe) $$shell_path($${OUT_PWD}/../dshow/VirtualCamera/$${DSHOW_PLUGIN_NAME}.plugin/$$normalizedArch(TARGET_ARCH))
+macx: QMAKE_POST_LINK = \
+ $$sprintf($$QMAKE_MKDIR_CMD, $$shell_path($${OUT_PWD}/../cmio/VirtualCamera/$${CMIO_PLUGIN_NAME}.plugin/Contents/Resources)) $${CMD_SEP} \
+ $(COPY) $$shell_path($${OUT_PWD}/$${BIN_DIR}/$${TARGET}) $$shell_path($${OUT_PWD}/../cmio/VirtualCamera/$${CMIO_PLUGIN_NAME}.plugin/Contents/Resources)
diff --git a/Manager/main.cpp b/Manager/main.cpp
new file mode 100644
index 0000000..a05477b
--- /dev/null
+++ b/Manager/main.cpp
@@ -0,0 +1,25 @@
+/* akvirtualcamera, virtual camera for Mac and Windows.
+ * Copyright (C) 2020 Gonzalo Exequiel Pedone
+ *
+ * akvirtualcamera is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * akvirtualcamera is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with akvirtualcamera. If not, see .
+ *
+ * Web-Site: http://webcamoid.github.io/
+ */
+
+#include
+
+int main(int argc, char **argv)
+{
+ return 0;
+}
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..16b498d
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,35 @@
+# README
+
+Before contributing, please read [the contributing document](https://github.com/webcamoid/akvirtualcamera/blob/master/CONTRIBUTING.md), and the [coding style and conventions](https://github.com/webcamoid/webcamoid/wiki/Coding-style-and-conventions) guide.
+Search the [pull request list](https://github.com/webcamoid/akvirtualcamera/pulls) for similar pulls before opening a new one.
+Check your code doesn't throw any warning or error message while compiling, and doesn't give any warning in Clang static analyzer. Make sure your code is GCC, Clang, MinGW and MSVC compliant (use AppVeyor and Travis for that).
+Check your code using GDB, Valgrind and similar tools to remove all possible memory leaks and segfaults.
+
+# Pull request
+
+## Type of change
+
+Is your pull request a bug fix, new feature, code refactor, breaking change, etc.?
+If your change is too big consider [discussing it](https://github.com/webcamoid/akvirtualcamera/issues) before pulling.
+
+## Summary
+
+Describe your pull request the best as you can.
+
+## Related Issue
+
+Is this pull request related to some [issue](https://github.com/webcamoid/akvirtualcamera/issues)? Cite the issue as #NNN, where NNN is the number of issue.
+
+## More info
+
+Provide screenshots, logs, etc. if required.
+
+## Added dependencies
+
+Does your pull request add more dependencies to the project? This may require some discussion. Minimal dependencies is a requirement.
+
+## Target Environment
+
+Is this pull request specific to a target operating system?
+
+* Operating System information: (name) (numeric version and codename if applied) (architecture)
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..bec73b3
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,10 @@
+# Security Policy
+
+## Supported Versions
+
+Only report vulnerabilities in the [latest stable](https://github.com/webcamoid/akvirtualcamera/releases) version and the [master repository](https://github.com/webcamoid/akvirtualcamera) (that includes [daily build](https://bintray.com/webcamoid/webcamoid/akvirtualcamera/daily/link)).
+
+## Reporting a Vulnerability
+
+Report all vulnerabilities at the [issues section](https://github.com/webcamoid/akvirtualcamera/issues).
+
\ No newline at end of file
diff --git a/VCamUtils/VCamUtils.pri b/VCamUtils/VCamUtils.pri
new file mode 100644
index 0000000..bbb9d76
--- /dev/null
+++ b/VCamUtils/VCamUtils.pri
@@ -0,0 +1,24 @@
+# akvirtualcamera, virtual camera for Mac and Windows.
+# Copyright (C) 2020 Gonzalo Exequiel Pedone
+#
+# akvirtualcamera is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# akvirtualcamera is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with akvirtualcamera. If not, see .
+#
+# Web-Site: http://webcamoid.github.io/
+
+DEFINES += \
+ QT_NAMESPACE=AkVCam
+
+CONFIG(debug, debug|release) {
+ DEFINES += QT_DEBUG
+}
diff --git a/VCamUtils/VCamUtils.pro b/VCamUtils/VCamUtils.pro
new file mode 100644
index 0000000..94b9ffb
--- /dev/null
+++ b/VCamUtils/VCamUtils.pro
@@ -0,0 +1,65 @@
+# akvirtualcamera, virtual camera for Mac and Windows.
+# Copyright (C) 2020 Gonzalo Exequiel Pedone
+#
+# akvirtualcamera is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# akvirtualcamera is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with akvirtualcamera. If not, see .
+#
+# Web-Site: http://webcamoid.github.io/
+
+exists(commons.pri) {
+ include(commons.pri)
+} else {
+ exists(../commons.pri) {
+ include(../commons.pri)
+ } else {
+ error("commons.pri file not found.")
+ }
+}
+
+include(VCamUtils.pri)
+
+CONFIG += \
+ staticlib \
+ create_prl \
+ no_install_prl
+CONFIG -= qt
+
+DESTDIR = $${OUT_PWD}/$${BIN_DIR}
+
+TARGET = VCamUtils
+
+TEMPLATE = lib
+
+SOURCES += \
+ src/fraction.cpp \
+ src/image/videoformat.cpp \
+ src/image/videoframe.cpp \
+ src/logger/logger.cpp \
+ src/timer.cpp \
+ src/utils.cpp
+
+HEADERS += \
+ src/fraction.h \
+ src/image/color.h \
+ src/image/videoformat.h \
+ src/image/videoframe.h \
+ src/image/videoframetypes.h \
+ src/image/videoformattypes.h \
+ src/ipcbridge.h \
+ src/logger/logger.h \
+ src/timer.h \
+ src/utils.h
+
+isEmpty(STATIC_BUILD) | isEqual(STATIC_BUILD, 0) {
+ win32-g++: QMAKE_LFLAGS = -static -static-libgcc -static-libstdc++
+}
diff --git a/VCamUtils/src/fraction.cpp b/VCamUtils/src/fraction.cpp
new file mode 100644
index 0000000..3088132
--- /dev/null
+++ b/VCamUtils/src/fraction.cpp
@@ -0,0 +1,178 @@
+/* akvirtualcamera, virtual camera for Mac and Windows.
+ * Copyright (C) 2020 Gonzalo Exequiel Pedone
+ *
+ * akvirtualcamera is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * akvirtualcamera is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with akvirtualcamera. If not, see .
+ *
+ * Web-Site: http://webcamoid.github.io/
+ */
+
+#include
+#include
+#include
+#include
+
+#include "fraction.h"
+#include "utils.h"
+
+namespace AkVCam
+{
+ class FractionPrivate
+ {
+ public:
+ int64_t m_num;
+ int64_t m_den;
+ };
+}
+
+AkVCam::Fraction::Fraction()
+{
+ this->d = new FractionPrivate;
+ this->d->m_num = 0;
+ this->d->m_den = 0;
+}
+
+AkVCam::Fraction::Fraction(int64_t num, int64_t den)
+{
+ this->d = new FractionPrivate;
+ this->d->m_num = num;
+ this->d->m_den = den;
+}
+
+AkVCam::Fraction::Fraction(const std::string &str)
+{
+ this->d = new FractionPrivate;
+ this->d->m_num = 0;
+ this->d->m_den = 1;
+ auto pos = str.find('/');
+
+ if (pos == std::string::npos) {
+ auto strCpy = trimmed(str);
+ this->d->m_num = uint32_t(strtol(strCpy.c_str(), nullptr, 10));
+ } else {
+ auto numStr = trimmed(str.substr(0, pos));
+ auto denStr = trimmed(str.substr(pos + 1));
+
+ this->d->m_num = uint32_t(strtol(numStr.c_str(), nullptr, 10));
+ this->d->m_den = uint32_t(strtol(denStr.c_str(), nullptr, 10));
+
+ if (this->d->m_den < 1) {
+ this->d->m_num = 0;
+ this->d->m_den = 1;
+ }
+ }
+}
+
+AkVCam::Fraction::Fraction(const std::wstring &str)
+{
+ this->d = new FractionPrivate;
+ this->d->m_num = 0;
+ this->d->m_den = 1;
+ auto pos = str.find(L'/');
+
+ if (pos == std::wstring::npos) {
+ auto strCpy = trimmed(str);
+
+ this->d->m_num = uint32_t(wcstol(strCpy.c_str(), nullptr, 10));
+ } else {
+ auto numStr = trimmed(str.substr(0, pos));
+ auto denStr = trimmed(str.substr(pos + 1));
+
+ this->d->m_num = uint32_t(wcstol(numStr.c_str(), nullptr, 10));
+ this->d->m_den = uint32_t(wcstol(denStr.c_str(), nullptr, 10));
+
+ if (this->d->m_den < 1) {
+ this->d->m_num = 0;
+ this->d->m_den = 1;
+ }
+ }
+}
+
+AkVCam::Fraction::Fraction(const Fraction &other)
+{
+ this->d = new FractionPrivate;
+ this->d->m_num = other.d->m_num;
+ this->d->m_den = other.d->m_den;
+}
+
+AkVCam::Fraction::~Fraction()
+{
+ delete this->d;
+}
+
+AkVCam::Fraction &AkVCam::Fraction::operator =(const Fraction &other)
+{
+ if (this != &other) {
+ this->d->m_num = other.d->m_num;
+ this->d->m_den = other.d->m_den;
+ }
+
+ return *this;
+}
+
+bool AkVCam::Fraction::operator ==(const Fraction &other) const
+{
+ if (this->d->m_den == 0 && other.d->m_den != 0)
+ return false;
+
+ if (this->d->m_den != 0 && other.d->m_den == 0)
+ return false;
+
+ return this->d->m_num * other.d->m_den == this->d->m_den * other.d->m_num;
+}
+
+bool AkVCam::Fraction::operator <(const Fraction &other) const
+{
+ return this->d->m_num * other.d->m_den < this->d->m_den * other.d->m_num;
+}
+
+int64_t AkVCam::Fraction::num() const
+{
+ return this->d->m_num;
+}
+
+int64_t &AkVCam::Fraction::num()
+{
+ return this->d->m_num;
+}
+
+int64_t AkVCam::Fraction::den() const
+{
+ return this->d->m_den;
+}
+
+int64_t &AkVCam::Fraction::den()
+{
+ return this->d->m_den;
+}
+
+double AkVCam::Fraction::value() const
+{
+ return double(this->d->m_num) / this->d->m_den;
+}
+
+std::string AkVCam::Fraction::toString() const
+{
+ std::stringstream ss;
+ ss << this->d->m_num << '/' << this->d->m_den;
+
+ return ss.str();
+}
+
+std::wstring AkVCam::Fraction::toWString() const
+{
+ std::wstringstream ss;
+ ss << this->d->m_num << L'/' << this->d->m_den;
+
+ return ss.str();
+}
diff --git a/VCamUtils/src/fraction.h b/VCamUtils/src/fraction.h
new file mode 100644
index 0000000..01ee4a7
--- /dev/null
+++ b/VCamUtils/src/fraction.h
@@ -0,0 +1,58 @@
+/* akvirtualcamera, virtual camera for Mac and Windows.
+ * Copyright (C) 2020 Gonzalo Exequiel Pedone
+ *
+ * akvirtualcamera is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * akvirtualcamera is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with akvirtualcamera. If not, see .
+ *
+ * Web-Site: http://webcamoid.github.io/
+ */
+
+#ifndef FRACTION_H
+#define FRACTION_H
+
+#include
+#include
+
+namespace AkVCam
+{
+ class Fraction;
+ class FractionPrivate;
+ using FractionRange = std::pair;
+
+ class Fraction
+ {
+ public:
+ Fraction();
+ Fraction(int64_t num, int64_t den);
+ Fraction(const std::string &str);
+ Fraction(const std::wstring &str);
+ Fraction(const Fraction &other);
+ virtual ~Fraction();
+ Fraction &operator =(const Fraction &other);
+ bool operator ==(const Fraction &other) const;
+ bool operator <(const Fraction &other) const;
+
+ int64_t num() const;
+ int64_t &num();
+ int64_t den() const;
+ int64_t &den();
+ double value() const;
+ std::string toString() const;
+ std::wstring toWString() const;
+
+ private:
+ FractionPrivate *d;
+ };
+}
+
+#endif // FRACTION_H
diff --git a/VCamUtils/src/image/color.h b/VCamUtils/src/image/color.h
new file mode 100644
index 0000000..8f42e04
--- /dev/null
+++ b/VCamUtils/src/image/color.h
@@ -0,0 +1,56 @@
+/* akvirtualcamera, virtual camera for Mac and Windows.
+ * Copyright (C) 2020 Gonzalo Exequiel Pedone
+ *
+ * akvirtualcamera is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * akvirtualcamera is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with akvirtualcamera. If not, see .
+ *
+ * Web-Site: http://webcamoid.github.io/
+ */
+
+#ifndef AKVCAMUTILS_COLOR_H
+#define AKVCAMUTILS_COLOR_H
+
+#include
+
+namespace AkVCam
+{
+ namespace Color
+ {
+ inline uint32_t rgb(uint32_t r, uint32_t g, uint32_t b, uint32_t a)
+ {
+ return (a << 24) | (r << 16) | (g << 8) | b;
+ }
+
+ inline uint32_t red(uint32_t rgba)
+ {
+ return (rgba >> 16) & 0xff;
+ }
+
+ inline uint32_t green(uint32_t rgba)
+ {
+ return (rgba >> 8) & 0xff;
+ }
+
+ inline uint32_t blue(uint32_t rgba)
+ {
+ return rgba & 0xff;
+ }
+
+ inline uint32_t alpha(uint32_t rgba)
+ {
+ return rgba >> 24;
+ }
+ }
+}
+
+#endif // AKVCAMUTILS_COLOR_H
diff --git a/VCamUtils/src/image/videoformat.cpp b/VCamUtils/src/image/videoformat.cpp
new file mode 100644
index 0000000..1497ab5
--- /dev/null
+++ b/VCamUtils/src/image/videoformat.cpp
@@ -0,0 +1,430 @@
+/* akvirtualcamera, virtual camera for Mac and Windows.
+ * Copyright (C) 2020 Gonzalo Exequiel Pedone
+ *
+ * akvirtualcamera is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * akvirtualcamera is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with akvirtualcamera. If not, see .
+ *
+ * Web-Site: http://webcamoid.github.io/
+ */
+
+#include