-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implement video filtering with libavfilter #68
base: master
Are you sure you want to change the base?
Implement video filtering with libavfilter #68
Conversation
8560306
to
f2f8242
Compare
Hi @KingOfTheBlues and thank you for the PR. I've checked it just briefly and it's looking good. I'll have to find some time to look into it in detail though. Until then, please put |
f2f8242
to
a89529c
Compare
int ret = av_buffersrc_add_frame(context, frame); | ||
|
||
if (ret == 0 || ret == AVERROR_EOF) { | ||
return 1; | ||
} | ||
else if (ret == AVERROR(EAGAIN)) { | ||
return 0; | ||
} | ||
|
||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is correct. The FFmpeg documentation does not say that av_buffersrc_add_frame
would behave the same way as avcodec_send_frame
. Is it possible that pushing one frame to a filter input can generate multiple frames at the filter output? Do we also have to consume all output frames before pushing the next input frame (i.e. is it possible that av_buffersrc_add_frame
would return AVERROR(EAGAIN)
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought I had addressed this one, actually I reverted the change for now as applying the respective change in the C code yields "all frames must be consumed before flushing" from CodecError
thanks so much @operutka for the awesome feedback! The code is now greatly simplified and I really appreciate the help here. I believe I have addressed all your comments now |
…codec_send_frame" This reverts commit 92b4f6c.
Adds bindings for libavfilter attempting to follow established patterns where possible. Audio filters to be added in later.
The implementation is based on the ffmpeg example: https://www.ffmpeg.org/doxygen/trunk/filtering_8c-source.html
Thanks in advance for your time considering this PR and providing any feedback.