summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* travis: DRY up the yaml fileStefano Pigozzi2013-05-201-6/+6
| | | | | Use YAML's anchor/reference syntax to DRY up the YAML file. Also fix a bug that caused the IRC notification to always take place (even on success).
* vf_dlopen framestep: step width of 0Rudolf Polzer2013-05-201-0/+2
| | | | | This is now defined to mean to never output any frame again (except for the first).
* vf_dlopen framestep filter: add a parameter for the phaseRudolf Polzer2013-05-201-4/+9
| | | | | also, default to 0-indexed frame counts (so by default, the 1st frame is output). Old behaviour can be done by -vf dlopen=./framestep.so:42:41.
* add Travis-CI integrationStefano Pigozzi2013-05-193-19/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Travis-CI [1] is a continous integration cloud service. It is free for open-source projects and tigthly integrated tiwh GitHub so there is really no reason for us not use it. :) For now we are going to do a total of 4 builds, mainly to test ffmpeg/libav API breakage: * ffmpeg-stable, libass-stable * ffmpeg-git, libass-stable * libav-stable, libass-stable * libav-git, libass-stable The compiler that is currently used is clang for two reasons: * running 8 build targets would be quite wasteful and take a long time * clang is less tested and used during development than gcc (especially on linux) Currently Travis doesn't support OS X environments alongside Linux ones [2]. When it will, we will add a fifth build target to test OS X compilation breakage. README was moved to markdown to add the little build status image. I ran some tests with my GitHub fork and couldn't get images to show up using ReStructured Text. [1]: https://github.com/travis-ci/travis-ci [2]: travis-ci/travis-ci#216
* configure: reject older libswresamplewm42013-05-191-2/+2
| | | | | | | | | | | mpv still builds with ffmpeg 1.0.x, however libswresample keeps cuasing trouble. In older releases, libswresample simply crashed when downmixing. In somewhat newer versions, it produces distorted output and downmixing isn't even close to correct. With ffmpeg release 1.1 (ffmpeg git tag n1.1), everything seems to work fine. The release uses 0.17.102 as libswresample version, so bump the required minimum version to that.
* Fix commit d1b37afwm42013-05-181-1/+1
| | | | Yeah, it doesn't work this way... Please look away.
* vo_image: start image file numbers at 1wm42013-05-181-2/+2
| | | | Requested by a user.
* input: allow quotes around any input commandwm42013-05-181-3/+1
|
* input: do property expansion for all input command string argumentswm42013-05-185-21/+33
| | | | | | Also add a "raw" prefix for commands, which prevents property expansion. The idea is that if the commands are generated by a program, it doesn't have to know whether the command expands properties or not.
* input: accept input command prefixes in any orderwm42013-05-181-20/+22
| | | | | | | | | | This is more consistent, and doesn't bother the user with ordering rules when new prefixes are added. Will break obscure uses of legacy commands: if the command is supposed to be translated by the legacy command bridge, and if that command uses one of the pausing* prefixes, the command can't be parsed. Well, just use the new commands in this case.
* video/filter: fix option parser memory leakwm42013-05-186-16/+3
| | | | | | | This happens only if an option actually allocates memory (like strings). Change filter API such that vf->priv is free'd by vf.c instead by the filters. vf.c will free the option values as well.
* core: allow changing filter filters at runtimewm42013-05-187-12/+112
| | | | | | | | | | | | | | | | Add the "vf" command, which allows changing the video filter chain at runtime. For example, the 'y' key could be bound to toggle deinterlacing by adding 'y vf toggle yadif' to the input.conf. Reconfiguring the video filter chain normally resets the VO, so that it will be "stuck" until a new video frame is rendered. To mitigate this, a seek to the current position is issued when the filter chain is changed. This is done only if playback is paused, because normal playback will show an actual new frame quickly enough. If vdpau hardware decoding is used, filter insertion (whether it fails or not) will break the video for a while. This is because vo_vdpau resets decoding related things on vo_config().
* m_option: allow -vf ""wm42013-05-181-5/+3
| | | | | | | With the current semantics, there's no reason to disallow this. (Although in my opinion, -vf should rather map to -vf-add than -vf-set, however that is an independent issue from this change.)
* m_option: add -vf-togglewm42013-05-181-52/+80
| | | | | | | | Works like -vf-add, except if a filter already exists and has the same parameters, it's removed instead of added. Not really useful on the command line itself, but will make sense for runtime filter changing in the following commit.
* m_option: allow using -vf-del with a namewm42013-05-181-51/+70
| | | | | | Until now, -vf-del required a list of indexes. This was a bit inconvenient, so add support for using filter names too. Also simplify the code a bit, doing the change would have been too painful otherwise.
* vd_lavc: change VDCTRL_REINIT_VO behaviorwm42013-05-181-3/+1
| | | | | | | | | | | | | This tried to use ctx->pic (last decoded AVFrame) for the frame bounds. However, if av_frame_unref() on the AVFrame is called, the function will reset _all_ AVFrame fields, even those which are not involved with memory management. As result, mpcodecs_config_vo() was called with 0 width/height, which made the function exit early, instead of reconfiguring the filter chain. Go back to using mpcodecs_config_vo() directly. (That's what it did before this VDCTRL was originally introduced; the original reason for it disappeared.)
* video: rename VDCTRL_RESET_ASPECT to VDCTRL_REINIT_VOwm42013-05-185-6/+6
| | | | Same thing, and VDCTRL_REINIT_VO implies more generic use.
* manpage: document af_* commandswm42013-05-181-2/+16
| | | | Except af_cmdline, which is too questionable.
* mp_image: align image allocation heightwm42013-05-171-1/+2
| | | | | | | | | | | | vo_vdpau actually reads past the image allocation when displaying a non-mod 2 420p image. The vdpau API specifies that VdpVideoSurfacePutBitsYCbCr() requires a height that is a multiple of 4, and surface allocations are automatically rounded. So allocate video images with rounded height. libavutil does the same, so images coming directly from the decoder or from libavfilter are no problem. (libavutil does this alginment explicitly, not just because the decoded image size is aligned to macroblocks.)
* cfg-mplayer: fix some option flagswm42013-05-171-3/+3
|
* cocoa_common: vo_corevideo: fix window initializationStefano Pigozzi2013-05-161-5/+5
| | | | | vo_corevideo doesn't create a hidden window to perform OpenGL extensions detection. This caused the window to always stay close.
* vf_dlopen examples: slightly simply the framestep filterRudolf Polzer2013-05-161-8/+1
| | | | We don't need config() ;)
* vf_dlopen examples: add framestep filterRudolf Polzer2013-05-162-2/+106
| | | | Usage: -vf dlopen=./framestep.so:5
* options: fix exit code when using help optionswm42013-05-153-16/+22
| | | | Basically a cosmetic change. Fixes github issue #88.
* mplayer: potentially fix main() return valuewm42013-05-151-2/+2
| | | | | | | The main() function is special, and omitting the return statement would make it always return 0. And also, mpv_main() actually never returns, it calls exit() through exit_player() instead. But change it anyway, because it looks misleading.
* options: add -V as alias for --versionwm42013-05-152-1/+2
| | | | This is a common convention.
* options: use case-sensitive comparsion for optionswm42013-05-152-17/+17
| | | | | This is better for consistency, and also allows using -V as alias for --version.
* 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