aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* ao: remove ao_driver.is_new fieldGravatar wm42013-05-12
| | | | Is unused, is completely pointless.
* ao_alsa: remove global variablesGravatar wm42013-05-12
|
* ao_alsa: switch to new AO APIGravatar wm42013-05-12
|
* af_ladspa: code cleanupGravatar eng2013-05-12
| | | | | | Cleanup based on results from cppcheck-1.59 Reduce the scope of several variables Fix memory leak
* audio: print channel map additionally to channel count on terminalGravatar wm42013-05-12
|
* ao_alsa: map to exact channel layoutGravatar wm42013-05-12
| | | | | | | This allows supporting 5 channel audio (which can be eother 5.0 or 4.1). Fallback doesn't work yet. It will do nonsense if the channel layout doesn't match perfectly, even though it's similar.
* ao_alsa: move format lookup into separate functionGravatar wm42013-05-12
|
* ao_alsa: more reformatGravatar wm42013-05-12
|
* af: print filter chain info on errorGravatar wm42013-05-12
| | | | | The filter chain was only visible with -v. Always print it if the filter chain could not be configured.
* ao_alsa: cosmetics, macro-fy error reportingGravatar wm42013-05-12
| | | | | | | | Add a CHECK_ALSA_ERROR macro to report ALSA errors. This is similar to what vo_vdpau does. This removes lots of boiler plate, it almost gives me the feeling the ao_alsa initialization code is now readable. This change is squashed with the reformatting, because both changes are just as noisy and useless.
* ao_alsa: uncrustifyGravatar wm42013-05-12
|
* uncrustify: add some instructionsGravatar wm42013-05-12
|
* audio: remove useless audio channels from AO, unless requestedGravatar wm42013-05-12
|
* ad_lavc: force channel layout pass-through with demux_rawaudioGravatar wm42013-05-12
| | | | | | | | Using demux_rawaudio and the --rawaudio-channels option is useful for testing channel map stuff. The libavcodec PCM decoder normalizes the channel map to ffmpeg order, though. Prevent this by forcing the original channel map when using the mp-pcm pseudo decoder entry (used by demux_rawaudio and stream/tv.c only).
* ao_coreaudio: switch to WAVEEXT channel orderGravatar wm42013-05-12
| | | | | This used ALSA order, which was not correct. Most likely this has been wrong since forever.
* ao_pulse: try to set correct channel layoutGravatar wm42013-05-12
| | | | | | | | | | | | Like most other AOs, ao_pulse set the channel count only, always using a default layout. Try to set the exact layout. For this, we need a big lookup table to map waveex/lavc/mpv speaker position to PulseAudio's, since PA_CHANNEL_POSITION_ is apparently not compatible to waveext, and I haven't seen any API functions that would help mapping them. Completely untested. (Let's leave that to someone else...)
* core: use channel map on demuxer level tooGravatar wm42013-05-12
| | | | | | | | | | | | | | | This helps passing the channel layout correctly from decoder to audio filter chain. (Because that part "reuses" the demuxer level codec parameters, which is very disgusting.) Note that ffmpeg stuff already passed the channel layout via mp_copy_lav_codec_headers(). So other than easier dealing with the demuxer/decoder parameters mess, there's no real advantage to doing this. Make the --channels option accept a channel map. Since simple numbers map to standard layouts with the given number of channels, this is downwards compatible. Likewise for demux_rawaudio.
* reorder_ch: remove old channel reorder functionsGravatar wm42013-05-12
| | | | | | | This is done in af_lavrresample now, and as part of format negotiation. Also remove the remaining reorder_channel calls. They were redundant and did nothing.
* audio: let libavresample do channel reorderingGravatar wm42013-05-12
|
* af_lavrresample: context is always allocated hereGravatar wm42013-05-12
|
* audio/out: switch to channel mapGravatar wm42013-05-12
| | | | | | This actually breaks audio for 5/6/8 channels. There's no reordering done yet. The actual reordering will be done inside of af_lavrresample and has to be made part of the format negotiation.
* af_pan: set unknown channel layout for outputGravatar wm42013-05-12
|
* af: use mp_chmap for mp_audio, include channel map in format negotiationGravatar wm42013-05-12
| | | | | Now af_lavrresample pretends to reorder the channels, although it doesn't yet, and nothing sets non-standard layouts either.
* audio: add some setters for mp_audio, and require filters to use themGravatar wm42013-05-12
| | | | | | | | | | | | | | | | mp_audio has some redundant fields. Setters like mp_audio_set_format() initialize these properly. Also move the mp_audio struct to a the file audio.c. We can remove a mysterious line of code from af.c: in.format |= af_bits2fmt(in.bps * 8); I'm not sure if this was ever actually needed, or if it was some kind of "make it work" quick-fix that works against the way things were supposed to work. All filters etc. now set the format correctly, so if there ever was a need for this code, it's definitely gone.
* audio: add channel map APIGravatar wm42013-05-12
| | | | | | | Unused, will be used in the following commits. Let chmap.h define the number of maximum channels, because that is most convenient.
* audio/filter: remove unused AF_CONTROLsGravatar wm42013-05-12
| | | | Was unused, has never been used.
* options: add option to prevent decoder audio downmixingGravatar wm42013-04-13
| | | | Also rename --a52drc to --ad-lavc-ac3drc, and add --ad-lavc-o.
* af: fix negotiation endless loopGravatar wm42013-04-13
| | | | | | | Yeah... ok. Can be reproduced by having AF_CONTROL_CHANNELS not really set the correct channel map.
* af: streamline format negotiationGravatar wm42013-04-13
| | | | | | | | | | | | | Add dummy input and output filters to remove special cases in the format negotiation code (af_fix_format_conversion() etc.). The output of the filter chain is now negotiated in exactly the same way as normal filters. Negotiate setting the sample rate in the same way as other audio parameters. As a side effect, the resampler is inserted at the start of the filter chain instead of the end, but that shouldn't matter much, especially since conversion and channel mixing are conflated into the same filter (due to libavresample's API).
* manpage: update af_lavrresample entryGravatar wm42013-04-13
| | | | Reflects the changes over the last few commits.
* af_lavrresample: add no-detach suboptionGravatar wm42013-04-13
| | | | | Normally, af_lavrresample detaches itself immediately if the input and output audio parameters are the same. no-detach prevents this.
* options: remove --af-advGravatar wm42013-04-13
| | | | | | | Anything this option did has been removed in the preceding 3 commits. Note that even though these options sounded like a good idea (like setting accuracy vs. speed tradeoffs), they were not really properly implemented.
* af: remove accuracy optionGravatar wm42013-04-13
| | | | | | | | All this option did was deciding whether the resample filter was to be insert at the beginning or end of the filter chain. Always do what the option set for accuracy did. I doubt it makes much of a difference. libavresample does most things in just one go anyway, so it won't matter.
* af: remove force optionGravatar wm42013-04-13
| | | | | | Dangerous and misleading. If it turns out that this is actually needed to make certain setups work right, it should be added back in a better way (in a way it doesn't cause random crashes).
* audio: remove float processing optionGravatar wm42013-04-13
| | | | | | | | | | | | | | The only thing this option did was changing the behavior of af_volume. The option decided what sample format af_volume would use, but only if the sample format was not already float. If the option was set, it would default to float, otherwise to S16. Remove use of the option and all associated code, and make af_volume always use float (unless a af_volume specific sub-option is set). Silence maximum value tracking. This message is printed when the filter is destroyed, and it's slightly annoying. Was enabled due to enabling float by default.
* audio: switch to libavcodec channel order, use libavresample for mixingGravatar wm42013-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the internal channel order to libavcodec's. If the channel number mismatches at some point, use libavresample for up- or downmixing. Remove the old af_pan automatic downmixing. The libavcodec channel order should be equivalent to WAVEFORMATEX order, at least nowadays. reorder_ch.h assumes that WAVEFORMATEX and libavcodec might be different, but all defined channels have the same mappings. Remove the downmixing with af_pan as well as the channel conversion with af_channels from af.c, and prefer af_lavrresample for this. The automatic downmixing behavior should be the same as before (if the --channels option is set to 2, which is the default, the audio output is forced to 2 channels, and libavresample does all downmixing). Note that mpv still can't do channel layouts. It will pick the default channel layout according to the channel count. This will be fixed later by passing down the channel layout as well. af_hrtf depends on the order of the input channels, so reorder to ALSA (for which this code was written). This is better than changing the filter code, which is more risky. ao_pulse can accept waveext order directly, so set that as channel mapping.
* ao_alsa: reorder channels from internal to alsa orderGravatar wm42013-04-13
| | | | | Currently, internal and alsa order are exactly the same, so this will do absolutely nothing.
* af: simplificationGravatar wm42013-04-13
| | | | | | | | | If format negotiation fails, and additional filters are inserted to fix this, don't try to reinitialize the filter immediately. Instead, correct the audio format, and let the caller retry. Add a retry counter to af_reinit() to ensure that misbehaving filters can't put the format negotiation into an endless loop.
* af: factor channel filter insertionGravatar wm42013-04-13
| | | | Do this just like it has been done for the format filter.
* af: use af_lavrresample for format conversions, if possibleGravatar wm42013-04-13
| | | | | | | | | | | | | Refactor to remove the duplicated format filter insertion code. Allow other format converting filters to be inserted on format mismatches. af_info.test_conversion checks whether conversion between two formats would work with the given filter; do this to avoid having to insert multiple conversion filters at once and such things. (Although this isn't ideal: what if we want to avoid af_format for some conversions? What if we want to split af_format in endian-swapping filters etc.?) Prefer af_lavrresample for conversions that it supports natively, otherwise let af_format handle the full conversion.
* af: remove automatically inserted filters on full reinitGravatar wm42013-04-13
| | | | | | | | | | | | | | | | | | | | | | Make sure automatically inserted filters are removed on full reinit (they are re-added later if they are really needed). Automatically inserted filters were never explicitly removed, instead, it was expected that redundant conversion filters detach themselves. This didn't work if there were several chained format conversion filters, e.g. s16le->floatle->s16le, which could result from repeated filter insertion and removal. (format filters detach only if input format and output format are the same.) Further, the dummy filter (which exists only because af.c can't handle an empty filter chain for some reason) could introduce bad conversions due to how the format negotiation works. Change the code so that the dummy filter never takes part on format negotiation. (It would be better to fix format negotiation, but that would be much more complicated and would involving fixing all filters.) Simplify af_reinit() and remove the start audio filter parameter. This means format negotiation and filter initialization is run more often, but should be harmless.
* af_lavrresample: allow other ffmpeg sample formats for input/outputGravatar wm42013-04-13
| | | | | | | The format was locked to s16. Extend it to accept all other ffmpeg sample formats, and even allow different in- and output formats. The generic filter code will still insert af_format on format mismatches, though.
* audio/filter: replace pointless memcpys with assignmentsGravatar wm42013-04-13
| | | | | | The change in af_scaletempo actually fixes a memory leak. af->data contained a pointer to an allocated buffer, which was overwritten during format negotiation. Set the format explicitly instead.
* af: uncrustifyGravatar wm42013-04-13
|
* ad_lavc: use fmt-conversion to map sample formatsGravatar Stefano Pigozzi2013-04-13
|
* demux: simplify chapter appending codeGravatar wm42013-04-12
| | | | | This pre-allocation looked tricky and awkward. Use MP_TARRAY_APPEND(), which makes the code simpler. This even keeps the pre-allocation.
* demux: always sort chaptersGravatar wm42013-04-12
| | | | | | | | | | | The condition that checked whether the chapters are out of order and should be sorted was inverted. This likely wasn't noticed in testing, because even if the chapters are unsorted, if the last two chapters were sorted, the rest got sorted too. Instead of doing this silly check, always sort the chapters after demuxer initialization. Also make sure the sort order is stable in case chapter start times are the same (original_index check).
* core: remove dead --vsync leftoversGravatar wm42013-04-12
|
* command: fix deref before NULL checkGravatar wm42013-04-12
| | | | Was accidentally broken in the last global variable removal round.
* ao_jack: fix deprecation warningGravatar Stefano Pigozzi2013-04-12
| | | | | jack_port_get_total_latency is deprecated: use the "new" API based on jack_port_get_latency_range instead.