Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux support #24

Open
avilleret opened this issue Jul 24, 2020 · 5 comments
Open

Linux support #24

avilleret opened this issue Jul 24, 2020 · 5 comments

Comments

@avilleret
Copy link

Having trouble interfacing with the ffmpeg C API directly from C++, I would like to give a try to ffmpeg-cpp.
Unfortunately, it's not that straightforward.

First of all, the windows only crtdbg.h is included from ffmpeg.h (and the later have a common name which could cause troubles on Linux).
This can be fixed by adding the proper #ifdef statement.

But then, I got the following error :

../FFmpegException.h:18:23: error: looser exception specification on overriding virtual function ‘virtual const char* ffmpegcpp::FFmpegException::what() const’ 18 | virtual char const* what() const

I do think this is specific to Windows exception implementation.

If someone is interested in, the CMakelists is attached.
It should go to source/ffmpeg-cpp/ffmpeg-cpp folder.
This is a very kick of, only files besides the CMakelists.txt are taken (nothing from subdirectories).
CMakeLists.txt

@ebachard
Copy link

ebachard commented Jul 24, 2020

So far, Linux is not really / officialy supported there.

If you don"t care about the license, you should have a look at :
https://framagit.org/ericb/ffmpeg-cpp2

Or even https://github.com/ebachard/ffmpeg-cpp if you prefer github, but it's not up to date like the first repo.

HTH

@avilleret
Copy link
Author

I know that linux is not officially supported here but since I read :

since the project itself is fully platform-independent.

in the readme.md I thought it was worth a try.

@ebachard
Copy link

I fully agree, I thought it was true like you. But is is not.

Back to the issue, and after a second read, your issue is caused by the exception handling : use strings instead, of char * everywhere + take care to some methods signatures, and it should help.

There are some other bad design issues IMHO (like serious visibility mess with some AV* structures, causing shadow issues, very difficult to track). If you prefer stick to this repository, I'd rather suggest you https://github.com/wvaarle/ffmpeg-cpp . This guy fixed a lot of issues and, IMHO, this is the better compromise.

Last but not least, if your time is precious, have a look at the framagit version I proposed you. FYI, once I'll have found a RPI 4/ 8GB, I'll improve (I mean I'll try to optimize) the Linux port on this machine.

@harshal-99
Copy link

harshal-99 commented Sep 12, 2020

First of all, the windows only crtdbg.h is included from ffmpeg.h (and the later have a common name which could cause troubles on Linux).

Not just that it also includes windows.h

@ebachard
Copy link

@harshal-99

Are you serious ? :-)

The code, the tree, the recent changes (completely wrong) ... and a lot of "details" show there are probably Microsoft devs behind that. When will C# beiing added btw ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants