xiph / ogg Goto Github PK
View Code? Open in Web Editor NEWReference implementation of the Ogg media container
License: BSD 3-Clause "New" or "Revised" License
Reference implementation of the Ogg media container
License: BSD 3-Clause "New" or "Revised" License
So, first I was struggling with finding Ogg Package. In my project, that is builded with CMake, I have both Ogg and Vorbis repositories as submodules:
/deps/ogg/<ogg repository>
/deps/vorbis/<vorbis repository>
CMakeLists.txt
Alongside others dependencies, I have these two sections dedicated to include Ogg and Vorbis in my CMakeLists.txt
(...)
# OGG
add_subdirectory("deps/ogg")
list( APPEND LINK_LIBRARIES ogg )
# Vorbis
set( OGG_ROOT ${PROJECT_SOURCE_DIR}/deps/ogg )
set( OGG_LIBRARY ogg )
add_subdirectory("deps/vorbis")
list( APPEND LINK_LIBRARIES vorbisfile )
(...)
I took a look at FindOgg.cmake (Vorbis repo) to find out that I should hint OGG_ROOT
, but should I have defined OGG_LIBRARY
as well? I'm kinda new to CMake so that was a bit confusing to me, since I thought that the point with find_package(Ogg)
was to define OGG_LIBRARY
. If I don't define OGG_LIBRARY
, find_package(Ogg)
fails.
Anyway, from here everything works fine until linking stage. I got it working after editing Vorbis's CMakeLists.txt
:
(...)
target_link_libraries(vorbis
PUBLIC Ogg::ogg
PRIVATE $<$<BOOL:${HAVE_LIBM}>:m>
)
(...)
Ogg::ogg
was being included simply as "ogg", i.e.:
/usr/bin/g++-9 -g (.....) deps/ogg/libogg.a deps/vorbis/lib/libvorbisfile.a deps/vorbis/lib/libvorbis.a ogg (....)
Is this somehow related to how I defined OGG_LIBRARY
? I managed to fix it by changing Ogg::ogg
to ${OGG_LIBRARY}
:
(...)
target_link_libraries(vorbis
PUBLIC ${OGG_LIBRARY}
PRIVATE $<$<BOOL:${HAVE_LIBM}>:m>
)
(...)
Webp is currently a more compact format than jpeg when on lossy compression, same with PNG and lossless compression:
https://github.com/webmproject/libwebp/
Is it possible and viable to implement it for usage on thumbnails with the ogg container, either video or audio?
So the problem here is a package maintainer for a distro or some system may not use the CMake build when making their packages, and instead base their process on the Autotools or other build. When this happens, the OggConfig.cmake file will not be in place, and in turn using find_package
in other CMake projects in such system won't work.
Also a new release with the recent CMake improvements would be welcome.
Hello,
currently the MSVC project files define a lib
prefix for the ogg library, leading to a libogg.dll
shared library, a libogg.lib
import library and a libogg_static.lib
static library. This is inconsistent with the output generated by CMake, which in the current configuration creates a ogg.dll
shared library, a ogg.lib
import library and a ogg.lib
static library.
But how to fix this? It's possible to change the MSVC projects or to set the prefix in the CMake configuration. The lib prefix isn't removed by the linker during runtime linking so one would always need to link against libogg
on windows, making it inconsistent across platforms where you link against ogg
, making cross platform builds a bit harder (eg. you would need to update the CMakelists.txt of the vorbis project to search for libogg too instead of just searching for ogg). On the other hand it would break compatibility in the sense that clients who use libogg in their project file, causing link error until the linker dependency is changed from libogg.lib to ogg.lib.
VCPKG is using the gitlab instance to download the latest version. However gitlab returns a 500 see: https://gitlab.xiph.org/xiph/ogg/-/archive/v1.3.5/ogg-v1.3.5.tar.gz
VCPKG ticket: microsoft/vcpkg#31930
microsoft/vcpkg#31927
As the title says the https://ftp.osuosl.org/pub/xiph/releases/ogg/MD5SUMS file doesn't contain any entry for the libogg v1.3.3 release.
New feature or function impovement in TODO List. I think it's a good way to attract more developer.
Dear All,
since I found no online IRC client to contact the devs of multiple projects, this is my entry point.
I am a user of SFML, a cross-platform GUI project that has an audio module that heavily depends on Xiph.org projects. Since I am an HPC GPGPU developer living on Windows but targeting linux clusters, CMake is the bread and butter for my life, as is for most cross-platform developers. If you are not familiar with it, consider taking a look. I tend to use always the latest unreleased versions of MSVC I need to build most of my own dependencies from source.
SFML has nice CMake support, but it's dependencies do not. While Xiph.org projects do provide some outdated Visual Studio solution files, moving to CMake has a meta-makefile would make life easier on your part too. Creating installer packages with (CPack) and creating unit tests (CTest) or getting distributed build automation (CDash) comes at a few lines of scripting only. CMake is not easily mastered, but pays off in the long run.
I would be willing to conitrubte to CMakeifying libOGG and libFLAC, and based on it other Xiph.org projects could adopt the build system easily. I have been using CMake for a while now for my own projects, and feel that I could put together PROPER CMake support. If you could give me a jump-start as to what platform-specific things are done by the current machinery, I could get started with a prototype, if you see fit.
I am a heavily overburdened person, so the speed at which I could work on this is not much, but I would like to contribute to the greater good.
when compile with cmake/mingw64 with msys2 shell
ogg.def is used
LIBRARY must be set to libogg, and then the executables will looking for libogg.dll, and not ogg.dll like now
flac and opus don't use a .def, and it works fine
is it necessary to use ogg.def for win32?
install msys2 from msys2.org
install mingw64 toolchain, mingw64 cmake
git clone opus in a dir ......src/opus
cd build/opus
export CFLAGS="-D_FORTIFY_SOURCE=0"
cmake -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -DWITH_STACK_PROTECTOR=OFF
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DWITH_OGG=ON ../../src/opus
if you build libsndfile for example, it will lookfor ogg.dll and not libogg.dll
if you set LIBRARY libogg it will be OK
but it would be simpler to make like flac or opus, withiut a def file
Install-Package ogg-msvc14-x64
Install-Package ogg-msvc14-x86
REF: #24
https://www.nuget.org/packages/ogg-msvc14-x64
https://www.nuget.org/packages/ogg-msvc14-x86
The current v1.3.3 release archive doesn't contain the CMake build system.
include/ogg/config_types.h:24:10: error: ‘ogg_uint64_t’ does not name a type; did you mean ‘ogg_int64_t’?
typedef ogg_uint64_t;
^~~~~~~~~~~~
ogg_int64_t
I am getting this error on linux, gcc with cmake generated project.
Has the unsigned type been removed?
From the autoconf doc https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.html the following macros are obsolecent
It should be "Ogg_FOUND" not "OGG_FOUND"
everything in the title
In function ‘_os_lacing_expand’,
inlined from ‘ogg_stream_pagein.constprop’ at framing.c:814:6:
framing.c:215:8: warning: argument 2 range [18446744073709551484, 18446744073709551612] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
ret=_ogg_realloc(os->lacing_vals,lacing_storage*sizeof(*os->lacing_vals));
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from framing.c:26:0:
framing.c: In function ‘ogg_stream_pagein.constprop’:
/usr/include/stdlib.h:549:14: note: in a call to allocation function ‘realloc’ declared here
extern void *realloc (void *__ptr, size_t __size)
^~~~~~~
In function ‘_os_lacing_expand’,
inlined from ‘ogg_stream_pagein.constprop’ at framing.c:814:6:
framing.c:221:8: warning: argument 2 range [18446744073709551352, 18446744073709551608] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
ret=_ogg_realloc(os->granule_vals,lacing_storage*
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(*os->granule_vals));
~~~~~~~~~~~~~~~~~~~~~~~~~~
Feel free to add -Wall -pedantic
CFLAGS to help catch these if they're not showing up. Cheers.
Hello
meson has some advantages over cmake:
Hi, please can you update the sum files with new versions of ogg?
https://ftp.osuosl.org/pub/xiph/releases/ogg/ ← MD5SUMS is missing the latest release
Thanks in advance.
Many other projects (zlib, png, SDL2, ...) embed version info in header file. I think ogg could also benefit from that. Yes, I'm aware of version info in pc files but that's not an option on Windows.
Using CMake you get Makefile.* in target docs directory
Tested on FreeBSD 13
vorbis master branch, commit 4e1155cc77a2c672f3dd18f9a32dbf1404693289
What about using C99 standard and its types, instead of checking for all the possible values ? C99 was 23 years old and one can consider that the compilers support it on all the needed platforms
When is the next libogg
release planned?
The latest release of libFLAC
(1.3.3) seems to be incompatible to the latest release of libogg
(1.3.4).
The problem apparently has been fixed in the master
branch (see also https://gitlab.xiph.org/xiph/ogg/-/issues/1747).
I'm aware that this github repo is only mirror for git.xiph.org/ogg.git and they had diverged a bit. But it's really bad idea to rewrite history instead of merging.
@tmatth asked me to make a new release. I'm slowly going through the accumulated PRs and issues to get things ready to go.
If you haven't tested the ogg development tree recently, now is a good time!
2019-09-26T07:58:23.6518222Z analyze-build: INFO: /home/runner/work/dosbox-staging/dosbox-staging/src/libs/decoders/internal/ogg/src/bitwise.c:98:12: warning: Array access (via field 'ptr') results in a null pointer dereference
2019-09-26T07:58:23.6519776Z analyze-build: INFO: b->ptr[0]|=value<<b->endbit;
2019-09-26T07:58:23.6520495Z analyze-build: INFO: ~~~ ^
2019-09-26T07:58:23.6521232Z analyze-build: INFO: /home/runner/work/dosbox-staging/dosbox-staging/src/libs/decoders/internal/ogg/src/bitwise.c:209:7: warning: 2nd function call argument is an uninitialized value
2019-09-26T07:58:23.6521886Z analyze-build: INFO: w(b,(unsigned long)(ptr[i]),8);
2019-09-26T07:58:23.6522659Z analyze-build: INFO: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-09-26T07:58:23.6523468Z analyze-build: INFO: /home/runner/work/dosbox-staging/dosbox-staging/src/libs/decoders/internal/ogg/src/bitwise.c:223:7: warning: 2nd function call argument is an uninitialized value
2019-09-26T07:58:23.6524092Z analyze-build: INFO: w(b,(unsigned long)(ptr[bytes]),bits);
2019-09-26T07:58:23.6524658Z analyze-build: INFO: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-09-26T07:58:23.6525200Z analyze-build: INFO: 3 warnings generated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.