aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* audio/filters: use refcounted frames for some simple filtersGravatar wm42015-01-13
| | | | These are read-only, and very trivial to convert.
* af_volume: use refcounted framesGravatar wm42015-01-13
|
* audio: use refcounted frames in the filter chainGravatar wm42015-01-13
| | | | | | | | | | | | | | | | | | | The goal is switching the whole audio chain to using refcounted frames. This brings the architecture closer to FFmpeg, enables better integration with libavfilter, will reduce useless copying somewhat, and will probably allow better timestamp tracking. For now, every filter goes through a semi-awful wrapper in af_do_filter(), though. This will be fixed step by step, and the wrapper should eventually be removed. Another thing that will have to be done is improving the timestamp handling and avoiding extra copies for the AO. Some of the new code is rather similar to the video filter code (the core filter code basically just has types replaced). Such code duplication is normally very unwanted, but in this case there's probably no other choice. On the other hand, this code is pretty simple (even if somewhat tricky). Maybe there will be unified filter code in the future, but this is still far away.
* audio: add some utility functions for refcounted framesGravatar wm42015-01-13
| | | | Used in the following commits.
* audio/filter: remove unused af_calc_filter_multiplier()Gravatar wm42015-01-13
| | | | | | | | | | | | The purpose of this function was to filter only as much audio input as needed to produce a certain amount of audio output. This could (in theory) avoid excessive buffering when e.g. changing playback speed with resampling. Use of this was already removed in commit 5fd8a1e0. No problems were experienced, so let's assume this feature is practically worthless. (Though it's possible that it was quite useful over a decade ago, or in some cornercases with evil files.)
* client API: fix log buffer overflow caseGravatar wm42015-01-13
| | | | | | | It just crashed. The prefix and text fields point to static strings in this case. Oops. Fixes the issue mentioned in #838.
* manpage: fix references to vf_ppGravatar wm42015-01-13
| | | | | | It was removed, but is still available through FFmpeg. Fixes #1468.
* vf: make message less confusingGravatar wm42015-01-13
| | | | | Well, probably still not very good, but now at least accounts for the case the decoder or a filter outputs nonsense values.
* mp_image: reject invalid display aspect ratioGravatar wm42015-01-13
| | | | | | | | | | Having any of these set to 0 makes no sense. I think some code might still be using 0/0 aspect ratio to signal unset aspect ratio, but I didn't find it. If there is still code like this, it should be fixed instead. Fixes #1467.
* player: fix crash wtih --secondary-sidGravatar wm42015-01-13
| | | | Fises #1463.
* cache: cache-position needs to be int64_tGravatar Oliver Freyermuth2015-01-13
| | | | | | Both max_filepos and offset are int64_t, so pos can overflow, e.g. causing endless loops in stream implementation.
* stream_dvb: Add MP_ERR if polling worked, but read fails.Gravatar Oliver Freyermuth2015-01-13
| | | | Read can still fail, e.g. if the buffer is invalid.
* wayland: implement key modifiersGravatar wm42015-01-12
| | | | Includes shift, ctrl, alt, meta.
* wayland: don't compute absurd window sizeGravatar wm42015-01-12
| | | | | | | | | For some reason, schedule_resize() can be called with everything set to 0. The code couldn't handle wl->window.aspect set to 0, converting NaNs to integers. Just work this around. (I have no idea what I'm doing. This is probably a corner case caused by my broken-ish wayland setup.)
* bstr: fix possible undefined behavior with length 0 stringsGravatar wm42015-01-12
| | | | | | | | | | BSTR_P() passes the string length and start pointer to printf-like functions. If the lenfth is 0, the pointer can be NULL, but we're actually still not allowed to pass a NULL pointer in any case. This is mostly a technically, because nobody in their right mind would attempt to specifically break such cases. But it's still undefined behavior, and some libcs might be strict about this.
* player: don't set tag strings to NULLGravatar wm42015-01-12
| | | | | | | | | | | | | bstr is a bounded string type, consisting of a pointer and a length value. If the length is 0, the pointer can be NULL. This is somewhat logical due to how this abstraction works, but it can leak when converting to C strings. talloc_strndup() returns NULL instead of "" in this case, which broke some other code. Use bstrto0() instead, which is the "proper" function to convert bstr to char*. Fixes #1462.
* demux_mkv: fix EBML parsing checksGravatar wm42015-01-12
| | | | | | | | Reading IDs must be checked too. This was basically forgotten in commit f3a978cd. Also set the *length parameter for ebml_parse_length() in some error cases, which _really_ should happen. Fixes #1461.
* manpage: improve --title descriptionGravatar wm42015-01-12
| | | | | It might be rather surprising that --title also sets the audio stream title (for PulseAudio and wasapi), so it certainly should be mentioned.
* tl_matroska: fix minor memory leak in error caseGravatar wm42015-01-12
| | | | Going the way of least resistance. Fixes #1460.
* player: check sufficient track selection before destroying VOGravatar wm42015-01-12
| | | | | | | | | | | | | | | | mpv needs at least an audio or video track to play something. If the track selection is basically insufficient, the player will immediately skip to the next file (or quit). One slightly annoying thing might be that trying to play a subtitle file will close the VO window, and then go to the next file immediately (so "mpv 1.mkv 2.srt 3.mkv" would flash the video window when 2.srt is skipped). Move the check to before the video window is possibly closed. This is a minor cosmetic issue; one can use --force-window to avoid closing the video window at all. Fixes #1459.
* client API: reasonable behavior if window is closedGravatar wm42015-01-12
| | | | | | | | | | | | | | | | Closing the video window sends CLOSE_WIN, which is normally mapped to the "quit" command. The client API normally disables all key bindings, and closing the window does nothing. It's simply left to the application to handle this. This is fine - an embedded window can not be destroyed by user interaction. But sometimes, the window might be destroyed anyway, for example because the containing window is destroyed. If this happens, CLOSE_WIN should better not be ignored. We can't expect client API users to handle this specially (by providing their own input.conf), so provide some fallback for this pseudo key binding. The "quit" command might be too intrusive (not every client necessarily handles "unexpected" MPV_EVENT_SHUTDOWN), but I think it's still reasonable.
* x11: explicitly query map status when waiting for map eventGravatar wm42015-01-12
| | | | | | | | For some reason, mpv sometimes does not get a MapNotify event with GtkSocket embedding. This happens maybe 1 out of 10 times. I'm not sure how this can happen - it certainly shouldn't. Since I was not able to find the cause, and causes an apparent "deadlock", here's a lazy hack to fix the misbehavior.
* x11: support XEmbedGravatar wm42015-01-12
| | | | | | | | | | | | Seems to work with GtkSocket and passing the gtk_socket_get_id() value via "wid" option to mpv. One caveat is that using <tab> to move input focus from mpv to GTK does not work. It seems we would have to interpret <tab> ourselves in this case. I'm not sure if we really should do this - it would probably require emulating some other typical conventions too. I'm not sure if an embedder could do something about this on the toolkit level, but in theory it would be possible, so leave it as is for now.
* vo: don't synchronize when seekingGravatar wm42015-01-12
| | | | | | | | | Don't use vo_control() for sending VOCTRL_RESET when starting a seek. This means vo_seek_reset() won't wait until the VO actually processed VOCTRL_RESET. It happens asynchronously instead. The impact of this change should be minimal, unless the VO is somehow too busy (like blocking on vsync).
* player: change --display-tags behaviorGravatar wm42015-01-12
| | | | | | | | | | | | | | | | | | Remove the "all" special-behavior, and instead interpret trailing "*" characters. --display-tags=all is replaced by --display-tags=* as a special-case of the new behavior. See #1404. Note that the most straight-forward value for matchlen in the normal case would be INT_MAX, because it should be using the entire string. I used keylen+1 instead, because glibc seems to handle this case incorrectly: snprintf(buf, sizeof(buf), "%.*s", INT_MAX, "hello"); The result is empty, instead of just containing the string argument. This might be a glibc bug; it works with other libcs (even MinGW-w64).
* demux_mkv: better check for some EBML parsingGravatar wm42015-01-12
| | | | | | | | | | Apparently, originally this code was meant to be able to read past the buffer somewhat, which is why the buffer allocation was padded by 8 byte. This is unclean and confuses valgrind. This probably could have crashed with certain invalid files too. Also revert the change added with 10a2f69; it should be not needed anymore.
* demux_mkv: avoid endless loop with broken filesGravatar wm42015-01-12
| | | | Fixes #1457.
* ao_pulse: exit AO if stream failsGravatar wm42015-01-11
| | | | | | This can for example reproduced by killing the pulseaudio server. If this happens, just try to reload the AO, instead of breaking everything forever.
* win32: drop hacks for possibly broken static pthreads-win32 linkingGravatar wm42015-01-11
| | | | | | | | | | | | We now use threads and other pthread API a lot, and not always we use it from threads created with pthread_create() (or the main thread). As I understand, with static linking we would have to use pthread_win32_thread_attach/detach_np() every time we enter or leave a foreign thread. We don't do this, and it's not feasible either, so it's just broken. This still should work with dynamic pthreads-win32. The MinGW pthread implementation should be unaffected from all of this.
* command: fix property naming conventionGravatar wm42015-01-10
| | | | Use "-" instead of "_" as separator.
* command: change properties added in previous commitGravatar wm42015-01-10
| | | | | | | | | | | | | Make their meaning more exact, and don't pretend that there's a reasonable definition for "bits-per-pixel". Also make unset fields unavailable. average_depth still might be inconsistent: for example, 10 bit 4:2:0 is identified as 24 bits, but RGB 4:4:4 as 12 bits. So YUV formats seemingly drop the per-component padding, while RGB formats do not. Internally it's consistent though: 10 bit YUV components are read as 16 bit, and the padding must be 0 (it's basically like an odd fixed- point representation, rather than a bitfield).
* command.c: new subproperties for video-params: bpp and depthGravatar xylosper2015-01-10
| | | | | | | | bpp(bits-per-pixel) and depth(bit-depth for color component) can be calculated from pixelformat technically but it requires massive informations to be implemented in client side. These subproperties are provided for convenience.
* player: enable demuxer thread for external audio filesGravatar wm42015-01-10
| | | | | | | | | | | | | | Enable asynchronous reading for external files. This excludes subtitle files (so it's effectively enabled for audio files only), because most subtitle files are fully read on loading, and running a thread for them would just cause slowdowns and increase resource usage, without having any advantages. In theory, an external file could provide multiple tracks from the same demuxer, but demux_start_thread() is idempotent, so the code can be kept simple. Should help with playing DASH with ytdl_hook.
* player: change stream list terminal outputGravatar wm42015-01-09
| | | | | Move the stream selection marker "(+)" to the beginning, and drop the "[stream]" prefix. Make the edition output line up with it too.
* DOCS/client_api_examples: qml_direct: QWindow::size() is not thread-safeGravatar wm42015-01-09
| | | | | | We still keep the window pointer, because we want to call QQuickWindow::resetOpenGLState() (which runs on the rendering thread only). Interesting mess...
* DOCS/client_api_examples: qml: reduce number of filesGravatar wm42015-01-09
| | | | This is annoying.
* ao_alsa: fix dtshd passthroughGravatar wm42015-01-09
| | | | | | | We must not try to remap channels with this. Whethever ALSA gives us, and whatever we do with it, the result will probably be nonsense. Untested, as I don't have the required hardware.
* DOCS/compile-windows.md: fix pkg-config directoryGravatar James Ross-Gowan2015-01-09
|
* video: Add sigmoidal upscaling to avoid ringing artifactsGravatar Niklas Haas2015-01-09
| | | | | | | | | This avoids issues when upscaling directly in linear light, and is the recommended way to upscale images according to imagemagick. The default slope of 6.5 offers a reasonable compromise between ringing artifacts eliminated and ringing artifacts introduced by sigmoid-upscaling. Same goes for the default center of 0.75.
* demux_mkv: improve robustness against broken libavcodec parsersGravatar wm42015-01-09
| | | | | | | | | The VP9 codec parser has a bug: it doesn't set the data/size pointers passed to it. As I understand, it must always do this, and in fact, if it doesn't some libavcodec generic code would be in trouble too. This helps with #1448, but is not the full fix for it. The codec parser must be fixed in libavcodec itself.
* tl_matroska: check chapter boundsGravatar wm42015-01-09
| | | | | | | I have no idea what this does, but it's without doubt a sufficient fix for the issue at hand. Fixes #1445.
* vo_opengl_cb: make mpv_opengl_cb_render() return left framesGravatar xylosper2015-01-08
| | | | | | Instead of error code which was not helpful because it's always 0, mpv_opengl_cb_render() returns the number of left frames in the frame queue now.
* vo_opengl_cb: use vo's drop_count instead of internal counterGravatar xylosper2015-01-08
| | | | | This commit makes it possible to query dropped frames by opengl-cb through vo-drop-frame-count property.
* vo: add functions to increment drop_countGravatar xylosper2015-01-08
| | | | | Add two functions which increment drop_count thread-safely. This is for the commit followed.
* vo_opengl_cb: introduce frame queueGravatar xylosper2015-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of opengl-cb kept only latest flipped frame. This can cause massive frame drops because rendering is done asynchronously and only the latest frame can be rendered. This commit introduces frame queue and releated options to opengl-cb. frame-queue-size: the maximum size of frame queue (1-100, default: 1) frame-drop-mode: behavior when frame queue is full (pop, clear, default: pop) The frame queue holds delayed frames and drops frames if the frame queue is overflowed with next method: 'pop' mode: drops all the oldest frames overflown. 'clear' mode: drops all frames in queue and clear it. With default options(frame-queue-size=1:frame-drop-mode=pop), opengl-cb behaves in the same way as previous implementation effectively. For frame-queue-size > 1, opengl-cb tries to calls update() without waiting next flip_page() in order to consume queued frames. Signed-off-by: wm4 <wm4@nowhere>
* win32: minor simplificationGravatar wm42015-01-08
| | | | The events parameter is not needed here and won't ever be.
* vo_opengl: don't crash win32 backend with NULL eventsGravatar wm42015-01-08
| | | | | | | | | vo_opengl was crashing since f811348d because it passed NULL for the events parameter to vo_control. Normally the parameter should not be NULL, so add a hack to account for this. In particular, we should handle the events that are returned. For the call in preinit() we skip this, but it most likely has no meaning anyway, because in this stage no window is visible yet.
* vo_opengl_cb: fix a typoGravatar wm42015-01-08
|
* vo_opengl_cb: allow changing debug option at runtimeGravatar wm42015-01-08
| | | | | | | This was always supposed to work. Just add the option declaration. Normally I'm not a fan of duplicating such things, but in this case it's (still) harmless.
* DOCS: add instructions for building with MSYS2Gravatar James Ross-Gowan2015-01-08
| | | | | | mpv can be built natively on a Windows machine using MSYS2. Add detailed instructions on how to build and merge them with the existing instructions for cross-compilation.