What version of ffmpeg does libvlc use? - c++

I am writing an application on linux (debian) that uses both libvlc and ffmpeg.
Both run fine separately, but the moment I try to compile both functionalities into my app, libvlc stops working (complains about not finding the codecs).
I have been able to isolate the problem, basically libvlc runs fine until I compile the first line of ffmpeg code (av_register_all), at which point the linker brings in my own ffmpeg compiled lib, and the moment I do that, it stops playing the file. Obviously I have 2 conflicting ffmpeg libs on my system, the one libvlc is using, and the newer one I built myself to write ffmpeg code.
My question is, how do I make libvlc work with the newer library? Considering there were functions deprecated in the newer ffmpeg code, would that involve recompiling libvlc? Is the libvlc code up to date with the newest ffmpeg library(new function signatures)?
Any help is appreciated!

Related

Check if OpenCV is compiled with GTK support from C++ code

My problem is the same as in:
OpenCV GTK+2.x error
I am facing this problem deploying my code in systems where OpenCV is available but has not been installed with GTK support. I have no control over OpenCV installation in these systems.
How can I discriminate where OpenCV is compiled without GTK support from C++ code, possibly without relying on catching exceptions? I would simply avoid calling imshow in these cases.
you could check dependencies by executing ldd opencv-lib and parse the output using e.g. regex to check for some kind of gtk libs.
Or use this approach: linux/gcc: ldd functionality from inside a C/C++ program
setenv("LD_TRACE_LOADED_OBJECTS", "1", 1);
FILE *ldd = popen("/lib/libz.so");

My libprotobuf.a work for Mac Os but not for iOS Device

I am working with Cocos2dx and trying to use protobuf for communication with the server by JAVA.
I have just downloaded google protocol buffer v3.3.0 and follow the installation document. After installing it, I got a static library libprotobuf.a file, I used it for running on a Mac-Desktop, it works perfectly, but when I change to build on a iOS device, it's not working.
Errors when building for iOS device
I have spent many hours to find a solution and or dynamic library C++ of protobuf 3.3.0, however, I have nothing at all.
I really need someone's help. Could you give me some solutions, please!

How to make Windows executable file from cpp code written under Ubuntu with OpenCV library?

I wrote cpp code using OpenCV library, compiled it with cmake and everything works good on Ubuntu. Now I need to compile the same code for Windows 7 or higher. I have no experience with cross compiling, is there any at least relatively easy and reliable way how to do it? Probably somehow change the CMakeLists or so?
Building OpenCV library for Windows seems according official tutorial pretty demanding.

Win7 / Eclipse / OpenCV / MinGW: Application crashes everytime it starts

After big struggle with me and OpenCV I finally found this tutorial:
OpenCV with MinGW on Eclipse Tutorial (Scroll to "OpenCV - with CMake & MinGW")
I did everything as it has been written, but everytime I try to launch application it stops to respond just after few seconds and Windows alert communicate is shown. I noticed, that I can freely run standard C++ programs and include headfiles, but after single line of OpenCV code it fails to work properly. Also there is no information about error.
why don't you try the official tutorial http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html#linux-eclipse-usage
this is the official site in opencv documentation which should get you started, it includes tutorials to get you started on lots of other platforms
http://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction
I also had a touch time getting OpenCV running but finally I found something that worked (I use Qt Creator as my IDE, not Eclipse, but maybe the problem and solution is similar).
At first I tried to download OpenCV 2.4.8, but I found it didn't include any MinGW binaries. I followed a forum on the web and installed CMake, but it seemed like OpenCV 2.4.8 didn't contain the CMake target for MinGW. After reading some more forums, I downloaded OpenCV 2.4.3 and was able to use CMake along with MinGW 4.8 (version that came with Qt 5.2) to build OpenCV. This got me to a point where I could compile my programs and attempt to run them. Some of the pure c commands even worked like cvLoadImage, but any of the c++ commands like imread or Mat::zeros(3,3, CV_8UC1) would cause a crash.
I tried building openCV a few more times with different options. Some sites suggested turning off SSE and SSE2 or building the debug version, but none of this worked for me.
Finally I ended up downloading TDM-GCC-32. I downloaded the on demand installer and made sure to get the dw2 version of the compiler (since a while ago I spent some time dealing with dw2 vs sjlj incompatibilities). Finally I rebuilt OpenCV with the TDM-GCC and also set TDM-GCC as the compiler in Qt Creator. This ended up being the fix.
I think there are some incompatibilities between the reference counting / allocation code used by the OpenCV Mat type and some versions of MinGW. I say this because all my crashes seemed to come from sections of code using the openCV matrix. (It seemed like it wasn't properly initialized or something). Switching to the TDM-GCC compiler fixed the problem.

Decode mp4 to raw frames windows c++

I'm trying to decode an MP4 file i've created using mp4creator library. I can't find a ffmpeg or libav example that actually works with the libraries, because the code is incompatible with the examples.
I need a simple way of reading the mp4 file and decoding it into raw audio and video frames. In needs to work on windows too.
If someone can point me towards a working and compatible ffmpeg/libav library + example source file that could work too.
If i could get the library version which was used in this tutorial that would work, since this guy seems to be the only one who wrote a decent tutorial on FFMPEG (albeit on some ancient version)
http://dranger.com/ffmpeg/
edit:
In the latest version of ffmpeg i found the example named: filtering_video.c
using a patch found: http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126587.html I have gotten the program to do "something" It looks to be working so I will investigate further.
As edited into the question: In the latest version of ffmpeg i found the example named: filtering_video.c
using a patch found: http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126587.html I have gotten the program to work.
Using the function avtoipl described here: http://www.digipedia.pl/usenet/thread/16949/6806/
I've gotten the data into an opencv RGB image which i can display.