-
Notifications
You must be signed in to change notification settings - Fork 358
cleanup libmyth/audio and move it to libmythtv #1135
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
Open
ulmus-scott
wants to merge
33
commits into
MythTV:master
Choose a base branch
from
ulmus-scott:audio
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 hidden or 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
58efc7e
to
cb74f4a
Compare
Use <>, not "", since it is not a header defined by MythTV.
and move it from libmyth/output.h to libmyth/audio/audiooutput.h.
and move it from libmyth/visual.h to libmyth/audio/visualization.h.
and return a copy, since QString is COW. Also, it makes no sense to convert from UTF-16 to UTF-8 and then back to UTF-16, so don't.
AudioReencodeBuffer subclasses AudioOutput, neither of which use AudioOutput::m_lastError, so calling ClearError() does nothing.
and use it to replace most uses of GetError(). AudioOutput::Error() already logs the message, so remove duplicate log entries in MusicPlayer::openOutputDevice() and MythRAOPConnection::OpenAudioDevice(). AudioOutputBase::Reconfigure() sets m_isConfigured to false for all of the early returns, which it should have been doing for m_configureSucceeded.
AudioPlayer::ReinitAudio()'s return value is unused, so this only changes the notification and log. However, the former message text is in the log and is available as an event if desired.
and replace Error() with LOG() and dispatchError(), a renamed error().
The mixing coefficient matrices should be transposed so the coefficients for each output channel are contiguous in memory and line up with the input data. The matrix multiplication would probably be faster and easier to vectorize. This probably could be implemented with FFmpeg’s pan filter. https://trac.ffmpeg.org/wiki/AudioChannelManipulation https://ffmpeg.org/ffmpeg-filters.html#pan I have no idea where the mixing coefficients come from and throwing away the LFE information is not optimal. The coefficients don’t match ATSC A/52:2012 section 7.8.2 Downmixing into Two Channels nor Ogg’s (https://www.rfc-editor.org/rfc/rfc7845#section-5.1.1.5). Additionally, the coefficients are not normalized, so this could cause clipping. Other coefficients: https://superuser.com/questions/852400/properly-downmix-5-1-to-stereo-using-ffmpeg#1410620
instead of forwarding through AudioOutputUtil. Also move the test code from TestAudioUtils to TestAudioConvert.
The only difference is the AVFrame AudioOutput::m_frame will be reused instead of allocating and freeing an AVFrame with every call and the samples will be converted to FORMAT_S16 if AudioOutput::CanProcess() returns false. However, FORMAT_S16 is the desired format and no conversion was performed, so the audio samples were assumed to already be FORMAT_S16.
It is a Visualization and they were the only files in audio/ that used libmythui.
libmyth is now MythContext and GUI files for libmythupnp. It is no longer used by any other library.
It is only used by MythContext so move the files to be with mythcontext.*.
for moving libmyth/audio to libmythtv.
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 contains some minor cleanups to the
libmyth/audio
code and moves the resulting code tolibmythtv/audio
.libmyth/mythav*
are also moved to libmythtv so libmyth no longer uses FFmpeg, is no longer used by other libraries, and contains just MythContext and GUI files for libmythupnp. It is essentially now libmythupnp-ui, but I have not renamed it.Checklist