├── README.md ├── .github └── ISSUE_TEMPLATE.md ├── integration └── handle_rtp.c └── LICENSE.md /README.md: -------------------------------------------------------------------------------- 1 | # Majestic Community edition support 2 | 3 | ## Information 4 | 5 | Majestic project internally uses [smolrtsp](https://github.com/OpenIPC/smolrtsp) project. Contribute there to improve majestic. 6 | 7 | ## Issues 8 | 9 | Feel free to open [an 10 | issue](https://github.com/OpenIPC/majestic_issues/issues/new/choose) and provide 11 | us information to reproduce the bug 12 | 13 | ## Integration 14 | 15 | RTP video stream could be sent via local unix socket to deliver data to custom clouds and 16 | CV applications. See [example](integration/handle_rtp.c) as reference. 17 | 18 | ## Plugins 19 | 20 | Experimental system for creating plugins for Majestic. See [example](https://github.com/OpenIPC/majestic-plugins) as reference. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | # Required information 9 | 10 | * Camera board id: 11 | * OpenIPC version: 12 | * Commit: 13 | * Branch: 14 | * Tag: 15 | * installation method: (by manual https://github.com/OpenIPC/openipc-2.1/wiki/install_hisi or another) 16 | * modified majestic.yaml: yes/no 17 | * cat /dev/kmsg 18 | * killall majestic 19 | ulimit -c unlimited 20 | echo /tmp/%e.%p.%s.%t.core > /proc/sys/kernel/core_pattern 21 | majestic 22 | Core dump file from /tmp/ , e.g. /tmp/majestic.806.11.1619707881.core 23 | 24 | # Issue description 25 | 26 | A brief description of the problem. Should include what you were 27 | attempting to do, what you did, what happened and what you expected to 28 | see happen. 29 | 30 | # Expectations 31 | 32 | # Steps to reproduce 33 | 34 | 1. Step one 35 | 2. Step two 36 | 3. Step three 37 | 38 | # Information to attach 39 | 40 | - [ ] Any relevant log output (`logread -f`) 41 | - [ ] majestic.yaml configuration (`cat /etc/majestic.yaml`) 42 | 43 | -------------------------------------------------------------------------------- /integration/handle_rtp.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #define SOCKET_NAME "/tmp/rtpstream.sock" 12 | #define BUFFER_SIZE 4096 13 | 14 | int main(int argc, char *argv[]) { 15 | int fd = socket(AF_UNIX, SOCK_SEQPACKET, 0); 16 | if (-1 == fd) { 17 | perror("socket"); 18 | return EXIT_FAILURE; 19 | } 20 | 21 | struct sockaddr_un addr = {AF_UNIX, {0}}; 22 | strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1); 23 | 24 | if (connect(fd, (struct sockaddr *)&addr, sizeof addr) == -1) { 25 | perror("connect"); 26 | return EXIT_FAILURE; 27 | } 28 | 29 | char *buffer = malloc(BUFFER_SIZE); 30 | assert(buffer); 31 | 32 | while (true) { 33 | const ssize_t ret = read(fd, buffer, BUFFER_SIZE); 34 | 35 | switch (ret) { 36 | case -1: // Error 37 | perror("read"); 38 | goto shutdown; 39 | break; 40 | case 0: // EOF 41 | puts("Done!"); 42 | goto shutdown; 43 | break; 44 | default: 45 | printf("%zd bytes received.\n", ret); 46 | break; 47 | } 48 | } 49 | 50 | shutdown: 51 | close(fd); 52 | free(buffer); 53 | } 54 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The Prosperity Public License 3.0.0 2 | 3 | Contributor: OpenIPC (c) 2025 4 | 5 | ## Purpose 6 | 7 | This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days. 8 | 9 | ## Agreement 10 | 11 | In order to receive this license, you have to agree to its rules. Those rules are both obligations under that agreement and conditions to your license. Don't do anything with this software that triggers a rule you can't or won't follow. 12 | 13 | ## Notices 14 | 15 | Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above. 16 | 17 | ## Commercial Trial 18 | 19 | Limit your use of this software for commercial purposes to a thirty-day trial period. If you use this software for work, your company gets one trial period for all personnel, not one trial per person. 20 | 21 | ## Contributions Back 22 | 23 | Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose. 24 | 25 | ## Personal Uses 26 | 27 | Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose. 28 | 29 | ## Noncommercial Organizations 30 | 31 | Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding. 32 | 33 | ## Defense 34 | 35 | Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent. 36 | 37 | ## Copyright 38 | 39 | The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it. 40 | 41 | ## Patent 42 | 43 | The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license. 44 | 45 | ## Reliability 46 | 47 | The contributor can't revoke this license. 48 | 49 | ## Excuse 50 | 51 | You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule. 52 | 53 | ## No Liability 54 | 55 | ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.*** 56 | --------------------------------------------------------------------------------