summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vd_lavc: better warning message for software decoding fallbackwm42013-02-261-1/+2
| | | | At least I hope it's better.
* 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.
* network: set default user-agent to MPlayer'swm42013-02-261-1/+1
| | | | | | | SHOUTcast bans "Mozilla" in the user-agent, Vimeo bans "Lavf" (part of the libavformat normal user-agent). "MPlayer 1.1-..." seems to work everywhere, and is close to the intented use (mpv is based on MPlayer, after all).
* 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.
* gl_common: remove compatibility aliases for backend sub-optionwm42013-02-261-6/+0
| | | | | | The backend sub-option for vo_opengl and vo_opengl-old accepted numeric values (like -1, 0, ...) for compatibility with MPlayer. This was added in mplayer2 times, and is not important anymore.
* img_format: add pixel format name for IMGFMT_MONO_Wwm42013-02-261-0/+1
| | | | This should have been in commit 90efe7c.
* vf_yadif: remove dead codewm42013-02-261-2/+0
| | | | Commit 2e1063d changed the option parsing, and args is always NULL now.
* demux_mf: add some more image formatswm42013-02-241-1/+15
| | | | And fix the comment about fourccs.
* Remove --rootwin option and rootwin propertywm42013-02-248-24/+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.
* demux_mf: support .xbmwm42013-02-244-0/+4
| | | | | | | And support the PIX_FMT_MONOWHITE pixel format. (This is really weird: unlike PIX_FMT_MONOBLACK, it uses white pixels. I have no idea why libavcodec doesn't just convert the pixel format on the fly, instead of bothering everyone with really special pixel formats.)
* demux_rawvideo: allow setting video codecwm42013-02-242-0/+6
| | | | Can be used to decode some obscure image formats and similar stuff.
* demux_mf: map to codecs directlywm42013-02-242-39/+35
| | | | Instead of going through FourCCs and codec_tags.c.
* vo_caca: remove OSD supportwm42013-02-243-108/+1
| | | | | | Recent changes to the OSD code made vo_caca crash when showing OSD. Since this is a joke VO (== I'd rather not waste my time with it), remove the OSD support. It wasn't that great anyway.
* 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.
* vo_direct3d: always clear window before drawing videowm42013-02-241-15/+2
| | | | | | | | | | | | | This fixes the issue that black borders (e.g. on fullscreen) are not redrawn, even if OSD rendering changes these areas. In theory, the code could try some clever things to determine whether clearing the window is really necessary, but that's probably not worth the trouble and won't bring any significant performance gain, or might even make things slower (because the GPU can't discard the old contents). Also fix redrawing when changing panscan with OSD disabled.
* vf_yadif: switch to option parser, allow disabling by defaultwm42013-02-232-13/+26
| | | | | | | | | Use the option parser instead of sscanf. Remove the parameter changing the field dominance (it has been marked deprecated for ages). Add a new suboption "enabled", which can be used to disable the filter by default, until it's enabled at runtime: mpv -vf yadif=enabled=no
* 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.)
* vf_scale: remove video dimension presets ("presize" suboption)wm42013-02-232-52/+1
| | | | | This wasn't really useful, and the option preset mechanism is awfully complex.
* vf_stereo3d: get rid of m_obj_presets_t usagewm42013-02-231-49/+3
| | | | The code becomes amazingly simpler.
* demux_rawvideo: remove ancient video dimension presetswm42013-02-232-20/+0
| | | | I can't see much value in them. Just specify the size manually.
* 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-2310-89/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-219-59/+111
| | | | | | | | | | | | `--fs-screen` allows to decide what display to go fullscreen into. The semantics of `--screen` changed and now it is only used to select the windowed display when starting the application. This is useful for people using mpv with an external TV. They will start windowed on their laptop's screen and switch to fullscreen on the TV. @wm4 worked on the x11 and w32 parts of the code. All is squashed in one commit for history clarity.
* core: move `xineramascreen` to `MPOpts` as `vo_screen_id`Stefano Pigozzi2013-02-218-16/+20
| | | | This is a small cleanup in preparation for the next commit.
* x11_common: uncrustifywm42013-02-212-390/+328
| | | | | | | | Also some other cosmetic changes. And reformat the two remaining doxygen comments. Removing MSGLEN in x11_errorhandler() is technically not just a cosmetic change, but the result is the same anyway.
* vd_lavc: fix software decoding fallbackwm42013-02-211-1/+1
| | | | | | The string is deallocated by the callee after initialization, so fallback at runtime passes a deallocated string to libavcodec, which results in random crashes. Regression introduced by commit 4d016a9.
* options: parse C-style escapes for some optionswm42013-02-204-15/+79
| | | | | | | | | | Being able to insert newline characters ("\n") is useful for --osd-status-msg, and possibly also for anything that prints to the terminal. Espcially --term-osd-esc looks relatively useless without being able to specify escapes. Maybe parsing escapes should happen during command line / config parsing instead (for all options).
* osd: prevent osd bar from sticking around on seekswm42013-02-202-7/+14
| | | | | | | | | | | | | This was supposed to be fixed in f897138, but there's another corner case. Basically, set_osd_function() reset the OSD time, which is not nice at all and breaks the logic of letting OSD elements disappear when they're not wanted anymore. Fix this by adding a separate timer for this. Additionally, make sure the OSD bar is _really_ always updated when visible. Also, redraw the OSD only if the OSD bar actually changes to prevent redrawing too often (every vo_osd_changed() will flag that the OSD should be redrawn, even if nothing changes).
* mplayer: don't display "-1" as chapter when chapter seek failswm42013-02-201-1/+6
| | | | | | | | | Increase robustness against out of bound chapter numbers. Normally these functions expect that the callers sanitize the chapter number. This went wrong at least in add_seek_osd_messages() (which displayed a chapter "-1" when chapters were not available). Make these functions a bit friendler and add some reasonable checks and fallbacks, which fixes the mentioned chapter seeking case as well.
* cocoa_common: fix crash with dead key input and simplify related codeStefano Pigozzi2013-02-191-9/+20
| | | | | | | | | Fixes #29. When a user used dead input keys (like the accent key), `mpv` crashed because the code tried to access the 0 element of a characters array (which was empty). While I was closing this bug, I refactored some related conditionals to make the code more readable.
* demux_lavf: add workaround for broken libavformat seek behaviorwm42013-02-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seeking before the start of a .flac file (such as seeking backwards when the file just started) generates a bunch of decoding errors and audible artifacts. Also, the audio output doesn't match the reported playback position. The errors printed to the terminal are: [flac @ 0x8aca1c0]invalid sync code [flac @ 0x8aca1c0]invalid frame header [flac @ 0x8aca1c0]decode_frame() failed This is most likely a problem with the libavformat API. When seeking with av_seek_frame() fails, the demuxer can be left in an inconsistent state. ffplay has the same issue [1]. Older versions of mpv somehow handled this fine. Bisection shows that commit b3fb7c2 caused this regression by removing code that retried failed seeks with an inverted AVSEEK_FLAG_BACKWARD flag. This code was removed because it made it harder to stop playback of a file by seeking past the end of the file (expecting this is rather natural when skipping through multiple files by seeking, and the internal mplayer demuxers also did this). As a workaround, re-add the original code, but only for the backwards seeking case. Also note that the original intention of the code removed in b3fb7c2 was not dealing with this case, but something else. It also had to do with working around weird libavformat situations, though. It's not perfectly clear what exactly. See commit 1ad332f. [1] https://ffmpeg.org/trac/ffmpeg/ticket/2282
* parser-cfg: fix profile-descwm42013-02-181-5/+6
| | | | | | | Printed "error parsing option profile-desc=..." when using that inside of profile sections. This happened because we now check the presence of an option before setting it, and profile-desc is not an option, but special cased in the config parser.
* osd: use --osd-duration for OSD barwm42013-02-171-2/+4
| | | | | It was hardcoded to 1 second (which is also the default for --osd-duration, so this was probably never noticed).
* manpage: improve configuration file section a bitwm42013-02-171-14/+37
|
* mplayer: print "Cache:" instead of "C:" on the status linewm42013-02-171-1/+1
| | | | | Hasn't been done before because there wasn't enough space, but this changed recently.
* osd: show cache state on the playback progression display by defaultwm42013-02-171-0/+3
| | | | | | | This affects the "show_progress" command, by defualt on the 'P' key. If there are complaints, I'll probably remove it again. (It looks relatively annoying, but it also valueable information... sort of.)
* command: add "cache" read-only propertywm42013-02-174-6/+18
|
* demux_mf: fix breakage after commit 4d016a9wm42013-02-171-0/+1
|
* cleanup: remove duplicated function, move escape parsing functionwm42013-02-164-75/+82
|
* osd: add --osd-status-msg option for custom OSD statuswm42013-02-164-5/+20
|
* mplayer: use talloc instead of malloc for status linewm42013-02-161-59/+35
|
* command: give feedback on the OSD if a property is unavailablewm42013-02-162-26/+24
| | | | | | | Until now, setting a property that is not available (e.g. deinterlacing if not using vdpau and no deinterlacing filter is inserted) silently failed (except for a messager on the terminal). Instead show on the OSD that the property is unavailable.
* osd: add --no-osd-bar option to disable the OSD barwm42013-02-166-3/+14
| | | | | In addition to disabling the OSD bar physically, also add some fallbacks to OSD text in places the OSD bar would have been used.
* osd: always update already visible OSD bar on seekswm42013-02-163-11/+26
| | | | | | | | | Seeks can be performed with OSD bar invisible (e.g. "osd-msg seek ..." command), and then an already visible bar won't be updated. But the bar will stick around until the OSD text is hidden. This is confusing, so change it that the bar is updated. (Making the bar disappear on such seeks would require much more changes, so we're lazy and go with this commit.)
* options: change handling of "no-" options yet againwm42013-02-164-45/+55
| | | | | | | | | | | | | | | | | | Commit 4a40eed "options: change handling of "no-" options" generally improved the handling of automatically added negation options (recognizing "--no-opt", even though only "--opt" is declared in the option list). Unfortunately, one corner case was missed, which broke the option "--input=no-default-bindings" (other suboptions, e.g. VO suboptions, were not affected, and this is the only option where this mattered). Instead of increasing the complexity further, use a completely different approach: add the "--no-" options at runtime, and make them behave like real options. This approach could be considered slightly less elegant, because the code now has to worry about some option implementation details rather than leaving it to the parser, but all in all the new code is simpler and there are less weird corner cases to worry about.
* osd: add --osd-bar-align-x/y options to control OSD bar positionwm42013-02-144-2/+29
|
* vo_xv: fix green border on the rightwm42013-02-141-0/+1
|
* demux: apply sparse video hack only to demux_lavf and demux_mkvwm42013-02-142-11/+8
| | | | | | | | | | | | | | | | | Apparently this cuases trouble for legacy demuxers. demux_mpg stopped doing PCM audio. (The problem was probably that it read a bunch of video packets on detection, and then the sparse video hack prevented audio packets from being read, because it looked like there were no more audio packets. With sparse video, this normally helps not reading too many audio packets.) Since the legacy demuxers do not need this hack, enable it for demux_lavf and demux_mkv only. Some additional hacks that were needed to handle legacy demuxers can be removed, making the code simpler. Also see commit 4a40eed.
* demux: restructure code that warns about packet buffer overflowswm42013-02-142-34/+33
| | | | | | | | | There should be no functional changes, except that way how avoiding spamming the terminal with the overflow warning is handled changes a bit. The removed check for ds->eof looks suspicious, but it should be redundant now.
* demux_mpg: fix setting codecwm42013-02-141-0/+1
| | | | | This made one case of DVD PCM audio not work. It still doesn't work, but that will be fixed with the following two commits.
* Fix compilation with Libavwm42013-02-141-0/+2
|
* mplayer: fix seek display during seeking when playing ordered chapterswm42013-02-131-9/+15
| | | | | | | | | | | | | | | | | The seek bar appeared to be "stuck" to the start of the current chapter. This is a regression from 630a2b1. This commit assumed that hrseek_pts would always contain the hrseek target time (when hrseek_active==true). But this is not always the case: when playing timeline stuff (e.g. ordered chapters), hrseek framedropping is abused to handle an obscure corner case, and then hrseek_pts contains something completely unrelated to the current playback time. See the added comment in mplayer.c and commit c1232c9. Fix this by trying something else to get a correct time "during" hr-seeks. mpctx->restart_playback looks ideal, because it's set while audio is being synced / audio buffers being filled, so we know that the audio time is probably bogus while it is set. Let's hope this is correct.
* dec_video: fix bogus assertwm42013-02-131-1/+1
| | | | Basically a typo. Made playing ordered chapters crash.
* Prefix keycode defines with MP_wm42013-02-1214-612/+606
| | | | | | | | | | Do this to reduce conflicts with <linux/input.h>, which contains some conflicting defines. This changes the meaning of MP_KEY_DOWN: KEY_DOWN is renamed to MP_KEY_DOWN (cursor down key) MP_KEY_DOWN is renamed to MP_KEY_STATE_DOWN (modifier for key down state)
* mp_common: silence warningwm42013-02-121-1/+1
| | | | | | int64_t was accidentally used with "%lld" format specifiers, which is incorrect (even though long long int is always 64 bits, the type behind int64_t can be different, e.g. it can be long int on 64 bit platforms).
* demux: fix video with demux_mpg (DVD playback)wm42013-02-121-1/+4
| | | | | | | | | | Commit 4d016a9 changed how demuxers report the codec of each stream. Some of that was missed in video.c, which is important for legacy demuxers (demux_mpg was broken by this, which is needed for DVD playback). Not sure about the ASF/AVI related change, but this is also a legacy demuxers only codepath.
* Rename af_volnorm to af_drcMartin2013-02-124-23/+27
| | | | | | The previous name of this filter was misleading, because it doesn’t actually normalize volume levels. What it does is closer to performing low-quality dynamic range compression, hence it is now called af_drc.
* configure: fix recently added testswm42013-02-111-2/+2
| | | | | | | | Commit 4d016a9 added some configure tests using statement_check. They wrongly used $_ld_tmp, which causes random failure, depending on whether the previous test using $_ld_tmp was successful. This happened because I blindly copied the statement_checks from somewhere else. Fix them.
* demux_lavf, ad_lavc, vd_lavc: pass codec header data directlywm42013-02-1010-284/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of putting codec header data into WAVEFORMATEX and BITMAPINFOHEADER, pass it directly via AVCodecContext. To do this, we add mp_copy_lav_codec_headers(), which copies the codec header data from one AVCodecContext to another (originally, the plan was to use avcodec_copy_context() for this, but it looks like this would turn decoder initialization into an even worse mess). Get rid of the silly CodecID <-> codec_tag mapping. This was originally needed for codecs.conf: codec tags were used to identify codecs, but libavformat didn't always return useful codec tags (different file formats can have different, overlapping tag numbers). Since we don't go through WAVEFORMATEX etc. and pass all header data directly via AVCodecContext, we can be absolutely sure that the codec tag mapping is not needed anymore. Note that this also destroys the "standard" MPlayer method of exporting codec header data. WAVEFORMATEX and BITMAPINFOHEADER made sure that other non-libavcodec decoders could be initialized. However, all these decoders have been removed, so this is just cruft full of old hacks that are not needed anymore. There's still ad_spdif and ad_mpg123, bu neither of these need codec header data. Should we ever add non-libavcodec decoders, better data structures without the past hacks could be added to export the headers.
* demux_lavf, ad_lavc, vd_lavc: refactor, cleanupwm42013-02-104-104/+79
| |