aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
Commit message (Collapse)AuthorAge
* af_export: require filename argumentGravatar wm42013-12-21
| | | | | | Since mp_find_user_config_file() is going to get a context argument, which would be annoying to do in the audio chain (actually I'm just lazy).
* m_option: add mp_log callback to OPT_STRING_VALIDATE optionsGravatar wm42013-12-21
| | | | | And also convert a bunch of other code, especially ao_wasapi and ao_portaudio.
* m_option, m_config: mp_msg conversionsGravatar wm42013-12-21
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* codecs: mp_msg conversionGravatar wm42013-12-21
|
* ao: some missing mp_msg conversionsGravatar wm42013-12-21
|
* ao_wasapi: mp_msg conversionsGravatar wm42013-12-21
| | | | | | | Remove the nonsensical print_lock too. Things that are called from the option validator are not converted yet, because the option parser doesn't provide a log context yet.
* audio/fmt-conversion.c: remove unknown audio format messagesGravatar wm42013-12-21
| | | | Same deal as with video/fmt-conversion.c.
* audio: mp_msg conversionsGravatar wm42013-12-21
|
* mixer: mp_msg conversionsGravatar wm42013-12-21
|
* ao_alsa: don't set ALSA message callbackGravatar wm42013-12-21
| | | | | | | This could output additional, potentially useful error messages. But the callback is global and not library-safe, and would require us to add additional state. Remove it, because it's obviously too much of a pain. Also, it seems ALSA prints stuff to stderr anyway.
* ao_wasapi: fix includesGravatar wm42013-12-18
| | | | Broken due to recent header renaming. Untested.
* ad_lavc: work around deprecation warningGravatar wm42013-12-18
| | | | | | | | | | request_channels has been deprecated for years (request_channel_layout is the replacement), but it appears it's still needed despite the deprecation at least on older libavcodec versions. So still set request_channels, but to it with the avoption API, which hides the deprecation warning. This should also prevent mpv getting trashed when libavcodec happens to bump its major version.
* Reduce recursive config.h inclusions in headersGravatar wm42013-12-18
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* Remove the _ macroGravatar wm42013-12-18
| | | | | This was a gettext-style macro to mark strings that should be translated.
* Split mpvcore/ into common/, misc/, bstr/Gravatar wm42013-12-17
|
* Merge mp_talloc.h into ta/ta_talloc.hGravatar wm42013-12-17
|
* Move options/config related files from mpvcore/ to options/Gravatar wm42013-12-17
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Move mpvcore/input/ to input/Gravatar wm42013-12-17
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgGravatar wm42013-12-16
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* ao_wasapi: Fix mistaken behavior on uninitGravatar Diogo Franco (Kovensky)2013-12-08
| | | | | The parameter, when true, tells whether uninit should block for flushing the buffers, not whether it should quit immediately without flushing.
* ao_wasapi: handle AOPLAY_FINAL_CHUNKGravatar Diogo Franco (Kovensky)2013-12-08
| | | | | Used for writing down all samples to the audio driver, even if it's not a full chunk; needed at EOF on weird files.
* ao_wasapi: Reduce the buffer size to a sane valueGravatar Diogo Franco (Kovensky)2013-12-08
| | | | | | | The previous RING_BUFFER_COUNT value, 64, would have ao_wasapi buffer 64 frames of audio in the ring buffer; a delay of 1280ms, which is clearly overkill for everything. A value of 8 buffers 8 frames for a total of 160ms.
* ao_wasapi: fix audio buffering delay calculationGravatar Diogo Franco (Kovensky)2013-12-08
| | | | | | | | When get_space was converted to returning samples instead of bytes, a unit type mismatch in get_delay's calculation returned bogus values. Fix by converting get_space's value back to bytes. Fixes playback with ao_wasapi when reaching EOF, or seeking past it.
* mixer: remove comment about af_pan doing downmixingGravatar wm42013-12-07
| | | | We don't do that anymore.
* audio: flush remaining data from the filter chain on EOFGravatar wm42013-12-05
| | | | | | | | | | | | | | | | | This can be reproduced with: mpv short.wav -af 'lavfi="aecho=0.8:0.9:5000|6800:0.3|0.25"' An audio file that is just 1-2 seconds long should play for 8-9 seconds, which audible echo towards the end. The code assumes that when playing with AF_FILTER_FLAG_EOF, the filter will either produce output, or has all remaining data flushed. I'm not really sure whether this really works if there are multiple filters with EOF handling in the chain. To handle it correctly, af_lavfi should retry filtering if 1. EOF flag is set, 2. there were input samples, and 3. no output samples were produced. But currently it seems to work well enough anyway.
* audio/filter: change filter callback signatureGravatar wm42013-12-05
| | | | | | | | | The new signature is actually closer to how it actually works, and someone who is not familiar to the API and how it works might make fewer fatal mistakes with the new signature than the old one. Pretty weird. Do this to sneak in a flags parameter, which will later be used to flush remaining data of at least vf_lavfi.
* ad_lavc: handle decoder EAGAIN only if there was an input packetGravatar wm42013-12-04
| | | | | Otherwise, it'd probably get stuck if the decoder still returns EAGAIN at EOF on e.g. a shortened data stream.
* af: remove af->setup fieldGravatar wm42013-12-04
| | | | Used to be used by filters that didn't use the option parser.
* af: remove legacy option parsing hacksGravatar wm42013-12-04
|
* af_pan: change options, use option parserGravatar wm42013-12-04
| | | | Similar to af_channels etc...
* af_ladspa: change options, use option parserGravatar wm42013-12-04
|
* af_delay: change option parsing, fix bugs, use option parserGravatar wm42013-12-04
| | | | Similar situation to af_channels.
* af_channels: use "unknown" channel layoutsGravatar wm42013-12-04
| | | | | | | | | This will make af_channels output a channel layout that is compatible with any destination layout. Not sure if that's a good idea though, since the way the AO choses a layout is perhaps less predictable. On the other hand, using the old MPlayer standard layouts doesn't make much sense either. We'll see whether this improves or breaks someone's use case.
* af_channels: change options, fix bugs, use option parserGravatar wm42013-12-04
| | | | | | | Apparently this stopped working after some planar changes (broken format negotiation). Radically change option parsing in an incompatible way. Suggest alternatives to this filter, since it barely has any importance anymore.
* af_sweep: use option parserGravatar wm42013-12-04
|
* af_surround: use option parserGravatar wm42013-12-04
|
* af_sub: use option parserGravatar wm42013-12-04
|
* af_sinesuppress: use option parserGravatar wm42013-12-04
|
* af_hrtf: use option parserGravatar wm42013-12-04
|
* af_extrastereo: use option parserGravatar wm42013-12-04
|
* af_export: use option parserGravatar wm42013-12-04
| | | | Probably requires the user to quote the shared buffer filename.
* af_equalizer: use option parserGravatar wm42013-12-04
|
* af_drc: use option parserGravatar wm42013-12-04
|
* af_center: use option parserGravatar wm42013-12-04
|
* af: returning NULL on filtering means errorGravatar wm42013-12-04
| | | | | | This code used to be ok, until the assert() was added. Simplify the loop statement, since the other NULL check for data doesn't make sense anymore.
* ad_lavc: expose an option to enable threadingGravatar wm42013-12-04
|
* ad_lavc: deal with arbitrary decoder delayGravatar wm42013-12-04
| | | | | | | | | | | | | | | | | | | | Normally, audio decoder don't have a decoder delay, so the code was fine. But FFmpeg supports multithreaded decoding for some audio codecs, which introduces such a delay. The delay means that we won't get decoded audio for the first few packets, and that we need to do something to get the trailing audio still buffered in the decoder when reaching EOF. Two changes are needed to deal with the delay: - If EOF is reached, pass a "flush" packet to the decoder to return the buffered audio. Such a flush packet is automatically setup when calling mp_set_av_packet() with a NULL packet. - Use the PTS returned by the decoder, instead of the packet's. This is important to get correct timestamps for decoded audio. Ignoring this would result into offsetting the audio playback time by the decoder delay. Note that we can still use the timestamp of the first packet to get the timestamp for the start of the audio.
* av_common: add timebase parameter to mp_set_av_packet()Gravatar wm42013-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the timebase is set, it's used for converting the packet timestamps. Otherwise, the previous method of reinterpret-casting the mpv style double timestamps to libavcodec style int64_t timestamps is used. Also replace the kind of awkward mp_get_av_frame_pkt_ts() function by mp_pts_from_av(), which simply converts timestamps in a way the old function did. (Plus it takes a timebase parameter, similar to the addition to mp_set_av_packet().) Note that this should not change anything yet. The code in ad_lavc.c and vd_lavc.c passes NULL for the timebase parameters. We could set AVCodecContext.pkt_timebase and use that if we want to give libavcodec "proper" timestamps. This could be important for ad_lavc.c: some codecs (opus, probably mp3 and aac too) have weird requirements about doing decoding preroll on the container level, and thus require adjusting the audio start timestamps in some cases. libavcodec doesn't tell us how much was skipped, so we either get shifted timestamps (by the length of the skipped data), or we give it proper timestamps. (Note: libavcodec interprets or changes timestamps only if pkt_timebase is set, which by default it is not.) This would require selecting a timebase though, so I feel uncomfortable with the idea. At least this change paves the way, and will allow some testing.
* ao_oss: when falling back from unknown prefer larger formatGravatar bugmen0t2013-12-04
|
* ao_oss: add 24bit formatsGravatar bugmen0t2013-12-04
|