aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
Commit message (Collapse)AuthorAge
* path: start special espansion with ~~name instead of ~nameGravatar wm42015-05-03
| | | | | | | Since commit 7381db60, strings like "~desktop/" were expanded as platform-specific paths by mpv. Apparently this similarity to standard Unix shell expansion caused confusion, so change it to "~~desktop/". The shell doesn't expand this, so it should be better.
* options: fix typo in variable nameGravatar wm42015-05-03
|
* options: remove --leak-reportGravatar wm42015-05-02
| | | | Use the environment variable instead.
* win32: move platform specifics to osdepGravatar wm42015-05-02
| | | | | This will probably disable this code for Cygwin. I don't know if this matters, since Cygwin should strictly behave like a Unix anyway.
* build: move main-fn files to osdepGravatar wm42015-05-02
| | | | | | And split the Cocoa and Unix cases. Simplify the Cocoa case slightly by calling mpv_main directly, instead of passing a function pointer. Also add a comment explaining why Cocoa needs a special case at all.
* cocoa: always compile OSX application code with cocoaGravatar wm42015-05-02
| | | | | | | | | | | | | | This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case.
* player: handle hotplug events in idle mode tooGravatar wm42015-05-02
|
* screenshots: create screenshot dirGravatar wm42015-05-02
| | | | Minor user convenience.
* screenshots: change default directory in pseudo-gui mode to desktopGravatar wm42015-05-01
| | | | | | | | This should take care of the endless complaints about the default location for screenshots (and will of course create new ones). If the screenshot-template is set to an absolute path, the directory won't be used. So this should be reasonably compatible.
* screenshots: add --screenshot-directory optionGravatar wm42015-05-01
| | | | | The plan is to use this to change the screenshot default location in pseudo-gui mode.
* player: properly destroy client context if thread can't be createdGravatar wm42015-04-30
| | | | Minor leak in an obscure out of memory case.
* command: let sub_reload remove the old track firstGravatar wm42015-04-28
| | | | | | In the most simple case, this prevents the track ID from changing. One disadvantage is that if the file fails loading, the track is gone for good and would have to be re-added explicitly by the user.
* player: log track list when adding or removing external filesGravatar wm42015-04-28
| | | | | | | | | Should help with debugging, and might be slightly more userfriendly. Note that this is called manually in multiple entry-points, instead of the functions doing the actual work (like mp_remove_track()). This is done so that exiting the player or calling the sub_reload command won't print redundant in-between states.
* player: clamp display time to known time range on seekingGravatar wm42015-04-28
| | | | | | | | | | | | | | | During seeking, and there is momemtarily no new data available yet, the player will display the seek target as current time. Clamp this time to the known time range as implied by the start time and the duration of the file. This improves behavior especially when seeking in audio files, for which this for some reason triggers rather often. There were some users complaining about this. This makes behavior worse for files with timestamp resets, or incorrectly reported duration. (The latter is relatively common, e.g. libavformat shortcomings, or incomplete files.)
* osc: redo slider position translationGravatar ChrisK22015-04-28
| | | | | | Now done in one place instead of mulitple times all over the code. Fixes #1876
* ytdl_hook.lua: Change format options when vid is "off"Gravatar robin2015-04-27
| | | | | | | | This will change the format option to "bestaudio/best" instead of passing the "-x" argument to yt-dl. Prevents the video still being downloaded in the new mpv versions where the yt-dl format is set to "best" by default.
* player: fix removing external tracks at runtimeGravatar wm42015-04-27
| | | | | | | | | | This could make the player crash on exit if the "sub_reload" command was used successfully. the reason was that the mpctx->sources array could have dangling pointers to the unloaded demuxers. Also fix a memory leak by actually always freeing the per-stream subtitle decoders (which are a hack to make ordered chapters behave better).
* player: flush decoder even if cover art is decodedGravatar wm42015-04-24
| | | | | | | | | | | | | | | Fixes PNG cover art not showing up immediately (for example when running with --pause). libavformat exports embedded cover art as a single packet. For example, a PNG attachment simply contains the PNG image, which can be sent to the decoder. Normally you would expect that the PNG decoder would return 1 frame for 1 packet, without any delays. But this stopped working, and it incurs a 1 frame delay. This is perfectly legal (even if unexpected), so let our code feed the decoder packets until we get something back. (In theory feeding the packet instead of a real flush packet is still somewhat questionable.)
* player: don't show A/V desync message in non-sense situationsGravatar wm42015-04-24
| | | | | | | last_av_difference can be MP_NOPTS_VALUE under certain circumstances (like no video timestamp yet). This triggered the desync message, because fabs(MP_NOPTS_VALUE) is quite a large value. We don't want to show a message in this situation.
* osc: add nil check for element.eventresponderGravatar wm42015-04-23
| | | | Possibly fixes a crash (see #1101).
* demux_mkv: move global options to the demuxerGravatar wm42015-04-23
| | | | | | | The options don't change, but they're now declared and used privately by demux_mkv.c. This also brings with it a minor refactor of the subpreroll seek handling - merge the code from playloop.c into demux_mkv.c. The change in demux.c is pretty much equivalent as well.
* lua: add utils.format_json() functionGravatar wm42015-04-22
| | | | Requested. Why not.
* osc: paint over a crashGravatar wm42015-04-22
| | | | | Sometimes tries to index a nil object when seeking close to the end of the file. See #1101.
* player: do not load encoding config files in non-encoding modeGravatar wm42015-04-21
| | | | | | | | It's annoying and unnecessary. They can be manually loaded if really needed (for things like previewing). Also remove the #if. It was for suppressing warnings, and we don't need to be so careful about this in the relatively obscure encoding mode.
* command: demuxer-cache-time propertyGravatar xylosper2015-04-21
| | | | | | | | Approximate time of video buffered in the demuxer, in seconds. Same as `demuxer-cache-duration` but returns the last timestamp of bufferred data in demuxer. Signed-off-by: wm4 <wm4@nowhere>
* player: cleanup update_fps() functionGravatar wm42015-04-20
| | | | | It was called only in 2 places, one of them redundant (the container FPS can not change).
* video: cleanup some old log messagesGravatar wm42015-04-20
| | | | | These are basically MPlayer leftovers, and barely useful due to being redundant with other messages. The FPS message is used somewhere else.
* client API: add a screenshot_raw commandGravatar wm42015-04-20
| | | | | | | | | Requested. The wild code for setting up the mpv_node probably deserves to be cleaned up later. Fixes #1800.
* client API: add MPV_FORMAT_BYTE_ARRAY typeGravatar wm42015-04-20
| | | | | | | | | | | | This will be used in the following commit, which adds screenshot_raw. The reasoning is that this will be better for binding scripting languages. One could special-case the screenshot_raw commit and define fixed semantics for passing through a pointer using the current API, like formatting a pointer as string. But that would be ridiculous and unclean.
* client API: add glue for making full use of mpv_command_node()Gravatar wm42015-04-20
| | | | | Until now, the return value was always MPV_FORMAT_NONE. Now a command can actually set it. This will be used in one of the following commits.
* player: change video-bitrate and audio-bitrate propertiesGravatar wm42015-04-20
| | | | | | | | | | | | | | Remove the old implementation for these properties. It was never very good, often returned very innaccurate values or just 0, and was static even if the source was variable bitrate. Replace it with the implementation of "packet-video-bitrate". Mark the "packet-..." properties as deprecated. (The effective difference is different formatting, and returning the raw value in bits instead of kilobits.) Also extend the documentation a little. It appears at least some decoders (sipr?) need the AVCodecContext.bit_rate field set, so this one is still passed through.
* command: disc-mouse-on-button propertyGravatar xylosper2015-04-21
| | | | | This property indicates whether mouse cursor is located on button or not for disc naviation.
* vf_screenshot: remove this filterGravatar wm42015-04-16
| | | | | | It's entirely useless, especially now that vo.c handles screenshots in a generic way, and requires no special VO support. There are some potential weird use-cases, but actually I've never seen it being used.
* command: let screenshot_to_file command overwrite filesGravatar wm42015-04-16
| | | | | | | The old behavior does not make too much sense after all. If you don't want to file to be overwritten, the user can check this manually. This is a change in behavior - let's hope nobody actually relied on it.
* video: do not show decoder framedrops if they're not requestedGravatar wm42015-04-16
| | | | | | | | | | | libavcodec makes it impossible to distinguish dropped frames (requested with AVCodecContext.skip_frame), and cases when the decoder simply does not return a frame by default (such as with VP9, which has invisible reference frames). This confuses users when decoding VP9 video. It's basically a cosmetic issue, so just paint it over by ignoring them if framedropping is disabled.
* subprocess: move implementation for deatched subprocessesGravatar wm42015-04-15
|
* player: silence spam in verbose mode when playing audio with cover artGravatar wm42015-04-14
| | | | | | When playing cover art, it conceptually reaches EOF as soon as the image was put on the VO, causing the EOF message to be repeated every time new audio was decoded. Just silence the message.
* Update license headersGravatar Marcin Kurczewski2015-04-13
| | | | Signed-off-by: wm4 <wm4@nowhere>
* main-fn-win: fix handle validity check for XPGravatar James Ross-Gowan2015-04-11
| | | | | | | Apparently the standard handles can be set to bogus values on XP. Use GetFileType to check whether they refer to an actual file/pipe/etc. The logic used by is_valid_handle() is now pretty similar to what the CRT uses to check for valid stdio handles.
* win32: use pseudo-gui profile when started without stdioGravatar James Ross-Gowan2015-04-11
| | | | | | If mpv is started from Explorer or the Start Menu, it will have no console and no standard IO handles. In this case, it's fairly safe to enable the pseudo-gui profile.
* win32: only attach to the console from mpv.comGravatar James Ross-Gowan2015-04-11
| | | | | | | | | | | | | | | | | | | Previously, mpv.exe used the --terminal option to decide whether to attach to the parent process's console, which made it impossible to tell whether mpv would attach to the console before the config files were parsed. Instead, make mpv always attach to the console when launched from the console wrapper (mpv.com) and never attach otherwise. This will be useful for the next commit, which will use the presence of the console to decide whether to use the pseudo-gui profile. This change should also be an improvement in behavior. The old code would attach to the parent process's console, regardless of whether it was mpv.com or some other program like cmd.exe. This could be confusing, since mpv.exe is marked as a Windows GUI program and shouldn't write text to its parent process's console when launched directly. (See #768.) Visual Studio does something similar with its devenv.com wrapper. devenv.exe only attaches to the console when launched from devenv.com.
* win32: use a platform-specific unicode entry-pointGravatar James Ross-Gowan2015-04-11
| | | | | | | | | | Add a platform-specific entry-point for Windows. This will allow some platform-specific initialization to be added without the need for ugly ifdeffery in main.c. As an immediate advantage, mpv can now use a unicode entry-point and convert the command line arguments to UTF-8 before passing them to mpv_main, so osdep_preinit can be simplified a little bit.
* player: use config parser for setting up pseudo-gui profileGravatar wm42015-04-10
|
* player: change pseudo-gui settingsGravatar wm42015-04-10
| | | | | | Remove --keep-open. Switch to --idle=once. This effectively makes the player quit after end of playback, but still shows the idle screen if it was started with no files.
* player: do not accidentally init terminalGravatar wm42015-04-10
| | | | | | | Starting the command line player with --no-terminal, the terminal was sitll initialized. This happened because update_logging() used the option value before the options were parsed. Fix by moving down the initialization to before the point where it's actually needed.
* ytdl: set additional properties for rtmp streamsGravatar Sebastian Mayr2015-04-09
|
* ytdl_hook.lua: Disable video when vid option is "no"Gravatar robin2015-04-09
| | | | | | When setting options like --no-video, ytdl_hook adds the "-x" argument to youtube-dl, so that bandwith is saved by not downloading the video on some sites.
* vo_opengl_cb: deprecate mpv_opengl_cb_render()Gravatar wm42015-04-09
| | | | Its vp parameter made no sense anymore. Introduce a new one.
* vo_opengl_cb: add a function to report vsync timeGravatar wm42015-04-09
| | | | | | | And also let vo.c know of it. Currently, this does not help much, but will facilitate future improvements.
* audio: change a detail about filter insertionGravatar wm42015-04-07
| | | | | | | | | | The af_add() function has a problem: if the inserted filter returns AF_DETACH during init, the function will have a dangling pointer. Until now this was avoided by making sure none of the used filters actually return AF_DETACH, but it's getting infeasible. Solve this by requiring passing an unique label to af_add(), which is then used instead of the pointer.