summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* options: add --versionwm42013-05-153-0/+14
|
* command: use "title" tag for media-title property if availablewm42013-05-151-3/+6
| | | | | In connection with the previous commit, this will use the Matroska title for the media-title property.
* demux_mkv: export Matroska title element as metadatawm42013-05-151-0/+3
|
* add osd-scale commandPaul B Mahol2013-05-147-0/+16
| | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Modified to add docs for --osd-scale option, and adjusted to the previous commit by wm4.
* command: simplify sub OSD updatewm42013-05-143-14/+12
| | | | | We can just update all OSD elements in these cases. This way we can also reuse it for commands which need to update the OSD for other reasons.
* m_option: fix segfault in parse_chmapRudolf Polzer2013-05-141-1/+2
|
* vd_lavc: hack-fix vdpau decoding with non mod 16 videowm42013-05-141-1/+10
| | | | | | | This changes the code so that it does the same as MPlayer, mplayer2 and mpv before ref-counted AVFrame. The problem is that get_buffer2 is called with aligned frame dimensions, while get_buffer didn't. This breaks the mpv video frame size change detection.
* cocoa_common: order front window only when invisible [2]Stefano Pigozzi2013-05-141-1/+5
| | | | | | Followup to 8df7127. This refines the condition for front ordering the condition to account for minimized or hidden state where the window should go to the front only as a consequnce of user interaction.
* chmap: fix oddity due to ambiguous 6.1 ffmpeg channel layoutwm42013-05-131-2/+3
| | | | | | | | FFmpeg (as well as Libav) have two layouts called "6.1": AV_CH_LAYOUT_6POINT1 and AV_CH_LAYOUT_6POINT1_BACK. We call them "6.1" and "6.1(back)". Change the default layout for 7 channels as well to return the same layout as av_get_default_channel_layout(). (Looks a bit questionable, but for now it's better to follow FFmpeg.)
* cocoa_common: order front window only when invisibleStefano Pigozzi2013-05-131-1/+1
| | | | | | | Window creation code always made mpv the front window. Fix it to make it front only if the window is currently invisible. Fixes #84
* cocoa_common: don't use recursive lockingStefano Pigozzi2013-05-131-2/+2
| | | | | This was in the original change set for the threadsafety changes but I forgot to squash it in.
* cocoa_common: remove pointless locking when using -fsStefano Pigozzi2013-05-131-5/+10
| | | | | | | | When using --fs `vo_cocoa_fullscreen` was called from the primary thread. This occurred inside `vo_cocoa_config_window` which is scheduled for excution on the primary thread with libdispatch). All of this caused spam from NSRecursiveLock in standard output.
* cocoa_common: fix a bug in window dragging stateStefano Pigozzi2013-05-131-13/+9
| | | | | | | | | | | | When going in and going out of full screen the player lost information on the movableByWindowBackground behaviour. There were some hacks in place to fix it but they were broken with the recent native fullscreen changes in 74c15ec6. This commit removes the problem at the root and removes the hacks. The delegate method `isMovableByWindowBackground` seems to be called after setFrame and setPresentationOptions so change fs state in opts before that. Fixes #83
* audio: fix ALSA 4 channel surround outputwm42013-05-132-2/+4
| | | | | | | | | It turns out that ALSA's 4 channel layout is different from mpv's and ffmpeg's 4.0 layout. Thus trying to do 4 channel output led to incorrect remixing via lib{av,sw}resample. Fix the default layouts for the internal filter chain as well, although I'm not sure if it matters at all.
* af_lavrresample: fix inverted conditionwm42013-05-131-1/+1
| | | | | This was added with the previous commit. It likely broke some obscure special-cases, which (hopefully) do not happen with normal playback.
* audio: fix compilation with older libavresample versionswm42013-05-134-1/+86
| | | | | | | | | | | | | | The libavresample version of the current Libav stable release lacks the avresample_set_channel_mapping() function. (FFmpeg's libswresample seems to be fine, because they added swr_set_channel_mapping() first.) Add a cheap/slow workaround to do channel reordering on our own. We don't use the recently removed MPlayer code (see commit 586b75a), because that is not generic enough. The functionality should be the same as with full-featured libavresample, and any differences are bugs. It's probably slower, though.
* cocoa_common: fix deadlock when calling resize_redrawStefano Pigozzi2013-05-121-4/+9
| | | | Fixes #82
* ao_coreaudio: fix switched parameterswm42013-05-121-1/+1
|
* core: re-add -dumpstream as --stream-dumpwm42013-05-125-0/+42
| | | | | | | Apparently useful for dumping DVD. Could also be used to rip streams with libquvi and such, but for that there are better tools. Actually I doubt there aren't better tools to dump DVDs, but whatever, this was a feature request, so I don't need a good reason.
* core: add --stream-capturewm42013-05-129-0/+71
| | | | | | This is a partial revert of commit 7059c15, and basically re-adds --capture, just with different option names and slightly different semantics.
* Merge branch 'audio_changes'wm42013-05-1279-3614/+3341
|\ | | | | | | | | Conflicts: audio/out/ao_lavc.c
| * af: improve filter chain setup retry limitwm42013-05-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af_reinit() is responsible for inserting automatic conversion filters for channel remixing, format conversion, and resampling. We don't require that a single filter can do all these (even though af_lavrresample does nearly all of this, sometimes af_format has to be used instead for format conversions). This makes setting up the chain more complicated, and a way is needed to prevent endless appending of conversion filters if a conversion is not possible. Until now, this used a stupidly simple yet robust static retry limit to detect failure. This is perfectly fine, and the limit (20) was good enough to handle about ~5 filters. But with more filters, and if each filter requires 3 additional conversion filters, this would fail. So raise the limit to 4 retries per filter. This is still stupidly simple and robust, but won't arbitrarily fail if the filter count is too large.
| * audio: add double sample formatwm42013-05-123-14/+12
| | | | | | | | | | | | To make this easier, get rid of the direct mapping of the AF_FORMAT_BITS_MASK bit field to number of bytes. This way we can throw away the unused AF_FORMAT_48BIT and don't have to add ..._56BIT.
| * ao_alsa: set fallback if format unknownwm42013-05-121-4/+6
| | | | | | | | | | | | The snd_pcm_hw_params_test_format() call actually crashes in alsa-lib if called with SND_PCM_FORMAT_UNKNOWN, so the already existing fallback code won't work in this case.
| * audio/out: channel map selectionwm42013-05-1214-68/+114
| | | | | | | | | | | | | | | | | | Make all AOs use what has been introduced in the previous commit. Note that even AOs which can handle all possible layouts (like ao_null) use the new functions. This might be important if in the future ao_select_champ() possibly honors global user options about downmixing and so on.
| * audio: add channel map selection functionwm42013-05-128-20/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The point is selecting a minimal fallback. The AOs will call this through the AO API, so it will be possible to add options affecting the general channel layout selection. It provides the following mechanism to AOs: - forcing the correct channel order - downmixing to stereo if no layout is available - allow 5.1 <-> 5.1(side) fallback - handling "unknown" channel layouts This is quite weak and lots of code/complexity for little gain. All AOs already made sure the channel order was correct, and the fallback is of little value, and could perhaps be done in the frontend instead, like stereo downmixing with --channels=2 is handled. But I'm not really sure how this stuff should _really_ work, and the new code will hopefully provides enough flexibility to make radical changes to channel layout negotiation easier.
| * ao_pulse: move format setup codewm42013-05-121-27/+27
| |
| * af_lavrresample: avoid channel reordering with unknown layoutswm42013-05-121-8/+24
| | | | | | | | | | | | | | If one of the input or output is an unknown layout, but the other is known, it can still happen that channels are remixed randomly. Avoid this by forcing default layouts in this case. (Doesn't work if the channel counts are different.)
| * manpage: update --channelswm42013-05-121-11/+10
| |
| * ao_openal: use channel map instead of ALSA fixed layoutwm42013-05-121-10/+31
| | | | | | | | | | | | | | | | | | Now mpv's channel map is used to map each channel to a speaker. This allows in theory for playback of any layout for which ao_openal actually has a speaker defined. Also add the back-center (BC) speaker, which allows playback of 6.0 audio. Enabling more layouts by adding other speakers would be possible, but I'm not sure about the speaker positions.
| * audio/filters: add af_forcewm42013-05-126-0/+189
| | | | | | | | | | Its main purpose is for testing in case channel layout stuff breaks, in particular in connection with old audio filters.
| * ao: remove ao_driver.is_new fieldwm42013-05-129-9/+0
| | | | | | | | Is unused, is completely pointless.
| * ao_alsa: remove global variableswm42013-05-121-110/+116
| |
| * ao_alsa: switch to new AO APIwm42013-05-121-39/+54
| |
| * af_ladspa: code cleanupeng2013-05-121-15/+17
| | | | | | | | | | | | 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 terminalwm42013-05-125-25/+35
| |
| * ao_alsa: map to exact channel layoutwm42013-05-121-38/+48
| | | | | | | | | | | | | | 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 functionwm42013-05-121-58/+36
| |
| * ao_alsa: more reformatwm42013-05-121-118/+113
| |
| * af: print filter chain info on errorwm42013-05-121-15/+16
| | | | | | | | | | 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 reportingwm42013-05-121-321/+181
| | | | | | | | | | | | | | | | 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: uncrustifywm42013-05-121-623/+717
| |
| * uncrustify: add some instructionswm42013-05-121-0/+7
| |
| * audio: remove useless audio channels from AO, unless requestedwm42013-05-121-0/+2
| |
| * ad_lavc: force channel layout pass-through with demux_rawaudiowm42013-05-121-2/+11
| | | | | | | | | | | | | | | | 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 orderwm42013-05-121-2/+1
| | | | | | | | | | This used ALSA order, which was not correct. Most likely this has been wrong since forever.
| * ao_pulse: try to set correct channel layoutwm42013-05-121-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | 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 toowm42013-05-1215-54/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 functionswm42013-05-124-1497/+0
| | | | | | | | | | | | | | 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 reorderingwm42013-05-121-3/+49
| |
| * af_lavrresample: context is always allocated herewm42013-05-121-2/+1
| |
| * audio/out: switch to channel mapwm42013-05-1220-239/+162
| | | | | | | | | | | | 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 outputwm42013-05-121-2/+11
| |
| * af: use mp_chmap for mp_audio, include channel map in format negotiationwm42013-05-1212-57/+64
| | | | | | | | | | 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 themwm42013-05-1229-178/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 APIwm42013-05-126-3/+660
| | | | | | | | | | | | | | 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_CONTROLswm42013-05-127-213/+1
| | | | | | | | Was unused, has never been used.
| * options: add option to prevent decoder audio downmixingwm42013-04-137-17/+59
| | | | | | | | Also rename --a52drc to --ad-lavc-ac3drc, and add --ad-lavc-o.
| * af: fix negotiation endless loopwm42013-04-131-3/+2
| | | | | | | | | | | | | | Yeah... ok. Can be reproduced by having AF_CONTROL_CHANNELS not really set the correct channel map.
| * af: streamline format negotiationwm42013-04-133-167/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 entrywm42013-04-131-6/+6
| | | | | | | | Reflects the changes over the last few commits.
| * af_lavrresample: add no-detach suboptionwm42013-04-132-1/+11
| | | | | | | | | | Normally, af_lavrresample detaches itself immediately if the input and output audio parameters are the same. no-detach prevents this.
| * options: remove --af-advwm42013-04-136-68/