aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* options: use case-sensitive comparsion for optionsGravatar wm42013-05-15
| | | | | This is better for consistency, and also allows using -V as alias for --version.
* options: add --versionGravatar wm42013-05-15
|
* command: use "title" tag for media-title property if availableGravatar wm42013-05-15
| | | | | In connection with the previous commit, this will use the Matroska title for the media-title property.
* demux_mkv: export Matroska title element as metadataGravatar wm42013-05-15
|
* add osd-scale commandGravatar Paul B Mahol2013-05-14
| | | | | | | 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 updateGravatar wm42013-05-14
| | | | | 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_chmapGravatar Rudolf Polzer2013-05-14
|
* vd_lavc: hack-fix vdpau decoding with non mod 16 videoGravatar wm42013-05-14
| | | | | | | 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]Gravatar Stefano Pigozzi2013-05-14
| | | | | | 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 layoutGravatar wm42013-05-13
| | | | | | | | 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 invisibleGravatar Stefano Pigozzi2013-05-13
| | | | | | | 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 lockingGravatar Stefano Pigozzi2013-05-13
| | | | | 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 -fsGravatar Stefano Pigozzi2013-05-13
| | | | | | | | 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 stateGravatar Stefano Pigozzi2013-05-13
| | | | | | | | | | | | 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 outputGravatar wm42013-05-13
| | | | | | | | | 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 conditionGravatar wm42013-05-13
| | | | | 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 versionsGravatar wm42013-05-13
| | | | | | | | | | | | | | 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_redrawGravatar Stefano Pigozzi2013-05-12
| | | | Fixes #82
* ao_coreaudio: fix switched parametersGravatar wm42013-05-12
|
* core: re-add -dumpstream as --stream-dumpGravatar wm42013-05-12
| | | | | | | 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-captureGravatar wm42013-05-12
| | | | | | 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'Gravatar wm42013-05-12
|\ | | | | | | | | Conflicts: audio/out/ao_lavc.c
| * af: improve filter chain setup retry limitGravatar wm42013-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 formatGravatar wm42013-05-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 unknownGravatar wm42013-05-12
| | | | | | | | | | | | 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 selectionGravatar wm42013-05-12
| | | | | | | | | | | | | | | | | | 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 functionGravatar wm42013-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 codeGravatar wm42013-05-12
| |
| * af_lavrresample: avoid channel reordering with unknown layoutsGravatar wm42013-05-12
| | | | | | | | | | | | | | 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 --channelsGravatar wm42013-05-12
| |
| * ao_openal: use channel map instead of ALSA fixed layoutGravatar wm42013-05-12
| | | | | | | | | | | | | | | | | | 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_forceGravatar wm42013-05-12
| | | | | | | | | | 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 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.