summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* terminal: move SIGTTOU signal handler setup codewm42013-12-192-7/+2
| | | | | | This comes with a real change in behavior: now the signal handler is set only when the terminal input code is active (e.g. not with --no-consolecontrols), but this should be ok.
* Rename getch2....c/h to terminal....c/hwm42013-12-1911-19/+16
| | | | | "getch2" really tells nothing about what the heck this code does. It'd be even worse when moving the rest of terminal handling code there.
* crosscompile-mingw.txt: fix instructionswm42013-12-191-1/+1
| | | | | The instructions hardcode some paths, so it sure would be better if the listed commands actually use this path.
* player: replace some overlooked mp_msgswm42013-12-198-42/+31
| | | | | There are still some using IDENTIFY, and some without context in configfiles.c.
* options: use M_OPT_EXIT with -Vwm42013-12-191-1/+1
| | | | | Otherwise, output will actually be muted during pre-pase stage, and it will exit before running it again with output enabled.
* ta: fix compilation with NDEBUGwm42013-12-191-1/+2
|
* m_option.h: actually remove config.h includewm42013-12-191-1/+0
| | | | This was supposed to be done in commit 80b34ebe.
* stream: remove stale MAX_STREAM_PROTOCOLS definewm42013-12-191-2/+0
|
* command: remove radio commandswm42013-12-194-50/+1
| | | | | | | Remove these because I'm too lazy to convert them to proper STREAM_CTRLs. Considering that probably nobody uses radio://, caring about this is a complete waste of time. I will add these commands back if someone asks for them, but I don't expect this to happen.
* w32_common: fix mouse clicksMartin Herkt2013-12-191-12/+17
| | | | | | | | | | | | | | Apparently this has been broken for a year or so. The were three reasons for the breakage here: 1. The window dragging hack prevented any DOWN event from passing through since it always returned before we even got the button. 2. The window style had CS_DBLCLKS in its flags, so we did not get any DOWN events when the OS had detected a double click (instead expecting us to handle a DBL event). 3. We never sent any mouse buttons when mouse movement handling was disabled.
* ao_wasapi: fix includeswm42013-12-181-3/+2
| | | | Broken due to recent header renaming. Untested.
* vf_lavfi: don't access AVFilterPad directlywm42013-12-181-2/+3
| | | | Direct access is deprecated.
* ad_lavc: work around deprecation warningwm42013-12-181-1/+4
| | | | | | | | | | request_channels has been deprecated for years (request_channel_layout is the replacement), but it appears it's still needed despite the deprecation at least on older libavcodec versions. So still set request_channels, but to it with the avoption API, which hides the deprecation warning. This should also prevent mpv getting trashed when libavcodec happens to bump its major version.
* m_option: don't include config.h in headerwm42013-12-182-7/+11
| | | | Requires a small workaround.
* Reduce recursive config.h inclusions in headerswm42013-12-1816-17/+18
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* stream: move O_BINARY dummy definitionwm42013-12-182-4/+4
|
* Remove the _ macrowm42013-12-187-47/+48
| | | | | This was a gettext-style macro to mark strings that should be translated.
* ildetect: add ILDETECT_FORCE_RUN (if interlacing could not be decided, ↵Rudolf Polzer2013-12-181-1/+7
| | | | assume yadif).
* command: better check whether file duration is availablewm42013-12-171-1/+1
|
* old-makefile: fix mpvcore references and the DIRS variablewm42013-12-171-3/+8
|
* Fix OSX build; remove all remaining mpvcore references11rcombs2013-12-178-20/+20
|
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-17235-376/+380
|
* Merge mp_talloc.h into ta/ta_talloc.hwm42013-12-1710-70/+45
|
* Move options/config related files from mpvcore/ to options/wm42013-12-17144-210/+210
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Move libquvi stuff to stream/resolve/wm42013-12-179-8/+6
|
* Move mpvcore/input/ to input/wm42013-12-1727-42/+45
|
* Rename mp_lua.c/h to lua.c/hwm42013-12-176-8/+8
|
* Rename mp_core.h to core.hwm42013-12-1718-17/+17
| | | | Get rid of the mp_ prefix.
* Move mpvcore/player/ to player/wm42013-12-1725-54/+56
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-1649-325/+309
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* input: remove LIRCCD supportwm42013-12-164-36/+0
| | | | | | | This removes support for the "LIRC Client Daemon", which is separate from LIRC, and hasn't been maintained for 10 years. See github issue #413.
* command: mess with previous commitwm42013-12-161-11/+9
| | | | | | Nothing actually used the returned length. Since the remaining time can easily become 0 or negative (e.g. incorrectly estimated file duration), the time_remaining function still needs 2 return values, though.
* command: scale osd’s time remaining by the current speedVivek Jain2013-12-163-6/+29
| | | | Signed-off-by: wm4 <wm4@nowhere>
* manpage: fix --vf=expand aspect ratio exampleAlessandro Ghedini2013-12-161-1/+1
|
* input: move multi-command parsing somewhere elsewm42013-12-161-32/+38
| | | | | I'm planning to add a mode to pass commands as a pre-split list of strings, and this will probably be useful to reach this goal.
* input: adjust code to make quoted/not quoted cases more unifiedwm42013-12-161-8/+11
|
* input: better error reporting for missing commandswm42013-12-161-7/+12
| | | | Don't print an empty string if the command is missing.
* input: move some command flags into a bitfieldwm42013-12-163-49/+49
|
* input: remove weird syntax for skipping optional argumentswm42013-12-161-10/+4
|
* manpage: undocument syntax for skipping optional arguments in input commandswm42013-12-161-2/+0
| | | | | | | | "-" could skip optional arguments. I think this was a pretty bad idea, because it introduced a weird special case. I'll remove the special syntax, but keep compatibility for the "seek" and "screenshot" commands.
* input: avoid using wakeup pipe if it's not neededwm42013-12-161-1/+9
| | | | | | | | | | | | | | If input is not waiting for select(), writing to the wakeup pipe is wasteful, and, if there are many wakeups, might even block the wakeup threads if the pipe gets full. However, if it's waiting for select(), the wakup pipe must be used to unblock the waiting thread. Actually there's a small race condition: we might determine that the main thread is in select(), and write to the wakeup pipe (whether we do this while unlocked or locked doesn't really matter). Then, the main thread might leave select() before reading from the wakup pipe. This should be harmless, because at worst more wakeups than needed happen, but never fewer.
* mp_msg: define a bunch of convenience macroswm42013-12-161-0/+8
| | | | | | | | | In order to use bare mp_log contexts, I find myself creating dummy structs (with a single "log" field) to use the MP_ERR() etc. macros, which hardcode the idiom that a context struct has a log field. On the other hand, just using mp_msg_log() is too much typing (and I want to rename it to mp_msg() when the transition is done), so it seems nice to have message printing macros that use mp_log directly.
* input: don't quit with exit status 1 when receiving SIGTERMwm42013-12-151-1/+1
| | | | | Instead, do whatever the normal "quit" command does, which currently is returning a status of 0.
* player: don't temporarily disable terminal handling when reloading fileswm42013-12-153-20/+11
| | | | | | | | | | There's no reason why we should do this. For some reason, the existing code reset terminal handling to default after unloading a file, just to initialize it again when loading a new file. Might be related to github issue #412, although I don't think it helps, since the default SIGTERM handler _should_ kill the mpv process. (It's still a nice simplification, though.)
* osd_libass: update styles when OSD changes PlayReswm42013-12-152-8/+15
| | | | | | | The OSD style settings depend on the PlayRes, simply because all style values are implicitly scaled by the PlayResY in libass. Also, the OSC changes the PlayResY in certain situations, so something could go wrong. But not sure if this actually matters in practice.
* osd: use separate ASS_Renderer for each OSD objectwm42013-12-153-46/+53
| | | | | | | | This simplifies things, although it is slightly less efficient (probably uses a bit more memory). This also happens to fix that the OSC dropped the libass cache on every frame.
* player: don't store subtitle renderer in osd_statewm42013-12-156-17/+16
| | | | | | | | This doesn't have much value. It can't be accessed by anything else than the actual subtitle renderer (sd_ass.c). sd_ass.c could create the renderer itself, except that we apparently want to save memory (and some font loading time) when using ordered chapters or multiple subtitle tracks.
* dvdnav: fix incorrect clipping of highlightswm42013-12-151-6/+6
|
* demux_mkv: don't seek outside of the file when finding segmentswm42013-12-141-1/+4
| | | | | | | | The end of the current segment will be the end of the file if there is no next segment. Normally, this didn't matter much, since UNIX files allow seeking past the end of the file. But when opening files from HTTP, this would print confusing error messages. So explicitly check for EOF before trying to read a segment.
* matroska: add --ordered-chapters-files optionwm42013-12-144-2/+30
| | | | | This option takes a playlist. The playlist will then be used as list of potential segment files for use with ordered chapters.
* manpage: mention that the "run" does not wait for the commandwm42013-12-141-0/+3
|
* Allow some options taking filenames to refer to mpv config dirwm42013-12-146-10/+73
| | | | | | | | | | Add the mp_get_user_path() function, and make it expand special path prefixes. Use it for some things in mpv which take filenames (--input-config, --screenshot-template, opengl icc-profile suboption). This allows accessing files in the mpv config dir without hardcoding the config path by prefixing the path with ~~/. Details see manpage additions.
* dvdnav: select longest title by defaultwm42013-12-142-6/+27
| | | | This way we probably do the right thing, and avoid all the menu shit.
* vf_dsize: fix bug caused by typowm42013-12-141-1/+1
|
* dvdnav: crappy hack to respect timed still frameswm42013-12-143-22/+36
| | | | | | Before this, they were displayed forever. Since some dvd screens seem not to allow escaping from the still frame using the menu, this could get you stuck forever.
* dvdnav, tv: force-disable cachingwm42013-12-144-4/+5
| | | | | | | | | On dvdnav, caching kind of works but not really. (Not our fault, at least not fully. It's due to libdvdnav being slightly misdesigned; see previous commit for some explanations.) The TV code is implemented in the demuxer, and the stream implementation is just a wrapper, so caching makes no sense here.
* dvdnav: enable cachingwm42013-12-141-2/+1
| | | | | | No idea why this was disabled. It was in the original MPlayer code, which doesn't make much sense to me, because using the MPlayer stream cache seems 100% broken due to design issues.
* dvdnav: block when libdvdnav requests draining bufferswm42013-12-141-5/+13
| | | | | | | | | | | Not sure how this should work. Using libdvdnav with a large FIFO doesn't make sense either: data and control commands use the same stream, so if you want to send input to libdvdnav, you just have to read from libdvdnav all the time to get a reaction, which is not compatible with maintaining a buffer that could remain full for a long time. I have no idea either whether this improves or worsens anything, though it might be more correct.
* stream_dvdnav: drop stream buffers on seekwm42013-12-141-3/+5
|
* cache: add a way to explicitly resume cachewm42013-12-142-0/+5
|
* cache: try harder on EOFwm42013-12-141-5/+11
| | | | | | | | | | | | | EOF is a special case. Normally, the reader will block until the cache thread has new data. Obviously we don't want to do this on EOF, because we'd potentially block forever. On the other hand, EOF will put the cache thread into a waiting state, so if EOF recovers, this will happen at a "later" point. This is bad if there is some kind of external event that ends the EOF condition. In this case, a steram_read() call would still return EOF. Make it so that the reader waits at least for one iteration of the cache trying to rad a new block. Also adjust some debug messages to not print file positions in hex.
* stream: don't seek when seeking to the same positionwm42013-12-141-0/+3
| | | | | | There was already something similar in the code that did the actual seek, but I think seeking to the same position could still trigger an actual seek due to weid interaction with the buffer.
* stream: add function for dropping the bufferwm42013-12-143-2/+12
| | | | | And use it in demux_lavf.c. It looks like otherwise, some data might be left over, depending on how the hell av_seek_frame() behaves.
* dvdnav: improve a commentwm42013-12-131-1/+1
|
* dvdnav: remove highlights if no PCI availablewm42013-12-131-1/+3
| | | | | Not sure if this actually can happen. It doesn't remove the problem that mpv sometimes shows highlights on nav screens which have no highlight.
* video: change --video-zoom behaviorwm42013-12-132-6/+13
| | | | | | | | | | | Use the scaled video size (i.e. as shown on the window) as reference for zoom. This is the easiest way to fix different width/height scale factors as they happen when zooming video with a pixel aspect ratio other than 1:1. Also fix the unscaled mode, so that it 1. doesn't scale even with --video-zoom, and 2. doesn't scale by small amounts when the video is cropped by making the window smaller than the video.
* dvb: prevent seek when reopening the demuxerwm42013-12-131-1/+3
| | | | | | Since dvb input is not seekable anyway, this would probably just flush the stream buffer, but at least it'll avoid a bogus message about seeking errors.
* build: dvdnav needs dvdreadNikoli2013-12-131-0/+1
|
* dvdnav: support mouse interactionwm42013-12-134-4/+38
|
* dec_video: fix handling of timestamp resetswm42013-12-121-1/+0
| | | | | | This code tried to pass a still monotonic (even if not strictly monotonic) PTS to the player, but as a result it remained stuck on the PTS before a reset (since the PTS was lower).
* demux_lavf: fix timebase confusionwm42013-12-121-7/+7
| | | | | This set last_pts to bogus values, which is used for relative seeks. The player usually uses absolute seeks, so this didn't matter much.
* demux: revert accidentally included change from previous commitwm42013-12-121-1/+1
| | | | Oops.
* Add prelimimary (basic, possibly broken) dvdnav supportwm42013-12-1225-28/+1122
| | | | | | | | | | | | | | | | | | | | | | | | | This readds a more or less completely new dvdnav implementation, though it's based on the code from before commit 41fbcee. Note that this is rather basic, and might be broken or not quite usable in many cases. Most importantly, navigation highlights are not correctly implemented. This would require changes in the FFmpeg dvdsub decoder (to apply a different internal CLUT), so supporting it is not really possible right now. And in fact, I don't think I ever want to support it, because it's a very small gain for a lot of work. Instead, mpv will display fake highlights, which are an approximate bounding box around the real highlights. Some things like mouse input or switching audio/subtitles stream using the dvdnav VM are not supported. Might be quite fragile on transitions: if dvdnav initiates a transition, and doesn't give us enough mpeg data to initialize video playback, the player will just quit. This is added only because some users seem to want it. I don't intend to make mpv a good DVD player, so the very basic minimum will have to do. How about you just convert your DVD to proper video files?
* demux_lavf: remove unnecessary seek on initializationwm42013-12-121-2/+0
| | | | This is not needed, and actually completely incorrect.
* input: fix bogus section disabling, add debugging outputwm42013-12-121-3/+11
| | | | | | | | The code to remove a section from the active section array wasn't correct (it should have tried to copy the elements in reverse), so just replace it with a macro that does the intended thing. Add some debug output to print the section stack.
* sd_lavc: factor out bitmap positioning codewm42013-12-123-30/+48
|
* osd: add option for "unscaled" OSDwm42013-12-106-3/+17
|
* osd: typo in commentwm42013-12-101-1/+1
|
* demux: set fps for mf:// to 1wm42013-12-102-2/+2