-
Notifications
You must be signed in to change notification settings - Fork 751
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
AVERROR(errno) is not defined #454
Comments
We would have to pick up the errno constants from somewhere, but they are not part of FFmpeg. The header files differ depending on the operating system. What would you suggest to do? |
The list used by FFmpeg is purely a subset, and we should implement the most vital ones like EAGAIN. If we can evaluate preprocessor we should get from it, else we would be just using a hardcoded enum. I have collected all codes directly referenced by the source. Note that there may be other source of errno (e.g. system IO). |
We also need a list of constants that are available on all the platforms... |
Or actually, we could simply implement them as JNI functions and they would return whatever constants are available as build time. |
A sad thing is that BSD family including Mac uses a different value of EAGAIN. This means that we cannot hardcode it and must evaluate in some manner. |
Declarations such as this at the bottom of public static native @MemberGetter @Name("AVERROR(EAGAIN)") int AVERROR_EAGAIN(); Would you mind sending a pull request for this? :) |
Makes sense. Let me do that over the weekend. |
Sorry, putting that statement at the bottom of presets/avutil.java doesn't seem to work. Is it somewhere else like InfoMap? |
No, methods in avutil class itself.
|
Altering the generated files may cause maintenance burden. Is there any way to do this more systematically? |
Not the generated one, the one in the presets subdirectory.
|
Putting the statement has no effect. I'm putting statements like this:
after What result did you get? |
What do you mean by effect? What does it return when you call it?
|
My bad. It actually works, but I didn't notice because generated JNI files gets automatically deleted. |
The modern ffmpeg API uses those macros especially
AVERROR(EAGAIN)
which is just a errno trick, but this preset doesn't seem to handle it. This makes it virtually impossible to use the new API.The text was updated successfully, but these errors were encountered: