aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* TOOLS: add lua/drc-controlGravatar Kevin Mitchell2014-04-27
| | | | allows live insertion/deletion/adjustment of drc audio filter
* TOOLS: move autocrop.lua to TOOLS/luaGravatar Kevin Mitchell2014-04-27
| | | | in anticipation of more lua scripts
* build: use -pthread when availableGravatar Stefano Pigozzi2014-04-27
| | | | | | | | | | | | Our code currently tries to link -lpthread and adds stuff like -D_REENTRANT based on the target platform. GCC actually supports to just pass a -pthread compiler and linker flag that will automatically enable threading and define the correct symbols for the platform, so let's try to just use that as our first choice. clang also supports -pthread but it must be used only as a compiler flag, so we also take care of that scenario with this commit.
* build: conditionally use -Wempty-bodyGravatar Stefano Pigozzi2014-04-26
| | | | | | | | | -Wempty-body is not available on all gcc versions but we were using it unconditionally. Also remove the usage from the clang case. clang still defines `__GNUC__` so it still gets all the gcc specific flags. This should fix the build on systems with older gcc versions like OpenBSD which still comes bundled with gcc 4.2 for license issues.
* terminal: always use SA_RESTART with sigaction()Gravatar wm42014-04-26
| | | | | | | One problem is that for example stdio functions won't restart syscalls manually, and instead treat EINTR as an error. So passing SA_RESTART is the only sane thing to do, unless you have special requirements, which we don't.
* demux_mkv: enable parsing for VP9Gravatar wm42014-04-26
| | | | | | | | | | | | VP9 packets can contain 2 frames in some video packets (from which 1 frame is invisible). Due to a design mismatch between libvpx and the libavcodec vp9 decoder, libvpx can take the "full" packets, but lavc vp9 can not. The consequence is that we have to split the packets if we want to feed them to the lavc codec. This is not entirely correct yet: timestamp handling is missing. --demuxer=lavf and ffmpeg native utilities have the same problem. We can fix this only once the ffmpeg VP9 parser is fixed.
* input: fix mouse_leave/OSC behaviorGravatar wm42014-04-26
| | | | | | | | | This essentially reverts commit cca13efb. The code in the if was supposed to be run only if the mouse button was down, because in this case the mouse area is never considered to be left. Since it was run for every mouse button, mouse_leave wasn't sent. Fixes #745.
* input: fix inverted conditionGravatar wm42014-04-26
| | | | | | pthread_equal() returns 0 if the threads are not the same, and somehow I got that wrong. The worst is that I actually explicitly checked the manpage when I wrote this code.
* osd: make code C99Gravatar wm42014-04-26
| | | | | | | This used an unnamed union, which is allowed in GNU C and C11, but not C99. This broke the build with some older compilers. Replaces pull request #744.
* Revert "wayland: print waylands display erros"Gravatar Alexander Preisinger2014-04-26
| | | | | | | | | | | | This reverts commit 6e34b0ec1f50612cb2767da3dbc27be0be63041d. There has always been an error message "proxy already has a listener" and I couldn't reproduce where it is comming from until now. The display interface already has a listener and we can't overwrite it. Now remove the code and avoid this error message. Conflicts: video/out/wayland_common.c
* manpage: fix grammarGravatar wm42014-04-26
|
* manpage: forced->usedGravatar wm42014-04-26
|
* vf_pp: PP_PICT_TYPE_QP2 is always definedGravatar wm42014-04-25
|
* stream: use libavformat interrupt callbackGravatar wm42014-04-25
| | | | | | This will allow to cancel opening slow/stuck network streams faster. How well his work probably depends on the protocol implementation in libavformat.
* stream: make mp_input_check_interrupt thread-safeGravatar wm42014-04-25
| | | | | | | | | | | | | | | | The interrupt callback will can be called from another thread if the cache is enabled, and the stream disconnects. Then stream_reconnect() will call this function from within the cache thread. mp_input_check_interrupt() is not thread-safe due to read_events() not being thread-safe. It will call input callbacks added with mp_input_add_fd() - these callbacks lead to code not protected by locks, such as reading X11 events. Solve this by adding a stupid hack, which checks whether the calling thread is the main playback thread (i.e. calling the input callbacks will be safe). We can remove this hack later, but it requires at least moving the VO to its own thread first.
* stream: remove interrupt callback global variablesGravatar wm42014-04-25
| | | | | | | | | | | | This used global variables for the asynchronous interrupt callback. Pick the simple and dumb solution and stuff the callback into mpv_global. Do this because interrupt checking should also work in the connect phase, and currently stream creation equates connecting. Ideally, this would be passed to the stream on creation instead, or connecting would be separated from creation. But since I don't know yet which is better, and since moving stream/demuxer into their own thread is something that will happen later, go with the mpv_global solution.
* stream: use uninterruptible sleep on reconnectingGravatar wm42014-04-25
| | | | | | | | | | This is the only function which actually used the time argument of stream_check_interrupt(). Considering that the whole player freezes anyway, this is not worth the complication. Also generally reduce the maximum wait time due to timeout. Introduce exponential backoff, which makes the first reconnect retries faster, but still waits up to 500ms in the later retries.
* stream: remove unused functionsGravatar wm42014-04-25
| | | | | | | Interestingly, their last use was removed with commit bbbea793, over 4 months ago. Also remove a stray struct demux_stream forward declaration.
* manpage: improve --osd-level descriptionGravatar wm42014-04-25
|
* OS X bundle: add UTImportedTypeDeclarationsGravatar Nyx0uf2014-04-25
| | | | | | | | | | | | | | | | Allows to declare UTIs [1] for types of file that OS X doesn't know, like mkv, mka, etc. For example: instead of having a dynamically generated UTI for .mkv like 'dyn.somerandomstring', 'io.mpv.mkv' is registered and conforms to public.movie and is known system wide. Note: The list is far from being complete but it should cover the most used type of files. [1]: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE Fixes: #734
* build: bump required libpostproc versionGravatar Alessandro Ghedini2014-04-25
| | | | | The CPU autodetect feature was added in 52.2.100 and is lacking from the stand-alone version at http://git.videolan.org/?p=libpostproc.git
* af.rst: fix replaygain-track descriptionGravatar Alessandro Ghedini2014-04-25
| | | | libav now supports reading ReplayGain values from LAME's Info/XING tag as well.
* demux_mkv: enable parsing for mp3Gravatar wm42014-04-25
| | | | | | | | | | | | | | | | | | | | | | For some reason, some files appear to have broken mp3 packets, or at least in a form that libavcodec can't deal with. The audio in the sample file in question could not be decoded using libavcodec. The problematic file had variable packet sizes, and the libavcodec decoder kept printing "mp3: Header missing" for each packet it was fed. Remuxing with mkvmerge fixes the problem. The mp3 data is probably not VBR, and remuxing resulted in fixed-size mp3 frames. So I don't know why the sample file was muxed this way - it might just be incorrect. The sample file had "libmkv 0.6.4" as MuxingApp (although I could not get mkvinfo to print this element, maybe the file uses an incorrect element ID), and "HandBrake 0.9.4" as WritingApp. Note that the libmpg123 decoder does not have any issues with it. It's probably more robust, because libmpg123 was made to decode whole mp3 files, not just single frames. Fixes issue #742.
* dispatch: document some guaranteesGravatar wm42014-04-25
| | | | | | | | The here documented guarantee might simplify code using this mechanism a lot, because it becomes unnecessary to invent a separate mechanism to make the mp_dispatch_queue_process loop exit after processing a dispatch callback. (Instead, the dispatch callback can set a flag, and the caller of mp_dispatch_queue_process can check it.)
* vo: do not check for events on unconfigured VOGravatar Martin Herkt2014-04-25
| | | | fixes #741
* ao_coreaudio: log even more info in verbose modeGravatar Stefano Pigozzi2014-04-24
| | | | | This logs more info that can be used for debugging purposes, in particular it prints all the AudioChannelDescription in the descriptions array.
* lua: fix stack going out of syncGravatar wm42014-04-24
| | | | This broke with recursive tables.
* command: allow native access to "vf" propertyGravatar wm42014-04-24
| | | | | | This allows client API users and Lua scripts to side-step the pretty horrible video filter string "language" (although it's back and can't be avoided when using libavfilter).
* dispatch: wakeup only if needed on mp_dispatch_resume()Gravatar wm42014-04-24
| | | | | | | | The wakeup is needed to make mp_dispatch_queue_process() return if suspension is not needed anymore - which is only the case when the request count reaches 0. The assertion added with this commit always has/had to be true.
* ao_coreaudio: add verbose output of detected channel layoutsGravatar Stefano Pigozzi2014-04-23
| | | | This can be useful for debugging purposes.
* cache: remove redundant log prefixGravatar wm42014-04-23
|
* audio: minor simplification in wait codeGravatar wm42014-04-23
|
* dispatch: improve documentation commentsGravatar wm42014-04-23
|
* threads: fix function nameGravatar wm42014-04-23
| | | | Closer to the corresponding standard function pthread_cond_timedwait.
* dispatch: implement timeoutGravatar wm42014-04-23
| | | | | | | | | | | | | Note that this mechanism is similarly "unreliable" as for example pthread_cond_timedwait(). Trying to target the exact wait time will just make it more complex. The main use case for this is for threads which either use the dispatch centrally and want mp_dispatch_queue_process to do a blocking wait for new work, or threads which have to implement timers. For the former, anything is fine, as long as they don't have to do active waiting for new works. For the former, callers are better off recalculating their deadline after every call.
* dispatch: use a real lock for mp_dispatch_lock()Gravatar wm42014-04-23
| | | | | | | | | | | This is much simpler, leaves fairness isues etc. to the operating system, and will work better with threading-related debugging tools. The "trick" to this is that the lock can be acquired and held only while the queue is in suspend mode. This way we don't need to make sure the lock is held outside of mp_dispatch_queue_process, which would be quite messy to get right, because it would have to be in locked state by default.
* dispatch: fix broken lockingGravatar wm42014-04-23
| | | | | | | | | | | | | | mp_dispatch_queue_process() releases the queue->lock mutex while processing a dispatch callback. But this allowed mp_dispatch_lock() to grab the "logical" lock represented by queue->locked. Grabbing the logical lock is not a problem in itself, but it can't be allowed to happen while the callback is still running. Fix this by claiming the logical lock while the dispatch callback is processed. Also make sure that the thread calling mp_dispatch_lock() is woken up properly. Fortunately, this didn't matter, because the locking function is unused.
* dispatch: wakeup target thread when locking/suspendingGravatar wm42014-04-23
| | | | | Without this, it could happen that both the caller thread and the target thread sleep.
* dispatch: move into its own source fileGravatar wm42014-04-23
| | | | | | | This was part of osdep/threads.c out of laziness. But it doesn't contain anything OS dependent. Note that the rest of threads.c actually isn't all that OS dependent either (just some minor ifdeffery to work around the lack of clock_gettime() on OSX).
* terminal: fix printing of prefixGravatar wm42014-04-23
| | | | This was subtly change in 5cfb18. Revert the change.
* video: add a "hwdec" property to enable or disable hw decoding at runtimeGravatar wm42014-04-23
|
* man: minor typo why not to use portaudioGravatar Kevin Mitchell2014-04-22
|
* vo: simplify event_fd handlingGravatar wm42014-04-22
| | | | | | Add the event FD after preinit, remove it before destroy. There's no need to do it on vo_config, and there's no need to remove the event FD when vo_config fails.
* vo: cosmetics: move around some codeGravatar wm42014-04-22
| | | | Group together related functionality.
* vo: minor cosmetic changeGravatar wm42014-04-22
|
* client API: make mpv_set_option set options nativelyGravatar wm42014-04-22
| | | | | | | | | | | | | | | | | | | | | | | | This should fix some issues, such as not being able to set the "no-video" option with MPV_FORMAT_FLAG. Note that this changes semantics a bit. Now setting an option strictly overwrite it, even if the corresponding command line option does not. For example, if we change --sub to append by default, then setting the "sub" option via the client API would still never append. (Oddly, this also applies to --vf-add, which will overwrite the old value when using the client API.) I'm doing this because there's no proper separation between the command line parser and setting an option using the MPV_FORMAT_STRING format. Maybe the solution to this mess would be adding format aware code (i.e. m_option_set_node) to every option type, and falling back to strings only if needed - but this would mean that you couldn't set e.g. an integer option using MPV_FORMAT_STRING, which doesn't seem to be ideal either. In conclusion, the current approach seems to be most robust, but I'm open to suggestions should someone find that these semantics are a problem.
* build: glob() is always availableGravatar wm42014-04-22
| | | | | | | | | glob() is mandated by POSIX. For the only non-POSIX platform we support, Windows, we have our own replacement. So the ifdeffery is not needed. Still leave the checks in the configure scripts, because they have to decide whether to compile the replacement or not. (Although this could be special cased to mingw-only, the wscript seems to make this hard.)
* command: export rotation parameterGravatar wm42014-04-22
| | | | For completeness.
* vf: print all image parameter information in verbose outputGravatar wm42014-04-22
|
* vo: warn if the VO doesn't support certain flagsGravatar wm42014-04-22
| | | | | | | | | Unfortunately, if a VO can't display something as intended, we can just complain to the user, and leave it at it. But it's still better than silently displaying things differently with different VOs. For now, this is used for rotation only. Other things that we should check includes colorspace and colorlevels stuff.