Using Standard .so files in GStreamer - gstreamer

I'm a beginner in GStreamer programming.
I created a pipeline for playing media in a file.
I would like to use libogg.so for decoding the ogg format files rather than libgstogg.so.
How can i use the this decoder in my pipeline?

Everybody is beginner in gstreamer programming it seems :)
You will have to write a program, may be C program and link it against libogg.so rather than libgstogg.so
You can achieve above easily using cmake
To be confirm what lib the program picked for linking,
You may try renaming libgstogg or
Running strace to see which location the binary picked the file
Create a shared library of your program and run ldd

you seem to miss some basic concepts here:
gstreamer is a framework to build media pipelines from elements
elements are defined via a plugin-system. the plugin-files are shared-objects (.so) files
you cannot use just any shared-object as a plugin (gstreamer will not recognize e.g. libc.so as a plugin - simply because libc.so does not provide a gstreamer plugin)
so in your special case you want to exchange libgstogg.so by libogg.so.
now libgstogg.so is a shared object, that provides the ogg family of gstreamer plugins.
on the other side libogg.so is an implementation of an ogg muxer/demuxer that has nothing to do with gstreamer.
if you want to use libogg.so you will have to create your own gstreamer-plugin that uses libogg.so. check the documentation on how to do that.
before you do so, check what libgstogg.so actually does. you will disover, that it provides a gstreamer plugin that uses libogg.so to do the actual muxing/demuxing. it is really just the bridge that you are looking for:
$ ldd /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstogg.so | grep ogg
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fc3f9ae7000)

Related

How to read audio metadata using TagLib with dart FFI

I am working on a cross-platform music player app with Flutter. I encounter a problem with reading audio metadata. I have found a package to read called Metadata God but it supports a few types of file formats. I need to support MP3, M4A, WMA, OGG, OPUS, FLAC, WAV, and ALAC file types and fetch more metadata fields like genre, mood, language, rating, and more.
I know that TagLib c++ library can do what I require but I couldn't find documentation or example to work with c++ objects using dart FFI. And also it is pretty complicated to compile TagLib inside Flutter plugin project. I can compile it on CMake GUI.
So I am thinking to compile TagLib as a shared library (dll, so, or dylib) and create wrapper functions to bind it using FFI. Please give me an example of how to do that or other suggestions to resolve those difficulties.

MP3 decoder using IPP

I need an mp3 decoder (no need for encoding), and since I already own Intel IPP, I wonder if I can use it instead searching for other libraries such as mpg123 or ffmpeg. This page contains IPP sample archive:
https://software.intel.com/en-us/articles/code-samples-for-intel-integrated-performance-primitives-intel-ipp-v61-library
There is something called UMC, which should be generalized codec system, but the documentation is virtually nonexistent, it is spread between many subprojects and the downloads are different for Windows & Mac.
Is UMC the right way to go to get an MP3 decoder? Does it work on both Windows & Mac?

QNX Microphone sampling and speaker playback

I am using QNX neutrino RTOS, I am new to QNX. I have setup my first project with some IPC messaging between two threads.
What I want to do is have one thread as a microphone "driver" that samples input from the microphone and stores / sends it as PCM packets to another thread which plays it out of the speaker.
So, are there any audio support libraries?, what is the best way to achieve recording microphone input and speaker output?
Yes, QNX comes with an audio library.
The audio library is documented starting at this location (6.5 SP1 version):
http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp?topic=%2Fcom.qnx.doc.neutrino_audio%2Fabout.html&cp=13_1
Your qnx system includes a utility (command) called "wave" for playing back a .wav file and "waverec" for recording audio from the microphone and saving it to a .wav file.
You can use the "use wave" and "use waverec" commands for getting information about the supported command line options.
The documentation includes the complete source of the wave and waverec utilities:
wave.c:
http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp?topic=%2Fcom.qnx.doc.neutrino_audio%2Fwavec.html
waverec.c:
http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp?topic=%2Fcom.qnx.doc.neutrino_audio%2Fwaverec.html
The recommended way to start with audio recording and playback is to first have the wave and waverec binaries shipped with the system working. After that build the supplied source, have it working again, then understand it and embed in your application, possibly after stripping it down. (Because the sample is generic and perhaps you want to hard-code certain features that are dynamically configured in the sample).
You need to link against the libasound.so library in order to build the samples.
A minimal command-line example (tested) to build wave.c for armlev7 and x86:
ntoarmv7-gcc wave.c -o wave -l asound
ntox86-gcc wave.c -o wave -l asound
If you are building via the IDE then you need to add the library in the appropriate setting.
You are welcome to post here any questions you may have while working with the samples.

How to convert flv video to mp3 using ffmpeg programmatically?

I need to create application on C++ for video conversion, and I can't use ffmpeg.exe.
I need to do it programmatically, but I don't know how can I do it, and I didn't find any examples on Internet.
May be somebody know something about my task? Thank you.
ffmpeg is an open source project. The transcoding engine used by ffmpeg is in the libraries libavcodec (for the codecs) and libavformat (for the containers). You can write your conversion as calls into these libraries, without the ffmpeg command line application.
Here is a tutorial on using these libraries.
Good luck.
Here's another good ffmpeg tutorial. Looking at the actual source code for ffmpeg would also help.
An updated version of the tutorial source is here.

How do I use the 7z sdk to extract rar/zip files (C++)?

I'm trying to write a small, cross-platform comic book reader (Qt / C++). I don't care what's already out there, I know there are some.
My problem is that I need to read the comic book formats, which are renamed rar and zip files.
The documentation is very... nonexistent? There's no "hello archive" document anywho.
How can I set this up?
If It makes it easier to assume I'm on any particular OS, do so. I'm switching between Kubuntu, OSX, and Win7 constantly for dev work.
I've been working on a simple C++ wrapper for the 7zip SDK, which you can find here. It currently only supports Windows and the specific needs I had, but I'd be happy to make some alterations and/or accept contributions. It can extract 7zip and Zip files in a few lines of code, using the 7z.dll. RAR shouldn't be difficult to add since the DLL supports it.
7z should actually come with both source for a commandline variant and a GUI variant, you could dig into to those and see how they do the compression, else you could use unRar and see if that has any examples(unfortunatly I can't check due to the download being blocked where I am).
Poking around the LMZA SDK a bit I came across this:
ANSI-C LZMA Decoder
~~~~~~~~~~~~~~~~~~~
Please note that interfaces for ANSI-C
code were changed in LZMA SDK 4.58. If
you want to use old interfaces you can
download previous version of LZMA SDK
from sourceforge.net site.
To use ANSI-C LZMA Decoder you need
the following files:
1) LzmaDec.h + LzmaDec.c + Types.h
LzmaUtil/LzmaUtil.c is example
application that uses these files.