summaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* Fix commit d1b37afwm42013-05-181-1/+1
| | | | Yeah, it doesn't work this way... Please look away.
* input: allow quotes around any input commandwm42013-05-181-3/+1
|
* input: do property expansion for all input command string argumentswm42013-05-183-18/+26
| | | | | | 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.
* core: allow changing filter filters at runtimewm42013-05-185-12/+80
| | | | | | | | | | | | | | | | 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.
* video: rename VDCTRL_RESET_ASPECT to VDCTRL_REINIT_VOwm42013-05-181-1/+1
| | | | Same thing, and VDCTRL_REINIT_VO implies more generic use.
* cfg-mplayer: fix some option flagswm42013-05-171-3/+3
|
* 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-151-0/+1
| | | | 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-152-0/+11
|
* 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.
* add osd-scale commandPaul B Mahol2013-05-144-0/+4
| | | | | | | 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-141-8/+8
| | | | | 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
|
* core: re-add -dumpstream as --stream-dumpwm42013-05-123-0/+36
| | | | | | | 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-124-0/+20
| | | | | | 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-127-35/+83
|\ | | | | | | | | Conflicts: audio/out/ao_lavc.c
| * audio: print channel map additionally to channel count on terminalwm42013-05-121-6/+4
| |
| * audio: remove useless audio channels from AO, unless requestedwm42013-05-121-0/+2
| |
| * core: use channel map on demuxer level toowm42013-05-126-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * audio/out: switch to channel mapwm42013-05-121-4/+4
| | | | | | | | | | | | 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.
| * audio: add channel map APIwm42013-05-122-0/+46
| | | | | | | | | | | | | | Unused, will be used in the following commits. Let chmap.h define the number of maximum channels, because that is most convenient.
| * options: add option to prevent decoder audio downmixingwm42013-04-134-6/+15
| | | | | | | | Also rename --a52drc to --ad-lavc-ac3drc, and add --ad-lavc-o.
| * options: remove --af-advwm42013-04-131-6/+0
| | | | | | | | | | | | | | 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.
| * audio: switch to libavcodec channel order, use libavresample for mixingwm42013-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * af: remove automatically inserted filters on full reinitwm42013-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cocoa_common: add native OSX fullscreen supportStefano Pigozzi2013-05-122-0/+6
| | | | | | | | | | | | | | | | This adds Mission Control fullscreen functionality to mpv. Since this doesn't play well with many of mpv's features disable it by default. Users can activate this feature by using `--native-fs` when starting mpv. Fixes #34
* | OSX: run native event loop in a separate threadStefano Pigozzi2013-05-121-34/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is a followup on the previous one and uses a solution I like more since it totally decouples the Cocoa code from mpv's core and tries to emulate a generic Cocoa application's lifecycle as much as possible without fighting the framework. mpv's main is executed in a pthread while the main thread runs the native cocoa event loop. All of the thread safety is mainly accomplished with additional logic in cocoa_common as to not increase complexity on the crossplatform parts of the code.
* | OSX: use native Cocoa's event loopStefano Pigozzi2013-05-122-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schedule mpv's playloop as a high frequency timer inside the main Cocoa event loop. This has the benefit to allow accessing menus as well as resizing the window without the playback being blocked and allows to remove countless hacks from the code that involved manually pumping the event loop as well simulating manually some of the Cocoa default behaviours. A huge improvement consists in removing NSApplicationLoad. This is a C function defined in the Cocoa header and implements a minimal OSX application under ther hood so that you can use the Cocoa GUI toolkit from C/C++ without having to respect the Cocoa standards in terms of application initialization. This was bad because the behaviour implemented by NSApplicationLoad was hard to customize and had several gotchas especially in the menu department. mpv was changed to be just a nib-less application. All the Cocoa part is still generated in code but the event handling is now not dissimilar to what is present in a stock Mac application. As a part of reviewing the initialization process, I also removed all of `osdep/macosx_finder_args`. The useful parts of the code were moved to `osdep/macosx_appication` which has the broaded responsibility of managing the full lifecycle of the Cocoa application. By consequence the `--enable-macosx-finder` configure switch was killed as well, as this feature is always enabled. Another change the users will notice is that when using a bundle the `--quiet` option will be inserted much earlier in the initializaion process. This results in mpv not spamming mpv.log anymore with all the initialization outputs.
* | command: add time-remaining propertywm42013-05-101-0/+14
| |
* | core: refactor seek_chapter() functionwm42013-05-093-40/+47
| | | | | | | | | | | | | | | | | | | | Makes it easier to understand... maybe. It's still pretty strange how this function may either queue the seek or seek immediately. The way it actually works doesn't change, queuing the seek is just moved into the function. Also add a execute_queued_seek() function, which resets the queue state correctly.
* | command: fix DVD angle cyclingwm42013-05-091-2/+12
| | | | | | | | It didn't wrap around when switching while the last angle is active.
* | demux: remove retrieval of chapter end timewm42013-05-061-1/+1
| | | | | | | | | | | | | | The frontend doesn't use this. Also use double for returning the chapter times. Everything uses double for times, and there's no reason to use float here.
* | Fix some cppcheck / scan-build warningswm42013-05-061-1/+1
| | | | | | | | | | | | | | | | These were found by the cppcheck and scan-build static analyzers. Most of these aren't interesting (the 2 previous commits fix some interesting cases found by these analyzers), and they don't nearly fix all warnings. (Most of the unfixed warnings are spam, things MPlayer never cared about, or false positives.)
* | core: add playback resume feature (manual/opt-in)wm42013-05-0510-1/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "watch later" command is now mapped to Shift+Q. This quits the player and stores the playback state in a config file in ~/.mpv/watch_later/. When calling the player with the same file again, playback is resumed at that time position. It's also possible to make mpv save playback state always on quit with the --save-position-on-quit option. Likewise, resuming can be disabled with the --no-resume-playback option. This also attempts to save some playback parameters, like fullscreen state or track selection. This will unconditionally override config settings and command line options (which is probably not what you would expect, but in general nobody will really care about this). Some things are not backed up, because that would cause various problems. Additional subtitle files, video filters, etc. are not stored because that would be too hard and fragile. Volume/mute state are not stored because it would mess up if the system mixer is used, or if the system mixer was readjusted in the meantime. Basically, the tradeoff between perfect state restoration and complexity/fragility makes it not worth to attempt to implement it perfectly, even if the result is a little bit inconsistent.
* | command: alias video/audio/sub properties to -vid/-aid/-sidwm42013-05-051-9/+26
| | | | | | | | | | | | | | | | | | Now vid/aid/sid can be used as properties. video/audio/sub still work, but they are aliases for the "real" properties. This guarantees that options/properties use the same value range. One consequence is that the video/audio/sub properties return "no" as value if no track is selected instead of -1.
* | mplayer: factor config dir creationwm42013-05-051-18/+23
| | | | | | | | Move it into its own function.
* | core: ignore backstep command if demuxer is not capablewm42013-05-051-4/+7
| | | | | | | | | | | | Also, mark demuxer as not capable if DVD playback is done. The problem with DVD is that playback time (stream_pts) is not reported frame-exact, and the time is a "guess" at best.
* | options: correctly handle things like: dvd://1-2/filenamewm42013-05-051-7/+9
| | | | | | | | | | The "/filename" part was silently dropped when a range of titles is specified.
* | core: move demuxer time reporting to demuxerwm42013-05-051-8/+4
| |
* | video: add --hwdec-codecs option to whitelist codecs for hw decodingwm42013-05-043-0/+4
| |
* | video: support YCgCo colorspacewm42013-05-041-1/+2
| | | | | | | | | | | | | | YCgCo can be manually selected, but will also be used if the decoder reports YCgCo. To make things more fun, files are sometimes marked incorrectly, which will display such broken files incorrectly starting with this commit.
* | stream_bluray: remove the broken -bluray-chapter optionreimar2013-04-271-1/+0
| | | | | | | | | | | | | | | | | | | | Remove the broken -bluray-chapter option. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36175 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: DOCS/man/en/mplayer.1 cfg-common.h
* | mplayer: put space before encoding part of status linewm42013-04-271-1/+1
| | | | | | | | Also, the trailing space isn't needed.
* | options: allow using [ ] for quoting in sub-optionswm42013-04-261-1/+8
| | | | | | | | | | | | This is an attempt to make quoting of sub-option values less awkward, even if it works only with some shells. This is needed mainly for vf_lavfi. Also update the vf_lavfi manpage section.
* | core: simplify handling of --pausewm42013-04-255-31/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename the struct MPOpts "start_pause" field to "pause". Store the user- pause state in that field, so that both runtime pause toggling and the --pause switch change the same variable. Simplify the initialization of pause so that using --pause and changing the file while paused is exactly the same case (changing the file while paused doesn't unpause, this has been always this way). Also make it a bit more consistent. Before, starting with --pause would reset the pause state for every file, instead of following the usual semantics for option switches (compare with behavior of --fs).
* | core: don't let cache pause handling and user pausing conflictwm42013-04-253-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | The core pauses and unpauses automatically to wait for the network cache (also known as buffering). This conflicted with user pause control, and was perceived as if the player was unresponsive and/or the cache just overturned the user's decisions. Change it so that the actual pause state and the pause state as intended by the user never conflict. If the user toggles pause, the pause state will be in the expected state as soon as the cache is loaded.
* | core: fix bogus condition that broke backstepping with last commitwm4