-
Notifications
You must be signed in to change notification settings - Fork 345
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
Eliminate usage of internal FFmpeg headers #931
Open
ulmus-scott
wants to merge
9
commits into
MythTV:master
Choose a base branch
from
ulmus-scott:ffmpeg_internal
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead of the internal FFmpeg header compat/cuda/dynlink_loader.h. This leaves only one internal FFmpeg header used by MythTV. Per the comment on win32_dlopen() in FFmpeg/compat/w32dlfcn.h, Windows will now additionally search the current directory for nvcuda.dll and nvcuvid.dll, which FFmpeg considers less secure. This is an atomic block and the order must be preserved: #include "libavutil/log.h" #define FFNV_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_ERROR, msg, __VA_ARGS__) #define FFNV_DEBUG_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_DEBUG, msg, __VA_ARGS__) #include <ffnvcodec/dynlink_loader.h> #include "libavutil/hwcontext_cuda.h" must come after #include <ffnvcodec/dynlink_cuda.h> which is also transitively included by #include <ffnvcodec/dynlink_loader.h>
This reverts commit 5f9b27c. MythTV no longer uses that file, so remove the modification.
…h (part 1) Since we don't need the full buffer, we could use avio_read_partial() instead.
Originally from 2003: MythTV@ec136a9
…h (part 3) I don't know if any of this is necessary since FFmpeg's avio API is already buffered. However, I did not investigate using avio directly with avio_open() nor did I investigate what our buffer actually does. I'm not sure why MythAVFormatBuffer::Seek() with Whence = SEEK_END did not ever actually seek. libavformat/avio.h says this about read_packet: " A function for refilling the buffer, may be NULL. For stream protocols, must never return 0 but rather a proper AVERROR code. " So I'm not sure the first return of 0 was correct. AVERROR(EINVAL) is a more useful return value for all of the functions, instead of 0.
ulmus-scott
force-pushed
the
ffmpeg_internal
branch
from
July 29, 2024 02:24
c8ed859
to
743a992
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This eliminates the use of FFmpeg's private headers. There are still other modifications to FFmpeg's public headers preventing use of an unmodified FFmpeg; however, this works towards that goal.
I performed a few tests, but I am not aware of any HTTP streams to test with.
Checklist