libsourcey | C++14 evented IO libraries for high performance networking and media based applications
kandi X-RAY | libsourcey Summary
kandi X-RAY | libsourcey Summary
LibSourcey is a collection of cross platform C++14 modules and classes that provide developers with an arsenal for rapidly developing high performance network based p2p and media streaming applications. Think of it as the power and performance of libuv combined with the features of FFmpeg, OpenCV and WebRTC, all integrated with the ease and readability of the stl (C++ Standard Library).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libsourcey
libsourcey Key Features
libsourcey Examples and Code Snippets
Community Discussions
Trending Discussions on libsourcey
QUESTION
I'm using libsourcey which uses libuv as its underlying I/O networking layer. Everything is setup and seems to run (haven't testen anything yet at all since I'm only prototyping and experimenting). However, I require that next to the application loop (the one that comes with libsourcey which relies on libuv's loop), also calls an "Idle function". As it is now, it calls the Idle CB on every cycle which is very CPU consuming. I'd need a way to limit the call-rate of the uv_idle_cb without blocking the calling thread which is the same the application uses to process I/O data (not sure about this last statement, correct me if i'm mistaken).
The idle function will be managing several different aspects of the application and it needs to run only x times within 1 second. Also, everything needs to run one the same thread (planning to upgrade an older application's network infrastructure which runs entirely single-threaded).
This is the code I have so far which also includes the test I did with sleeping the thread within the callback but it blocks everything so even the 2nd idle cb I set up has the same call-rate as the 1st one.
...ANSWER
Answered 2018-Apr-27 at 23:42Solved the problem by using uv_timer_t and uv_timer_cb (Hadn't digged into libuv's doc yet). CPU usage went down drastically and nothing gets blocked.
QUESTION
I'am trying to run the LibSourcey to use the Webrtc Streaming Server.
The thing is that i can't seem to make it work. I struggled to cmake the project on my Ubuntu 16.04(Regexp in cmake files) but now its fixed . The problem that i actually got is a shared object bug at compiling time :
...ANSWER
Answered 2017-Jul-18 at 18:51You have a linkage error, not a compilation error. You haven't run into a bug, you have just attempted a linkage that cannot work.
You are trying to build a shared library libscy_av.so
. All the object
files that are linked in a shared library must consist of Position Independent
Code. To generate
such an object file with gcc, you compile with the option -fPIC
.
The linker discovers that your shared libary requires the object file
options.o
, which is a member of the static library libswresample.a
. It then
discovers that this options.o
is not PIC, and so cannot be linked in
a shared library. The linkage fails and the linker advises you that
options.o
must be recompiled with the -fPIC
compiler option.
To comply with that advice, you would have to rebuild the static library libswresample.a
from source, with -fPIC
added to the compiler flags.
You might do that, but it is unusual for object files in a static library to
be PIC, and there is an easier option. Your mistake was in linking against
the static version of libswresample
(libswresample.a
) rather than the
shared version (libswresample.so
), which will be PIC. Just correct that mistake. If you install
libswresample.a
from a dev package provided by your package manager, then
it will also provide libswresample.so
. If you have built libswresample
from source, then the build system will also build both.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libsourcey
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page