summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* msg: remove the useless trailing comment from stats dumpingwm42015-10-141-4/+2
| | | | | The origin of the stats line was added as a comment (starting with '#'). It was useless and just blowing up file sizes.
* player: fix inverted conditionwm42015-10-131-1/+1
| | | | | | | Simple oversight which made it not work at all. How did this ever work, and if it was never tested, then why did it work when fixing this oversight?
* vo_opengl: x11egl: fix confused error status codeswm42015-10-121-2/+2
| | | | This is all kinds of wonderfully stupid.
* vo_opengl: x11egl: reject nvidia drivers when autoprobingwm42015-10-121-0/+6
| | | | | | | | | Newer nVidia drivers support EGL, but they seem to work badly, apparently don't support some needed features or not in a form we want (such as swap control), and vdpau interop is not available. Disable it by default, because I'm tired of explaining this issue. Can be reverted as soon as nVidia release working drivers.
* vd_lavc: work around libavcodec nonsense causing hwdec init failurewm42015-10-121-0/+3
| | | | | | | | | | | | | | | | The libavcodec h264 decoder contains some idiotic code with unknown purpose (no sample or explanation known that necessitates its existence), that causes the AVCodecContext.get_format callback to be invoked at a time when hwaccels can't be initialized. By definition, the get_format callback is supposed to initialize hwaccels (another idiotic thing now part of the API, but different story). This causes hwdec initialization sometimes to fail (WolfensteinTwitch.mp4): the first get_format callback will mark it as failed, so the second get_format (the "proper" normal one) will not bother restoring the state, and hwdec init fails. While this should be fixed in libavcodec (good luck with that), it's quite easy to workaround.
* demux_mkv: do not return subtitle packets that end before seek targetwm42015-10-121-2/+6
| | | | | | This affects the subtitle preroll mode during seeking. It could matter somewhat with insane files with ten-thousands of subtitle events, which now seem to pop up, and will avoid packet queue overflow.
* af_lavrresample: reinit resampler on large speed changeswm42015-10-121-15/+19
| | | | | | swr/avresample_set_compensation() was made for small speed adjustments. Non-documentation says it should be used for changes not larger than 1%, so reinitialize the sampler if the change is larger than that.
* ytdl: Set a proper label for external audio tracksChrisK22015-10-111-3/+3
|
* vd_lavc: refuse to initialize vaapi with unknown profileswm42015-10-111-3/+1
| | | | | | Bad idea, although I'm not sure how harmful it actually was. Although this is common code, only the vaapi hwaccel still uses it.
* cocoa: set application policy before creating windowwm42015-10-111-5/+4
| | | | | | | | | | | | This fixes a regression since commit f4d62da8. The original code run vo_cocoa_config_window() once without creating the window, which had the effect that the last part of the function was run at least once before the actual window was created. Fix the regression by moving it to before the window is created. The regression itself is hard to describe. One test case: start mpv from a fullscreened terminal window. It should switch to another desktop, with the mpv window visible. This didn't happen anymore.
* DOCS/client_api_examples/README: add qt_openglwm42015-10-111-10/+16
| | | | | | | And also adjust the documentation for the other Qt examples to avoid redundancy. While we're at it, move the simple example to the top.
* DOCS/client_api_examples/qt_opengl: fix uninitwm42015-10-111-0/+1
| | | | | | | | | | | | | | | | | mpv_opengl_cb_uninit_gl() still needs the OpenGL context. It makes calls to free OpenGL objects. Strictly speaking, this is probably unnecessary, because the OpenGL context is destroyed afterwards (implicitly freeing all related objects). But mpv_opengl_cb_uninit_gl() does not require the destruction of the OpenGL context, and thus has to free resources manually. It's also true that OpenGL normally simply ignores API calls (or returns errors) if no context is set, but doing it properly is cleaner. That makeCurrent() can be called in the destructor is explicitly allowed and recommended for freeing GL resources in the Qt docs. This fixes a mpv error message on exit.
* DOCS/client_api_examples: add qt widget + opengl-cb examplewang-bin2015-10-116-0/+272
|
* ytdl: Remove DASH hacks, use DASH by defaultChrisK22015-10-113-16/+15
| | | | | | | | | | | Thanks to rcombs, ffmpeg now properly supports DASH and we can remove our hacks for it and use it by default whenever available. If you don't like this for whatever reason, you can get the "normal" streams back with --ytdl-format=best . Closes #579 Closes #1321 Closes #2359
* DOCS/client_api_examples/README: rewritewm42015-10-102-17/+106
| | | | | | The new one is much more detailed. Also add part of it to the libmpv doxygen.
* player: fix missed wakeup on video EOFwm42015-10-091-0/+3
| | | | | | | If video EOF happens during playback restart, and audio is syncing, and the demuxer packet queue overflows (i.e. no new packets will be read), then it could happen that the player accidentally enters sleeping, and continues playing anything only after e.g. user input wakes it up.
* manpage: font options do not support fontconfig patterns anymorewm42015-10-091-2/+5
| | | | | | libass 0.13.0 breaks this due to removal of fontconfig from its core (instead, fontconfig is one possible backend, and pattern lookup is apparently not possible anymore).
* audio: add AO deviation loggingwm42015-10-082-0/+27
| | | | | Pretty dumb (and doesn't handle pausing or other discontinuities), but at least somewhat idiot-proof.
* vo: log deviation from ideal vsync intervalwm42015-10-081-0/+5
|
* demux_subreader: participate in probing only on Libavwm42015-10-081-0/+4
| | | | | | FFmpeg supports all formats the old subreader code does, and is better at it. On the other hand, subreader.c's probing is bad and can lead to false positives easily.
* af_lavrresample: use libswsresample dynamic rate adjustment featurewm42015-10-071-9/+26
| | | | | | | | | | swr_set_compensation() changes the apparent sample rate on the fly (who would have guessed). It is thus very well-suited for adjusting audio speed on the fly during playback (like needed by the display-sync mode). It skips the relatively slow resampler reinitialization. If this doesn't work (libswresample soxr backend), then fall back to the old method.
* vo_xv: fix crash with --widwm42015-10-071-1/+1
| | | | | | Fixes #2386. Reminder that you should not use this crap-VO.
* audio: make spdif re-probe from normal decoding workwm42015-10-062-2/+11
| | | | | | | | The previous commit handled not falling back to normal decoding if the AO was reloaded (I think...), and this tries to re-engage spdif pass- through if it was previously falling back to normal decoding (e.g. because it temporarily switched to an audio device incapable of passthrough).
* audio: re-probe spdif if AO is reloadedwm42015-10-061-1/+3
| | | | Makes the spdif automagic work better on audio hotplugging.
* demux: don't attempt to open a demuxer after abort signal was givenwm42015-10-061-0/+3
| | | | | demux_open() kept trying to fallback to other demuxers when opening was cancelled. This was not really a problem, but it was stupid.
* player: make stop command actually stopwm42015-10-062-2/+2
| | | | | | | | | | | | | The stop command didn't always stop. In this case, opening a HLS URL and then sending "stop" during loading would actually make it fallback to parsing it as a playlist, and then continued to play the playlist items. (This corner case makes several unfortunate factors come together to produce this really odd behavior.) Another issue is that the "stop" was not always explicitly set. This could be a problem when sending several commands at once. Only the "quit" command should have priority over the "stop" command, so this is still checked.
* README: link to Copyright instead of LICENSE filewm42015-10-061-1/+1
| | | | | | | The Copyright file explains the whole license mess. The earlier change was apparently confusing, because the link reading "details" merely linked to the GPLv2 license instead of explaining anything. In fact, I meant to link to the Copyright file in the first place.
* video: fix base for --no-correct-ptswm42015-10-062-9/+10
| | | | | | | | | | Use the first encountered packet PTS/DTS as base, instead of the last one. This does not add the amount of frames buffered in the codec to the PTS offset, and thus is better. Also, don't add the frame time if there was no decoded frame yet. The first frame should obviously have the timestamp of the first packet (going by this heuristic).
* video: increase maximum number of buffered AVI pts sampleswm42015-10-061-1/+1
| | | | | | | While b-frame reordering limits the maximum required number to around 16, the number of additionally buffered frames can be much higher. Guess when this actually matters? (For the libavcodec MMAL wrapper.)
* video: don't sort AVI pts sampleswm42015-10-061-14/+10
| | | | | It's obviously not needed, and only an artifact of the old PTS determination code.
* video: remove user-controllable PTS sorting (--pts-association-mode)wm42015-10-067-80/+5
| | | | | | | | | Useless. Sometimes it might be useful to make some extremely broken files work, but on the other hand --no-correct-pts is sufficient for these cases. While we still need some of the code for AVI, the "auto" mode in particular inflated the size of the code.
* video: disable framedrop if avi-style timestamps are usedwm42015-10-061-0/+3
| | | | | | | | | | | | This can't be handled correctly at all. Other cases when the decoder might drop a frame (such as completely failing to decode a frame) will shift timestamps by a frame, and it can't be avoided. While we could maybe find a better way to handle this with libavcodec's main decoders, this seems to be much harder if it should work with certain HW decoders, which don't passthrough the DTS field (such as MMAL). Another problem are .avi files with b-frames. So just leave it as it is.
* ytdl: Remove version check and minor cleanupChrisK22015-10-061-55/+22
| | | | Closes #2370
* ao_alsa: add debug messages for format searchKevin Mitchell2015-10-061-0/+2
|
* ao_alsa: fix failure to find any sampleformatKevin Mitchell2015-10-061-4/+7
| | | | | Set format to invalid after each failed test. This way the final check for valid format will actually fail if no formats work.
* README: clarify license statementwm42015-10-061-2/+2
| | | | Fixes #2382.
* audio: add option for falling back to ao_nullwm42015-10-057-4/+24
| | | | | | | | | The manpage entry explains this. (Maybe this option could be always enabled and removed. I don't quite remember what valid use-cases there are for just disabling audio entirely, other than that this is also needed for audio decoder init failure.)
* ao: rework audio output driver probingwm42015-10-051-38/+42
| | | | | | | | | | | | | | | Make the code a bit more uniform. Always build a "dummy" audio output list before probing, which means that opening preferred devices and pure auto-probing is done with the same code. We can drop the second ao_init() call. This also makes the next commit easier, which wants to selectively fallback to ao_null. This could have been implemented by passing a different requested audio output list (instead of reading it from MPOptions), but I think it's better if this rather special feature is handled internally in the AO code. This also makes sure the AO code can handle its own options (such as the audio output list) in a self-contained way.
* manpage: edit recommended VO remarkswm42015-10-041-7/+4
|
* player: add wav to list of external audio file extensionswm42015-10-041-1/+2
| | | | Fixes #2378.
* video: remove codec delay estimationwm42015-10-033-15/+2
| | | | | | | | | | This was used only by the timestamp sorting code, which is a fallback for avi files (as well as avi-muxed mkv files). This was supposed to prevent accumulating timestamps in case the decoder consumes more packets than it outputs frames (i.e. frames are dropped). This didn't work very well (timestamps could be off by a large amount), the estimation of the delay was fragile, and the interdependencies with the decoder were annoying, so kill it.
* video: cosmetics: remove trailing whitespacewm42015-10-031-1/+1
|
* video/out: remove an unused parameterwm42015-10-0327-45/+42
| | | | | | | | | | | This parameter has been unused for years (the last flag was removed in commit d658b115). Get rid of it. This affects the general VO API, as well as the vo_opengl backend API, so it touches a lot of files. The VOFLAGs are still used to control OpenGL context creation, so move them to the OpenGL backend code.
* vo: change some defines to enumswm42015-10-021-9/+13
| | | | Why not.
* vo_opengl: drop old backend APIwm42015-10-023-87/+26
|
* vo_opengl: rpi: switch to new internal APIwm42015-10-023-39/+35
|
* win32: cleanup: remove some unneeded thingswm42015-10-024-17/+10
|
* vo_opengl: w32: switch to new internal APIwm42015-10-024-27/+36
|
* vo_opengl: refactor DwmFlush crapwm42015-10-023-42/+45
| | | | | Get it out of the way in the common code. MPGLContext.dwm_flush_opt can be removed as well as soon as the option system gets overhauled.
* vo_opengl: remove leftover variable from vaglx in vaeglEmmanuel Gil Peyrot2015-10-021-1/+0
| | | | This was preventing compilation on systems without X11 headers.
* vo: fix compilation failure when vaapi is enabled and x11 disabledEmmanuel Gil Peyrot2015-10-021-1/+1
| | | | | This was previously trying to use the video_output_vaapi symbol despite vo_vaapi.c being guarded by the vaapi-x11 option.
* vo_opengl: wayland: switch to new internal APIwm42015-10-016-54/+44
|
* vo_opengl: cocoa: switch to new internal APIwm42015-10-016-31/+37
|
* cue: read more metadatawm42015-10-014-26/+42
| | | | | | | | | | | Make handling of metadata slightly more generic, and add reading of the "PERFORMER" fields. There are some more fields, but for now let's leave it at this. TRACK-specific PERFORMER fields have to be read from the per-chapter metadata (somewhat obscure). Fixes #2328.
* player: print tags under different log prefixwm42015-10-011-2/+4
| | | | A minor, but apparently common feature request. Fixes #2360.
* vo_opengl: make sw suboption work without explicit backend selectionwm42015-10-013-2/+3
| | | | | | | You needed to select a GL backend with the backend suboption. This was confusing. Fixes #2361.
* vo_opengl: debanding requires GLSL 1.30wm42015-10-011-0/+4
| | | | | | We have to disable it, or shader compilation will fail. Fixes #2362.
* x11: separate window creation and configurationwm42015-09-308-36/+56
| | | | | | | | | | | | | | | | | | | This gets rid of an old hack, VOFLAG_HIDDEN. Although handling of it has been sane for a while, it used to cause much pain, and is still unintuitive and weird even today. The main reason for this hack is that OpenGL selects a X11 Visual for you, and you're supposed to use this Visual when creating the X window for the OpenGL context. Which means the X window can't be created early in the common X11 init code, but the OpenGL code needs to do something before that. API-wise you need separate functions for X11 init and X11 window creation. The VOFLAG_HIDDEN hack conflated window creation and the entrypoint for resizing on video resolution change into one function, vo_x11_config_vo_window(). This required all platform backends to handle this flag, even if they didn't need this mechanism. Wayland still uses this for minor reasons (alpha support?), so the wayland backend must be changed before the flag can be entirely removed.
* vo_opengl: cosmetics: coding stylewm42015-09-301-46/+45
|
* vo_opengl: do not reset video queue when changing video equalizerwm42015-09-301-1/+0
| | | | | | | If interpolation is enabled, then this causes heavy artifacts if done while unpaused. It's preferable to allow a latency of a few frames for the change to take full effect instead. If this is done paused, the frame is fully redrawn anyway.
* Revert "vo_x11: remove this video output"wm42015-09-305-1/+461
| | | | | | | | | | | | | | | This reverts commit d11184a256ed709a03fa94a4e3940eed1b76d76f. Unfortunately, there was a lot of unexpected resistance. Do note that this is still extremely slow, crappy, etc. Note that vo_x11.c was further edited. Compared to the removed vo_x11.c, an additional ~200 lines of code was removed in order to simplify it. I tried to strip it down as much as possible. In particular, support for odd non-32 bit formats (24, 16, 15, 8 bit) is dropped. Closes #2300.
* stream: minor cleanup to verbose loggingwm42015-09-302-3/+4
| | | | | | Don't print the URL that is opened twice. stream.c and stream_lavf.c each printed it once. Remove the logging from stream_lavf.c, and move the log call to a more interesting point.
* ytdl: Don't override user-set format in no-video modeChrisK22015-09-301-11/+23
|
* manpage: adjustments to hwdec remarkswm42015-09-291-3/+9
|
* video: replace vf_format outputlevels option with global optionwm42015-09-2915-48/+39
| | | | | | | | | | | The vf_format suboption is replaced with --video-output-levels (a global option and property). In particular, the parameter is removed from mp_image_params. The mechanism is moved to the "video equalizer", which also handles common video output customization like brightness and contrast controls. The new code is slightly cleaner, and the top-level option is slightly more user-friendly than as vf_format sub-option.
* Take care of libavcodec convergence_duration deprecationwm42015-09-294-1/+17
| | | | | | This AVPacket field was a hack against the fact that the duration field was merely an int (too small for things like subtitle durations). Newer libavcodec drops this field and makes duration 64 bit.
* Revert "vd_lavc: do not abort hardware decoding on errors"wm42015-09-281-0/+1
| | | | | | | | | | This essentially reverts commit 009dfbe3. FFmpeg VideoToolbox support is being wacky, and can cause major issues, such as not being able to decode a single frame. (E.g. by playing a .ts file. This should be fixed in FFmpeg eventually.) This is not a straight revert of the commit; just a functional one. We keep the slightly simpler code structure.
* vo_opengl: videotoolbox: cleanupswm42015-09-281-43/+26
| | | | Get rid of the VDA specifics like naming or ancient pixel formats.
* vo_opengl: rename hwdec_vda.c to hwdec_osx.cwm42015-09-282-1/+1
| | | | | | | It doesn't deal with VDA at all anymore. Rename it to hwdec_osx.c. Not using hwdec_videotoolbox.c, because that would give it the longest source path in this project yet. (Also, this code isn't even VideoToolox-specific, other than the name of the pixel format used.)
* video: remove VDA supportwm42015-09-2814-177/+4
| | | | | | | | | VideoToolbox is preferred. Now that