-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Interrupt callback #170
Comments
Sure, there's some examples here: #124 It might also be possible to set a timeout through an option: #165 In any case, it's a feature that I would like to map to the |
Thank you very much, I don't use the FFmpegFrameGrabber, so i think i can't set a timeout as in #165. Is it possible to set this opion in the dictionary of avformat_open_input? Thank you |
Sounds like a bug in FFmpeg. Could you report that as an issue upstream? Thanks! Even if you don't use FFmpegFrameGrabber, check the source code to see how the option gets set. |
Ok, thank you very much |
@gtow I write the code as #124 suggested, but it returns a nullpointerException, could you please help me to solve it? here is my code: static final AVIOInterruptCB.Callback_Pointer dummy = new AVIOInterruptCB.Callback_Pointer() {
@Override
public int call(Pointer arg0) {
return 1;
}
};
...
AVFormatContext pFormatCtx = new AVFormatContext(null);
AVIOInterruptCB avioInterruptCB = new AVIOInterruptCB();
avioInterruptCB.callback(dummy);
pFormatCtx.interrupt_callback(avioInterruptCB);
... and here is the ouput:
|
FYI, thanks to @d-a-gerashenko we now have working sample code for this: |
Hello,
I'm having problems with some inputs when using avformat_open_input, because some times it takes too long (arround 1:30) and then the function returns with the corresponding error. The problem is in the inputs, so the error is OK, but the timeout is too long.
So, I'm trying to use the method interrupt_callback from AVFormatContext, but I can't get it working. I don't know how to use the Callback_Pointer to define the interrupt function.
Please, Do you have some code or example using interrupt_callback?
Thank you very much
The text was updated successfully, but these errors were encountered: