From 7c72d26e46121d8a1a24a1122d16c0631bf8ac97 Mon Sep 17 00:00:00 2001 From: zii Date: Thu, 26 Jun 2025 12:06:41 -0400 Subject: [PATCH] v1.0 -initial commit -basic functions tested working --- .gitignore | 71 +++ LICENSE.md | 621 +++++++++++++++++++++++++ README.md | 193 ++++++++ build.py | 55 +++ client/JustMotion-Client.pro | 32 ++ client/build.py | 262 +++++++++++ client/icons/check.png | Bin 0 -> 15714 bytes client/icons/error.png | Bin 0 -> 50788 bytes client/icons/main.png | Bin 0 -> 13051 bytes client/icons/main.svg | 14 + client/img/no_mdeia.png | Bin 0 -> 29872 bytes client/install.py | 342 ++++++++++++++ client/res.qrc | 5 + client/src/common.cpp | 475 +++++++++++++++++++ client/src/common.h | 166 +++++++ client/src/host_dialog.cpp | 61 +++ client/src/host_dialog.h | 41 ++ client/src/main.cpp | 74 +++ client/src/main_widget.cpp | 252 ++++++++++ client/src/main_widget.h | 73 +++ client/src/playlist_widget.cpp | 214 +++++++++ client/src/playlist_widget.h | 88 ++++ client/src/recents.cpp | 69 +++ client/src/recents.h | 60 +++ client/templates/linux_icon.desktop | 10 + client/templates/linux_run_script.sh | 5 + client/templates/linux_uninstall.sh | 22 + install.py | 74 +++ server/JustVideo-Server.pro | 26 ++ server/build.py | 270 +++++++++++ server/install.py | 355 ++++++++++++++ server/src/camera.cpp | 143 ++++++ server/src/camera.h | 60 +++ server/src/common.cpp | 390 ++++++++++++++++ server/src/common.h | 99 ++++ server/src/detect_loop.cpp | 227 +++++++++ server/src/detect_loop.h | 57 +++ server/src/event_loop.cpp | 172 +++++++ server/src/event_loop.h | 43 ++ server/src/main.cpp | 129 +++++ server/src/proc_control.cpp | 108 +++++ server/src/proc_control.h | 51 ++ server/src/record_loop.cpp | 115 +++++ server/src/record_loop.h | 47 ++ server/templates/linux_run_script.sh | 5 + server/templates/linux_service.service | 15 + server/templates/linux_uninstall.sh | 9 + 47 files changed, 5600 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 README.md create mode 100755 build.py create mode 100644 client/JustMotion-Client.pro create mode 100755 client/build.py create mode 100644 client/icons/check.png create mode 100644 client/icons/error.png create mode 100644 client/icons/main.png create mode 100644 client/icons/main.svg create mode 100644 client/img/no_mdeia.png create mode 100755 client/install.py create mode 100644 client/res.qrc create mode 100644 client/src/common.cpp create mode 100644 client/src/common.h create mode 100644 client/src/host_dialog.cpp create mode 100644 client/src/host_dialog.h create mode 100644 client/src/main.cpp create mode 100644 client/src/main_widget.cpp create mode 100644 client/src/main_widget.h create mode 100644 client/src/playlist_widget.cpp create mode 100644 client/src/playlist_widget.h create mode 100644 client/src/recents.cpp create mode 100644 client/src/recents.h create mode 100644 client/templates/linux_icon.desktop create mode 100644 client/templates/linux_run_script.sh create mode 100644 client/templates/linux_uninstall.sh create mode 100755 install.py create mode 100644 server/JustVideo-Server.pro create mode 100644 server/build.py create mode 100644 server/install.py create mode 100644 server/src/camera.cpp create mode 100644 server/src/camera.h create mode 100644 server/src/common.cpp create mode 100644 server/src/common.h create mode 100644 server/src/detect_loop.cpp create mode 100644 server/src/detect_loop.h create mode 100644 server/src/event_loop.cpp create mode 100644 server/src/event_loop.h create mode 100644 server/src/main.cpp create mode 100644 server/src/proc_control.cpp create mode 100644 server/src/proc_control.h create mode 100644 server/src/record_loop.cpp create mode 100644 server/src/record_loop.h create mode 100644 server/templates/linux_run_script.sh create mode 100644 server/templates/linux_service.service create mode 100644 server/templates/linux_uninstall.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..406329d --- /dev/null +++ b/.gitignore @@ -0,0 +1,71 @@ +# C++ objects and libs +*.slo +*.lo +*.o +*.a +*.la +*.lai +*.so +*.dll +*.dylib + +# Qt-es +object_script.*.Release +object_script.*.Debug +*_plugin_import.cpp +/.qmake.cache +/.qmake.stash +/client/.qmake.cache +/server/.qmake.cache +/client/.qmake.stash +/server/.qmake.stash +*.pro.user +*.pro.user.* +*.qbs.user +*.qbs.user.* +*.moc +moc_*.cpp +moc_*.h +qrc_*.cpp +ui_*.h +*.qmlc +*.jsc +Makefile* +/client/Makefile* +/server/Makefile* +*build-* +/build +/client/build +/server/build +/app_dir +/client/app_dir +/client/app_dir +/server/app_dir +/server/app_dir +/installers +/release +/debug + +# Qt unit tests +target_wrapper.* + +# QtCreator +*.autosave + +# QtCreator Qml +*.qmlproject.user +*.qmlproject.user.* + +# QtCreator CMake +CMakeLists.txt.user* + +# QtCreator 4.8< compilation database +compile_commands.json + +# QtCreator local machine specific files for imported projects +*creator.user* + +# VSCode +/.vscode +/client/.vscode +/server/.vscode diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..f718b3e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,621 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + 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. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..27e9926 --- /dev/null +++ b/README.md @@ -0,0 +1,193 @@ +# JustMotion # + +JustMotion is a simple, lightweight video surveillance application utilizing +the server-client model that doesn't try to re-invent the wheel. The source +code for both server and client are available this repository and can be +compliled and/or installed separately. + +# JustMotion-Server # + +JustMotion-Server is the server portion of this appication that monitors the +video feeds of any IP or local cameras and records footage that contains +motion to permanent storage. The main advantage of this is reduced storage +requirements as opposed to continuous recording because only video footage +of interest is kept in storage. + +The server implements the principle of doing the least as needed, as a result +it extremely lightweight with the fact it doesn't attempt to re-implement much +of it's functions internally but will instead rely on external applications +that already implement the functions very well. + +It doesn't have a builtin user interface so instead external applications are +more than welcome to interface with the buffer/footage directories to +implement a user interface of any flavor. + +# JustMotion-Client # + +JustMotion-Client is the client portion of this application that actually +implement a user interface. Utilizing the same principle of doing the least as +needed, it uses an external video player to play m3u8 playlist files mounted +as an ssh filesystem to play live or recorded footage from the server. + +### Usage (server) ### + +``` +JustMotion 1.0 + +Usage: jmotion + +-h : display usage information about this application. +-d : all valid config files found in /etc/jmotion will be used to + create camera instances. (this is blocking, meant to run with systemd) +-v : display the current version. +-u : uninstall the entire server from your system, including the service. all + recorded footage and config files will remain. +-f : force an action without pausing for user confirmation. +-s : view the status of all camera instances. +-q : kill all camera instances. +-r : same as -d except it is non-blocking for starting all camera instances + via systemd. same as 'systemctl start jmotion' +``` + +### Config File (server) ### + +The config file is a simple text file that contain parameters that dictate the +behavior of the server for each camera located in the /etc/jmotion directory. +The config for each camera can have any unique name within that directory. +Below is an example of a config file with all parameters supported and +descriptions. +``` +# Motion Watch config file +# +# note all lines in this config file that starts with a '#' are ignored. +# also note to avoid using empty lines. if you're going to need an empty +# line, start it with a '#' +# +recording_uri = rtsp://1.2.3.4:554/h264 +# this is the uri to the main stream of the IP camera that will be used +# to record footage. it can be a url to an rtsp stream or a direct device +# path such as /dev/video0. +# +buffer_path = /tmp/jmotion +# this is the work directory the app will use to store live footage and +# image frames. it's recommended to use a ram disk for this since there +# will be large amounts of io occuring here. 1GB of space per camera is +# a good rule of thumb. +# +rec_path = /var/jmotion/footage +# this is video output directory that will be used to store any footage +# that contain any motion events. +# +live_secs = 160 +# this is the maximum amount of seconds worth of live footage to keep in +# buffer_path before deleting the oldest 3 seconds worth of footage. +# note: each video clip in buffer_path is typically 3 seconds long. +# +cam_name = cam-1 +# this is the optional camera name parameter to identify the camera. this +# name will also be used as the base directory in buffer_path and rec_path. +# if not defined, the name of the config file will be used. +# +max_events_bytes = 10G +# this is the maximum amount of disk space of video footage that can be +# recorded in the rec_path directory. +# +max_event_secs = 30 +# this is the maximum amount of secs of video footage that can be recorded +# in a motion event. +# +img_comp_cmd = compare -metric FUZZ &prev& &next& /dev/null +# this is the command line template this application will use when calling +# the external image comparison application. the external application is +# expected to compare snapshots from the video stream to determine how +# different the images are from each other. it needs to output a numeric +# score with the higher values meaning very different while low values +# mean similar images. the snapshots pulled from the stream will be bitmap +# formatted so the app will be required to support this format. also avoid +# outputting any special chars, only numeric chars with a single '.' if +# outputting a decimal value. magick is the default if not defined in the +# config file. the special string &prev& will be substituted with the path +# to the "previous" bitmap image, behind in time stamp to the image path +# subtituted in &next&. +# +img_comp_out = stderr +# this is the standard output stream the app defined in img_comp_cmd will +# use to output the comparison score. this can only be stderr or stdout, +# any other stream name is considered invalid. +# +vid_codec = copy +# this is the encoding codec to use when recording footage from the camera. +# the list of supported codecs entirely depend on the hosts' ffmpeg +# installation. run 'ffmpeg -codecs' to determine this list. if not +# defined, 'copy' will be used as in it will just copy the codec format +# from the camera itself without re-encoding. +# +aud_codec = copy +# this is the audio encoding codec to use when recording from the camera. +# the list of supported audio codes can be determined by running 'ffmpeg +# -codecs' on the host machine. if not defined, 'copy' will be used as in +# it will directly copy the audio stream from the camera if present. +# +stream_ext = .mkv +# this is the file extension that will be used to when recording footage +# from the camera in buffer_path. ffmpeg will also use this to determine +# what format container to use for the video clips. +# +thumbnail_ext = .jpg +# this the image format that will be used when creating the thumbnails +# for the videos clips recorded to rec_path. +# +rec_ext = .mkv +# this the the file extension that will be used when storing motion footage +# to rec_path. ffmpeg will also use this to determine what format container +# to use for the video clips. +# +img_thresh = 8000 +# this parameter defines the score threshold from img_comp_cmd that will +# be considered motion. any motion events will queue up max_event_secs +# worth of video clips to be written out to rec_path. +# +post_secs = 60 +# this is the amount of seconds to wait before running the command +# defined in post_cmd. the command will not run if motion was detected +# in the space before post_secs elapsed. +# +post_cmd = move_the_ptz_camera.py +# this an optional command to run with post_secs. one great use for this +# is to move a ptz camera to the next position of it's patrol pattern. +# note: the call to this command will be delayed if motion was detected. +# also, motion detection is paused while this command is running. +# +rec_fps = 30 +# this sets the recording frames per second for the footage recorded +# from the camera. this has no affect if using 'copy' as the vid_codec. +# +rec_scale = 1280:720 +# this sets the pixel scale of the recorded footage from the camera. it +# uses width, height numeric strings seperated by a colon, eg W:H. this +# has no affect of using 'copy' as the vid_codec. +# +img_scale = 320:240 +# this sets the pixel size of the thumbnails for recorded stored in +# rec_path. it uses width, height numeric strings seperated by a colon, +# eg W:H. +# +``` + +### Build/Install ### + +This application is currently only compatible with a Linux based operating +systems that are capable of installing python3 and the QT API (QT6.X.X or +better). + +``` +./build.py <--run this first +./install.py <--run this next +``` +``` +note 1: the build script will search for the QT api installed in your + system. if not found, it will ask you where it is. either way + it is recommended to install the QT API before running this + script. +note 2: both scripts assume python3 is already installed. +``` diff --git a/build.py b/build.py new file mode 100755 index 0000000..15d433b --- /dev/null +++ b/build.py @@ -0,0 +1,55 @@ +#!/usr/bin/python3 + +import os +import subprocess + +def cd(): + current_dir = os.path.dirname(__file__) + + if current_dir != "": + os.chdir(current_dir) + +def main(): + cd() + opt = "" + + while opt == "": + print("--Welcome to the build script for JustMotion--") + print("Before we begin it is highly recommended that you install the QT API from the online installer.") + print("The QT API from various linux package managers are often too old to build this app.") + print("Version 6.9+ is recommended.\n") + print("What would you like to build?") + print("[1] Server Only") + print("[2] Client Only") + print("[3] Both") + print("[4] Quit\n") + + opt = input("[1-4]: ") + + if opt == "1": + os.chdir("server") + subprocess.run(["python3", "build.py"]) + break + + elif opt == "2": + os.chdir("client") + subprocess.run(["python3", "build.py"]) + break + + elif opt == "3": + os.chdir("server") + subprocess.run(["python3", "build.py"]) + os.chdir("../client") + subprocess.run(["python3", "build.py"]) + break + + elif opt == "4": + break + + else: + print("err: invalid option\n") + opt = "" + cd() + +if __name__ == "__main__": + main() diff --git a/client/JustMotion-Client.pro b/client/JustMotion-Client.pro new file mode 100644 index 0000000..5c9276d --- /dev/null +++ b/client/JustMotion-Client.pro @@ -0,0 +1,32 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +TARGET = build/jmotion-client +OBJECTS_DIR = build +MOC_DIR = build +RCC_DIR = build + +SOURCES += \ + src/host_dialog.cpp \ + src/main.cpp \ + src/common.cpp \ + src/main_widget.cpp \ + src/playlist_widget.cpp \ + src/recents.cpp + +HEADERS += \ + src/common.h \ + src/host_dialog.h \ + src/main_widget.h \ + src/playlist_widget.h \ + src/recents.h + +RESOURCES += \ + res.qrc diff --git a/client/build.py b/client/build.py new file mode 100755 index 0000000..fc43636 --- /dev/null +++ b/client/build.py @@ -0,0 +1,262 @@ +#!/usr/bin/python3 + +import os +import re +import subprocess +import shutil +import sys +import platform + +def get_app_target(text): + return re.search(r'(APP_TARGET) +(\"(.*?)\")', text).group(3) + +def get_app_ver(text): + return re.search(r'(APP_VERSION) +(\"(.*?)\")', text).group(3) + +def get_app_name(text): + return re.search(r'(APP_NAME) +(\"(.*?)\")', text).group(3) + +def get_qt_path(): + try: + return str(subprocess.check_output(["qtpaths6", "--binaries-dir"]), 'utf-8').strip() + + except: + print("A direct call to 'qtpaths6' has failed so automatic retrieval of the QT bin folder is not possible.") + + return input("Please enter the QT bin path (leave blank to cancel the build): ") + +def get_qt_from_cli(): + for arg in sys.argv: + if arg == "-qt_dir": + index = sys.argv.index(arg) + + try: + return sys.argv[index + 1] + + except: + return "" + + return "" + +def get_ver_header(): + current_dir = os.path.dirname(__file__) + + if current_dir == "": + return "src" + os.sep + "common.h" + else: + return current_dir + os.sep + "src" + os.sep + "common.h" + +def get_nearest_subdir(path, sub_name): + dir_list = os.listdir(path) + ret = "" + + for entry in dir_list: + if sub_name in entry: + ret = entry + + break + + return ret + +def cd(): + current_dir = os.path.dirname(__file__) + + if current_dir != "": + os.chdir(current_dir) + +def verbose_copy(src, dst): + print("cpy: " + src + " --> " + dst) + + if os.path.isdir(src): + if os.path.exists(dst) and os.path.isdir(dst): + shutil.rmtree(dst) + + try: + # ignore errors thrown by shutil.copytree() + # it's likely not actually failing to copy + # the directory but still throws errors if + # it fails to apply the same file stats as + # the source. this type of error can be + # ignored. + shutil.copytree(src, dst) + + except: + pass + + elif os.path.exists(src): + shutil.copyfile(src, dst) + + else: + print("wrn: " + src + " does not exists. skipping.") + +def linux_build_app_dir(app_ver, app_name, app_target, qt_bin): + if not os.path.exists("app_dir/platforms"): + os.makedirs("app_dir/platforms") + + if not os.path.exists("app_dir/xcbglintegrations"): + os.makedirs("app_dir/xcbglintegrations") + + if not os.path.exists("app_dir/multimedia"): + os.makedirs("app_dir/multimedia") + + if not os.path.exists("app_dir/platformthemes"): + os.makedirs("app_dir/platformthemes") + + if not os.path.exists("app_dir/lib"): + os.makedirs("app_dir/lib") + + if not os.path.exists("app_dir/icons"): + os.makedirs("app_dir/icons") + + verbose_copy(qt_bin + "/../plugins/platforms", "app_dir/platforms") + verbose_copy(qt_bin + "/../plugins/xcbglintegrations", "app_dir/xcbglintegrations") + verbose_copy(qt_bin + "/../plugins/multimedia", "app_dir/multimedia") + verbose_copy(qt_bin + "/../plugins/platformthemes", "app_dir/platformthemes") + verbose_copy("build/" + app_target, "app_dir/" + app_target) + verbose_copy("icons/main.svg", "app_dir/icons/scalable.svg") + + img_sizes = [8, 16, 22, 24, 28, 32, 36, 42, 48, 64, 72, 96, 128, 192, 256, 512, 1024] + + for i in img_sizes: + subprocess.run(["inkscape", "-w", str(i), "-h", str(i), "icons/main.svg", "-o", "app_dir/icons/" + str(i) + ".png"]) + + shutil.copyfile("build/" + app_target, "/tmp/" + app_target) + # copying the executable file from the build folder to + # temp bypasses any -noexe retrictions a linux file + # system may have. there is a chance temp is also + # restricted in this way but that kind of config is + # rare. ldd will not run correctly with -noexe + # enabled. + + lines = str(subprocess.check_output(["ldd", "/tmp/" + app_target]), 'utf-8').split("\n") + + os.remove("/tmp/" + app_target) + + for line in lines: + if " => " in line and "libc" not in line: + #if ("libQt" in line) or ("libicu" in line) or ("libGL.so" in line) or ("libpcre16.so" in line) or ("libpcre.so" in line): + if " (0x0" in line: + start_index = line.index("> ") + 2 + end_index = line.index(" (0x0") + src_file = line[start_index:end_index] + file_name = os.path.basename(src_file) + + verbose_copy(src_file, "app_dir/lib/" + file_name) + + if "/usr/lib/x86_64-linux-gnu/qt6/bin" == qt_bin: + verbose_copy(qt_bin + "/../../libQt6DBus.so.6", "app_dir/lib/libQt6DBus.so.6") + verbose_copy(qt_bin + "/../../libQt6XcbQpa.so.6", "app_dir/lib/libQt6XcbQpa.so.6") + + else: + verbose_copy(qt_bin + "/../lib/libQt6DBus.so.6", "app_dir/lib/libQt6DBus.so.6") + verbose_copy(qt_bin + "/../lib/libQt6XcbQpa.so.6", "app_dir/lib/libQt6XcbQpa.so.6") + verbose_copy(qt_bin + "/../lib/libQt6OpenGL.so.6", "app_dir/lib/libQt6OpenGL.so.6") + + verbose_copy("templates/linux_run_script.sh", "app_dir/" + app_target + ".sh") + verbose_copy("templates/linux_uninstall.sh", "app_dir/uninstall.sh") + verbose_copy("templates/linux_icon.desktop", "app_dir/" + app_target + ".desktop") + + complete(app_ver, app_target) + +def complete(app_ver, app_target): + print("Build complete for version: " + app_ver) + print("You can now run the install.py script to install onto this machine or create an installer.") + +def get_like_distro(): + info = platform.freedesktop_os_release() + ids = [info["ID"]] + + if "ID_LIKE" in info: + # ids are space separated and ordered by precedence + ids.extend(info["ID_LIKE"].split()) + + return ids + +def list_installed_packages(): + like_distro = get_like_distro() + + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + return str(subprocess.check_output(["apt", "list", "--installed"]), 'utf-8') + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + return str(subprocess.check_output(["dnf", "list", "installed"]), 'utf-8') + + elif ("arch" in like_distro): + return str(subprocess.check_output(["pacman", "-Q"]), 'utf-8') + + else: + print("Warning: unable to determine a package manager for this platform.") + + return [] + + +def list_of_words_in_text(list_of_words, text_body): + for word in list_of_words: + if not word in text_body: + return False + + return True + +def platform_setup(): + ins_packages = list_installed_packages() + like_distro = get_like_distro() + dep_pkgs_a = ["pkg-config"] + dep_pkgs_b = ["ffmpeg", "libavcodec-dev", "libavformat-dev", "libavfilter-dev", "libavdevice-dev", "libilmbase-dev", "libvdpau-dev", "libxkbcommon-dev", "libgl-dev", "libxcb-cursor0", "inkscape"] + + if not list_of_words_in_text(dep_pkgs_a, ins_packages) or not list_of_words_in_text(dep_pkgs_b, ins_packages): + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + subprocess.run(["sudo", "apt", "update", "-y"]) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_b) + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_b) + + elif ("arch" in like_distro): + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_a) + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_b) + +def main(): + platform_setup() + + with open(get_ver_header()) as file: + text = file.read() + + app_target = get_app_target(text) + app_ver = get_app_ver(text) + app_name = get_app_name(text) + qt_bin = get_qt_from_cli() + + if qt_bin == "": + qt_bin = get_qt_path() + + if qt_bin != "": + print("app_target = " + app_target) + print("app_version = " + app_ver) + print("app_name = " + app_name) + print("qt_bin = " + qt_bin) + + cd() + + result = subprocess.run([qt_bin + os.sep + "qmake", "-config", "release"]) + + if result.returncode == 0: + result = subprocess.run(["make"]) + + if result.returncode == 0: + if os.path.exists("app_dir"): + shutil.rmtree("app_dir") + + os.makedirs("app_dir") + + with open("app_dir" + os.sep + "info.txt", "w") as info_file: + info_file.write(app_target + "\n") + info_file.write(app_ver + "\n") + info_file.write(app_name + "\n") + + linux_build_app_dir(app_ver, app_name, app_target, qt_bin) + + +if __name__ == "__main__": + main() diff --git a/client/icons/check.png b/client/icons/check.png new file mode 100644 index 0000000000000000000000000000000000000000..0146337b81c61c58c096ae68137842810ff172e8 GIT binary patch literal 15714 zcmZX5cRbba`~Q8+B9yF>QARc?5y_E?V`T4LMzVKV=kzHQWgHHYif=kf4Rulx17@9Vzybzjf>jmASo8mfy_000`4(mgEzNZ>z7z$ps&XZzW} z0sKSeeix;43jX+=vU&~wf7(UK&>aBk^Tb~Si2uj}A71ddZ{VTrY~$f=>1GYQy}d>3 zob25nTe?__IJ?;=IhW1qJ;CZ})+|z8 z;r#r&<9{Y!LTdz`HQ_>!OuS6J$4$EzeVUt1xrKE#ne@hmClKWFBjw%y(z|EULY7>RI5@Sx+C(|` z!1`0JQn0{o9M-1#P}T5;_GX-T_YM8hG~ViX>-Z~nK~}fgZSPn|k)vqT_e(8N%~uJL zD-mC~v-Jxu#~tv{RArkNuwhpsT4lN%g3}ZkhiRKfF3meE1sSRtd(=ngZmf|atqm3c zGNzkw)H6(@P`z)n@grnq;g>@_f6`hBms)(LEFmFx<~Xk=EgxIaR%W9~vLP*L92@GsG$d+2#(kZR?W~d@70|e>=$}D&9rTfdwU#MizZlD;;!}|p z)A$4Xv@dN(Bwu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qRJAy+0WoUOR|8E%RNKY6tgHo{?W77iPdJj}5v2iB+ zz*=Niu~WqaZtdzW52m<5IteI+5vz-X7>&oj7?1f9%LECxWa^3PPk0Tlv?3p2jD)nJy`|q2J47~ zSOQ(DjKQVp8PXi^tfscaJa2(GP@A*AEdoI{9|4w$W&aI@a4UcK%GZDT95LnST~H^t zgwdr(ABMzbYs1$tVx)6ALQ{(I{?J&l+~n<8&gc0Gj1m37F{pr-3|Sx~JxIq9>*HVp zEm3BJbO5C4?f|2pbcSdIF^6fb1Epo$xu;>wF5#K?ldHyF z`;8GA^s*3>X^>9N!U^8htE>H->G6)7{11J|(0;U8X=^z%)cq9pL+)Z$Kx6|X9RHwp zX`a09I;(t0vEN8ZnRh2jkg3xa}1T;TLkF9Fr!SMQbml`H_ERyuJQG z?_Mvd$~=U!}xCU#QX z^V4J z?U;FQKej<3s`rKRXl z)HL1EIQ%yb_C5Icg6R;P1a9?!l?0DJF|mW&U{d*wat1Q(DyS zep^mNv(k;nmb>82jm$0#HX2|y-%h`sq_wv`JbcCFs9xLPQ|kK|@5lwd<=oZq8N206 zhXbUici^PzLW&RMzXeAG9T7I|a&^%3+>L9Gtk LnpGb1y83?rQrjq= literal 0 HcmV?d00001 diff --git a/client/icons/main.png b/client/icons/main.png new file mode 100644 index 0000000000000000000000000000000000000000..fe7e89710dc693fa5e3e19fd74be22a9e21b0671 GIT binary patch literal 13051 zcmeHt2{e>#|G$Lf$rdFc^H7#F#x{(7ElEPjR%nc&i7~^BeQPYq5M5?u75;shKY%6lxDE{wc&3wcb$zSY!n319A~(;fBu62Cok`(0rq2T* z--oH%wU5u@jR?gzX8dweZd||0|J`?G;Zk6omZ<(>eZtaY0eMT|i^xV?ybxTY{zPEL zm+hp|%=%LnOQSg<4R5J_StCLk0@W(fvj#4uez1OOgro1sU1I9BHMZa0a!Z!jmYBjM zkFE_|q-N1*H6N!>JX;gPh2+Ir<&|7IAp62s*-pM?%jxU(4Yxp{jDsEm8PnCPfw>EB z7h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ztE_J_+x2k*x6`9QcbF^N)uS>t&QY z@8Hc?46HwRJki|S{i>fsRg-`~Wy(C`619oFY*E15K43tz@ZD0G=$_Ty@y3-CkdSeY zZdS#zGYm{I`*t&J8r87u-+V!c82>_hb_<2-IyCM0r6%Tddm5-_Q4ve~#&^_}3(_{l-aVvuO3iWEzkfNTc)hh7 z%8k;}=u=<*36@}<#=3t;9C011448~IboQ*t4)JNxRXOB6J)O2MJ;>v7A3U}0EV|;` zk6YH35(e6M>LQbN~ z=i#D~2X}>xx;LY#b8w9^k3V9jGeQ<03$1<_E*njv9g8Fg%%{XMN}!ZSinp>-D0Ziv zy0S#wSrH}FKUViof14PQNUr~)*j2RU6g8daBA=hikW%cR)SfkqjfGE9QIg~+_NuXh zxwx^mtXV4EsV|p01O9bmqQX^+Qnnay`0ZHiIk3uFd8GvOP0Q@o3<1h@mq<_X&KD0N zW%Cw*s-+z&Fd^Xlgnkbazy@uHVf*YZ)2p9^j~OBRq|Sp6KV+rXDEXNBWwpJm8F;yV jrY-C(!E-|U`!9a57*qCpZ(6|rPBc1w!Jt6zTIl}(p#AsC literal 0 HcmV?d00001 diff --git a/client/icons/main.svg b/client/icons/main.svg new file mode 100644 index 0000000..c272a35 --- /dev/null +++ b/client/icons/main.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/client/img/no_mdeia.png b/client/img/no_mdeia.png new file mode 100644 index 0000000000000000000000000000000000000000..475751466ae15a594805e824d7e5a2010ac05e1b GIT binary patch literal 29872 zcmeIbcR1Jo-#+}3(x5brN~Dapog`#b%8W#2LT0iu%hpmT%8ZOM3z=oFie!{hl*|ZO z30Yb9`SSUGuIu{!?&JRNcl?g~k6g!f^=Wv&->>KMG0yXRoDY|unyUQzb=%hw1hHOG z;g~u>to9*@m11jX@Fzb$zK|sds%w_AvTBO5vTPR}?945#%?N_~p65L&g;$4nRvDgo z&cn|#%+`JPk%aEXZT6pdwmv%gc$=QHP~mUdD3QGsfxxR)FJ1&yrCtlj&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index 0000000..0360bf0 --- /dev/null +++ b/client/install.py @@ -0,0 +1,342 @@ +#!/usr/bin/python3 + +import os +import subprocess +import shutil +import platform +import sys +import zipfile +import binascii +import tempfile + +def cd(): + current_dir = os.path.dirname(__file__) + + if current_dir != "": + os.chdir(current_dir) + +def get_default_installer_path(app_ver, app_name): + if not os.path.exists("../installers"): + os.makedirs("../installers") + + return "../installers/" + app_name + "-" + app_ver + "-" + platform.system() + "-" + platform.machine() + ".run" + +def make_install_dir(path): + try: + if not os.path.exists(path): + os.makedirs(path) + + return True + + except: + print("Failed to create the install directory, please make sure you are runnning this script with admin rights.") + + return False + +def replace_bin(binary, old_bin, new_bin, offs): + while(True): + try: + index = binary.index(old_bin, offs) + binary = binary[:index] + new_bin + binary[index + len(old_bin):] + + except ValueError: + break + + return binary + +def bin_sub_copy_file(src, dst, old_bin, new_bin, offs): + binary = bytearray() + + with open(src, "rb") as rd_file: + binary = rd_file.read() + binary = replace_bin(binary, old_bin, new_bin, offs) + + with open(dst, "wb") as wr_file: + wr_file.write(binary) + +def text_sub_copy_file(src, dst, old_text, new_text, offs): + bin_sub_copy_file(src, dst, old_text.encode("utf-8"), new_text.encode("utf-8"), offs) + +def text_template_deploy(src, dst, install_dir, app_name, app_target): + print("dep: " + dst) + + text_sub_copy_file(src, dst, "$install_dir", install_dir, 0) + text_sub_copy_file(dst, dst, "$app_name", app_name, 0) + text_sub_copy_file(dst, dst, "$app_target", app_target, 0) + +def verbose_copy(src, dst): + print("cpy: " + src + " --> " + dst) + + if os.path.isdir(src): + files = os.listdir(src) + + if not os.path.exists(dst): + os.makedirs(dst) + + for file in files: + tree_src = src + os.path.sep + file + tree_dst = dst + os.path.sep + file + + if os.path.isdir(tree_src): + if not os.path.exists(tree_dst): + os.makedirs(tree_dst) + + verbose_copy(tree_src, tree_dst) + + else: + shutil.copyfile(src, dst) + +def verbose_create_symmlink(src, dst): + print("lnk: " + src + " --> " + dst) + + if os.path.exists(dst): + os.remove(dst) + + os.symlink(src, dst) + +def local_install(app_target, app_name): + install_dir = "/opt/" + app_target + + if os.path.exists(install_dir + "/uninstall.sh"): + subprocess.run([install_dir + "/uninstall.sh"]) + + if make_install_dir(install_dir): + text_template_deploy("app_dir/" + app_target + ".sh", install_dir + "/" + app_target + ".sh", install_dir, app_name, app_target) + text_template_deploy("app_dir/uninstall.sh", install_dir + "/uninstall.sh", install_dir, app_name, app_target) + text_template_deploy("app_dir/" + app_target + ".desktop", "/usr/share/applications/" + app_target + ".desktop", install_dir, app_name, app_target) + + img_sizes = [8, 16, 22, 24, 28, 32, 36, 42, 48, 64, 72, 96, 128, 192, 256, 512, 1024] + + for i in img_sizes: + dst_img = "/usr/share/icons/hicolor/" + str(i) + "x" + str(i) + "/apps/jmc.png" + + verbose_copy("app_dir/icons/" + str(i) + ".png", dst_img) + + subprocess.run(["chmod", "644", dst_img]) + + verbose_copy("app_dir/icons/scalable.svg", "/usr/share/icons/hicolor/scalable/apps/jmc.svg") + verbose_copy("app_dir/" + app_target, install_dir + "/" + app_target) + verbose_copy("app_dir/lib", install_dir + "/lib") + verbose_copy("app_dir/platforms", install_dir + "/platforms") + verbose_copy("app_dir/xcbglintegrations", install_dir + "/xcbglintegrations") + verbose_copy("app_dir/multimedia", install_dir + "/multimedia") + verbose_copy("app_dir/platformthemes", install_dir + "/platformthemes") + + verbose_create_symmlink(install_dir + "/" + app_target + ".sh", "/usr/bin/" + app_target) + + subprocess.run(["chmod", "644", "/usr/share/icons/hicolor/scalable/apps/jmc.svg"]) + subprocess.run(["chmod", "755", install_dir + "/" + app_target + ".sh"]) + subprocess.run(["chmod", "755", install_dir + "/" + app_target]) + subprocess.run(["chmod", "755", install_dir + "/uninstall.sh"]) + + print("Installation finished. If you ever need to uninstall this application, run this command with root rights:") + print(" sh " + install_dir + "/uninstall.sh\n") + +def dir_tree(path): + ret = [] + + if os.path.isdir(path): + for entry in os.listdir(path): + full_path = os.path.join(path, entry) + + if os.path.isdir(full_path): + for sub_dir_file in dir_tree(full_path): + ret.append(sub_dir_file) + + else: + ret.append(full_path) + + return ret + +def to_hex(data): + return str(binascii.hexlify(data))[2:-1] + +def from_hex(text_line): + return binascii.unhexlify(text_line) + +def make_install(app_ver, app_name): + path = get_default_installer_path(app_ver, app_name) + + with zipfile.ZipFile("app_dir.zip", "w", compression=zipfile.ZIP_DEFLATED) as zip_file: + print("Compressing app_dir --") + + for file in dir_tree("app_dir"): + print("adding file: " + file) + zip_file.write(file) + + text_sub_copy_file(__file__, path, "main(is_sfx=False)", "main(is_sfx=True)\n\n\n", 10728) + + with open(path, "a") as dst_file, open("app_dir.zip", "rb") as src_file: + print("Packing the compressed app_dir into the sfx script file --") + + dst_file.write("# APP_DIR\n") + + stat = os.stat("app_dir.zip") + + while(True): + buffer = src_file.read(4000000) + + if len(buffer) != 0: + dst_file.write("# " + to_hex(buffer) + "\n") + + print(str(src_file.tell()) + "/" + str(stat.st_size)) + + if len(buffer) < 4000000: + break + + os.remove("app_dir.zip") + + subprocess.run(["chmod", "+x", path]) + + print("Finished packing the app.") + print("Installer: " + path) + +def sfx(): + abs_sfx_path = os.path.abspath(__file__) + mark_found = False + + os.chdir(tempfile.gettempdir()) + + with open(abs_sfx_path) as packed_file, open("app_dir.zip", "wb") as zip_file: + stat = os.stat(abs_sfx_path) + + print("Unpacking the app_dir compressed file from the sfx script.") + + while(True): + line = packed_file.readline() + + if not line: + break + + elif mark_found: + zip_file.write(from_hex(line[2:-1])) + + print(str(packed_file.tell()) + "/" + str(stat.st_size)) + + else: + if line == "# APP_DIR\n": + mark_found = True + + print("Done.") + + if not mark_found: + print("The app_dir mark was not found, unable to continue.") + + else: + with zipfile.ZipFile("app_dir.zip", "r", compression=zipfile.ZIP_DEFLATED) as zip_file: + print("De-compressing app_dir --") + + zip_file.extractall() + + print("Preparing for installation.") + + os.remove("app_dir.zip") + + with open("app_dir" + os.sep + "info.txt") as info_file: + info = info_file.read().split("\n") + + local_install(info[0], info[2]) + shutil.rmtree("app_dir") + +def get_like_distro(): + info = platform.freedesktop_os_release() + ids = [info["ID"]] + + if "ID_LIKE" in info: + # ids are space separated and ordered by precedence + ids.extend(info["ID_LIKE"].split()) + + return ids + +def list_installed_packages(): + like_distro = get_like_distro() + + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + return str(subprocess.check_output(["apt", "list", "--installed"]), 'utf-8') + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + return str(subprocess.check_output(["dnf", "list", "installed"]), 'utf-8') + + elif ("arch" in like_distro): + return str(subprocess.check_output(["pacman", "-Q"]), 'utf-8') + + else: + print("Warning: unable to determine a package manager for this platform.") + + return [] + + +def list_of_words_in_text(list_of_words, text_body): + for word in list_of_words: + if not word in text_body: + return False + + return True + +def platform_setup(): + ins_packages = list_installed_packages() + like_distro = get_like_distro() + dep_pkgs_a = ["pkg-config"] + dep_pkgs_b = ["ffmpeg", "libavcodec-dev", "libavformat-dev", "libavfilter-dev", "libavdevice-dev", "libilmbase-dev", "libvdpau-dev", "libxkbcommon-dev", "libgl-dev", "libxcb-cursor0"] + + if not list_of_words_in_text(dep_pkgs_a, ins_packages) or not list_of_words_in_text(dep_pkgs_b, ins_packages): + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + subprocess.run(["sudo", "apt", "update", "-y"]) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_b) + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_b) + + elif ("arch" in like_distro): + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_a) + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_b) + +def main(is_sfx): + cd() + + app_target = "" + app_ver = "" + app_name = "" + + if not is_sfx: + with open("app_dir" + os.sep + "info.txt") as info_file: + info = info_file.read().split("\n") + + app_target = info[0] + app_ver = info[1] + app_name = info[2] + + if is_sfx: + sfx() + + elif "--local" in sys.argv: + platform_setup() + local_install(app_target, app_name) + + elif "--installer" in sys.argv: + make_install(app_ver, app_name) + + else: + print("Do you want to install onto this machine or create an installer?") + print("[1] local machine") + print("[2] create installer") + print("[3] exit") + + while(True): + opt = input("select an option: ") + + if opt == "1": + subprocess.run(["sudo", "python3", "install.py", "--local"]) + break + + elif opt == "2": + subprocess.run(["python3", "install.py", "--installer"]) + break + + elif opt == "3": + break + +if __name__ == "__main__": + main(is_sfx=False) diff --git a/client/res.qrc b/client/res.qrc new file mode 100644 index 0000000..a13421f --- /dev/null +++ b/client/res.qrc @@ -0,0 +1,5 @@ + + + img/no_mdeia.png + + diff --git a/client/src/common.cpp b/client/src/common.cpp new file mode 100644 index 0000000..044ee91 --- /dev/null +++ b/client/src/common.cpp @@ -0,0 +1,475 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +QString randPickItem(const QStringList &list) +{ + if (!list.isEmpty()) + { + if (list.size() == 1) + { + return list[0]; + } + else + { + return list[QRandomGenerator().bounded(0, list.size() - 1)]; + } + } + + return QString(); +} + +void elasticWid(QWidget *wid) +{ + wid->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + wid->setContentsMargins(0,0,0,0); +} + +void elasticWidLimitH(QWidget *wid) +{ + wid->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + wid->setContentsMargins(0,0,0,0); +} + +QStringList lsFiles(const QString &path, const QStringList &filters) +{ + QDir dirObj(path); + + dirObj.setFilter(QDir::Files); + dirObj.setSorting(QDir::Name); + + if (!filters.isEmpty()) + { + dirObj.setNameFilters(filters); + } + + return dirObj.entryList(); +} + +QStringList lsFiles(const QString &path) +{ + return lsFiles(path, QStringList()); +} + +QStringList lsVidFiles(const QString &path) +{ + QStringList filters; + + filters << "*.mp4"; filters << "*.ts"; filters << "*.mov"; filters << "*.avi"; + filters << "*.wmv"; filters << "*.flv"; filters << "*.webm"; filters << "*.avchd"; + filters << "*.mkv"; + + return lsFiles(path, filters); +} + +QStringList lsImgFiles(const QString &path) +{ + QStringList filters; + + filters << "*.bmp"; filters << "*.jpeg"; filters << "*.jpg"; filters << "*.gif"; + filters << "*.png"; + + return lsFiles(path, filters); +} + +QStringList lsConfFiles(const QString &path) +{ + QStringList filters; + + filters << "*.conf"; + + return lsFiles(path, filters); +} + +QStringList lsDirsInDir(const QString &path) +{ + QDir dirObj(path); + + dirObj.setFilter(QDir::Dirs | QDir::NoDotAndDotDot); + dirObj.setSorting(QDir::Name); + + return dirObj.entryList(); +} + +void rdLine(const QString ¶m, const QString &line, QString *value) +{ + if (line.startsWith(param)) + { + *value = line.mid(param.size()).trimmed(); + } +} + +void rdLine(const QString ¶m, const QString &line, int *value) +{ + if (line.startsWith(param)) + { + *value = line.mid(param.size()).trimmed().toInt(); + } +} + +void rdLine(const QString ¶m, const QString &line, bool *value) +{ + if (line.startsWith(param)) + { + auto val = line.mid(param.size()).trimmed(); + + *value = (val == "y" || val == "Y"); + } +} + +bool delFolderContents(const QString &path) +{ + auto ret = false; + auto files = lsFiles(path); + auto dirs = lsDirsInDir(path); + + for (auto &&file: files) + { + ret = QFile::remove(path + QDir::separator() + file); + } + + for (auto &&dir: dirs) + { + ret = QDir(dir).removeRecursively(); + } + + return ret; +} + +void extCorrection(QString &ext) +{ + if (!ext.startsWith(".")) + { + ext = "." + ext; + } +} + +bool mkPath(const QString &path) +{ + auto ret = true; + + if (!QFileInfo::exists(path)) + { + ret = QDir(path).mkpath(path); + } + + return ret; +} + +void resetSharedRes(shared_t *share) +{ + share->camName.clear(); + share->buffPath.clear(); + share->recPath.clear(); + share->playPath.clear(); + + share->conf = share->appConfPath; +} + +bool runCmd(const QStringList &args, QWidget *parent) +{ + auto ret = true; + + if (!args.isEmpty()) + { + if (QProcess::execute(args[0], args.mid(1)) != 0) + { + QMessageBox::critical(parent, QObject::tr("Exec Error"), QObject::tr("Command: ") + args.join(' ') + QObject::tr(" returned non-zero. See Help > Logs for details")); + + ret = false; + } + } + + return ret; +} + +bool rdConf(const QString &filePath, shared_t *share) +{ + QFile varFile(filePath); + + if (!varFile.open(QFile::ReadOnly)) + { + share->retCode = ENOENT; + + QTextStream(stderr) << "err: config file - " << filePath << " does not exists or lack read permissions." << Qt::endl; + } + else + { + resetSharedRes(share); + + share->conf = filePath; + + QString line; + + do + { + line = QString::fromUtf8(varFile.readLine()); + + if (!line.startsWith("#")) + { + rdLine("host_addr = ", line, &share->hostAddr); + rdLine("host_port = ", line, &share->hostPort); + rdLine("host_key = ", line, &share->hostKey); + rdLine("host_user = ", line, &share->hostUser); + rdLine("cam_name = ", line, &share->camName); + rdLine("buffer_path = ", line, &share->buffPath); + rdLine("rec_path = ", line, &share->recPath); + rdLine("play_path = ", line, &share->playPath); + rdLine("winrect_w = ", line, &share->windowW); + rdLine("winrect_h = ", line, &share->windowH); + rdLine("winrect_x = ", line, &share->windowX); + rdLine("winrect_y = ", line, &share->windowY); + rdLine("player_cmd = ", line, &share->playerCmd); + } + + } while(!line.isEmpty()); + + if (share->camName.isEmpty()) + { + share->camName = QFileInfo(share->conf).baseName(); + } + + if (share->buffPath.isEmpty()) + { + share->buffPath = "/tmp/jmotion/" + share->camName; + } + else + { + share->buffPath = QDir::cleanPath(share->buffPath); + } + + if (share->recPath.isEmpty()) + { + share->recPath = "/var/jmotion/footage/" + share->camName; + } + else + { + share->recPath = QDir::cleanPath(share->recPath); + } + } + + return share->retCode == 0; +} + +void wrConf(const QString &filePath, shared_t *share) +{ + QFile file(filePath); + QString txt; + QTextStream ts(&txt); + + if (file.open(QFile::WriteOnly)) + { + if (filePath == share->appConfPath) + { + ts << "winrect_w = " << share->windowW << Qt::endl; + ts << "winrect_h = " << share->windowH << Qt::endl; + ts << "winrect_x = " << share->windowX << Qt::endl; + ts << "winrect_y = " << share->windowY << Qt::endl; + ts << "player_cmd = " << share->playerCmd << Qt::endl; + } + else + { + ts << "host_addr = " << share->hostAddr << Qt::endl; + ts << "host_port = " << share->hostPort << Qt::endl; + ts << "host_key = " << share->hostKey << Qt::endl; + ts << "host_user = " << share->hostUser << Qt::endl; + } + + file.write(txt.toUtf8()); + } + + file.close(); +} + +void createOrUpdateRecent(shared_t *share) +{ + if (share->conf == share->appConfPath) + { + QCryptographicHash hasher(QCryptographicHash::Md5); + + hasher.addData(share->playPath.toUtf8()); + + wrConf(share->recentsPath + QDir::separator() + hasher.result().toHex() + ".conf", share); + } + else + { + wrConf(share->conf, share); + } +} + +void buildGrid(QGridLayout *mainLayout, int parentWidth, const QList &widList, QList &spcList, int cellWidth, QWidget *parentWid) +{ + auto columns = 0; + + if (widList.size() == 1) + { + columns = 1; + } + else + { + columns = parentWidth / cellWidth; + } + + for (auto &&wid : widList) + { + mainLayout->removeWidget(wid); + } + + for (auto &&wid : spcList) + { + mainLayout->removeWidget(wid); + + wid->deleteLater(); + } + + spcList.clear(); + + auto rows = 0; + + if (columns != 0) + { + for (auto row = 0, i = 0; i < widList.size(); ++row, ++rows) + { + for (auto col = 0; (col < columns) && (i < widList.size()); ++col, ++i) + { + mainLayout->addWidget(widList[i], row, col); + } + + auto spacer = new QWidget(mainLayout->widget()); + + elasticWid(spacer); + + mainLayout->addWidget(spacer, row, columns); + + spcList.append(spacer); + } + } + else + { + qInfo() << "buildGrid() << calculated a zero column grid. This may cause a blank layout."; + } + + parentWid->setFixedHeight((rows * THUMB_H) + 10); +} + +QStringList parseArgs(const QByteArray &data, int maxArgs, int *pos) +{ + QStringList ret; + QString arg; + + auto line = QString::fromUtf8(data); + auto inDQuotes = false; + auto inSQuotes = false; + auto escaped = false; + + if (pos != nullptr) *pos = 0; + + for (int i = 0; i < line.size(); ++i) + { + if (pos != nullptr) *pos += 1; + + if ((line[i] == '\'') && !inDQuotes && !escaped) + { + // single quote ' + + inSQuotes = !inSQuotes; + } + else if ((line[i] == '\"') && !inSQuotes && !escaped) + { + // double quote " + + inDQuotes = !inDQuotes; + } + else + { + escaped = false; + + if (line[i].isSpace() && !inDQuotes && !inSQuotes) + { + // space + + if (!arg.isEmpty()) + { + ret.append(arg); + arg.clear(); + } + } + else + { + if ((line[i] == '\\') && ((i + 1) < line.size())) + { + if ((line[i + 1] == '\'') || (line[i + 1] == '\"')) + { + escaped = true; + } + else + { + arg.append(line[i]); + } + } + else + { + arg.append(line[i]); + } + } + } + + if ((ret.size() >= maxArgs) && (maxArgs != -1)) + { + break; + } + } + + if (!arg.isEmpty() && !inDQuotes && !inSQuotes) + { + ret.append(arg); + } + + return ret; +} + +Proc::Proc(const QString &cmdLine, QObject *parent) : QProcess(parent) +{ + args = parseArgs(cmdLine.toUtf8()); + + connect(this, &Proc::readyReadStandardError, this, &Proc::rdStdErr); + connect(this, &Proc::readyReadStandardOutput, this, &Proc::rdStdOut); +} + +void Proc::rdStdErr() +{ + stdErr += readAllStandardError().trimmed(); +} + +void Proc::rdStdOut() +{ + stdOut += readAllStandardOutput().trimmed(); +} + +int Proc::exec() +{ + if (args.isEmpty()) + { + stdErr = tr("Command line not parsable"); return 1; + } + else + { + setProgram(args[0]); + setArguments(args.mid(1)); + + start(); + waitForFinished(); + + return exitCode(); + } +} diff --git a/client/src/common.h b/client/src/common.h new file mode 100644 index 0000000..fc6f6f1 --- /dev/null +++ b/client/src/common.h @@ -0,0 +1,166 @@ +#ifndef COMMON_H +#define COMMON_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define APP_VERSION "1.0.0" +#define APP_NAME "JustMotion-Client" +#define APP_TARGET "jmotion-client" +#define DEFAULT_PLAYER "vlc --no-audio --no-video-title-show --no-osd --repeat pls.m3u8" + +#define PULL_RATE 700 +#define THUMB_W 100 +#define THUMB_H 75 + +class Actions; +class VidWidget; + +enum ViewIndex +{ + VIDEO = 0, + NO_MEDIA = 1, + BUFFERING = 2, + END_OF_MEDIA = 3, + PLAYBACK_ERR = 4 +}; + +struct shared_t +{ + QString conf; + QString buffPath; + QString recPath; + QString camName; + QString playPath; + QString recentsPath; + QString appDataPath; + QString appConfPath; + QString hostAddr; + QString hostKey; + QString hostUser; + QString hostPort; + QString playerCmd; + int windowW; + int windowH; + int windowX; + int windowY; + int retCode; +}; + +struct ssh_opt +{ + QString pw; + QString key; + QString port; + QString user; +}; + +QStringList lsFiles(const QString &path, const QStringList &filters); +QStringList lsFiles(const QString &path); +QStringList lsVidFiles(const QString &path); +QStringList lsImgFiles(const QString &path); +QStringList lsConfFiles(const QString &path); +QStringList lsDirsInDir(const QString &path); +QStringList parseArgs(const QByteArray &data, int maxArgs = -1, int *pos = nullptr); +QString randPickItem(const QStringList &list); +bool rdConf(const QString &filePath, shared_t *share); +bool mkPath(const QString &path); +bool delFolderContents(const QString &path); +bool runCmd(const QStringList &args, QWidget *parent); +void createOrUpdateRecent(shared_t *share); +void wrConf(const QString &filePath, shared_t *share); +void rdLine(const QString ¶m, const QString &line, QString *value); +void rdLine(const QString ¶m, const QString &line, int *value); +void rdLine(const QString ¶m, const QString &line, bool *value); +void extCorrection(QString &ext); +void resetSharedRes(shared_t *share); +void buildGrid(QGridLayout *mainLayout, int parentWidth, const QList &widList, QList &spcList, int cellWidth, QWidget *parentWid); +void elasticWid(QWidget *wid); +void elasticWidLimitH(QWidget *wid); + +class Proc : public QProcess +{ + Q_OBJECT + +private: + + QStringList args; + +private slots: + + void rdStdErr(); + void rdStdOut(); + +public: + + QString stdErr; + QString stdOut; + + explicit Proc(const QString &cmd, QObject *parent = nullptr); + + int exec(); +}; + +#endif // COMMON_H diff --git a/client/src/host_dialog.cpp b/client/src/host_dialog.cpp new file mode 100644 index 0000000..edcced9 --- /dev/null +++ b/client/src/host_dialog.cpp @@ -0,0 +1,61 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "host_dialog.h" + +HostDialog::HostDialog(ssh_opt *opts, QWidget *parent) : QDialog(parent) +{ + sshOpts = opts; + + auto mainLayout = new QVBoxLayout(this); + auto formWidget = new QWidget(this); + auto formLayout = new QFormLayout(formWidget); + + hostPort = new QLineEdit(this); + hostKey = new QLineEdit(this); + username = new QLineEdit(this); + pw = new QLineEdit(this); + + pw->setEchoMode(QLineEdit::PasswordEchoOnEdit); + + formLayout->addRow(new QLabel(tr("Host Port:"), this), hostPort); + formLayout->addRow(new QLabel(tr("Host Key:"), this), hostKey); + formLayout->addRow(new QLabel(tr("Username:"), this), username); + formLayout->addRow(new QLabel(tr("Password:"), this), pw); + + hostPort->setText(sshOpts->port); + hostKey->setText(sshOpts->key); + username->setText(sshOpts->user); + + mainLayout->addWidget(formWidget, 0, Qt::AlignLeft); + setContentsMargins(0,0,0,0); + + connect(hostPort, &QLineEdit::editingFinished, this, &HostDialog::wr); + connect(hostKey, &QLineEdit::editingFinished, this, &HostDialog::wr); + connect(username, &QLineEdit::editingFinished, this, &HostDialog::wr); + connect(pw, &QLineEdit::editingFinished, this, &HostDialog::wr); +} + +void HostDialog::closeEvent(QCloseEvent *event) +{ + wr(); + + QDialog::closeEvent(event); +} + +void HostDialog::wr() +{ + sshOpts->port = hostPort->text(); + sshOpts->key = hostKey->text(); + sshOpts->user = username->text(); + sshOpts->pw = pw->text(); +} diff --git a/client/src/host_dialog.h b/client/src/host_dialog.h new file mode 100644 index 0000000..20d84b5 --- /dev/null +++ b/client/src/host_dialog.h @@ -0,0 +1,41 @@ +#ifndef HOST_DIALOG_H +#define HOST_DIALOG_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +class HostDialog : public QDialog +{ + Q_OBJECT + +private: + + ssh_opt *sshOpts; + QLineEdit *hostPort; + QLineEdit *hostKey; + QLineEdit *username; + QLineEdit *pw; + + void closeEvent(QCloseEvent *event); + +private slots: + + void wr(); + +public: + + explicit HostDialog(ssh_opt *opts, QWidget *parent = nullptr); +}; + +#endif // HOST_DIALOG_H diff --git a/client/src/main.cpp b/client/src/main.cpp new file mode 100644 index 0000000..6ac9cf9 --- /dev/null +++ b/client/src/main.cpp @@ -0,0 +1,74 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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.RPOSE. See the +// GNU General Public License for more details. + +#include "common.h" +#include "main_widget.h" +#include "recents.h" + +int main(int argc, char** argv) +{ + QApplication app(argc, argv); + + QApplication::setApplicationName(APP_NAME); + QApplication::setApplicationVersion(APP_VERSION); + + shared_t shared; + MainGui mainGui(&shared); + + auto rec = app.primaryScreen()->geometry(); + + shared.appDataPath = QDir::homePath() + QDir::separator() + "." + QString(APP_TARGET); + shared.recentsPath = shared.appDataPath + QDir::separator() + "recent"; + shared.appConfPath = shared.appDataPath + QDir::separator() + "app.conf"; + shared.windowH = (rec.height() / 4) * 3; + shared.windowW = rec.width() / 2; + shared.windowX = rec.x(); + shared.windowY = rec.y(); + shared.retCode = 0; + + mkPath(shared.appDataPath); + mkPath(shared.recentsPath); + + if (!QFileInfo::exists(shared.appConfPath)) + { + wrConf(shared.appConfPath, &shared); + } + + rdConf(shared.appConfPath, &shared); + + MainWidget mainWidget(&shared, &mainGui); + + elasticWid(&mainWidget); + + mainGui.setContentsMargins(0,0,0,0); + mainGui.setCentralWidget(&mainWidget); + mainGui.setWindowTitle(APP_NAME); + mainGui.setMinimumHeight(600); + mainGui.setMinimumWidth(800); + mainGui.setGeometry(shared.windowX, shared.windowY, shared.windowW, shared.windowH); + mainGui.show(); + + auto ret = app.exec(); + + rec = mainGui.geometry(); + + shared.windowH = rec.height(); + shared.windowW = rec.width(); + shared.windowX = rec.x(); + shared.windowY = rec.y(); + + resetSharedRes(&shared); + wrConf(shared.appConfPath, &shared); + + return ret; +} diff --git a/client/src/main_widget.cpp b/client/src/main_widget.cpp new file mode 100644 index 0000000..227e308 --- /dev/null +++ b/client/src/main_widget.cpp @@ -0,0 +1,252 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "main_widget.h" +#include "host_dialog.h" + +MainGui::MainGui(shared_t *share, QWidget *parent) : QMainWindow(parent) +{ + shared = share; + + layout()->setSpacing(0); +} + +void MainGui::closeEvent(QCloseEvent *event) +{ + if (!shared->playPath.isEmpty()) + { + thread()->sleep(1); + + QString cmdA = "umount " + shared->playPath; + QString cmdB = "rmdir " + shared->playPath; + + system(cmdA.toUtf8().data()); + system(cmdB.toUtf8().data()); + } + + QWidget::closeEvent(event); +} + +MainWidget::MainWidget(shared_t *share, MainGui *parent) : QWidget(parent) +{ + shared = share; + mainGui = parent; + sshOpts = new ssh_opt(); + homeLayout = new QVBoxLayout(this); + + genConnectWidget(); + genSettingsWidget(); + genSpacer(); + + parentWidget()->setWindowTitle(QString(APP_NAME)); +} + +void MainWidget::closeEvent(QCloseEvent *event) +{ + close(); + + QWidget::closeEvent(event); +} + +void MainWidget::genConnectWidget() +{ + auto wid = new QGroupBox(this); + auto lay = new QHBoxLayout(wid); + + hostAddr = new QComboBox(this); + sshOptBtn = new QPushButton(tr("Options"), this); + connectBtn = new QPushButton(tr("Connect"), this); + closeBtn = new QPushButton(tr("Close"), this); + recents = new Recents(shared, hostAddr, sshOpts, this); + + hostAddr->setEditable(true); + hostAddr->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + closeBtn->setVisible(false); + + wid->setTitle(tr("Host")); + lay->addWidget(new QLabel(tr("Host Address: "), this)); + lay->addWidget(hostAddr); + lay->addStretch(); + lay->addWidget(sshOptBtn); + lay->addWidget(connectBtn); + lay->addWidget(closeBtn); + + homeLayout->addWidget(wid); + + connect(connectBtn, &QPushButton::clicked, this, &MainWidget::open); + connect(closeBtn, &QPushButton::clicked, this, &MainWidget::close); + connect(sshOptBtn, &QPushButton::clicked, this, &MainWidget::openSshOptsDialog); +} + +void MainWidget::genSettingsWidget() +{ + auto wid = new QGroupBox(this); + auto lay = new QHBoxLayout(wid); + auto defBtn = new QPushButton(tr("Default"), this); + + playerCmd = new QLineEdit(this); + + playerCmd->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + playerCmd->setText(shared->playerCmd); + + wid->setTitle(tr("Settings")); + lay->addWidget(new QLabel(tr("Video Player Command: "), this)); + lay->addWidget(playerCmd); + lay->addStretch(); + lay->addWidget(defBtn); + + homeLayout->addWidget(wid); + + connect(defBtn, &QPushButton::clicked, this, &MainWidget::resetPlayerDefault); + connect(playerCmd, &QLineEdit::textEdited, this, &MainWidget::updatePlayerCmd); +} + +void MainWidget::genSpacer() +{ + spacer = new QWidget(this); + + elasticWid(spacer); + + homeLayout->addWidget(spacer); +} + +void MainWidget::resetPlayerDefault() +{ + playerCmd->setText(DEFAULT_PLAYER); + + shared->playerCmd = DEFAULT_PLAYER; +} + +void MainWidget::updatePlayerCmd(const QString &line) +{ + shared->playerCmd = line; +} + +void MainWidget::close() +{ + parentWidget()->setWindowTitle(QString(APP_NAME)); + + closeBtn->setVisible(false); + connectBtn->setVisible(true); + sshOptBtn->setVisible(true); + + sshOpts->key.clear(); + sshOpts->pw.clear(); + sshOpts->port.clear(); + sshOpts->user.clear(); + + shared->hostAddr.clear(); + shared->hostKey.clear(); + shared->hostPort.clear(); + shared->hostUser.clear(); + + liveWid->close(); + footageWid->close(); + + if (!shared->playPath.isEmpty()) + { + thread()->sleep(1); + + QString cmdA = "umount " + shared->playPath; + QString cmdB = "rmdir " + shared->playPath; + + system(cmdA.toUtf8().data()); + system(cmdB.toUtf8().data()); + } + + shared->playPath.clear(); +} + +void MainWidget::openSshOptsDialog() +{ + HostDialog(sshOpts, this).exec(); +} + +void MainWidget::open() +{ + shared->hostAddr = hostAddr->currentText(); + shared->hostKey = sshOpts->key; + shared->hostPort = sshOpts->port; + shared->hostUser = sshOpts->user; + shared->playPath = QDir::tempPath() + QDir::separator() + shared->hostAddr; + + createOrUpdateRecent(shared); + + mkPath(shared->playPath); + + QString sshfsCmd = "sshfs"; + + if (shared->hostUser.isEmpty()) sshfsCmd += " "; + else sshfsCmd += " " + shared->hostUser + "@"; + + sshfsCmd += shared->hostAddr + ":/ " + shared->playPath; + + if (!shared->hostPort.isEmpty()) sshfsCmd += " -p " + shared->hostPort; + if (!shared->hostKey.isEmpty()) sshfsCmd += " -o IdentityFile=" + shared->hostKey; + + if (!sshOpts->pw.isEmpty()) + { + sshfsCmd = "sshpass -p " + sshOpts->pw + " " + sshfsCmd; + } + + Proc proc(sshfsCmd, this); + + if (proc.exec() == 0) + { + parentWidget()->setWindowTitle(shared->hostAddr + " - " + QString(APP_NAME)); + + closeBtn->setVisible(true); + connectBtn->setVisible(false); + sshOptBtn->setVisible(false); + spacer->close(); + + liveWid = new QGroupBox(this); + footageWid = new QGroupBox(this); + + liveWid->setTitle(tr("Live")); + footageWid->setTitle(tr("Footage")); + + auto liveLayout = new QVBoxLayout(liveWid); + auto footageLayout = new QVBoxLayout(footageWid); + + liveLayout->addWidget(new PlaylistWidget(shared, CAM_LIVE, liveWid)); + footageLayout->addWidget(new PlaylistWidget(shared, CAM_FOOTAGE, footageWid)); + + homeLayout->addWidget(liveWid); + homeLayout->addWidget(footageWid); + + genSpacer(); + } + else + { + auto msg = proc.errorString().trimmed(); + + if (msg.isEmpty() || msg == tr("Unknown error")) + { + msg = proc.stdErr; + } + + if (msg.isEmpty()) + { + msg = proc.stdOut; + } + + if (msg.isEmpty()) + { + msg = tr("Failed to connect to host via SSH - unkown error."); + } + + msg = msg + tr(" - return code: ") + QString::number(proc.exitCode()); + + QMessageBox::critical(this, APP_NAME, msg); + } +} diff --git a/client/src/main_widget.h b/client/src/main_widget.h new file mode 100644 index 0000000..ecdaa82 --- /dev/null +++ b/client/src/main_widget.h @@ -0,0 +1,73 @@ +#ifndef MAIN_WIDGET_H +#define MAIN_WIDGET_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" +#include "recents.h" +#include "playlist_widget.h" + +class MainGui : public QMainWindow +{ + Q_OBJECT + +private: + + shared_t *shared; + + void closeEvent(QCloseEvent *event); + +public: + + explicit MainGui(shared_t *share, QWidget *parent = nullptr); +}; + +class MainWidget : public QWidget +{ + Q_OBJECT + +private: + + shared_t *shared; + ssh_opt *sshOpts; + MainGui *mainGui; + QVBoxLayout *homeLayout; + QComboBox *hostAddr; + QPushButton *sshOptBtn; + QPushButton *connectBtn; + QPushButton *closeBtn; + QLineEdit *playerCmd; + QGroupBox *liveWid; + QGroupBox *footageWid; + QWidget *spacer; + Recents *recents; + + void genConnectWidget(); + void genSettingsWidget(); + void genSpacer(); + void closeEvent(QCloseEvent *event); + +private slots: + + void open(); + void close(); + void openSshOptsDialog(); + void resetPlayerDefault(); + void updatePlayerCmd(const QString &line); + +public: + + explicit MainWidget(shared_t *share, MainGui *parent); +}; + +#endif // MAIN_WIDGET_H diff --git a/client/src/playlist_widget.cpp b/client/src/playlist_widget.cpp new file mode 100644 index 0000000..d0218f0 --- /dev/null +++ b/client/src/playlist_widget.cpp @@ -0,0 +1,214 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "playlist_widget.h" + +PlaylistItem::PlaylistItem(shared_t *appConf, const QString &path, const QString &confPath, QWidget *parent) : QLabel(parent) +{ + setObjectName(QFileInfo(path).baseName()); + + popMsg = new QDialog(this, Qt::Window | Qt::FramelessWindowHint | Qt::Tool); + popMsgText = new QLabel(popMsg); + confChecker = new QTimer(this); + proc = new QProcess(this); + basePath = QDir::cleanPath(path); + conf = confPath; + appShare = appConf; + + popMsg->hide(); + popMsg->setModal(false); + confChecker->setSingleShot(false); + confChecker->setInterval(5000); + confChecker->start(); + popMsg->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + auto popLayout = new QVBoxLayout(popMsg); + + popLayout->addWidget(popMsgText, 0, Qt::AlignCenter); + + setCursor(Qt::PointingHandCursor); + setFixedWidth(THUMB_W); + setFixedHeight(THUMB_H); + + genImgAndText(); + setMouseTracking(true); + + connect(confChecker, &QTimer::timeout, this, &PlaylistItem::checkConfExists); +} + +void PlaylistItem::checkConfExists() +{ + if (!QFileInfo::exists(conf)) + { + emit rmItem(conf, this); + } +} + +void PlaylistItem::loadImgFromFile(QString path) +{ + if (path.isEmpty() || !QFileInfo::exists(path)) + { + path = ":/img/no_mdeia.png"; + } + + auto pix = QPixmap(path); + + setPixmap(pix.scaled(THUMB_W, THUMB_H, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); +} + +void PlaylistItem::genImgAndText() +{ + auto imgDir = basePath + QDir::separator() + "img" + QDir::separator(); + auto imgList = lsImgFiles(imgDir); + auto imgFile = randPickItem(imgList); + + loadImgFromFile(imgDir + imgFile); + + popMsgText->setText(objectName()); +} + +void PlaylistItem::leaveEvent(QEvent *event) +{ + Q_UNUSED(event); + + popMsg->hide(); +} + +void PlaylistItem::enterEvent(QEnterEvent *event) +{ + Q_UNUSED(event); + + dispText(); +} + +void PlaylistItem::playerExited() +{ + +} + +void PlaylistItem::mouseReleaseEvent(QMouseEvent *event) +{ + Q_UNUSED(event); + + auto args = parseArgs(appShare->playerCmd.toUtf8()); + + if (args.isEmpty()) + { + QMessageBox::critical(this, APP_NAME, tr("player command not parsable")); + } + else if (!args.contains("pls.m3u8")) + { + QMessageBox::critical(this, APP_NAME, tr("missing argument in player command for pls.m3u8")); + } + else + { + if (proc->state() == QProcess::Running) + { + proc->kill(); + proc->waitForFinished(); + } + + connect(proc, &QProcess::finished, this, &PlaylistItem::playerExited); + + proc->setWorkingDirectory(basePath); + proc->setProgram(args[0]); + proc->setArguments(args.mid(1)); + proc->start(); + } +} + +void PlaylistItem::dispText() +{ + auto pnt = mapToGlobal(QPointF(0, THUMB_H / 2)); + + popMsg->move(pnt.x(), pnt.y()); + popMsg->show(); +} + +PlaylistWidget::PlaylistWidget(shared_t *share, play_item_t type, QWidget *parent) : QScrollArea(parent) +{ + auto listWidget = new QWidget(this); + + shared = share; + itemType = type; + listLayout = new QGridLayout(listWidget); + + elasticWid(listWidget); + + setWidget(listWidget); + setWidgetResizable(true); + setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setFrameStyle(QFrame::NoFrame); + + scan(); +} + +void PlaylistWidget::scan() +{ + auto mntPath = QDir::cleanPath(shared->playPath) + QDir::separator(); + auto confPath = mntPath + "etc" + QDir::separator() + "jmotion" + QDir::separator(); + auto confList = lsFiles(confPath); + + for (auto conf : confList) + { + if (!fileList.contains(conf)) + { + shared_t confParams; + PlaylistItem *item; + + rdConf(confPath + conf, &confParams); + + if (itemType == CAM_LIVE) + { + item = new PlaylistItem(shared, mntPath + confParams.buffPath, confPath + conf, this); + } + else + { + item = new PlaylistItem(shared, mntPath + confParams.recPath, confPath + conf, this); + } + + connect(item, &PlaylistItem::rmItem, this, &PlaylistWidget::rmItem); + + fileList.append(conf); + widList.append(item); + } + } + + reGrid(); +} + +void PlaylistWidget::reGrid() +{ + buildGrid(listLayout, width(), widList, spcList, THUMB_W, this); + + parentWidget()->setFixedHeight(size().height() * 2); +} + +void PlaylistWidget::rmItem(const QString &confPath, const QWidget *item) +{ + fileList.removeOne(confPath); + widList.removeOne(item); + + reGrid(); +} + +void PlaylistWidget::showEvent(QShowEvent *event) +{ + reGrid(); QScrollArea::showEvent(event); +} + +void PlaylistWidget::resizeEvent(QResizeEvent *event) +{ + reGrid(); QScrollArea::resizeEvent(event); +} diff --git a/client/src/playlist_widget.h b/client/src/playlist_widget.h new file mode 100644 index 0000000..93e1fd8 --- /dev/null +++ b/client/src/playlist_widget.h @@ -0,0 +1,88 @@ +#ifndef PLAYLIST_WIDGET_H +#define PLAYLIST_WIDGET_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +enum play_item_t +{ + CAM_LIVE, + CAM_FOOTAGE +}; + +class PlaylistItem : public QLabel +{ + Q_OBJECT + +private: + + QLabel *image; + QLabel *title; + QDialog *popMsg; + QLabel *popMsgText; + QTimer *confChecker; + shared_t *appShare; + QProcess *proc; + QString conf; + QString basePath; + + void mouseReleaseEvent(QMouseEvent *event); + void leaveEvent(QEvent *event); + void enterEvent(QEnterEvent *event); + void genImgAndText(); + void loadImgFromFile(QString path); + void dispText(); + +private slots: + + void checkConfExists(); + void playerExited(); + +public: + + explicit PlaylistItem(shared_t *appConf, const QString &path, const QString &confPath, QWidget *parent); + +signals: + + void rmItem(const QString &confPath, const QWidget *item); +}; + +class PlaylistWidget : public QScrollArea +{ + Q_OBJECT + +private: + + shared_t *shared; + QGridLayout *listLayout; + QStringList fileList; + play_item_t itemType; + QList widList; + QList spcList; + + void reGrid(); + void showEvent(QShowEvent *event); + void resizeEvent(QResizeEvent *event); + +private slots: + + void rmItem(const QString &confPath, const QWidget *item); + void scan(); + +public: + + explicit PlaylistWidget(shared_t *share, play_item_t type, QWidget *parent); +}; + +#endif // PLAYLIST_WIDGET_H diff --git a/client/src/recents.cpp b/client/src/recents.cpp new file mode 100644 index 0000000..ab133a4 --- /dev/null +++ b/client/src/recents.cpp @@ -0,0 +1,69 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "recents.h" + +RecentItem::RecentItem(const QString &path, QComboBox *box, ssh_opt *opts, QObject *parent) : QObject(parent) +{ + shared_t conf; + + confPath = path; + sshOpts = opts; + + rdConf(path, &conf); + + setObjectName(conf.hostAddr); + + box->addItem(objectName()); + + connect(box, &QComboBox::textActivated, this, &RecentItem::itemSelected); +} + +void RecentItem::itemSelected(const QString &name) +{ + if (objectName() == name) + { + shared_t conf; + + rdConf(confPath, &conf); + + (*sshOpts).key = conf.hostKey; + (*sshOpts).port = conf.hostPort; + (*sshOpts).user = conf.hostUser; + } +} + +Recents::Recents(shared_t *shareedRes, QComboBox *box, ssh_opt *opts, QObject *parent) : QObject(parent) +{ + share = shareedRes; + comboBox = box; + sshOpts = opts; + + mon.addPath(shareedRes->recentsPath); + + connect(&mon, &QFileSystemWatcher::directoryChanged, this, &Recents::scan); + connect(this, &Recents::clear, box, &QComboBox::clear); + + scan(); +} + +void Recents::scan() +{ + emit clear(); + + for (auto &&file: lsConfFiles(share->recentsPath)) + { + auto item = new RecentItem(share->recentsPath + QDir::separator() + file, comboBox, sshOpts, this); + + connect(this, &Recents::clear, item, &RecentItem::deleteLater); + } +} diff --git a/client/src/recents.h b/client/src/recents.h new file mode 100644 index 0000000..c3ef12c --- /dev/null +++ b/client/src/recents.h @@ -0,0 +1,60 @@ +#ifndef RECENTS_H +#define RECENTS_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +class RecentItem : public QObject +{ + Q_OBJECT + +private: + + QString confPath; + ssh_opt *sshOpts; + +private slots: + + void itemSelected(const QString &name); + +public: + + explicit RecentItem(const QString &path, QComboBox *box, ssh_opt *opts, QObject *parent = nullptr); +}; + +class Recents : public QObject +{ + Q_OBJECT + +private: + + QFileSystemWatcher mon; + shared_t *share; + ssh_opt *sshOpts; + QComboBox *comboBox; + +private slots: + + void scan(); + +public: + + explicit Recents(shared_t *shareedRes, QComboBox *box, ssh_opt *opts, QObject *parent = nullptr); + +signals: + + void clear(); +}; + +#endif // RECENTS_H diff --git a/client/templates/linux_icon.desktop b/client/templates/linux_icon.desktop new file mode 100644 index 0000000..2be3c51 --- /dev/null +++ b/client/templates/linux_icon.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=$app_name +GenericName=View live/footage video in a JustMotion server +Comment=Frontend client for JustMotion +Exec=/usr/bin/$app_target +Icon=jmc +Terminal=false +Type=Application +Categories=AudioVideo;Video;Player;TV; + diff --git a/client/templates/linux_run_script.sh b/client/templates/linux_run_script.sh new file mode 100644 index 0000000..8c63cfd --- /dev/null +++ b/client/templates/linux_run_script.sh @@ -0,0 +1,5 @@ +#!/bin/sh +export QTDIR=$install_dir +export QT_PLUGIN_PATH=$install_dir +export LD_LIBRARY_PATH=$install_dir/lib +$install_dir/$app_target $1 $2 $3 diff --git a/client/templates/linux_uninstall.sh b/client/templates/linux_uninstall.sh new file mode 100644 index 0000000..a1bf045 --- /dev/null +++ b/client/templates/linux_uninstall.sh @@ -0,0 +1,22 @@ +#!/bin/sh +rm -v /usr/bin/$app_target +rm -rv $install_dir +rm -v /usr/share/icons/hicolor/8x8/apps/jmc.png +rm -v /usr/share/icons/hicolor/16x16/apps/jmc.png +rm -v /usr/share/icons/hicolor/22x22/apps/jmc.png +rm -v /usr/share/icons/hicolor/24x24/apps/jmc.png +rm -v /usr/share/icons/hicolor/28x28/apps/jmc.png +rm -v /usr/share/icons/hicolor/32x32/apps/jmc.png +rm -v /usr/share/icons/hicolor/36x36/apps/jmc.png +rm -v /usr/share/icons/hicolor/42x42/apps/jmc.png +rm -v /usr/share/icons/hicolor/48x48/apps/jmc.png +rm -v /usr/share/icons/hicolor/64x64/apps/jmc.png +rm -v /usr/share/icons/hicolor/72x72/apps/jmc.png +rm -v /usr/share/icons/hicolor/96x96/apps/jmc.png +rm -v /usr/share/icons/hicolor/128x128/apps/jmc.png +rm -v /usr/share/icons/hicolor/192x192/apps/jmc.png +rm -v /usr/share/icons/hicolor/256x256/apps/jmc.png +rm -v /usr/share/icons/hicolor/512x512/apps/jmc.png +rm -v /usr/share/icons/hicolor/scalable/apps/jmc.svg +rm -v /usr/share/applications/$app_target.desktop +echo "Uninstallation Complete" diff --git a/install.py b/install.py new file mode 100755 index 0000000..218016d --- /dev/null +++ b/install.py @@ -0,0 +1,74 @@ +#!/usr/bin/python3 + +import os +import subprocess + +def cd(): + current_dir = os.path.dirname(__file__) + + if current_dir != "": + os.chdir(current_dir) + +def main(): + cd() + opt = "" + + while opt == "": + print("--Welcome to the install script for JustMotion--") + print("If you haven't run the build script yet, I suggest you do that now.") + print("What would you like to install/package?") + print("[1][install] Server Only") + print("[2][install] Client Only") + print("[3][install] Both") + print("[4][package] Server Only") + print("[5][package] Client Only") + print("[6][package] Both") + print("[7] Quit\n") + + opt = input("[1-7]: ") + + if opt == "1": + os.chdir("server") + subprocess.run(["python3", "install.py", "--local"]) + break + + elif opt == "2": + os.chdir("client") + subprocess.run(["python3", "install.py", "--local"]) + break + + elif opt == "3": + os.chdir("server") + subprocess.run(["python3", "install.py", "--local"]) + os.chdir("../client") + subprocess.run(["python3", "install.py", "--local"]) + break + + if opt == "4": + os.chdir("server") + subprocess.run(["python3", "install.py", "--installer"]) + break + + elif opt == "5": + os.chdir("client") + subprocess.run(["python3", "install.py", "--installer"]) + break + + elif opt == "6": + os.chdir("server") + subprocess.run(["python3", "install.py", "--installer"]) + os.chdir("../client") + subprocess.run(["python3", "install.py", "--installer"]) + break + + elif opt == "7": + break + + else: + print("err: invalid option\n") + opt = "" + + cd() + +if __name__ == "__main__": + main() diff --git a/server/JustVideo-Server.pro b/server/JustVideo-Server.pro new file mode 100644 index 0000000..69af38d --- /dev/null +++ b/server/JustVideo-Server.pro @@ -0,0 +1,26 @@ +QT -= gui + +CONFIG += c++11 console +CONFIG -= app_bundle + + TARGET = build/jmotion + OBJECTS_DIR = build + MOC_DIR = build + RCC_DIR = build + +HEADERS += \ + src/common.h \ + src/camera.h \ + src/detect_loop.h \ + src/event_loop.h \ + src/proc_control.h \ + src/record_loop.h + +SOURCES += \ + src/common.cpp \ + src/camera.cpp \ + src/detect_loop.cpp \ + src/event_loop.cpp \ + src/proc_control.cpp \ + src/record_loop.cpp \ + src/main.cpp diff --git a/server/build.py b/server/build.py new file mode 100644 index 0000000..53b42b7 --- /dev/null +++ b/server/build.py @@ -0,0 +1,270 @@ +#!/usr/bin/python3 + +import os +import re +import subprocess +import shutil +import sys +import platform +import pwd + +def get_app_target(text): + return re.search(r'(APP_TARGET) +(\"(.*?)\")', text).group(3) + +def get_app_ver(text): + return re.search(r'(APP_VERSION) +(\"(.*?)\")', text).group(3) + +def get_app_name(text): + return re.search(r'(APP_NAME) +(\"(.*?)\")', text).group(3) + +def get_qt_path(): + try: + if os.path.exists("/usr/lib/qt6/bin"): + return "/usr/lib/qt6/bin" + + return str(subprocess.check_output(["qtpaths6", "--binaries-dir"]), 'utf-8').strip() + + except: + print("A direct call to 'qtpaths6' has failed so automatic retrieval of the QT bin folder is not possible.") + + return input("Please enter the QT bin path (leave blank to cancel the build): ") + +def get_qt_lib_path(qt_bin): + output = str(subprocess.check_output([qt_bin + "/qtpaths6", "--query"]), 'utf-8').strip() + lines = output.split("\n") + ret = "" + + for line in lines: + if line.startswith("QT_HOST_LIBS:"): + ret = line[13:] + + if ret == "": + print("failed automatic retrieval of the QT lib folder.") + + return input("Please enter the QT lib path (leave blank to cancel the build): ") + + else: + return ret + +def get_qt_from_cli(): + for arg in sys.argv: + if arg == "-qt_dir": + index = sys.argv.index(arg) + + try: + return sys.argv[index + 1] + + except: + return "" + + return "" + +def get_ver_header(): + current_dir = os.path.dirname(__file__) + + if current_dir == "": + return "src" + os.sep + "common.h" + else: + return current_dir + os.sep + "src" + os.sep + "common.h" + +def get_nearest_subdir(path, sub_name): + dir_list = os.listdir(path) + ret = "" + + for entry in dir_list: + if sub_name in entry: + ret = entry + + break + + return ret + +def cd(): + current_dir = os.path.dirname(__file__) + + if current_dir != "": + os.chdir(current_dir) + +def verbose_copy(src, dst): + print("cpy: " + src + " --> " + dst) + + if os.path.isdir(src): + if os.path.exists(dst) and os.path.isdir(dst): + shutil.rmtree(dst) + + try: + # ignore errors thrown by shutil.copytree() + # it's likely not actually failing to copy + # the directory but still throws errors if + # it fails to apply the same file stats as + # the source. this type of error can be + # ignored. + shutil.copytree(src, dst) + + except: + pass + + elif os.path.exists(src): + shutil.copyfile(src, dst) + + else: + print("wrn: " + src + " does not exists. skipping.") + +def linux_build_app_dir(app_ver, app_name, app_target, qt_bin, qt_lib): + if not os.path.exists("app_dir/lib"): + os.makedirs("app_dir/lib") + + verbose_copy("build/" + app_target, "app_dir/" + app_target) + + shutil.copyfile("build/" + app_target, "/tmp/" + app_target + "-bin") + # copying the executable file from the build folder to + # temp bypasses any -noexe retrictions a linux file + # system may have. there is a chance temp is also + # restricted in this way but that kind of config is + # rare. ldd will not run correctly with -noexe + # enabled. + + lines = str(subprocess.check_output(["ldd", "/tmp/" + app_target + "-bin"]), 'utf-8').split("\n") + + os.remove("/tmp/" + app_target + "-bin") + + for line in lines: + if " => " in line and "libc" not in line: + #if ("libQt" in line) or ("libicu" in line) or ("libGL.so" in line) or ("libpcre16.so" in line) or ("libpcre.so" in line): + if " (0x0" in line: + start_index = line.index("> ") + 2 + end_index = line.index(" (0x0") + src_file = line[start_index:end_index] + file_name = os.path.basename(src_file) + + verbose_copy(src_file, "app_dir/lib/" + file_name) + + verbose_copy(qt_lib + "/libQt6DBus.so.6", "app_dir/lib/libQt6DBus.so.6") + + verbose_copy("templates/linux_run_script.sh", "app_dir/" + app_target + ".sh") + verbose_copy("templates/linux_uninstall.sh", "app_dir/uninstall.sh") + verbose_copy("templates/linux_service.service", "app_dir/" + app_target + ".service") + + complete(app_ver, app_target) + +def complete(app_ver, app_target): + print("Build complete for version: " + app_ver) + print("You can now run the install.py script to install onto this machine or create an installer.") + +def get_like_distro(): + info = platform.freedesktop_os_release() + ids = [info["ID"]] + + if "ID_LIKE" in info: + # ids are space separated and ordered by precedence + ids.extend(info["ID_LIKE"].split()) + + return ids + +def list_installed_packages(): + like_distro = get_like_distro() + + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + return str(subprocess.check_output(["apt", "list", "--installed"]), 'utf-8') + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + return str(subprocess.check_output(["dnf", "list", "installed"]), 'utf-8') + + elif ("arch" in like_distro): + return str(subprocess.check_output(["pacman", "-Q"]), 'utf-8') + + else: + print("Warning: unable to determine a package manager for this platform.") + + return [] + + +def list_of_words_in_text(list_of_words, text_body): + for word in list_of_words: + if not word in text_body: + return False + + return True + +def user_exists(user_name): + try: + pwd.getpwnam(user_name) + + return True + + except KeyError: + return False + +def platform_setup(): + ins_packages = list_installed_packages() + like_distro = get_like_distro() + dep_pkgs_a = ["pkg-config", "make", "g++"] + dep_pkgs_b = ["ffmpeg", "libfuse3-dev", "libfuse-dev", "fuse3", "imagemagick"] + + if not list_of_words_in_text(dep_pkgs_a, ins_packages) or not list_of_words_in_text(dep_pkgs_b, ins_packages): + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + subprocess.run(["sudo", "apt", "update", "-y"]) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_b) + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_b) + + elif ("arch" in like_distro): + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_a) + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_b) + + if not user_exists("jmotion"): + subprocess.run(["sudo", "useradd", "-r", "jmotion"]) + subprocess.run(["sudo", "usermod", "-aG", "video", "jmotion"]) + +def main(): + platform_setup() + + with open(get_ver_header()) as file: + text = file.read() + + app_target = get_app_target(text) + app_ver = get_app_ver(text) + app_name = get_app_name(text) + qt_bin = get_qt_from_cli() + + if qt_bin == "": + qt_bin = get_qt_path() + + if qt_bin != "": + qt_lib = get_qt_lib_path(qt_bin) + + if qt_lib == "": + exit(1) + + print("app_target = " + app_target) + print("app_version = " + app_ver) + print("app_name = " + app_name) + print("qt_bin = " + qt_bin) + print("qt_lib = " + qt_lib) + + cd() + + result = subprocess.run([qt_bin + os.sep + "qmake", "-config", "release"]) + + if result.returncode == 0: + result = subprocess.run(["make"]) + + if result.returncode == 0: + if os.path.exists("app_dir"): + shutil.rmtree("app_dir") + + os.makedirs("app_dir") + + with open("app_dir" + os.sep + "info.txt", "w") as info_file: + info_file.write(app_target + "\n") + info_file.write(app_ver + "\n") + info_file.write(app_name + "\n") + + linux_build_app_dir(app_ver, app_name, app_target, qt_bin, qt_lib) + + +if __name__ == "__main__": + main() diff --git a/server/install.py b/server/install.py new file mode 100644 index 0000000..e5a9a8b --- /dev/null +++ b/server/install.py @@ -0,0 +1,355 @@ +#!/usr/bin/python3 + +import os +import subprocess +import shutil +import platform +import sys +import zipfile +import binascii +import tempfile +import pwd + +def cd(): + current_dir = os.path.dirname(__file__) + + if current_dir != "": + os.chdir(current_dir) + +def get_default_installer_path(app_ver, app_name): + if not os.path.exists("../installers"): + os.makedirs("../installers") + + return "../installers/" + app_name + "-" + app_ver + "-" + platform.system() + "-" + platform.machine() + ".run" + +def make_install_dir(path, false_on_fail): + try: + if not os.path.exists(path): + os.makedirs(path) + + return True + + except: + if false_on_fail: + print("Failed to create directory: " + path + ", please make sure you are runnning this script with admin rights.") + + return False + + else: + return True + +def make_app_dirs(app_target): + return make_install_dir("/etc/" + app_target, True) and make_install_dir("/opt/" + app_target, True) and make_install_dir("/var/local/" + app_target, False) + +def replace_bin(binary, old_bin, new_bin, offs): + while(True): + try: + index = binary.index(old_bin, offs) + binary = binary[:index] + new_bin + binary[index + len(old_bin):] + + except ValueError: + break + + return binary + +def bin_sub_copy_file(src, dst, old_bin, new_bin, offs): + binary = bytearray() + + with open(src, "rb") as rd_file: + binary = rd_file.read() + binary = replace_bin(binary, old_bin, new_bin, offs) + + with open(dst, "wb") as wr_file: + wr_file.write(binary) + +def text_sub_copy_file(src, dst, old_text, new_text, offs): + bin_sub_copy_file(src, dst, old_text.encode("utf-8"), new_text.encode("utf-8"), offs) + +def text_template_deploy(src, dst, install_dir, app_name, app_target): + print("dep: " + dst) + + text_sub_copy_file(src, dst, "$install_dir", install_dir, 0) + text_sub_copy_file(dst, dst, "$app_name", app_name, 0) + text_sub_copy_file(dst, dst, "$app_target", app_target, 0) + +def verbose_copy(src, dst): + print("cpy: " + src + " --> " + dst) + + if os.path.isdir(src): + files = os.listdir(src) + + if not os.path.exists(dst): + os.makedirs(dst) + + for file in files: + tree_src = src + os.path.sep + file + tree_dst = dst + os.path.sep + file + + if os.path.isdir(tree_src): + if not os.path.exists(tree_dst): + os.makedirs(tree_dst) + + verbose_copy(tree_src, tree_dst) + + else: + shutil.copyfile(src, dst) + +def verbose_create_symmlink(src, dst): + print("lnk: " + src + " --> " + dst) + + if os.path.exists(dst): + os.remove(dst) + + os.symlink(src, dst) + +def local_install(app_target, app_name): + install_dir = "/opt/" + app_target + + if os.path.exists(install_dir + "/uninstall.sh"): + subprocess.run([install_dir + "/uninstall.sh"]) + + if make_app_dirs(app_target): + text_template_deploy("app_dir/" + app_target + ".sh", install_dir + "/" + app_target + ".sh", install_dir, app_name, app_target) + text_template_deploy("app_dir/" + app_target + ".service", "/lib/systemd/system/" + app_target + ".service", install_dir, app_name, app_target) + text_template_deploy("app_dir/uninstall.sh", install_dir + "/uninstall.sh", install_dir, app_name, app_target) + + verbose_copy("app_dir/" + app_target, install_dir + "/" + app_target) + verbose_copy("app_dir/lib", install_dir + "/lib") + + verbose_create_symmlink(install_dir + "/" + app_target + ".sh", "/usr/bin/" + app_target) + + subprocess.run(["chmod", "755", install_dir + "/" + app_target + ".sh"]) + subprocess.run(["chmod", "755", install_dir + "/" + app_target]) + subprocess.run(["chmod", "755", install_dir + "/uninstall.sh"]) + subprocess.run(["chmod", "644", "/lib/systemd/system/" + app_target + ".service"]) + + if not user_exists(app_target): + subprocess.run(["sudo", "useradd", "-r", app_target]) + subprocess.run(["sudo", "usermod", "-aG", "video", app_target]) + + subprocess.run(["chown", app_target + ":" + app_target, "/var/local/" + app_target]) + + subprocess.run(["systemctl", "start", app_target]) + subprocess.run(["systemctl", "enable", app_target]) + + print("Installation finished. If you ever need to uninstall this application, run this command with root rights:") + print(" sh " + install_dir + "/uninstall.sh\n") + +def dir_tree(path): + ret = [] + + if os.path.isdir(path): + for entry in os.listdir(path): + full_path = os.path.join(path, entry) + + if os.path.isdir(full_path): + for sub_dir_file in dir_tree(full_path): + ret.append(sub_dir_file) + + else: + ret.append(full_path) + + return ret + +def to_hex(data): + return str(binascii.hexlify(data))[2:-1] + +def from_hex(text_line): + return binascii.unhexlify(text_line) + +def make_install(app_ver, app_name): + path = get_default_installer_path(app_ver, app_name) + + with zipfile.ZipFile("app_dir.zip", "w", compression=zipfile.ZIP_DEFLATED) as zip_file: + print("Compressing app_dir --") + + for file in dir_tree("app_dir"): + print("adding file: " + file) + zip_file.write(file) + + text_sub_copy_file(__file__, path, "main(is_sfx=False)", "main(is_sfx=True)\n\n\n", 10322) + + with open(path, "a") as dst_file, open("app_dir.zip", "rb") as src_file: + print("Packing the compressed app_dir into the sfx script file --") + + dst_file.write("# APP_DIR\n") + + stat = os.stat("app_dir.zip") + + while(True): + buffer = src_file.read(4000000) + + if len(buffer) != 0: + dst_file.write("# " + to_hex(buffer) + "\n") + + print(str(src_file.tell()) + "/" + str(stat.st_size)) + + if len(buffer) < 4000000: + break + + os.remove("app_dir.zip") + + subprocess.run(["chmod", "+x", path]) + + print("Finished packing the app.") + print("Installer: " + path) + +def sfx(): + abs_sfx_path = os.path.abspath(__file__) + mark_found = False + + os.chdir(tempfile.gettempdir()) + + with open(abs_sfx_path) as packed_file, open("app_dir.zip", "wb") as zip_file: + stat = os.stat(abs_sfx_path) + + print("Unpacking the app_dir compressed file from the sfx script.") + + while(True): + line = packed_file.readline() + + if not line: + break + + elif mark_found: + zip_file.write(from_hex(line[2:-1])) + + print(str(packed_file.tell()) + "/" + str(stat.st_size)) + + else: + if line == "# APP_DIR\n": + mark_found = True + + print("Done.") + + if not mark_found: + print("The app_dir mark was not found, unable to continue.") + + else: + with zipfile.ZipFile("app_dir.zip", "r", compression=zipfile.ZIP_DEFLATED) as zip_file: + print("De-compressing app_dir --") + + zip_file.extractall() + + print("Preparing for installation.") + + os.remove("app_dir.zip") + + with open("app_dir" + os.sep + "info.txt") as info_file: + info = info_file.read().split("\n") + + local_install(info[0], info[2]) + shutil.rmtree("app_dir") + +def get_like_distro(): + info = platform.freedesktop_os_release() + ids = [info["ID"]] + + if "ID_LIKE" in info: + # ids are space separated and ordered by precedence + ids.extend(info["ID_LIKE"].split()) + + return ids + +def list_installed_packages(): + like_distro = get_like_distro() + + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + return str(subprocess.check_output(["apt", "list", "--installed"]), 'utf-8') + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + return str(subprocess.check_output(["dnf", "list", "installed"]), 'utf-8') + + elif ("arch" in like_distro): + return str(subprocess.check_output(["pacman", "-Q"]), 'utf-8') + + else: + print("Warning: unable to determine a package manager for this platform.") + + return [] + + +def list_of_words_in_text(list_of_words, text_body): + for word in list_of_words: + if not word in text_body: + return False + + return True + +def user_exists(user_name): + try: + pwd.getpwnam(user_name) + + return True + + except KeyError: + return False + +def platform_setup(): + ins_packages = list_installed_packages() + like_distro = get_like_distro() + dep_pkgs_a = ["pkg-config"] + dep_pkgs_b = ["ffmpeg", "libfuse-dev", "fuse3", "imagemagick"] + + if not list_of_words_in_text(dep_pkgs_a, ins_packages) or not list_of_words_in_text(dep_pkgs_b, ins_packages): + if ("ubuntu" in like_distro) or ("debian" in like_distro) or ("linuxmint" in like_distro): + subprocess.run(["sudo", "apt", "update", "-y"]) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "apt", "install", "-y"] + dep_pkgs_b) + + elif ("fedora" in like_distro) or ("rhel" in like_distro): + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_a) + subprocess.run(["sudo", "dnf", "install", "-y"] + dep_pkgs_b) + + elif ("arch" in like_distro): + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_a) + subprocess.run(["sudo", "pacman", "-S", "--noconfirm"] + dep_pkgs_b) + +def main(is_sfx): + cd() + + app_target = "" + app_ver = "" + app_name = "" + + if not is_sfx: + with open("app_dir" + os.sep + "info.txt") as info_file: + info = info_file.read().split("\n") + + app_target = info[0] + app_ver = info[1] + app_name = info[2] + + if is_sfx: + platform_setup() + sfx() + + elif "--local" in sys.argv: + platform_setup() + local_install(app_target, app_name) + + elif "--installer" in sys.argv: + make_install(app_ver, app_name) + + else: + print("Do you want to install onto this machine or create an installer?") + print("[1] local machine") + print("[2] create installer") + print("[3] exit") + + while(True): + opt = input("select an option: ") + + if opt == "1": + subprocess.run(["sudo", "python3", "install.py", "--local"]) + break + + elif opt == "2": + subprocess.run(["python3", "install.py", "--installer"]) + break + + elif opt == "3": + break + +if __name__ == "__main__": + main(is_sfx=False) diff --git a/server/src/camera.cpp b/server/src/camera.cpp new file mode 100644 index 0000000..da6b7d0 --- /dev/null +++ b/server/src/camera.cpp @@ -0,0 +1,143 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "camera.h" + +Camera::Camera(const QString &confFile, const QString &statDir, ProcControl *proc, QCoreApplication *parent) : QObject(nullptr) +{ + Q_UNUSED(parent); + + fsW = new QFileSystemWatcher(this); + statTimer = new QTimer(this); + statPath = statDir; + evtLoop = nullptr; + detLoop = nullptr; + recLoop = nullptr; + delOnZero = false; + objCount = 0; + + statTimer->setInterval(5000); + statTimer->start(); + proc->objPlusOne(); + + connect(fsW, &QFileSystemWatcher::fileChanged, this, &Camera::confChanged); + connect(proc, &ProcControl::prepForClose, this, &Camera::prepForDel); + connect(this, &Camera::destroyed, proc, &ProcControl::objMinusOne); + connect(statTimer, &QTimer::timeout, this, &Camera::updateStat); + + start(confFile); +} + +void Camera::objMinusOne() +{ + objCount--; + + if (objCount == 0) + { + thr1->deleteLater(); + thr2->deleteLater(); + thr3->deleteLater(); + + if (delOnZero) + { + QDir(shared.buffPath).removeRecursively(); + + deleteLater(); + } + } +} + +void Camera::prepForDel() +{ + statTimer->blockSignals(true); + + delOnZero = true; + + emit stop(); +} + +void Camera::updateStat() +{ + auto statFile = statPath + "/" + shared.camName; + + QFile file(statFile); + + file.open(QFile::WriteOnly); + file.write(statusLine().toUtf8()); + file.close(); +} + +int Camera::start(const QString &conf) +{ + if (rdConf(conf, &shared)) + { + setupBuffDir(shared.buffPath, true); + + if (!fsW->files().contains(conf)) + { + fsW->addPath(conf); + } + + thr1 = new QThread(nullptr); + thr2 = new QThread(nullptr); + thr3 = new QThread(nullptr); + + evtLoop = new EventLoop(&shared, thr1, nullptr); + detLoop = new DetectLoop(&shared, thr2, nullptr); + recLoop = new RecordLoop(&shared, thr3, nullptr); + + connect(this, &Camera::stop, thr1, &QThread::quit); + connect(this, &Camera::stop, thr2, &QThread::quit); + connect(this, &Camera::stop, thr3, &QThread::quit); + + connect(thr1, &QThread::finished, this, &Camera::objMinusOne); + connect(thr2, &QThread::finished, this, &Camera::objMinusOne); + connect(thr3, &QThread::finished, this, &Camera::objMinusOne); + + connect(detLoop, &DetectLoop::starving, recLoop, &RecordLoop::restart); + + thr1->start(); + thr2->start(); + thr3->start(); + + objCount = 3; + } + + return shared.retCode; +} + +void Camera::confChanged(const QString &path) +{ + emit stop(); + + if (!QFileInfo::exists(path)) + { + deleteLater(); + } + else + { + auto ret = start(path); + + if (ret != 0) + { + deleteLater(); + } + } +} + +QString Camera::statusLine() +{ + return "Detection: " + detLoop->statusLine() + + " Event-Scraping: " + evtLoop->statusLine() + + " Recording: " + recLoop->statusLine() + + " Name: " + shared.camName + "\n"; +} diff --git a/server/src/camera.h b/server/src/camera.h new file mode 100644 index 0000000..0d10f68 --- /dev/null +++ b/server/src/camera.h @@ -0,0 +1,60 @@ +#ifndef CAMERA_H +#define CAMERA_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" +#include "event_loop.h" +#include "detect_loop.h" +#include "record_loop.h" +#include "proc_control.h" + +class Camera : public QObject +{ + Q_OBJECT + +private: + + QFileSystemWatcher *fsW; + EventLoop *evtLoop; + DetectLoop *detLoop; + RecordLoop *recLoop; + QThread *thr1; + QThread *thr2; + QThread *thr3; + QTimer *statTimer; + QString statPath; + shared_t shared; + uint objCount; + bool delOnZero; + +private slots: + + void confChanged(const QString &path); + void objMinusOne(); + void updateStat(); + void prepForDel(); + +public: + + explicit Camera(const QString &confFile, const QString &statDir, ProcControl *proc, QCoreApplication *parent); + + int start(const QString &conf); + QString statusLine(); + +signals: + + void stop(); +}; + +#endif // CAMERA_H diff --git a/server/src/common.cpp b/server/src/common.cpp new file mode 100644 index 0000000..760b6b9 --- /dev/null +++ b/server/src/common.cpp @@ -0,0 +1,390 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +QStringList lsFilesInDir(const QString &path, const QString &ext) +{ + QStringList filters; + + filters << "*" + ext; + + QDir dirObj(path); + + dirObj.setFilter(QDir::Files); + dirObj.setNameFilters(filters); + dirObj.setSorting(QDir::Name); + + return dirObj.entryList(); +} + +QStringList lsDirsInDir(const QString &path) +{ + QDir dirObj(path); + + dirObj.setFilter(QDir::Dirs | QDir::NoDotAndDotDot); + dirObj.setSorting(QDir::Name); + + return dirObj.entryList(); +} + +QStringList listFacingFiles(const QString &path, const QString &ext, const QDateTime &stamp, int secs, char dir) +{ + QStringList ret; + + for (auto i = 0; i < secs; ++i) + { + QString filePath; + + if (dir == '-') filePath = path + "/" + stamp.addSecs(-i).toString(DATETIME_FMT) + ext; + if (dir == '+') filePath = path + "/" + stamp.addSecs(i).toString(DATETIME_FMT) + ext; + + if (QFile::exists(filePath)) + { + if (dir == '-') ret.insert(0, filePath); + if (dir == '+') ret.append(filePath); + } + } + + return ret; +} + +QStringList backwardFacingFiles(const QString &path, const QString &ext, const QDateTime &stamp, int secs) +{ + return listFacingFiles(path, ext, stamp, secs, '-'); +} + +QStringList forwardFacingFiles(const QString &path, const QString &ext, const QDateTime &stamp, int secs) +{ + return listFacingFiles(path, ext, stamp, secs, '+'); +} + +void rdLine(const QString ¶m, const QString &line, QString *value) +{ + if (line.startsWith(param)) + { + *value = line.mid(param.size()).trimmed(); + } +} + +void rdLine(const QString ¶m, const QString &line, int *value) +{ + if (line.startsWith(param)) + { + *value = line.mid(param.size()).trimmed().toInt(); + } +} + +void rdLine(const QString ¶m, const QString &line, quint64 *value) +{ + if (line.startsWith(param)) + { + quint64 multiplier = 1; + auto lineCpy = line; + + if (line.endsWith('k', Qt::CaseInsensitive)) + { + multiplier = 1000; lineCpy.chop(1); + } + else if (line.endsWith('m', Qt::CaseInsensitive)) + { + multiplier = 1000000; lineCpy.chop(1); + } + else if (line.endsWith('g', Qt::CaseInsensitive)) + { + multiplier = 1000000000; lineCpy.chop(1); + } + else if (line.endsWith('t', Qt::CaseInsensitive)) + { + multiplier = 1000000000000; lineCpy.chop(1); + } + + *value = lineCpy.mid(param.size()).trimmed().toULongLong() * multiplier; + } +} + +void rdLine(const QString ¶m, const QString &line, bool *value) +{ + if (line.startsWith(param)) + { + auto val = line.mid(param.size()).trimmed(); + + *value = (val == "y" || val == "Y"); + } +} + +void extCorrection(QString &ext) +{ + if (!ext.startsWith(".")) + { + ext = "." + ext; + } +} + +bool mkPath(const QString &path) +{ + auto ret = true; + + if (!QDir().exists(path)) + { + ret = QDir().mkpath(path); + } + + return ret; +} + +bool rdConf(const QString &filePath, shared_t *share) +{ + QFile varFile(filePath); + + if (!varFile.open(QFile::ReadOnly)) + { + share->retCode = ENOENT; + + QTextStream(stderr) << "err: config file - " << filePath << " does not exists or lack read permissions." << Qt::endl; + } + else + { + share->recordUri.clear(); + share->postCmd.clear(); + share->camName.clear(); + share->buffPath.clear(); + share->recPath.clear(); + + share->retCode = 0; + share->imgThresh = 8000; + share->postSecs = 60; + share->evMaxSecs = 30; + share->evtMaxBytes = 10000000000; + share->conf = filePath; + share->outputType = "stderr"; + share->compCmd = "compare -metric FUZZ " + QString(PREV_IMG) + " " + QString(NEXT_IMG) + " /dev/null"; + share->vidCodec = "copy"; + share->audCodec = "copy"; + share->streamExt = ".mkv"; + share->recExt = ".mkv"; + share->thumbExt = ".bmp"; + share->recFps = 30; + share->liveSecs = 160; + share->recScale = "1280:720"; + share->imgScale = "320:240"; + + QString line; + + do + { + line = QString::fromUtf8(varFile.readLine()); + + if (!line.startsWith("#")) + { + rdLine("cam_name = ", line, &share->camName); + rdLine("recording_uri = ", line, &share->recordUri); + rdLine("buffer_path = ", line, &share->buffPath); + rdLine("rec_path = ", line, &share->recPath); + rdLine("max_event_secs = ", line, &share->evMaxSecs); + rdLine("post_secs = ", line, &share->postSecs); + rdLine("post_cmd = ", line, &share->postCmd); + rdLine("img_thresh = ", line, &share->imgThresh); + rdLine("max_events_bytes = ", line, &share->evtMaxBytes); + rdLine("img_comp_out = ", line, &share->outputType); + rdLine("img_comp_cmd = ", line, &share->compCmd); + rdLine("vid_codec = ", line, &share->vidCodec); + rdLine("aud_codec = ", line, &share->audCodec); + rdLine("stream_ext = ", line, &share->streamExt); + rdLine("rec_ext = ", line, &share->recExt); + rdLine("thumbnail_ext = ", line, &share->thumbExt); + rdLine("rec_fps = ", line, &share->recFps); + rdLine("rec_scale = ", line, &share->recScale); + rdLine("img_scale = ", line, &share->imgScale); + rdLine("live_secs = ", line, &share->liveSecs); + } + + } while(!line.isEmpty()); + + if (share->camName.isEmpty()) + { + share->camName = QFileInfo(share->conf).baseName(); + } + + extCorrection(share->streamExt); + extCorrection(share->recExt); + extCorrection(share->thumbExt); + + if (share->outputType != "stdout" && share->outputType != "stderr") + { + share->outputType = "stderr"; + } + + if (share->buffPath.isEmpty()) + { + share->buffPath = QDir::tempPath() + "/" + QString(APP_TARGET) + "/" + share->camName; + } + else + { + share->buffPath = QDir::cleanPath(share->buffPath); + } + + if (share->recPath.isEmpty()) + { + share->recPath = "/var/" + QString(APP_TARGET) + "/footage/" + share->camName; + } + else + { + share->recPath = QDir::cleanPath(share->recPath); + } + + if (share->liveSecs < 10) + { + share->liveSecs = 10; + } + + if ((share->liveSecs - 4) < share->evMaxSecs) + { + share->evMaxSecs = share->liveSecs - 4; + } + } + + return share->retCode == 0; +} + +void setupBuffDir(const QString &path, bool del) +{ + if (del) + { + QDir(path).removeRecursively(); + } + + if (!QFileInfo::exists(path)) + { + mkPath(path); + } + + if (!QFileInfo::exists(path + "/vid")) + { + mkPath(path + "/vid"); + } + + if (!QFileInfo::exists(path + "/img")) + { + mkPath(path + "/img"); + } +} + +QString buildThreadCount(int count) +{ + QString ret = "0"; + + for (auto i = 1; i < count; ++i) + { + ret.append(","); ret.append(QString::number(i)); + } + + return ret; +} + +quint64 byteSize(const QString &path) +{ + quint64 ret = 0; + auto fileList = lsFilesInDir(path); + + for (auto name : fileList) + { + auto fullPath = QDir::cleanPath(path) + "/" + name; + + if (QFileInfo(fullPath).isDir()) + { + ret += byteSize(fullPath); + } + else + { + ret += QFile(fullPath).size(); + } + } + + return ret; +} + +QStringList parseArgs(const QByteArray &data, int maxArgs, int *pos) +{ + QStringList ret; + QString arg; + + auto line = QString::fromUtf8(data); + auto inDQuotes = false; + auto inSQuotes = false; + auto escaped = false; + + if (pos != nullptr) *pos = 0; + + for (int i = 0; i < line.size(); ++i) + { + if (pos != nullptr) *pos += 1; + + if ((line[i] == '\'') && !inDQuotes && !escaped) + { + // single quote ' + + inSQuotes = !inSQuotes; + } + else if ((line[i] == '\"') && !inSQuotes && !escaped) + { + // double quote " + + inDQuotes = !inDQuotes; + } + else + { + escaped = false; + + if (line[i].isSpace() && !inDQuotes && !inSQuotes) + { + // space + + if (!arg.isEmpty()) + { + ret.append(arg); + arg.clear(); + } + } + else + { + if ((line[i] == '\\') && ((i + 1) < line.size())) + { + if ((line[i + 1] == '\'') || (line[i + 1] == '\"')) + { + escaped = true; + } + else + { + arg.append(line[i]); + } + } + else + { + arg.append(line[i]); + } + } + } + + if ((ret.size() >= maxArgs) && (maxArgs != -1)) + { + break; + } + } + + if (!arg.isEmpty() && !inDQuotes && !inSQuotes) + { + ret.append(arg); + } + + return ret; +} diff --git a/server/src/common.h b/server/src/common.h new file mode 100644 index 0000000..53f6a13 --- /dev/null +++ b/server/src/common.h @@ -0,0 +1,99 @@ +#ifndef COMMON_H +#define COMMON_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +#define APP_VERSION "1.0" +#define APP_NAME "JustMotion" +#define APP_TARGET "jmotion" +#define DATETIME_FMT "yyyyMMddhhmmss" +#define STRFTIME_FMT "%Y%m%d%H%M%S" +#define PREV_IMG "&prev&" +#define NEXT_IMG "&next&" + +enum CmdExeType +{ + MAIN_LOOP, + VID_LOOP +}; + +struct evt_t +{ + QList vidList; + QList imgList; +}; + +struct shared_t +{ + evt_t recList; + QString conf; + QString recordUri; + QString buffPath; + QString postCmd; + QString camName; + QString recPath; + QString outputType; + QString compCmd; + QString vidCodec; + QString audCodec; + QString streamExt; + QString recExt; + QString thumbExt; + QString recScale; + QString imgScale; + quint64 evtMaxBytes; + int liveSecs; + int recFps; + int evMaxSecs; + int postSecs; + int imgThresh; + int retCode; +}; + +QString buildThreadCount(int count); +QStringList lsFilesInDir(const QString &path, const QString &ext = QString()); +QStringList lsDirsInDir(const QString &path); +QStringList listFacingFiles(const QString &path, const QString &ext, const QDateTime &stamp, int secs, char dir); +QStringList backwardFacingFiles(const QString &path, const QString &ext, const QDateTime &stamp, int secs); +QStringList forwardFacingFiles(const QString &path, const QString &ext, const QDateTime &stamp, int secs); +QStringList parseArgs(const QByteArray &data, int maxArgs, int *pos = nullptr); +quint64 byteSize(const QString &path); +bool rdConf(const QString &filePath, shared_t *share); +bool mkPath(const QString &path); +void setupBuffDir(const QString &path, bool del = false); +void rdLine(const QString ¶m, const QString &line, QString *value); +void rdLine(const QString ¶m, const QString &line, int *value); +void rdLine(const QString ¶m, const QString &line, quint64 *value); +void rdLine(const QString ¶m, const QString &line, bool *value); +void extCorrection(QString &ext); + +#endif // COMMON_H diff --git a/server/src/detect_loop.cpp b/server/src/detect_loop.cpp new file mode 100644 index 0000000..c15907d --- /dev/null +++ b/server/src/detect_loop.cpp @@ -0,0 +1,227 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "detect_loop.h" + +DetectLoop::DetectLoop(shared_t *sharedRes, QThread *thr, QObject *parent) : QFileSystemWatcher(parent) +{ + evtOn = false; + pcTimer = 0; + shared = sharedRes; + + connect(thr, &QThread::started, this, &DetectLoop::init); + connect(thr, &QThread::finished, this, &DetectLoop::deleteLater); + + moveToThread(thr); +} + +void DetectLoop::init() +{ + pcTimer = new QTimer(this); + evtTimer = new QTimer(this); + + connect(pcTimer, &QTimer::timeout, this, &DetectLoop::pcBreak); + connect(evtTimer, &QTimer::timeout, this, &DetectLoop::reset); + + connect(this, &QFileSystemWatcher::directoryChanged, this, &DetectLoop::updated); + + pcTimer->start(shared->postSecs * 1000); + evtTimer->setSingleShot(true); + + setupBuffDir(shared->buffPath); + addPath(shared->buffPath + "/vid"); +} + +void DetectLoop::updated(const QString &path) +{ + eTimer.start(); + + auto clips = lsFilesInDir(path, shared->streamExt); + auto index = clips.indexOf(vidBName); + + if (clips.size() - (index + 1) < 3) + { + thread()->sleep(1); + } + else + { + vidAName = clips[clips.size() - 3]; + vidBName = clips[clips.size() - 2]; + + vidAPath = shared->buffPath + "/vid/" + vidAName; + vidBPath = shared->buffPath + "/vid/" + vidBName; + + exec(); thread()->sleep(1); + } +} + +void DetectLoop::pcBreak() +{ + if (!shared->postCmd.isEmpty()) + { + qInfo() << "---POST_BREAK---"; + + if (evtTimer->isActive()) + { + qInfo() << "motion detected, skipping the post command"; + } + else + { + qInfo() << "no motion detected, running post command: " << shared->postCmd; + + auto args = parseArgs(shared->postCmd.toUtf8(), -1); + + if (args.isEmpty()) + { + qCritical() << "err: did not parse an executable from the post command line."; + } + else + { + QProcess::execute(args[0], args.mid(1)); + } + } + } +} + +float DetectLoop::getFloatFromExe(const QByteArray &line) +{ + QString strLine(line); + QString strNum; + + for (auto chr : strLine) + { + if (chr.isDigit() || (chr == '.')) + { + strNum.append(chr); + } + else + { + break; + } + } + + auto ok = false; + auto res = strNum.toFloat(&ok); + + if (!ok || strNum.isEmpty()) + { + qCritical() << "err: the image comp command returned unexpected output and couldn't be converted to float"; + qCritical() << " raw output: " << line; + } + + return res; +} + +QStringList DetectLoop::buildArgs(const QString &prev, const QString &next) +{ + auto args = parseArgs(shared->compCmd.toUtf8(), -1); + + for (auto i = 0; i < args.size(); ++i) + { + if (args[i] == PREV_IMG) args[i] = prev; + if (args[i] == NEXT_IMG) args[i] = next; + } + + return args; +} + +QStringList DetectLoop::buildSnapArgs(const QString &vidSrc, const QString &imgPath) +{ + QStringList ret; + + ret.append("-hide_banner"); + ret.append("-loglevel"); + ret.append("panic"); + ret.append("-y"); + ret.append("-i"); + ret.append(vidSrc); + ret.append("-frames:v"); + ret.append("1"); + ret.append(imgPath); + + return ret; +} + +QString DetectLoop::statusLine() +{ + if (eTimer.elapsed() >= 5000) + { + emit starving(); + + return "STARVED"; + } + else + { + return "OK "; + } +} + +void DetectLoop::reset() +{ + evtOn = false; +} + +void DetectLoop::exec() +{ + auto imgAPath = shared->buffPath + "/img/" + QFileInfo(vidAPath).baseName() + ".bmp"; + auto imgBPath = shared->buffPath + "/img/" + QFileInfo(vidBPath).baseName() + ".bmp"; + auto snapArgsA = buildSnapArgs(vidAPath, imgAPath); + auto snapArgsB = buildSnapArgs(vidBPath, imgBPath); + auto compArgs = buildArgs(imgAPath, imgBPath); + + if (compArgs.isEmpty()) + { + qCritical() << "err: could not parse a executable name from img_comp_cmd: " << shared->compCmd; + } + else + { + QProcess::execute("ffmpeg", snapArgsA); + QProcess::execute("ffmpeg", snapArgsB); + + if (QFile::exists(imgAPath) && QFile::exists(imgBPath)) + { + QProcess extComp; + + extComp.start(compArgs[0], compArgs.mid(1)); + extComp.waitForFinished(); + + float score = 0; + + if (shared->outputType == "stdout") + { + score = getFloatFromExe(extComp.readAllStandardOutput()); + } + else + { + score = getFloatFromExe(extComp.readAllStandardError()); + } + + qInfo() << compArgs.join(" ") << " --result: " << QString::number(score); + + if ((score >= shared->imgThresh) || evtOn) + { + shared->recList.vidList.append(vidAPath); + shared->recList.vidList.append(vidBPath); + shared->recList.imgList.append(imgAPath); + shared->recList.imgList.append(imgBPath); + + if (!evtTimer->isActive()) + { + evtTimer->start(shared->evMaxSecs * 1000); + } + } + } + } + + vidAPath.clear(); + vidBPath.clear(); +} diff --git a/server/src/detect_loop.h b/server/src/detect_loop.h new file mode 100644 index 0000000..1e0b979 --- /dev/null +++ b/server/src/detect_loop.h @@ -0,0 +1,57 @@ +#ifndef DETECT_LOOP_H +#define DETECT_LOOP_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +class DetectLoop : public QFileSystemWatcher +{ + Q_OBJECT + +private: + + QString vidAPath; + QString vidBPath; + QString vidAName; + QString vidBName; + QTimer *pcTimer; + QTimer *evtTimer; + QElapsedTimer eTimer; + shared_t *shared; + bool evtOn; + + float getFloatFromExe(const QByteArray &line); + QStringList buildArgs(const QString &prev, const QString &next); + QStringList buildSnapArgs(const QString &vidSrc, const QString &imgPath); + +private slots: + + void init(); + void reset(); + void pcBreak(); + void updated(const QString &path); + +public: + + explicit DetectLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr); + + void exec(); + QString statusLine(); + +signals: + + void starving(); +}; + +#endif // DETECT_LOOP_H diff --git a/server/src/event_loop.cpp b/server/src/event_loop.cpp new file mode 100644 index 0000000..6b3eb4f --- /dev/null +++ b/server/src/event_loop.cpp @@ -0,0 +1,172 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "event_loop.h" + +EventLoop::EventLoop(shared_t *sharedRes, QThread *thr, QObject *parent) : QObject(parent) +{ + shared = sharedRes; + heartBeat = 1; + loopTimer = 0; + + connect(thr, &QThread::started, this, &EventLoop::init); + connect(thr, &QThread::finished, this, &EventLoop::deleteLater); + + moveToThread(thr); +} + +void EventLoop::init() +{ + loopTimer = new QTimer(this); + + connect(loopTimer, &QTimer::timeout, this, &EventLoop::exec); + + loopTimer->setSingleShot(false); + loopTimer->start(heartBeat * 1000); +} + +QString EventLoop::statusLine() +{ + if (loopTimer->isActive()) + { + return "OK "; + } + else + { + return "FAIL"; + } +} + +void EventLoop::updatePls() +{ + QString text; + auto txt = QTextStream(&text); + + txt << "#EXTM3U" << Qt::endl; + txt << "#EXT-X-VERSION:3" << Qt::endl; + txt << "#EXT-X-TARGETDURATION:4" << Qt::endl; + txt << "#EXT-X-MEDIA-SEQUENCE:0" << Qt::endl; + + auto vids = lsFilesInDir(shared->recPath + "/vid", shared->recExt); + + for (auto vid : vids) + { + txt << "#EXTINF:4.000000," << Qt::endl; + txt << "vid/" << vid << Qt::endl; + } + + QFile file(shared->recPath + "/pls.m3u8"); + + if (file.open(QFile::WriteOnly)) + { + file.write(text.toUtf8()); + } + + file.close(); +} + +void EventLoop::exec() +{ + bool dirUpdated = false; + + if (!shared->recList.vidList.isEmpty()) + { + auto vidPath = shared->recList.vidList.takeFirst(); + auto imgPath = shared->recList.imgList.takeFirst(); + auto vidDst = shared->recPath + "/vid/" + QFileInfo(vidPath).fileName(); + auto imgDst = shared->recPath + "/img/" + QFileInfo(imgPath).baseName() + shared->thumbExt; + + qInfo() << "---EVENT WRITEOUT START---"; + qInfo() << "source files: "; + qInfo() << vidPath; + qInfo() << imgPath; + qInfo() << "destination files: "; + qInfo() << vidDst; + qInfo() << imgDst; + + mkPath(shared->recPath + "/vid"); + mkPath(shared->recPath + "/img"); + + if (!QFile::copy(vidPath, vidDst)) + { + qCritical() << "err: file copy operation failed." << Qt::endl; + + qInfo() << "exists?: " << vidPath << ": " << QFileInfo::exists(vidPath); + } + + if (imgPath.endsWith(shared->thumbExt)) + { + QFile::copy(imgPath, imgDst); + } + else + { + QStringList args; + + args << imgPath; + args << imgDst; + + QProcess::execute("convert", args); + } + + dirUpdated = true; + + qInfo() << "---EVENT WRITEOUT END---"; + } + else + { + // maintain max live secs worth of image files in the img buffer folder. + + auto names = lsFilesInDir(shared->buffPath + "/img", ".bmp"); + + if (names.size() > (shared->liveSecs / 3)) + { + QFile::remove(shared->buffPath + "/img/" + names[0]); + + names.removeFirst(); + } + + // maintain max live secs worth of video files in the vid buffer folder. + + names = lsFilesInDir(shared->buffPath + "/vid", shared->streamExt); + + if (names.size() > (shared->liveSecs / 3)) + { + QFile::remove(shared->buffPath + "/vid/" + names[0]); + + names.removeFirst(); + } + } + + // maintain max byte size of the vid/img folder in the recording path. + + auto names = lsFilesInDir(shared->recPath + "/vid", shared->recExt); + + if (byteSize(shared->recPath) > shared->evtMaxBytes) + { + auto nameOnly = QFileInfo(shared->recPath + "/vid/" + names[0]).baseName(); + + auto vidFile = shared->recPath + "/vid/" + nameOnly + shared->recExt; + auto imgFile = shared->recPath + "/img/" + nameOnly + shared->thumbExt; + + QFile::remove(vidFile); + QFile::remove(imgFile); + + names.removeFirst(); + + dirUpdated = true; + } + + if (dirUpdated) + { + updatePls(); + } +} diff --git a/server/src/event_loop.h b/server/src/event_loop.h new file mode 100644 index 0000000..1125dd8 --- /dev/null +++ b/server/src/event_loop.h @@ -0,0 +1,43 @@ +#ifndef EVENT_LOOP_H +#define EVENT_LOOP_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +class EventLoop : public QObject +{ + Q_OBJECT + +private slots: + + void init(); + void exec(); + +private: + + shared_t *shared; + QTimer *loopTimer; + int heartBeat; + + void updatePls(); + +public: + + explicit EventLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr); + + + QString statusLine(); +}; + +#endif // EVENT_LOOP_H diff --git a/server/src/main.cpp b/server/src/main.cpp new file mode 100644 index 0000000..2530f41 --- /dev/null +++ b/server/src/main.cpp @@ -0,0 +1,129 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" +#include "camera.h" +#include "proc_control.h" + +void showHelp(const QString etcDir) +{ + QTextStream(stdout) << APP_NAME << " " << APP_VERSION << Qt::endl << Qt::endl; + QTextStream(stdout) << "Usage: " << APP_TARGET << " " << Qt::endl << Qt::endl; + QTextStream(stdout) << "-h : display usage information about this application." << Qt::endl; + QTextStream(stdout) << "-d : all valid config files found in " << etcDir << " will be used to" << Qt::endl; + QTextStream(stdout) << " create camera instances. (this is blocking, meant to run with systemd)" << Qt::endl; + QTextStream(stdout) << "-v : display the current version." << Qt::endl; + QTextStream(stdout) << "-u : uninstall the entire server from your system, including the service. all" << Qt::endl; + QTextStream(stdout) << " recorded footage and config files will remain." << Qt::endl; + QTextStream(stdout) << "-f : force an action without pausing for user confirmation." << Qt::endl; + QTextStream(stdout) << "-s : view the status of all camera instances." << Qt::endl; + QTextStream(stdout) << "-q : kill all camera instances." << Qt::endl; + QTextStream(stdout) << "-r : same as -d except it is non-blocking for starting all camera instances" << Qt::endl; + QTextStream(stdout) << " via systemd. same as 'systemctl start " << APP_TARGET << "'" << Qt::endl; + } + +int main(int argc, char** argv) +{ + QCoreApplication app(argc, argv); + + QCoreApplication::setApplicationName(APP_NAME); + QCoreApplication::setApplicationVersion(APP_VERSION); + + auto args = QCoreApplication::arguments(); + auto etcDir = "/etc/" + QString(APP_TARGET); + auto tmpDir = QDir::tempPath() + "/" + QString(APP_TARGET); + auto staDir = tmpDir + "/stats"; + auto procFile = tmpDir + "/proc"; + auto ret = 0; + + if (!QFileInfo::exists(staDir)) + { + mkPath(staDir); + } + + if (args.contains("-h")) + { + showHelp(etcDir); + } + else if (args.contains("-v")) + { + QTextStream(stdout) << APP_VERSION << Qt::endl; + } + else if (args.contains("-d")) + { + auto confs = lsFilesInDir(etcDir); + auto proc = new ProcControl(procFile, staDir, &app); + + if (!proc->init()) + { + ret = EACCES; + } + else + { + for (auto &&conf : confs) + { + new Camera(etcDir + "/" + conf, staDir, proc, &app); + } + + ret = app.exec(); + } + } + else if (args.contains("-u")) + { + if (args.contains("-f")) + { + ret = QProcess::execute("/opt/" + QString(APP_TARGET) + "/uninstall.sh", QStringList()); + } + else + { + char ans; + + std::cout << "This will completely uninstall " << APP_NAME << " from your system. continue y/n? "; + std::cin >> ans; + + if (ans == 'y' || ans == 'Y') + { + ret = QProcess::execute("/opt/" + QString(APP_TARGET) + "/uninstall.sh", QStringList()); + } + } + } + else if (args.contains("-s")) + { + auto statFiles = lsFilesInDir(staDir); + + for (auto &&statFile: statFiles) + { + QFile file(staDir + "/" + statFile); + + file.open(QFile::ReadOnly); + + std::cout << file.readAll().data(); + + file.close(); + } + } + else if (args.contains("-q")) + { + QFile::remove(procFile); + QThread::currentThread()->sleep(5); + } + else if (args.contains("-r")) + { + QProcess::execute("systemctl start " + QString(APP_TARGET)); + } + else + { + showHelp(etcDir); + } + + return ret; +} diff --git a/server/src/proc_control.cpp b/server/src/proc_control.cpp new file mode 100644 index 0000000..610c790 --- /dev/null +++ b/server/src/proc_control.cpp @@ -0,0 +1,108 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "proc_control.h" + +ProcControl::ProcControl(const QString &procFile, const QString &statDir, QCoreApplication *parent) : QObject(parent) +{ + fsMon = new QFileSystemWatcher(this); + file = procFile; + statPath = statDir; + closeOnZero = false; + objCount = 0; + + connect(fsMon, &QFileSystemWatcher::fileChanged, this, &ProcControl::procFileUpdated); +} + +bool ProcControl::init() +{ + auto ret = false; + + if (!QFileInfo::exists(file)) + { + QFile fObj(file); + + if (!fObj.open(QFile::WriteOnly)) + { + QTextStream(stderr) << "err: Failed to open process control file for writing: " << file << " reason: " << fObj.errorString(); + } + else + { + fObj.write("##"); + fObj.close(); + + ret = true; + } + } + else + { + QTextStream(stdout) << "wrn: " << file << " already exists so it will be removed, this will cause any other existing instance to close."; + + if (!QFile::remove(file)) + { + QTextStream(stderr) << "err: Failed to remove process control file: " << file << " check permissions."; + } + else + { + thread()->sleep(3); + + ret = init(); + } + } + + if (ret) + { + fsMon->addPath(file); + } + + return ret; +} + +void ProcControl::procFileUpdated(const QString &path) +{ + fsMon->removePath(path); + + QFile::remove(path); + + closeApp(); +} + +void ProcControl::closeApp() +{ + if (objCount == 0) + { + QDir(statPath).removeRecursively(); + + QCoreApplication::instance()->quit(); + } + else + { + closeOnZero = true; + + emit prepForClose(); + } +} + +void ProcControl::objPlusOne() +{ + objCount++; +} + +void ProcControl::objMinusOne() +{ + objCount--; + + if (closeOnZero && (objCount == 0)) + { + closeApp(); + } +} diff --git a/server/src/proc_control.h b/server/src/proc_control.h new file mode 100644 index 0000000..a5bc970 --- /dev/null +++ b/server/src/proc_control.h @@ -0,0 +1,51 @@ +#ifndef PROC_CONTROL_H +#define PROC_CONTROL_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +class ProcControl : public QObject +{ + Q_OBJECT + +private: + + QFileSystemWatcher *fsMon; + QString file; + QString statPath; + bool closeOnZero; + uint objCount; + +private slots: + + void procFileUpdated(const QString &path); + void closeApp(); + +public: + + explicit ProcControl(const QString &procFile, const QString &statDir, QCoreApplication *parent); + + void objPlusOne(); + bool init(); + +public slots: + + void objMinusOne(); + +signals: + + void prepForClose(); +}; + +#endif // PROC_CONTROL_H diff --git a/server/src/record_loop.cpp b/server/src/record_loop.cpp new file mode 100644 index 0000000..c871765 --- /dev/null +++ b/server/src/record_loop.cpp @@ -0,0 +1,115 @@ +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "record_loop.h" + +RecordLoop::RecordLoop(shared_t *sharedRes, QThread *thr, QObject *parent) : QProcess(parent) +{ + checkTimer = 0; + shared = sharedRes; + + connect(thr, &QThread::started, this, &RecordLoop::init); + connect(thr, &QThread::finished, this, &RecordLoop::deleteLater); + + connect(this, &RecordLoop::readyReadStandardOutput, this, &RecordLoop::resetTime); + connect(this, &RecordLoop::readyReadStandardError, this, &RecordLoop::resetTime); + connect(this, &RecordLoop::started, this, &RecordLoop::resetTime); + + moveToThread(thr); +} + +RecordLoop::~RecordLoop() +{ + terminate(); + waitForFinished(); +} + +void RecordLoop::init() +{ + checkTimer = new QTimer(this); + + connect(checkTimer, &QTimer::timeout, this, &RecordLoop::restart); + + checkTimer->setSingleShot(true); + checkTimer->setInterval(3000); + + setupBuffDir(shared->buffPath); + restart(); +} + +QString RecordLoop::camCmdFromConf() +{ + auto ret = "ffmpeg -hide_banner -y -i '" + shared->recordUri + "' -strftime 1 -strftime_mkdir 1 "; + + if (shared->recordUri.contains("rtsp")) + { + ret += "-rtsp_transport udp "; + } + + if (shared->vidCodec != "copy") + { + ret += "-vf fps=" + QString::number(shared->recFps) + ",scale=" + shared->recScale + " "; + } + + ret += "-vcodec " + shared->vidCodec + " "; + ret += "-acodec " + shared->audCodec + " "; + ret += "-hls_time 3 -hls_list_size " + QString::number(shared->liveSecs / 3) + " -hls_flags delete_segments -hls_segment_filename vid/" + QString(STRFTIME_FMT) + shared->streamExt + " "; + ret += "pls.m3u8"; + + qInfo() << ret; + + return ret; +} + +QString RecordLoop::statusLine() +{ + if (state() == QProcess::Running) + { + return "OK "; + } + else + { + return "FAIL"; + } +} + +void RecordLoop::resetTime() +{ + checkTimer->start(); +} + +void RecordLoop::restart() +{ + if (state() == QProcess::Running) + { + terminate(); + waitForFinished(); + } + + auto cmdLine = camCmdFromConf(); + auto args = parseArgs(cmdLine.toUtf8(), -1); + + //qInfo() << "start recording command: " << cmdLine; + + if (args.isEmpty()) + { + qCritical() << "err: couldn't parse a program name"; + } + else + { + setWorkingDirectory(shared->buffPath); + setProgram(args[0]); + setArguments(args.mid(1)); + + start(); + } +} diff --git a/server/src/record_loop.h b/server/src/record_loop.h new file mode 100644 index 0000000..494a779 --- /dev/null +++ b/server/src/record_loop.h @@ -0,0 +1,47 @@ +#ifndef RECORD_LOOP_H +#define RECORD_LOOP_H + +// This file is part of JustMotion. + +// JustMotion 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. + +// JustMotion 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. + +#include "common.h" + +class RecordLoop : public QProcess +{ + Q_OBJECT + +private slots: + + void init(); + void resetTime(); + +private: + + shared_t *shared; + QTimer *checkTimer; + + QString camCmdFromConf(); + +public slots: + + void restart(); + +public: + + explicit RecordLoop(shared_t *shared, QThread *thr, QObject *parent = nullptr); + + ~RecordLoop(); + + QString statusLine(); +}; + +#endif // RECORD_LOOP_H diff --git a/server/templates/linux_run_script.sh b/server/templates/linux_run_script.sh new file mode 100644 index 0000000..8c63cfd --- /dev/null +++ b/server/templates/linux_run_script.sh @@ -0,0 +1,5 @@ +#!/bin/sh +export QTDIR=$install_dir +export QT_PLUGIN_PATH=$install_dir +export LD_LIBRARY_PATH=$install_dir/lib +$install_dir/$app_target $1 $2 $3 diff --git a/server/templates/linux_service.service b/server/templates/linux_service.service new file mode 100644 index 0000000..41b19db --- /dev/null +++ b/server/templates/linux_service.service @@ -0,0 +1,15 @@ +[Unit] +Description=$app_name Daemon +After=network.target + +[Service] +Type=simple +User=$app_target +Restart=on-failure +RestartSec=5 +TimeoutStopSec=infinity +ExecStart=/usr/bin/env $app_target -d +ExecStop=/usr/bin/env $app_target -q + +[Install] +WantedBy=multi-user.target diff --git a/server/templates/linux_uninstall.sh b/server/templates/linux_uninstall.sh new file mode 100644 index 0000000..09980e9 --- /dev/null +++ b/server/templates/linux_uninstall.sh @@ -0,0 +1,9 @@ +#!/bin/sh +systemctl stop $app_target +systemctl disable $app_target +rm -v /lib/systemd/system/$app_target.service +rm -v /usr/bin/$app_target +rm -rv /tmp/$app_target-stats +rm -rv $install_dir +deluser $app_target +echo "Uninstallation Complete"