Skip to content

Linux support #24

Open
Open

Description

@avilleret

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

Activity

  1. ebachard commented on Jul 24, 2020

    @ebachard

    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

  2. avilleret commented on Jul 24, 2020

    @avilleret
    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.

  3. ebachard commented on Jul 25, 2020

    @ebachard

    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.

  4. harshal-99 commented on Sep 12, 2020

    @harshal-99

    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

  5. ebachard commented on Sep 28, 2020

    @ebachard

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions