summaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* options: fix --no-colorkeywm42013-04-041-1/+1
| | | | | | | In the last cleanup round, this was accidentally changed from a store option to int, and the option value was passed as flag value. (Not that anyone needs/uses/cares about this option...)
* core: add --heartbeat-interval optionwm42013-04-045-3/+8
| | | | | | This closely follows MPlayer commit 36099, with some changes. Move a mutable static variable into MPContext.
* av_common: minor simplificationwm42013-04-041-8/+2
|
* command: silence "Audio: no audio" line for playback speedwm42013-04-041-1/+2
| | | | | If no audio stream is selected, this line will be printed by reinit_audio_chain() when changing playback speed.
* mplayer: switch back to video PTS for reporting playback timewm42013-04-042-10/+8
| | | | | | | | | | | | | | | The main problem with video PTS was that it wasn't very useful when playing audio files with cover art. Using the audio time instead was an obvious solution. Unfortunately, this leads to "inexact" reporting of the playback time in paused mode, and audio is always ahead by small, essentially random amounts of time ahead. This is possibly because the times reported by AOs are not entirely accurate when paused (see commit 9b3bf76). Switch back to video PTS, and use a simpler way to deal with the cover art case: if the video has ended, use the audio PTS. Also see commit f9a259e (and the commits referenced from there).
* mplayer: fix framestepping on ordered chapter segment boundarieswm42013-04-041-28/+34
| | | | | | | | | | | | | | | | | | | Trying to step over a segment boundary didn't work, and the video was stuck at the end of the current chapter. At this point, both video and audio of the segment has ended, and the segment switching code is going to call seek() to go to the next segment (the part of the code in run_playloop that uses end_is_chapter). However, this seek() is not called if playback is paused, and the framestepping code always paused before this code is run. Move the framestepping code below the chapter switching code. The added restart_playback condition makes sure the code is called only after at least one video frame has been shown. Also don't reset the framestep counter after seek. It's not needed, and removing it prevents full unpausing when stepping over a segment boundary. This also terminates playback when frame stepping at the end of the file. The --keep-open option can be used to get the old behavior.
* mplayer: fix --step EOF handlingwm42013-04-041-1/+3
|
* remove Apple Remote related codeStefano Pigozzi2013-03-316-677/+0
| | | | | | | | | | | | | | | | The OSX part of the Apple Remote was unmaintained for a long time and was not working anymore. I tried to update the cookies to what the current versions of OS X expect without much luck. I decided to remove it since Apple is not including the IR receiver anymore in new hardware and it's clear that wifi based remotes are the way to go. A third party iOS app should be used in it's place. In the future we could look into having a dedicated iOS Remote Control app like VLC and XBMC do. The Linux side (`appleir.c`) was relatively tidy but it looks like LIRC can be configured to work with any version of Apple Remote [1] and is more maintained. [1] LIRC Apple Remote configs: http://lirc.sourceforge.net/remotes/apple/
* osd: draw the OSD bar with ASS vector drawingswm42013-03-304-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Drawing the bar with vector drawings (instead with characters from the OSD font) offers more flexibility and looks better. This also adds chapter marks to the OSD bar, which are visible as small triangles on the top and bottom inner border of the bar. Change the default position of the OSD bar below the center of the screen. This is less annoying than putting the bar directly into the center of the view, where it obscures the video. The new position is not quite on the bottom of the screen to avoid collisions with subtitles. The old centered position can be forced with ``--osd-bar-align-y=0``. Also make it possible to change the OSD bar width/height with the new --osd-bar-w and --osd-bar-h options. It's possible that the new OSD bar renders much slower than the old one. There are two reasons for this: 1. the character based bar allowed libass to cache each character, while the vector drawing forces it to redraw every time the bar position changes. 2., the bar position is updated at a much higher granularity (the bar position is passed along as float instead of as integer in the range 0-100, so the bar will be updated on every single video frame).
* vo: rename vo_draw_image to vo_queue_imagewm42013-03-281-2/+2
|
* vo_opengl: split into multiple files, convert to new option APIwm42013-03-281-0/+10
| | | | | | gl_video.c contains all rendering code, gl_lcms.c the .icc loader and creation of 3D LUT (and all LittleCMS specific code). vo_opengl.c is reduced to interfacing between the various parts.
* core: always pass data via packet fields to video decoderswm42013-03-281-10/+9
| | | | | | | Makes the code a bit simpler to follow, at least in the "modern" decoding path (update_video_nocorrect_pts() is used with old demuxers, which don't return proper packets and need further parsing, so this code looks less simple now).
* m_option: pretty-print floats with 3 pre-decimal digits instead of 2wm42013-03-261-6/+6
| | | | | | There were complaints that ${fps} was printed as e.g. "23.98" instead of "23.976". Since there's no way to format floats exactly _and_ in a user- friendly way, just change the default precision for printing floats.
* core: output --playing-msg message only after at least one frame is shownwm42013-03-262-6/+9
| | | | | | | | | | | | | | | | This way it's possible to retrieve correct information about video, like actual width/height, which in general are available only after at least one frame has been sent to the video output, such as dwidth/dheight. mpv_identify.sh becomes a bit slower, because we let it decode enough audio and video to fill the audio buffers and to send one frame to the video output. Also, --playing-msg isn't shown anymore with --frames=0 (could be fixed by special-casing it, should this break any use cases). Note that in some corner cases, like when the demuxer for some reason returns lots of audio packets but no video packets at the start, but video actually starts later, the --playing-msg will still be output before video starts.
* mplayer: make --frames=1 work for audiowm42013-03-261-10/+15
| | | | | | | This has the same (useless) definition as frame stepping in audio-only mode: one frame means one playloop iteration. (It's relatively useless, because one playloop iteration has a random duration. But it makes --frames=1 work, which is useful again.)
* mplayer: cosmetics: make some code more readablewm42013-03-261-13/+13
|
* command: export VO video width/height as propertieswm42013-03-261-0/+24
| | | | | | Add new properties "dwidth" and "dheight", which contain the video size as known by the VO (not necessarily what the VO makes out of them, i.e. without window scaling and panscan).
* input: make input command deprecation warnings visiblewm42013-03-262-3/+3
| | | | | | | | | | | | | | | | Some time ago, all old special-cased commands (like "volume 1" to change volume by one) have been removed. These commands are still emulated using simple text replacement. This emulation is done to not break everyone's input.conf, especially because the input.conf provided by standard mplayer* still uses the old commands. Every use of a deprecated command prints a replacement warning, which was visible only with -v. Make these warnings visible by default. There's actually not much reason to do this, but since commands like "volume 5 1" don't work anymore, it's better to be verbose about this. Also simplify the replacement for "vo_fullscreen".
* mp_msg: don't change text color for normal outputwm42013-03-261-2/+8
| | | | | | | | | | Normal text was set to gray foreground color. This didn't work for terminals with white background. Instead of setting a color for normal text, reset the color attributes. This way, only errors and warnings are formatted differently. Also change the default color for MSGL_HINT from bold white to yellow.
* input: fix crash due to dangling pointerwm42013-03-191-1/+1
| | | | | Wrong API usage, has been in the code since 2011. Rarely triggered (if at all in the current setup).
* input/ar: remove unused variablewm42013-03-191-1/+0
|
* mp_msg: print MSGL_STATUS to stderr if stderr is redirectedRudolf Polzer2013-03-181-2/+2
| | | | | Of course, status output is still hidden when stderr is a tty which is not the foreground tty.
* mp_msg: fix status output disappearing when redirecting INPUT.Rudolf Polzer2013-03-181-2/+2
| | | | | Instead, we now check stderr's destination against the foreground tty for deciding whether we want status output or not.
* options: fix --widwm42013-03-181-1/+1
| | | | | | A recent change accidentally set the flags options to -1 (probably confusing it with the defasult value?), which mistakenly set all flags and rejected all option values (except 0).
* configure: bump minimum FFmpeg/Libav versions, remove compat hackswm42013-03-131-74/+0
| | | | | | | | | | | | | | | | | We consider FFmpeg 1.x and Libav 0.9.x releases compatible. Support for FFmpeg 0.9.x and Libav 0.8.x is considered infeasible and has been dropped in the previous commits. The bits that break compatibility are mainly the CodecID renaming (trivial, but would require nasty hacks everywhere), the avcodec_encode_video2() function (missing in older releases, mandatory in newer ones), and the resampler changes (older releases miss lib{av,sw}resample, newer versions removed the libavcodec resampler). Remove some other compatibility bits that were needed to for releases for which we drop support. The comment about Libav 0.9 in compat/libav.h is incorrect and should have been 0.8 (the symbol is present in Libav 0.9).
* Prefix CODEC_ID_ with AV_wm42013-03-131-29/+29
| | | | | | | | | The old names have been deprecated a while ago, but were needed for supporting older ffmpeg/libav versions. The deprecated identifiers have been removed from recent Libav and FFmpeg git. This change breaks compatibility with Libav 0.8.x and equivalent FFmpeg releases.
* core: remove a number of global variableswm42013-03-089-112/+103
| | | | | | | | | | | Move them into per-instance structs. This should get rid of all global variables in mplayer.c (not counting those referenced by cfg-mplayer.h). In core/input/ar.c, just remove checking the slave_mode variable. I'm not sure what this code was supposed to achieve, but slave mode is broken, slave mode is actually infeasible on OSX (ar.c is completely OSX specific), and the correct way of doing this would be to disable this input device per command line switch.
* core: make more robust against missing libavcodec AVCodecDescriptor entrieswm42013-03-071-3/+18
| | | | | | | | | | | Missing entries cause avcodec_descriptor_get() to return NULL, and in turn mp_codec_from_av_codec_id() will return NULL. This shouldn't happen, and avcodec_descriptor_get() returning NULL for a valid codec is clearly a bug. But make it more robust anyway, and use the decoder's name if this happens, because I doubt maintainance of the AVCodecDescriptor table in ffmpeg/Libav will always be perfect and reliable.
* options: fix panscan controlswm42013-03-061-1/+1
| | | | | | | The value range was set to 1-99 instead of 0-1. This broke panscan control with the 'w' and 'e' keybindings. Broken by commit 1198c03.
* options: remove --no-vsyncwm42013-03-063-4/+0
| | | | | | Latest nvidia drivers ignore the application setting, so this switch makes even less sense than before. It's still possible to control this with VO specific suboptions.
* vo: Separate vo options from MPOptsAlexander Preisinger2013-03-045-46/+49
| | | | | | | Separate the video output options from the big MPOpts structure and also only pass the new mp_vo_opts structure to the vo backend. Move video_driver_list into mp_vo_opts
* Remove vo_fps global variablewm42013-03-044-5/+22
| | | | | This is needed by the encode stuff for some reason, so we have to explicitly pass it. Functionality shouldn't change.
* Add a --dtshd optionWessel Dankers2013-03-042-0/+2
| | | | | | | | | | The spdif decoder was hardcoded to assume that the spdif output is capable of accepting high (>1.5Mbps) bitrates. While this is true for modern HDMI spdif interfaces, the original coax/toslink system cannot deal with this and will fail to work. This patch adds an option --dtshd which can be enabled if you use a DTS-capable receiver behind a HDMI link.
* vo: remove and cleanup globalsAlexander Preisinger2013-03-046-93/+131
| | | | | | | | Removes almost every global variabel in vo.h and puts them in a special struct in MPOpts for video output related options. Also we completly remove the options/globals pts and refresh rate because they were unused.
* x11_common: fix --cursor-autohide when pausedwm42013-03-031-2/+8
| | | | | | | | When paused, --cursor-autohide worked with a precision of 500ms, which is the main loop's default sleep time when paused. Cursor hiding is polled in x11_common, and the main loop never called the X11 code at the right time. Fix this by allowing the VO to set a time when it should be called next.
* core: fix SEEK_FACTORwm42013-03-012-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Emulate percentage-seeks (SEEK_FACTOR) as normal time-seeks if possible. This fixes some issues with (let's call it) low quality implementations of SEEK_FACTOR (e.g. demux_mkv basically interprets this as byte-seek, and also seeking to 99.9% makes it seek back to the start). For weird MPEG formats the demuxer level SEEK_FACTOR is still used. These formats, which can have timestamp resets, are identified by setting demuxer->ts_resets_possible to true. Also, have get_current_pos_ratio() follow the same rules, and calculate the percentage position with the file position if timestamp resets are possible. This actually fixes percentage-seeks in .ts files with demux_lavf.c. This kind of seek is not really used now, but it will be more important when we add a progress bar. Note: seeking in chained ogg files is still completely broken. The main issue is that ffmpeg doesn't provide a sane API for dealing with timestamp resets, and trying to do byte seeks with ogg confuses demuxer and decoder (or something like this) and just does random things. (Tested with two concatenated flac-in-ogg files).
* m_option: don't define OPT_BASE_STRUCT by defaultwm42013-03-013-2/+4
| | | | | | | | | | | OPT_BASE_STRUCT defines which struct the OPT_ macros (like OPT_INT etc.) reference implicitly, since these macros take struct member names but no struct type. Normally, only cfg-mplayer.h should need this, and other places shouldn't be bothered with having to #undef it. (Some files, like demux_lavf.c, still store their options in MPOpts. In the long term, this should be removed, and handled like e.g. with VO suboptions instead.)
* m_option: reformat option macro definitionswm42013-03-011-31/+102
| | | | Slightly more bearable, but it's still incredibly ugly.
* m_options: more typesafetywm42013-03-014-30/+73
| | | | | | | | | | | | | Change the option definition macros so that they cause compiler warnings if the type of the referenced option struct member doesn't match the type implied by the macro. The compiler warning printed isn't very telling, but it's better than silently invoking undefined behavior by violating the C strict aliasing rules. Also fix some minor cases that violate the type rules. For the option "no-aspect" we have to add a new option type to handle it properly. Some option types are hard to check, so we don't in these cases.
* core: move X11 specific code to x11_common.cwm42013-03-011-5/+0
| | | | | Nothing changes, because vo_check_events() is called at the same place anyway.
* core: simplify OSD capability handling, remove VFCAP_OSDwm42013-03-011-3/+2
| | | | | | | | | | | | | | | | | | | VFCAP_OSD was used to determine at runtime whether the VO supports OSD rendering. This was mostly unused. vo_direct3d had an option to disable OSD (was supposed to allow to force auto-insertion of vf_ass, but we removed that anyway). vo_opengl_old could disable OSD rendering when a very old OpenGL version was detected, and had an option to explicitly disable it as well. Remove VFCAP_OSD from everything (and some associated logic). Now the vo_driver.draw_osd callback can be set to NULL to indicate missing OSD support (important so that vo_null etc. don't single-step on OSD redraw), and if OSD support depends on runtime support, the VO's draw_osd should just do nothing if OSD is not available. Also, do not access vo->want_redraw directly. Change the want_redraw reset logic for this purpose, too. (Probably unneeded, vo_flip_page resets it already.)
* core: use floats for OSD bar percentage displaywm42013-02-262-15/+17
| | | | | | | Use floats instead of integers in the range 0-100. Currently, the OSD is currently made up of 46 elements so no change should be visible, but rendering of the bar will be changed later to use vector drawings (using pixel coordinates) instead of glyphs. This commit is for preparation.
* core: use playback time to determine playback percent positionwm42013-02-261-6/+16
| | | | | | | | | | | | | The percent position is used for the OSD, the status line, and for the OSD bar (shown on seeks). By default, the PTS of the last demuxed packet was used to calculate it. This led to a "jumpy" display when the percentage value (casted to int) was changing. The reasons for this were the presence of video frame reordering (packet PTS is not monotonic), or getting PTS values from different streams (like audio/subs). Since these rely on PTS values and correct file durations anyway, simplify it by calculating it with the current playback position in mplayer.c instead.
* video/out: remove video mode switching (--vm)wm42013-02-262-7/+0
| | | | | | | | | | | | | | | | | | | | This allowed making the player switch the monitor video mode when creating the video window. This was a questionable feature, and with today's LCD screens certainly not useful anymore. Switching to a random video mode (going by video width/height) doesn't sound too useful either. I'm not sure about the win32 implementation, but the X part had several bugs. Even in mplayer-svn (where x11_common.c hasn't been receiving any larger changes for a long time), this code is buggy and doesn't do the right thing anyway. (And what the hell _did_ it do when using multiple physical monitors?) If you really want this, write a shell script that calls xrandr before and after calling mpv. vo_sdl still can do mode switching, because SDL has native support for it, and using it is trivial. Add a new sub-option for this.
* screenshot: make showing OSD message when taking a screenshot defaultwm42013-02-261-2/+1
| | | | | | | This can be disabled by prefixing the "screenshot" command with "no-osd" in input.conf: s no-osd screenshot
* screenshot: show a message on each screenshot takenwm42013-02-263-15/+45
| | | | | | The message reads: "Screenshot: filename", where the filename is what mpv passes to fopen(). It will also show error messages when saving the screenshot fails.
* commands: parse seek time arguments like time optionswm42013-02-263-2/+4
| | | | | | | | | | This means a commands like "seek 13:00 absolute" actually behaves like "--start=13:00", instead of interpreting the argument as fraction as with normal float options. This is probably slightly closer to what you'd expect. As a consequence, the seek argument's type changes from float to double internally.
* options: reject nan, inf, 0:0, etc. for float optionswm42013-02-261-0/+13
| | | | Same for time values.
* options: remove parsing of "," as decimal pointwm42013-02-261-17/+2
| | | | | | Apparently the intention was parsing numbers reliably in presence of non-C locales. mpv is always in C locale, and not being in C locale would probably break even more things, so remove this code.
* Remove --rootwin option and rootwin propertywm42013-02-243-12/+0
| | | | | | | | You can just use --wid=0 if you really want this. This only worked/works for X11, and even then it might interact badly with most desktop environments. All the option did was setting --wid to 0, and the property did nothing.
* core: print correct quit message when quitting, simplify codewm42013-02-242-27/+14
| | | | | | | | | "End of file" was printed to the terminal instead of "Quit" when exiting with the "quit" slave command (closing the window and such). Note that it will still print EOF when it exists because the end of the playlist is reached. Do some other (not strictly related) simplifications.
* m_option: remove preset mechanismwm42013-02-232-98/+0
| | | | | | | | | | Was very complicated to use, and its uses have been removed in the previous commits. (While this feature sounded kind of useful, it could be rewritten in a much simpler way, like storing presets as strings, and then using the option parser to apply a preset. The removed code did some major pointer juggling to handle raw values, which made it hard to use.)
* options: fix --no-shuffle and --no-{wm42013-02-232-2/+6
| | | | | --no-shuffle accidentally did nothing after commit 57879a2. The options --no-{ and --no-} make no sense and shouldn't exist (wrong option type).
* options: drop --opt:subopt option nameswm42013-02-234-40/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For all suboptions, "flat" options were available by separating the parent option and the sub option with ":", e.g. "--rawvideo:w=123". Drop this syntax and use "-" as separator. This means even suboptions are available as normal options now, e.g. "--rawvideo-w=123". The old syntax doesn't work anymore. Note that this is completely separate from actual suboptions. For example, "-rawvideo w=123:h=123" still works. (Not that this syntax is worth supporting, but it's needed anyway, for for other things like vf and vo suboptions.) As a consequence of this change, we also have to add new "no-" prefixed options for flag suboptions, so that "--no-input-default-bindings" works. ("--input-no-default-bindings" also works as a consequence of allowing "-input no-default-bindings" - they are handled by the same underlying option.) For --input, always use the full syntax in the manpage. There exist suboptions other than --input (like --tv, --rawvideo, etc.), but since they might be handled differently in the future, don't touch these yet. M_OPT_PREFIXED becomes the default, so remove it. As a minor unrelated cleanup, get rid of M_OPT_MERGE too and use the OPT_SUBSTRUCT() macro in some places. Unrelated: remove the duplicated --tv:buffersize option, fix a typo in changes.rst.
* core: add fs-screen option for fullscreen display selectionStefano Pigozzi2013-02-213-0<