Skip to content

Commit

Permalink
Implementing PNG support for OSD uploads, integrating libspng and miniz
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Nov 10, 2024
1 parent bda6e18 commit 3ab8dd8
Show file tree
Hide file tree
Showing 20 changed files with 17,077 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"name": "armhf-musl",
"includePath": ["${workspaceFolder}/**"],
"defines": ["__arm__"],
"compilerPath": "toolchain/cortex_a7_thumb2-gcc13-musl-4_9/bin/arm-openipc-linux-musleabi-gcc",
"compilerPath": "toolchain/cortex_a7_thumb2_hf-gcc13-musl-4_9/bin/arm-openipc-linux-musleabihf-gcc",
"cStandard": "c11"
},{
"name": "mips-musl",
Expand Down
125 changes: 93 additions & 32 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---

The forked tinysvcmdns component from @mikebrady/shairport-sync is included under src/lib.
A copy of the original source code may be downloaded from git+https://github.com/mikebrady/shairport-sync.
It is accompanied by the following license and notice:

tinysvcmdns - a tiny MDNS implementation for publishing services
Copyright (C) 2011 Darell Tan
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

The following software is included in this product under src/rtsp: @ykst/librtsp.
A copy of the original source code may be downloaded from git+https://github.com/ykst/librtsp.
It is accompanied by the following license and notice below:
Expand Down Expand Up @@ -79,6 +47,67 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

The following software is included in this product under src/lib: @randy408/libspng.
A copy of the original source code may be downloaded from git+https://github.com/randy408/libspng.
It is accompanied by the following license and notice below:

BSD 2-Clause License

Copyright (c) 2018-2023, Randy <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

The following software is included in this product under src/lib/miniz: @richgel999/miniz.
A copy of the original source code may be downloaded from git+https://github.com/richgel999/miniz.
It is accompanied by the following license and notice below:

Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC

All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---

The following software is included in this product under src/lib/shine: @toots/shine.
A copy of the original source code may be downloaded from git+https://github.com/toots/shine
It is accompanied by following license and notice below:
Expand Down Expand Up @@ -566,4 +595,36 @@ necessary. Here is a sample; alter the names:

That's all there is to it!

---

The forked tinysvcmdns component from @mikebrady/shairport-sync is included under src/lib.
A copy of the original source code may be downloaded from git+https://github.com/mikebrady/shairport-sync.
It is accompanied by the following license and notice:

tinysvcmdns - a tiny MDNS implementation for publishing services
Copyright (C) 2011 Darell Tan
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---
12 changes: 12 additions & 0 deletions src/hal/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ unsigned int millis() {
return t.tv_sec * 1000 + (t.tv_usec + 500) / 1000;
}

void reverse(void *arr, size_t width) {
char *val = (char*)arr;
char tmp;
size_t i;

for (i = 0; i < width / 2; i++) {
tmp = val[i];
val[i] = val[width - i - 1];
val[width - i - 1] = tmp;
}
}

char *split(char **input, char *sep) {
char *curr = (char *)"";
while (curr && !curr[0] && *input) curr = strsep(input, sep);
Expand Down
2 changes: 2 additions & 0 deletions src/hal/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ char *memstr(char *haystack, char *needle, int size, char needlesize);

unsigned int millis();

void reverse(void *arr, size_t width);

char *split(char **input, char *sep);

void unescape_uri(char *uri);
Loading

0 comments on commit 3ab8dd8

Please sign in to comment.