summaryrefslogtreecommitdiffstats
path: root/player
Commit message (Collapse)AuthorAgeFilesLines
* player: make sure version information is always included in --log-filewm42017-05-221-0/+5
| | | | | | | If --log-file was used in config files, this could be missing due to the exact timing when the messages are print, and when the options are applied. Fix this by always dumping the version again when a log file is opened.
* command: use scale_units to add/cycle integer propertiesJames Ross-Gowan2017-05-121-16/+38
| | | | | | | | | | | | | | | This adds check_property_scalable, which returns true if the property is backed by a floating-point number. When the add or cycle commands operate on these properties, they can benefit from the fractional scale value in cmd->scale. When the property is not backed by a floating-point number, cmd->scale_units is used instead, so for axis events, the property is only incrmented when the user scrolls one full unit. This solution isn't perfect, because in some cases integer-backed properties could benefit from accurate scrolling. For example, if an axis is bound to "cycle audio 5", the cycle command could be made to change the audio track by one when the user scrolls 1/5th of a unit, though this behaviour would require more changes to the options system.
* vo.c, vo.h, vo_null.c: change license to LGPLwm42017-05-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most contributors have agreed. vo.c requires a "driver" entry for each video output - we assume that if someone who didn't agree to LGPL added a line, it's fine for vo.c to be LGPL anyway. If the affected video output is not disabled at compilation time, the resulting binary will be GPL anyway. One problem are the changes by Nick Kurshev (usually using "nick" as SVN username). He could not be reached. I believe all changes to his files are actually gone, but here is a detailed listing: fa1d5742bc: nick introduces a new VO API. It was removed in 64bedd9683. Some of this was replaced by VOCTRLs are introduced in 7c51652a1b, obviously replacing at least some functionality by his API. b587a3d642: nick adds a vo_tune_info_t struct. Removed in 64bedd9683 too. 9caad2c29a: nick adds some VOCTRLs, which were silently removed in 8cc5ba5ab8 (they became unused probably with the VIDIX removal). 340183b0e9: nick adds VO-based screenshots, which got removed in 2f4b840f62. Strangely the same name was introduced in 01cf896a2f again, but this is a coincidence and worked differently (also it was removed yet again in 2858232220). 104c125e6d: nick adds an option for "direct rendering". It was renamed in 6403904ae9 and fully removed in e48b21dd87. 5ddd8e92a1: nick adds code to check the VO driver preinit arg to every single VO driver. The argument itself and any possibly remaining code associated with it was removed in 1f5ffe7d30. f6878753fb: nick adds header inclusion guards. We assume this is not relevant for copyright. Some of nick's code was merely moved to other files, such as the equalizer stuff added in 555c676683 and moved in 4db72f6a80 and 12579136ff, and don't affect copyright of these files anymore. Other notes: fef7b17c34: a patch by someone who wasn't asked for relicensing added a symbol that was removed again in 1b09f4633. 4a8a46fafd: author probably didn't agree to LGPL, but the function signature was changed later on anyway, and nothing of this is left. 7b25afd742: the same author adds a symbol to what is vo.h today, which this relicensing commit removes, as it was unused. (It's not clear whether the mere symbol is copyrightable, but no need to take a risk.) 3a406e94d7, 9dd8f241ac: slave mode things by someone who couldn't be reached. This aspect of the old slave mode was completely removed. bbeb54d80a: patch by someone who was not asked, but the added code was completely removed again.
* audio: replace from_dB functionwm42017-05-051-8/+4
| | | | | | | | The author of the old code disagreed with LGPL. The new code is a clean room reimplementation by Niklas Haas. It lacks the clamping, but we decided it doesn't matter. Untested, bugs can be fixed later anyway.
* ytdl_hook: rework edl joining to use lua tablesRicardo Constantino2017-05-041-5/+7
| | | | Seems much more resource efficient than concatenating a string.
* lua: increase subprocess stdout limit to 64MBRicardo Constantino2017-05-041-1/+1
|
* player: fix potential segfault when playing dvd:// with DVD disabledwm42017-05-011-1/+1
| | | | | | | Tries to access the options, which are obviously not allocated if there is no DVD support compiled. Fixes #4393.
* audio: merge --replaygain-track and --replaygain-album into one optionwm42017-04-271-2/+2
| | | | | This is probably better than separate options. For example, the user does not have to guess which one is applied if both options are enabled.
* audio: fix replaygain volume scalewm42017-04-271-0/+1
| | | | | | | | The new replaygain code accidentally applied the linear gain as cubic volume level. Fix this by moving the computation of the volume scale out of the af_volume filter. (Still haven't verified whether the replaygain code works correctly.)
* audio: move replaygain control to top-level optionswm42017-04-262-4/+53
| | | | | | | | | | | | | | | | | | | | | af_volume is deprecated, and so are its replaygain sub-options. To make it possible to use replaygain without deprecated options (and of course to make it available at all after af_volume is dropped), reintroduce them as top-level options. This also means that they are easily changeable at runtime by using them as properties. Change the "volume" property to use the new update mechanism as well. We don't actually bother sharing the implementation between new and deprecated mechanisms, as the deprecated one will simply be deleted. For the from_dB() functions, we mention anders' copyright, although I'm not sure if a mere formula is copyrightable. This will have to be determined later. This whole change is mostly untested. Our distributed human CI will take care of it.
* player: close audio device on no audio trackMarko Hauptvogel2017-04-251-1/+3
| | | | | | | | | Close the audio device if there is no audio track (or stream) in the current file. It will be opened again if the next file should contain audio. Signed-off-by: Marko Hauptvogel <marko.hauptvogel@googlemail.com> Signed-off-by: wm4 <wm4@nowhere>
* osc: also add processing for axis_up/down eventsRicardo Constantino2017-04-251-4/+6
| | | | | | Considered semantically equivalent with mouse_btn3/4. This is a preemptive fix for upcoming changes to AXIS_* events.
* ytdl_hook: treat single-entry playlists as a single videoRicardo Constantino2017-04-231-1/+9
|
* ytdl_hook: move single video code to a separate functionRicardo Constantino2017-04-231-94/+98
|
* external_files.c: add GPL headerwm42017-04-211-0/+17
| | | | | | It's been missing since mplayer2 times, not sure why. It originates from subreader.c. No analysis on whether it can be relicensed to LGPL was done yet.
* osc: add user_opts.boxmaxchars for box layout title limitAvi Halachmi (:avih)2017-04-191-3/+6
| | | | | The default of 80 is conservative to allow relatively wide fonts, but with many common fonts a bigger number can be used without overflow.
* osc: add volume icons to osd font and use themRicardo Constantino2017-04-191-3/+4
| | | | | Glyphs taken and based on U+1F507 to U+1F50A from Symbola, which is available under public domain: http://users.teilar.gr/~g1951d/
* osc: move volume left of fullscreen buttonRicardo Constantino2017-04-191-16/+17
|
* osc: bottom/topbar: add fullscreen buttonRicardo Constantino2017-04-191-4/+13
|
* osc: add volume buttonRicardo Constantino2017-04-191-3/+41
| | | | | Click to toggle mute, mouse wheel to change volume. OSD is shown on volume change.
* osc: support handling mouse wheel eventsRicardo Constantino2017-04-191-4/+8
|
* osc: simplify checks in key handlerRicardo Constantino2017-04-191-30/+25
| | | | Use a helper function for these safety checks.
* osc: fix last potential race condition on key eventsRicardo Constantino2017-04-191-1/+2
|
* Fix use of ISC licensewm42017-04-151-1/+3
| | | | | | | | | | The license text refers a "above copyright notice", so I guess it'd be good to actually provide such a notice. Add the license to some files that were missing it (since in theory, our Copyright file says that such files are LGPL by default). Remove the questionable remarks about the license in the client API.
* player: fix a corner case in previous commitwm42017-04-143-3/+5
| | | | | | | | | The previous commit set "mpctx->playback_active = false;" before unload hooks were processed. This was intentional, but could in theory cause playback_active to be set to true again, and actually it's plain wrong if playback was exited in the middle it. There needs to be something else that forces playback_active to be set to false while in this unloading state.
* player: fix core-idle and eof-reached update notifcationswm42017-04-145-11/+37
| | | | | | | | Make mpv_observe_property() work correctly on them even with --keep-open-pause=no. This also changes the situations in which the screensaver is enabled/disabled subtly.
* player: unmess pause state handlingwm42017-04-145-65/+53
| | | | | | | | | Merge the pause_player() and unpause_player() functions. Make sure the pause events are emitted properly. We can now set the internal pause state based on a predicate, instead of e.g. handle_pause_on_low_cache() making a mess to trigger the internal pause state as wanted. Preparation for some more changes.
* player: add --keep-open-pause=no optionDan Oscarsson2017-04-141-1/+1
| | | | | | | | | | | Instead of pausing if --keep-open is active, stop at end but continue playing if seeking backwards. And then stop again when end is reached. Signed-off-by: wm4 <wm4@nowhere> Over the PR, the option was renamed, and the manpage additions were slightly changed/enhanced.
* osc: use "loop-playlist" instead of "loop" propertywm42017-04-111-1/+1
|
* command, manpage: some leftover mentions of renamed --loop optionwm42017-04-111-1/+1
|
* command: update sub-fps etc. options on runtime changeswm42017-04-101-11/+7
| | | | | | | | | | | | | Un-special-case the sub-speed property, and apply subtitle speed updates in more cases. In particular, this respects runtime changes of the sub-fps option. (A minor consequence of this is that the subtitle speed is recomputed more often even in cases when it's not necessary. Also, the subtitle update is slightly "delayed" rather than strictly instant. Both of these likely are absolutely not observable by the user, although the subtitle speed verbose log message will be printed more often if the subtitle format is MicroDVD.)
* audio: deprecate most audio filterswm42017-04-041-1/+2
| | | | | Well, ok, only 4 filters. The rest will survive in one or the other form.
* video: deprecate almost all video filterswm42017-04-021-3/+4
| | | | | | | | | | | | | The plan is to nuke the custom filter chain completely. It's not clear what will happen to the still needed builtin filters (mostly hardware deinterlacing and vf_vapoursynth). Most likely we'll replace them with different filter chain concept (whose main purpose will be providing builtin things and bridging to libavfilter). The undocumented "warn" options are there to disable deprecation warnings when the player inserts filter automatically. The same will be done to audio filters, at a later point.
* screenshot: cleanup: use normal MSGL_ defineswm42017-04-011-19/+9
| | | | Remove the weird custom thing.
* player: make screenshot commands honor the async flagwm42017-04-015-29/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | And also change input.conf to make all screenshots async. (Except the every-frame mode, which always uses synchronous mode and ignores the flag.) By default, the "screenshot" command is still asynchronous, because scripts etc. might depend on this behavior. This is only partially async. The code for determining the filename is still always run synchronously. Only encoding the screenshot and writing it to disk is asynchronous. We explicitly document the exact behavior as undefined, so it can be changed any time. Some of this is a bit messy, because I wanted to avoid duplicating the message display code between sync and async mode. In async mode, this is called from a worker thread, which is not safe because showing a message accesses the thread-unsafe OSD code. So the core has to be locked during this, which implies accessing the core and all that. So the code has weird locking calls, and we need to do core destruction in a more "controlled" manner (thus the outstanding_async field). (What I'd really want would be the OSD simply showing log messages instead.) This is pretty untested, so expect bugs. Fixes #4250.
* player: enable "buffering" pausing for DASH streams toowm42017-04-011-1/+2
| | | | | | | | | | This wasn't enabled if no stream cache was used. It can work with only the demuxer cache. In theory this could be always enabled (even for local files), but still try to avoid this, and enable it only if the source is marked as potentially being a "network" stream. The intention is mostly to enable it for the youtube-dl pseudo-DASH support.
* external_files: enable autoloading with URLsRicardo Constantino2017-04-011-3/+4
| | | | Closes #3264
* external_files: actually try to autoload from fallback pathsRicardo Constantino2017-04-011-2/+2
| | | | | | The 'sub' and 'audio' configuration subdirectories are supposed to be fallbacks for sub-paths and audio-file-paths respectively, but they weren't being scanned even if they existed.
* command: add property notifications for hwdec propertieswm42017-03-311-3/+3
| | | | | | | | | | This is a bit approximate, because we rely on the pixel format changing if the hardware decoding changes. This is not always true, as the pixel format for software decoded video and hardware decoded video copied back to CPU RAM could be the same. (Not sure if that is actually the case for any supported cases.) But for now this should fix most of #4289.
* osc: escape ASS and strip newlines on titleRicardo Constantino2017-03-271-0/+2
|
* osc: make title configurable and use property expansion on itRicardo Constantino2017-03-271-6/+4
|
* Revert "osc: make the title toggleable between media-title and filename"Ricardo Constantino2017-03-271-11/+10
| | | | This reverts commit 6573b73462e336da0daca845ba4df02782afc2b6.
* osx: initial Touch Bar supportAkemi2017-03-261-0/+5
|
* command: add expand-text command to property-expand a stringAvi Halachmi (:avih)2017-03-261-0/+10
|
* osc: make the title toggleable between media-title and filenameRicardo Constantino2017-03-261-10/+11
| | | | Close #4221
* player: make new stream output more consistent with other outputwm42017-03-261-3/+3
| | | | It seems we generally skip the space, such as seen on the AO init line.
* player: print additional stream infoDan Oscarsson2017-03-261-1/+13
| | | | | | In print_stream print additional stream info for audio and video track. While it may be incorrect it is mostly correct and good info to have.
* command: add better runtime filter toggling methodwm42017-03-251-1/+4
| | | | | | | | | | Basically, see the example in input.rst. This is better than the "old" vf-toggle method, because it doesn't require the user to duplicate the filter string in mpv.conf and input.conf. Some aspects of this changes are untested, so enjoy your alpha testing.
* command: add demux-start-time propertyMatthias Hunstock2017-03-251-0/+11
| | | | Add a demux_start_time property, update docs.
* osc: fix PlayResX undefined warning when aspect is 0Ricardo Constantino2017-03-241-3/+6
|
* osc: bottom/topbar: don't clip title verticallyRicardo Constantino2017-03-241-2/+2
|
* osc: bottom/topbar: increase timecodes width a bitRicardo Constantino2017-03-241-4/+4
| | | | | | | Compensates for wider fonts like DejaVu Sans Mono. Further compensate for the minus sign in the right timecode by 10px. Closes #3952
* osc: refactor cache status displayRicardo Constantino2017-03-241-11/+18
| | | | This removes the twitch of the right-aligned cache status.
* osc: refactor osc message scalingRicardo Constantino2017-03-241-35/+20
| | | | | | | | | | Will still hide playlist items with long enough filenames and osd-font-size but not as soon. osc messages should now preserve their scaling with fullscreen toggling and cycling through audio-only files and files with video. Closes #4081, #4083, #4102
* command: add a property to signal whether networking is usedwm42017-03-241-0/+12
| | | | | | Requested. The property semantics are a bit muddy due to lack of effort. Anticipated use is different display of cache status, so it should not matter anyway.
* screenshot: change details of --screenshot-format handlingwm42017-03-181-2/+3
| | | | | | | | | | | | | | | | This is just a pointless refactor with the only goal of making image_writer_opts.format a number. The pointless part of it is that instead of using some sort of arbitrary ID (in place of a file extension string), we use a AV_CODEC_ID_. There was also some idea of falling back to the libavcodec MJPEG encoder if mpv was not linked against libjpeg, but this fails. libavcodec insist on having AV_PIX_FMT_YUVJ420P, which we pretend does not exist, and which we always map to AV_PIX_FMT_YUV420P (without the J indicating full range), so encoder init fails. This is pretty dumb, but whatever. The not-caring factor is raised by the fact that we don't know that we should convert to full range, because encoders have no proper way to signal this. (Be reminded that AV_PIX_FMT_YUVJ420P is deprecated.)
* screenshot: minor simplificationwm42017-03-181-7/+4
| | | | | | | | This also will set image=NULL, if the video frame is marked as hwaccel, and could not be copied to normal RAM. This will probably change the error message (due to screenshot_get() returning NULL, instead of making image conversion fail at a later point), but the behavior is the same anyway.
* player: specifically log audio EOF toowm42017-03-141-1/+3
|
* osc: fix window dragging with showwindowed=noAkemi2017-02-271-0/+2
| | | | | | | initialise OSC with a zero mouse area so mp_input_test_dragging returns a proper value. Fixes #1819
* client: call certain external functions outside of client lockwm42017-02-241-2/+3
| | | | | | | | | Fixes theoretical lock-order issues found by Coverity. Calling these inside the log is unnecessary anyway, because they have their own locking, and because mpv_detach_destroy() needs to be called by someone who has exclusive access to the mpv_handle (it's basically a destructor function). The lock order issues comes from the fact that they call back into the client API implementation to broadcast events and such.
* lavfi: temporary workaround for FFmpeg av_buffersrc_parameters_set() bugwm42017-02-221-0/+9
| | | | | The function ignores AVBufferSrcParameters.channel_layout. Set it manually using the API.
* player: don't block playback stop when seekingwm42017-02-211-3/+0
| | | | | | This was added for A-B loops, but it looks like commit a1dec6f5 made this code unnecessary. Remove it, because it has the annoying side-effect of blocking playback stop when seeking past the end.
* player: fix stats-logging of sleep statewm42017-02-211-2/+3
|
* player: remove unnecessary wakeupwm42017-02-211-1/+0
| | | | I can't find any actual need for it.
* player: reduce blocking on VO when switching pausewm42017-02-211-2/+2
| | | | | | | | | | | | | | | | | | | When pausing, we sent BOCTRL_PAUSE and VOCTRL_RESTORE_SCREENSAVER. These essentially wait until the video frame has been rendered. This is a problem with the opengl-cb, if GL rendering is done in the same thread as libmpv uses. Unfortunately, it's allowed to use opengl-cb this way. Logically speaking