summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* video: display last frame, drain frames on video reconfigwm42013-12-105-10/+92
| | | | | | | | | | | | | | | | | | | | | | Until now, the player didn't care to drain frames on video reconfig. Instead, the VO was reconfigured (i.e. resized) before the queued frames finished displaying. This can for example be observed by passing multiple images with different size as mf:// filename. Then the window would resize one frame before image with the new size is displayed. With --vo=vdpau, the effect is worse, because this VO queues more than 1 frame internally. Fix this by explicitly draining buffered frames before video reconfig. Raise the display time of the last frame. Otherwise, the last frame would be shown for a very short time only. This usually doesn't matter, but helps when playing image files. This is a byproduct of frame draining, because normally, video timing is based on the frames queued to the VO, and we can't do that with frames of different size or format. So we pretend that the frame before the change is the last frame in order to time it. This code is incorrect though: it tries to use the framerate, which often doesn't make sense. But it's good enough to test this code with mf://.
* vo: reset some fields properlywm42013-12-101-0/+6
| | | | | | Otherwise, next_pts2 can be == next_pts (and not MP_NOPTS_VALUE), in which case the player thinks the first frame has duration 0. (Weird corner case.)
* video: move VO reinit from filter chain to playerwm42013-12-106-149/+90
| | | | | | | | | This gets rid of the vf_vo pseudo-filter. It ends the idea of MPlayer's architecture that the VO is just a (terminating) video filter. It didn't really work for us with respect to video timing (the "end" of the video chain isn't really made for video timing, and making it do so would be awkward), and now we're removing it entirely. We will be able to fix some things, such as properly draining video on reconfiguration.
* video: move handling of brightness and deinterlacing controlwm42013-12-105-36/+49
| | | | | Handling of brightness/gamma/saturation/etc. and deinterlacing is moved from vf_vo.c to dec_video.c.
* vf_vo: remove VO reset on filter uninitwm42013-12-101-5/+0
| | | | | | I don't think this has any reason to exist. It's likely that this used to be required by the old direct rendering infrastructure. (See git blame output.)
* video: move video filter chain initialization from decoder to playerwm42013-12-108-83/+78
| | | | | | | | | | | | | This should help fixing some issues (like not draining video frames correctly on reinit), as well as decoupling the decoder, filter chain, and VO code. I also wanted to make the hardware video decoding fallback work properly if software-only video filters are inserted. This currently has the issue that the fallback is too violent, and throws away a bunch of demuxer packets needed to restart software decoding properly. But keeping "backup" packets turned out as too hacky, so I'm not doing this, at least not yet.
* osxbundle: use mpv's version.sh instead of osxbundle'sChrisK22013-12-092-16/+1
|
* compat: add compatibility kludge for Libav 9wm42013-12-082-8/+26
| | | | | | | | Libav 9 still uses the unprefixed PIX_FMT_... symbols, but they will probably be removed some time in the future. There are some other deprecations we have yet to take care of, but there are no clear replacements yet.
* ao_wasapi: Fix mistaken behavior on uninitDiogo Franco (Kovensky)2013-12-081-2/+2
| | | | | The parameter, when true, tells whether uninit should block for flushing the buffers, not whether it should quit immediately without flushing.
* ao_wasapi: handle AOPLAY_FINAL_CHUNKDiogo Franco (Kovensky)2013-12-081-2/+6
| | | | | Used for writing down all samples to the audio driver, even if it's not a full chunk; needed at EOF on weird files.
* ao_wasapi: Reduce the buffer size to a sane valueDiogo Franco (Kovensky)2013-12-081-1/+1
| | | | | | | The previous RING_BUFFER_COUNT value, 64, would have ao_wasapi buffer 64 frames of audio in the ring buffer; a delay of 1280ms, which is clearly overkill for everything. A value of 8 buffers 8 frames for a total of 160ms.
* ao_wasapi: fix audio buffering delay calculationDiogo Franco (Kovensky)2013-12-081-1/+1