summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.6.0v0.6.0Alessandro Ghedini2014-09-303-0/+70
|
* man: fix to->too typoKevin Mitchell2014-09-301-1/+1
|
* audio: remove --audiodropwm42014-09-305-24/+0
| | | | | | | | | | | | | | | This would play some silence in case video was slower than audio. If framedropping is already enabled, there's no other way to keep A/V sync, short of changing audio playback speed (which would give worse results). The --audiodrop option inserted silence if there was more than 500ms desync. This worked somewhat, but I think it was a silly idea after all. Whether the playback experience is really bad or slightly worse doesn't really matter. There also was a subtle bug with PTS handling, that apparently caused A/V desync anyway at ridiculous playback speeds. Just remove this feature; nobody is going to use it anyway.
* w32_common: quit event loop on destroyJames Ross-Gowan2014-09-301-6/+11
| | | | | | | | | | | | When embedding, if the parent window is destroyed, it will cause mpv's window to be destroyed as well. Since WM_USER wakeups are sent to the window, destroying the window will prevent wakeups and cause uninit to hang. Fix this by quitting the event loop on WM_DESTROY. Events should only be processed for the lifetime of the window, from CreateWindowEx to WM_DESTROY. After the event loop is finished, mp_dispatch_queue_process can handle any remaining requests.
* vd_lavc: fix a small memory leak on init errorwm42014-09-292-8/+5
| | | | | The private context wasn't free'd when codec init failed. Restructure the code so that it can't happen.
* x11: always wait for mapped when using --widwm42014-09-291-2/+3
| | | | | | | Might help with embedding with mozplugger. I can't confirm whether it fixes the issue. See #1090.
* demux_disc: export BD/DVD audio languagewm42014-09-291-0/+1
| | | | This was "forgotten".
* stream: don't drop buffers on failed seekswm42014-09-291-6/+2
| | | | | | | | | | | Might matter when libavformat tries to do tiny seekbacks in an unseekable stream, and the seekback buffer isn't large enough. In this case, seeking would fail, and would drop the current buffer. The seekback would end up dropping future data. This change probably doesn't have any observable effects. libavformat normally has its own stream buffer, and demux_mkv.c tries carefully never to seek back.
* cache_file: refuse to cache unseekable streamswm42014-09-291-0/+5
| | | | | | | | | This makes no sense to use with DVD/BD/DVB and some others, and these streams happen to be unseekable. Also, other kinds of unseekable streams (like reading from pipe) should work, but will exhibit sketchy behavior if they need to seek. So just disable it, and leave these problems to the memory cache (cache.c).
* demux_lavf: bluray: don't skip stream data when flushingwm42014-09-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This code meant to flush demuxer internal buffers by doing a byte seek to the current position. In theory this shouldn't drop any stream data. However, if the stream positions mismatch, then avio_seek() (called by av_seek_frame()) stops being a no-op, and might for example read some data to skip to the seek target. (This can happen if the distance is less than SHORT_SEEK_THRESHOLD.) The positions get out of sync because we drop data at one point (which is what we _want_ to do). Strictly speaking, the AVIOContext flushing is done incorrectly, becuase pb->pos points to the start of the buffer, not the current position. So we have to increment pb->pos by the buffered amount. Since there are other weird reasons why the positions might go out of sync (such as stream_dvd.c dropping buffers itself), and they don't necessarily need to be in sync in the first place unless AVIOContext has nothing buffered internally, just use the sledgehammer approach and correct the position manually. Also run av_seek_frame() after this. Currently, it shouldn't read anything, but who knows how that might change with future libavformat development. This whole change didn't have any observable effect for me, but I'm hoping it fixes a reported problem.
* demux_disc: bluray: potentially fix some aspects of seekingwm42014-09-292-1/+7
| | | | | | | | | | | | | When flushing the AVIOContext, make sure it can't seek back to discarded data. buf_ptr is just the current read position, while buf_end - buffer is the actual buffer size. Since mpegts.c is littered with seek calls, it might be that the ability to seek could read Mark the stream (which the demuxer uses) as not seekable. The cache can enable seeking again (this behavior is sometimes useful for other things). I think this should have had no bad influence in theory, since seeking BD/DVD first does the "real" seek, then flushes libavformat and reads new packets.
* mpv.desktop: add more ogg-related mime typesAlessandro Ghedini2014-09-291-1/+1
| | | | Also adds audio/ogg and video/ogg.
* lua: add mpv/lua directories to the lua pathOtto Modinos2014-09-282-3/+33
| | | | Signed-off-by: wm4 <wm4@nowhere>
* DOCS/client_api_examples: qtexample: remove broken resizingwm42014-09-281-8/+6
| | | | | | | | | The intention was to adjust the window size to video size. It never worked well; it prevented the user to make the window smaller. For unknown reason it stopped resizing properly as well. This is just a cheap example, and I don't intend to fight with Qt, so replace the "demonstration" behavior by something slightly lamer.
* client API, X11: change default keyboard input handling againwm42014-09-289-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 64b7811c tried to do the "right thing" with respect to whether keyboard input should be enabled or not. It turns out that X11 does something stupid by design. All modern toolkits work around this native X11 behavior, but embedding breaks these workarounds. The only way to handle this correctly is the XEmbed protocol. It needs to be supported by the toolkit, and probably also some mpv support. But Qt has inconsistent support for it. In Qt 4, a X11 specific embedding widget was needed. Qt 5.0 doesn't support it at all. Qt 5.1 apparently supports it via QWindow, but if it really does, I couldn't get it to work. So add a hack instead. The new --input-x11-keyboard option controls whether mpv should enable keyboard input on the X11 window or not. In the command line player, it's enabled by default, but in libmpv it's disabled. This hack has the same problem as all previous embedding had: move the mouse outside of the window, and you don't get keyboard input anymore. Likewise, mpv will steal all keyboard input from the parent application as long as the mouse is inside of the mpv window. Also see issue #1090.
* Fix build with libavfilter disabledwm42014-09-281-1/+1
| | | | Although I'm not sure why we even support this.
* stream_bluray: autodetect AVCHD directorieswm42014-09-271-3/+4
| | | | Fixes #1127.
* video: change automatic rotation and 3D filter insertionwm42014-09-273-17/+114
| | | | | | | | | | | | | | | | | | | | | We inserted these filters with fixed parameters, which was ok. But this also didn't change image parameters for the filters down the filter chain and the VO. For example, if rotation by 90° was requested by the file, we would insert a filter and rotate the video, but the VO would still receive image parameters that direct rotation by 90°. This wasn't a problem, but it could become one. Fix this by letting the filters automatically pick up the image params. The image params are reset on application. (We could probably also always try to apply and reset image params in a filter, instead of having special "auto" parameters. This would probably work, and video.c would insert a "rotate=0" filter. But I'm afraid this would be confusing and the current solution is cosmetically slightly nicer.) Unfortunately, the vf_stereo3d.c change turned out a big mess, but once the "internal" filter is fully replaced with libavfilter, most of this can be radically simplified.
* vf_lavfi: make chaining from other filters more flexiblewm42014-09-273-26/+45
| | | | | | | | | Some filters exists only to create a specific lavfi graph. Allow these filters to reset the graph exactly on reconfig, and allow them to modify some image parameters too. Also make vf_lw_update_graph() behave like vf_lw_set_graph() - they had a subtitle difference with filter==NULL. Useful for the following commit.
* input: copy options automaticallywm42014-09-271-36/+29
| | | | | | Originally, all options were copied to ensure that input_ctx remins thread-safe, even if options are changed asynchronously. But this got a bit inconsistent. Copy them automatically and reduce some weirdness.
* input: separate creation and loading of configwm42014-09-273-15/+25
| | | | | | | | | | | Until now, creating the input_ctx was delayed until the command line and config files were parsed. Separate creation and loading so that input_ctx is available from start. This should make it possible to simplify some things. For example, some complications with Cocoa were apparently only because input_ctx was available only "later". (Although I'm not sure if this is still relevant, or if the Cocoa code should even be organized this way.)
* stream: change malloc+memset to callocBruno George Moraes2014-09-273-8/+2
| | | | | | | Also removed some memset that were left on some calloc that was already in the code. Signed-off-by: wm4 <wm4@nowhere>
* audio/out/push: clean up properly on init errorwm42014-09-271-9/+16
| | | | Close the wakeup pipes, free the mutex and condition var.
* audio/out: check device buffer size for push.c onlywm42014-09-272-7/+5
| | | | Should fix #1125.
* audio/out: disable ao_sndio by defaultwm42014-09-262-4/+5
| | | | | Don't build it, move it down the autoprobe list even if it's enabled. It doesn't work well enough.
* audio/out: fail init on unknown audio bufferwm42014-09-261-0/+7
| | | | A 0 audio buffer makes push.c go haywire. Shouldn't normally happen.
* ao_sndio: print a warning when draining audiowm42014-09-261-7/+14
| | | | | | | | | | | libsndio has absolutely no mechanism to discard already written audio (other than SIGKILLing the sound server). sio_stop() will always block until all audio is played. This is a legitimate design bug. In theory, we could just not stop it at all, so if the player is e.g. paused, the remaining audio would be played. When resuming, we would have to do something to ensure get_delay() returns the right value. But I couldn't get it to work in all cases.
* ao_sndio: update buffer status on get_delaywm42014-09-261-9/+15
| | | | | | get_delay needs to report the current audio buffer status. It's important for A/V sync that this information is current, but functions which update it were called on play() or get_space() calls only.
* ao_sndio: change p->delay to sampleswm42014-09-261-7/+5
| | | | | | | This was in bytes, but it's more convenient to use samples (or frames; in any case the smallest unit of audio that includes all channels). Remove the ao->bps line too; it will be set after init() returns.
* ao_sndio: set non-blocking flagwm42014-09-261-1/+1
| | | | | | Otherwise the feed thread and the playloop will get randomly blocked. This seems to fix most A/V sync issues.
* ao_sndio: fix some incorrect commentswm42014-09-261-2/+2
| | | | The AO API always uses sample counts.
* old-configure: minor improvementswm42014-09-261-5/+4
| | | | | Use a trap to remove the temp dir on exit. Write config.log to old_build instead of the top-level dir.
* build: add -Wno-format-zero-lengthwm42014-09-264-3/+6
| | | | | | This warning makes absolutely no sense. Passing an empty string to printf-like functions is perfectly fine. In the OSD case, it just sets an empty message, practically clearing the OSD.
* demux_mkv: don't use default_duration for parsed packetswm42014-09-261-4/+6
| | | | | | | | | Makes it behave slightly better for VP9. This is also the behavior libavformat has. Also while we're at it, don't set duration except for the first packet. Normally we don't use the duration except for subtitles (which are never parsed or "laced"), so this should make no observable difference.
* stream_bluray: allow opening BDMV directories directlywm42014-09-262-0/+88
| | | | | | | | Similar as the previous commits. Most of the code is actually copied from the stream_dvdnav.c code, but I'd rather prefer to duplicate it, than to entangle them. The latter would probably result in terrible things in a few years.
* stream_dvdnav: allow opening DVD directories directlywm42014-09-262-0/+54
| | | | | | | | Same hack as with stream_dvd.c. VIDEO_TS.IFO files are now opened via stream_dvdnav.c. Directories containing a VIDEO_TS.IFO or VIDEO_TS/VIDEO_TS.IFO file are also opened with it.
* stream_dvd: better .ifo probingwm42014-09-255-21/+66
| | | | | | | | | | | | | | | stream_dvd.c includes a pseudo-protocol that recognizes .IFO files, and plays them using libdvdread. This was relatively lazy, and could perhaps easily trigger with files that just had the .ifo extension. Make the checks stricter, and even probe the file header. Apparently the first bytes in an .ifo file are always "DVDVIDEO-VTS", so check for this. Refuse to load the main "video_ts.ifo". The plan is to use stream_dvdnav for it. This also removes at least 1 memory leak.
* player: do not wrongly clear OSD bar stops, reindentwm42014-09-251-30/+30
| | | | | | | | | | set_osd_bar_chapters() always cleared the OSD bar stops, even if the current bar was not the seek bar. Obviously it should leave the state of the bar alone in this case. Also change the function control flow so that we can drop one indentation level, and do the equivalent change for the other OSD bar functions.
* player: simplify OSD message handling codewm42014-09-252-103/+60
| | | | | | | | | | | Eliminate the remains of the OSD message stack. Another simplification comes from the fact that we do not need to care about time going backwards (we always use a monotonic time source, and wrapping time values are practically impossible). What this code was pretty trivial, and by now unnecessarily roundabout. Merge get_osd_msg() into update_osd_msg(), and add_osd_msg() into set_osd_msg_va().
* player: move code to make playloop smallerwm42014-09-252-9/+9
| | | | | This is basically a cosmetic change, although it weirdly also affects the percent position in encoding mode.
* player: rate-limit OSD text updatewm42014-09-254-10/+18
| | | | | | | | | | | | | | | There's no need to update OSD messages and the terminal status if nobody is going to see it. Since the player doesn't block on video display anymore, this update happens to often and probably burns slightly more CPU than necessary. (OSD redrawing is handled separately, so it's just mostly useless text processing and such.) Change it so that it's updated only on every video frame or all 50ms (whatever comes first). For VO OSD, we could in theory try to lock to the OSD redraw heuristic or the display refresh rate, but that's more complicated and doesn't work for the terminal status.
* player: fix OSD redraw heuristic with audio-only modewm42014-09-251-1/+1
| | | | | | When using --force-window (and no video or cover art), this heuristic prevents any redrawing during seeking. It should be applied only if there is any form of video.
* sub: approximate subtitle display in no-video modewm42014-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | This makes subtitle display somewhat work if no video is displayed, but a VO window exists (--force-window or cover art display). The main problem with normal subtitle display is that it's locked to video: it uses the video PTS as reference, and the subtitles advance only if a new video frame is displayed. In audio-only mode on the other hand, no video frame is ever displayed (or only 1 in the cover art case). You would need a workaround to adjust the subtitle PTS, and you would have to decide with what frequency to update the display. In general, there is no "right" display FPS for subtitles. Some formats (ASS) have animations parameterized by time, and any refresh rate could be used. Sidestep these problems by enabling the text OSD-based subtitle mechanism. This is similar to --no-sub-ass, and updates and renders subtitles with plain OSD. It has some caveats: no bitmap subs, somewhat incorrect timing, no formatting. Timing in particular is a bit strange and depends how often the audio output asks for new data, or other events that happen to wakeup the playloop.
* Remove mpbswap.hwm42014-09-255-39/+5
| | | | | | This was once central, but now it's almost unused. Only vf_divtc still uses it for extremely weird and incomprehensible reasons. The use in stream.c is trivial. Replace these, and remove mpbswap.h.
* stream_cdda, demux_raw: always use s16lewm42014-09-252-9/+1
| | | | | | | | | | | | | stream_cdda's output format is linked to demux_raw's default audio format, and at least we don't care enough to provide a separate mechanism to let stream_cdda explicitly set the format, so they must match. Judging from the existing code, it looks like CDDA always outputs little endian. stream_cdda.c changed this back to native endian (what demux_raw expects). Just make them both little endian. This requires less code, and also having a raw demuxer's behavior depend on the endianness of the machine isn't very sane anyway.
* osc: update cache displayChrisK22014-09-251-3/+14
| | | | now similar to what the status line displays
* demux_mkv: get rid of MS structswm42014-09-253-119/+39
| | | | | | | See previous commits. This finally replaces directly reading the file data into a struct with reading them manually. In theory this is more portable (no alignment issues and other things). For the most part, it's nice seeing this gone.
* audio: remove WAVEFORMATEX from internal demuxer APIwm42014-09-255-98/+88
| | | | | Same as with the previous commit. A bit more involved due to how the code is written.
* video: remove BITMAPINFOHEADER from internal demuxer APIwm42014-09-253-25/+18
| | | | | | | | | | MPlayer traditionally did this because it made sense: the most important formats (avi, asf/wmv) used Microsoft formats, and many important decoders (win32 binary codecs) also did. But the world has changed, and I've always wanted to get rid of this thing from the codebase. demux_mkv.c internally still uses it, because, guess what, Matroska has a VfW muxing mode, which uses these data structures natively.
* audio: confine demux_mkv audio PCM hackwm42014-09-242-56/+28
| | | | | | | | Let codec_tags.c do the messy mapping. In theory we could simplify further by makign demux_mkv.c directly use codec names instead of the MPlayer-inherited "internal FourCC" business, but I'd rather not touch this - it would just break things.
* audio: decouple demux and audio decoder/filter sample formatswm42014-09-247-85/+66
| | | | | | | | | | | | | | | | | | | | For a while, we used this to transfer PCM from demuxer to the filter chain. We had a special "codec" that mapped what MPlayer used to do (MPlayer passes the AF sample format over an extra field to ad_pcm, which specially interprets it). Do this by providing a mp_set_pcm_codec() function, which describes a sample format in a generic way, and sets the appropriate demuxer header fields so that libavcodec interprets it correctly. We use the fact that libavcodec has separate PCM decoders for each format. These are systematically named, so we can easily map them. This has the advantage that we can change the audio filter chain as we like, without losing features from the "rawaudio" demuxer. In fact, this commit also gets rid of the audio filter chain formats completely. Instead have an explicit list of PCM formats. (We could even just have the user pass libavcodec PCM decoder names directly, but that would be annoying in other ways.)
* ao_sndio: fix U24 bit widthwm42014-09-241-1/+1
| | | | This was wrong since the initial commit.
* TOOLS/umpv: drop unnecessary checkwm42014-09-241-2/+0
| | | | | This was supposed to make sure that argv[1:] does not fail, but Python actually allows mismatching bounds for slicing.
* TOOLS/umpv: use python octal notationshdown2014-09-241-1/+1
|
* TOOLS/mpv_identify.sh: remove pointless escapeshdown2014-09-241-1/+1
|
* TOOLS/idet.sh: add descriptionshdown2014-09-241-0/+3
| | | | | | Just a copy of c0cd58e3f5b1daff58ad5ca48b964a2b1fb86d6d commit message (with a small fix: ildetect.sh+ildetect.so, not ildetect.sh+ildetect.sh).
* TOOLS/idet.sh: remove unused and duplicated assignmentsshdown2014-09-241-2/+0
|
* player: change --keep-open semanticswm42014-09-242-2/+11
| | | | By popular request.
* player: show correct playback time with --keep-open --no-videowm42014-09-241-1/+2
| | | | Whatever.
* player: --loop-file takes precedence before --keep-openwm42014-09-241-2/+2
|
* ao_oss: improve format negotiation, and hopefully fix pass-throughwm42014-09-241-45/+45
| | | | | |</