aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* timer: use gettimeofday() on WindowsGravatar wm42013-05-26
| | | | | | | MinGW-w64 emulates this via GetSystemTimeAsFileTime(), which has supposedly the best and most stable timer source out of most others. http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-crt/misc/gettimeofday.c
* timer: refactor, add 64 bit timer functionGravatar wm42013-05-26
| | | | | | | | | | | | | | Make OS specific timer code export a mp_raw_time_us() function, and add generic implementations of GetTimer()/GetTimerMS() using this function. New mpv code is supposed to call mp_time_us() in situations where precision is absolutely needed, or mp_time_s() otherwise. Make it so that mp_time_us() will return a value near program start. We don't set it to 0 though to avoid confusion with relative vs. absolute time. Instead, pick an arbitrary offset. Move the test program in timer-darwin.c to timer.c, and modify it to work with the generic timer functions.
* cocoa_common: send mouse moved events to core when draggingGravatar Stefano Pigozzi2013-05-26
| | | | This change fixes mouse autohide when dragging mouse.
* wayland: use VOCTRL_SET_CURSOR_VISIBILITYGravatar Alexander Preisinger2013-05-26
|
* wayland: introduce vo_wayland_configGravatar Alexander Preisinger2013-05-26
| | | | | This removes the need for exposing vo_wayland_fullscreen and other functions also this will be usefull for other vos in the future.
* cocoa_common: implement VOCTRL_SET_CURSOR_VISIBILITYGravatar Stefano Pigozzi2013-05-26
| | | | Pass along cursor visibility hints to be more consistent with OSX's behaviour.
* cocoa_common: implement mouse movement notificationsGravatar Stefano Pigozzi2013-05-26
| | | | | | Notify the core of mouse movement events. The coordinates are converted to a coordinate system with the origin in upper left corner, since Cocoa has it in the lower left corner.
* w32: use VOCTRL_SET_CURSOR_VISIBILITYGravatar wm42013-05-26
| | | | | This didn't even implement --cursor-autohide. Now it does, and the behavior of the VOs under Windows change accordingly.
* vo_sdl: use VOCTRL_SET_CURSOR_VISIBILITYGravatar wm42013-05-26
|
* x11: remove cursor hiding logic, use VOCTRL_SET_CURSOR_VISIBILITYGravatar wm42013-05-26
|
* core: do mouse cursor hiding business in frontendGravatar wm42013-05-26
| | | | | Do this so that not every VO backend has to setup a timer for cursor hiding and interpret the --cursor-autohide option.
* vo: remove vo.check_events callbackGravatar wm42013-05-26
| | | | | | Use VOCTRL_CHECK_EVENTS instead. Change the remaining VOs to use it. Only vo_sdl and vo_caca actually need this, and vo_null, vo_lavc, and vo_image had stubs only.
* w32: use vo_w32_control() for all VOsGravatar wm42013-05-26
|
* x11: use vo_x11_control() for all VOsGravatar wm42013-05-26
|
* video/out: introduce vo_control for gl_common based VOsGravatar wm42013-05-26
| | | | | | | | | | | | | | | | Instead of having separate callbacks for each backend-handled feature (like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the VOCTRL responsible for this directly to the backend. This allows removing a bunch of callbacks, that currently must be set even for optional/lesser features (like VOCTRL_BORDER). This requires changes to all VOs using gl_common, as well as all backends that support gl_common. Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional. VO backends can use VOCTRL_CHECK_EVENTS instead to implementing check_events. This has the advantage that the event handling code in VOs doesn't have to be duplicated if vo_control() is used.
* vf_lavfi: allow setting avoptsGravatar wm42013-05-26
|
* ao_alsa: always unset ALSA error handler, cleanup on init errorGravatar wm42013-05-26
| | | | | | | | | | | | | | | | The ALSA device was not closed when initialization failed. The ALSA error handler (set with snd_lib_error_set_handler()) was not unset when closing ao_alsa. If this is not done, the handler will still be called when other libraries using ALSA cause errors, even though ao_alsa was long closed. Since these messages were prefixed with "[AO_ALSA]", they were misleading and implying ao_alsa was still used. For some reason, our error handler is still called even after doing snd_lib_error_set_handler(NULL), which should be impossible. Checking with the debuggers, inserting printf(), as well as the alsa-lib source code all suggest our error handler should not be called, but it still happens. It's a complete mystery.
* cocoa_common: authohide menu/dock in fullscreenGravatar Stefano Pigozzi2013-05-26
| | | | | This simple fix makes it possible to access the MainManu and Dock when in fullscreen when not using `--native-fs`.
* macosx_application: implement "Quit & remember position"Gravatar Stefano Pigozzi2013-05-23
| | | | | | | Add a menu item to quit and save the current playback position using the code added with commit ce9a854. Fixes #85
* af_lavfi: add libavfilter bridgeGravatar wm42013-05-23
| | | | | | | | | | | | | | | | | | | | | Mostly copied from vf_lavfi. The parts that could be shared are minor, because most code is about setting up audio and video, which are too different. This won't work with Libav. I used ffplay.c as guide, and noticed too late that their setup methods are incompatible with Libav's. Trying to make it work with both would be too much effort. The configure test for av_opt_set_int_list() should disable af_lavfi gracefully when compiling with Libav. Due to option parser chaos, you currently can't have a "," as part of the filter graph string - not even with quoting or escaping. This will probably be fixed later. The audio filter chain is not PTS aware. So we have to do some hacks to make up a fake PTS, and we have to map the output PTS back to the filter chain's method of tracking PTS changes and buffering, by adjusting af->delay.
* demux_mkv: defer reading of seek index until first seekGravatar wm42013-05-23
| | | | | | | | | | | | | | | | | | | | | | Playing Youtube videos often requires an additional seek to the end of the file. This flushes the stream cache. The reason for the seek is reading the cues (seek index). This poses the question why Google is muxing its files in such a way, since nothing in Matroska mandates that cues are located at the end of the file, but we want to handle this situation better anyway. The seek index is not needed for normal playback, only for seeking. This commit changes header parsing such that the index is not read on initialization in order to avoid the additional stream-level seek. Instead, read the index on the first demuxer-level seek, when the seek index is actually needed. If the cues are at the beginning of the file, they are read immediately as part of the normal header reading process. This commit changes behavior only if cues are outside of the header (i.e. not in the area between EBML header and clusters), and linked by a SeekHead. Other level 1 elements linked by the SeekHead might still cause seeks to the end of the file, although that seems to be rare.
* demux_mkv: use a single flag to indicate whether cues have been readGravatar wm42013-05-23
| | | | | | | | | | | | Before this commit, the demuxer would in theory accept multiple cues elements (and append its contents to the index in the order as encountered during reading). According to the Matroska specification, there can be only one cues element in the segment, so this seems like an overcomplication. Change it so that redundant elements are ignored, like with all other unique header elements. This makes implementing deferred reading of the cues element easier.
* command: auto-insert yadif when switching deinterlacingGravatar wm42013-05-23
| | | | | | | | | | | | | | | | | | | | | | | If VO deinterlacing is unavailable, try to insert vf_yadif. If vf_lavfi is available, actually use vf_yadif from libavfilter. The libavfilter version of this filter is faster, more correct, etc., so it is preferred. Unfortunately vf_yadif obviously doesn't support VFCTRL_GET/SET_DEINTERLACE, and with the current state of the libavfilter API, it doesn't look like there is any simple way to emulate it. Instead, we simply insert the filter with a specific label, and if deinterlacing is to be disabled, the filter is removed again by label. This won't do the right thing if the user inserts any deinterlacing filter manually (except native vf_yadif, which understands the VFCTRL). For example, with '-vf lavfi=yadif', pressing 'D' (toggle deinterlacing) will just insert a second deinterlacer filter. In these cases, the user is supposed to map a command that toggles his own filter instead of using 'D' and the deinterlace property. The same applies if the user wants to pass different parameters to the deinterlacer filters.
* m_option: allow removing filter entries by content with -vf-delGravatar wm42013-05-23
| | | | | | | | | | | | | | If a complete filter description is passed to -vf-del, search for an existing filter with the same label or the same name/arguments, and delete it. The rules for filter entry equality are the same as with the -vf-toggle option. E.g. -vf-add gradfun=123:gradfun=456 -vf-del gradfun=456 does what you would expect.
* m_option: move code aroundGravatar wm42013-05-23
| | | | Move the helper functions for parsing -vf, and rename some.
* m_option, vf: add label supportGravatar wm42013-05-23
| | | | | | | | | | | | | | | | | Can be used to refer to filters by name. Intended to be used when the filter chain is changed at runtime. A label can be assigned to a filter by prefixing it with '@name:', where 'name' is an user-chosen identifier. For example, a filter added with '-vf-add @label1:gradfun=123' can be removed with '-vf-del @label1'. If a filter with an already existing label is added, the existing filter is replaced with the new filter (this happens for both -vf-add and -vf-pre). If a filter is replaced, the new filter takes the position of the old filter, instead of being appended/prepended to the filter chain as usual. For -vf-toggle, labels are compared if at least one of the filters has a label; otherwise they are compared by filter name and arguments (like before). This means two filters are never considered equal if one has a label and the other one does not.
* core: support mpv directory itself as a valid location for config files on ↵Gravatar elevengu2013-05-23
| | | | | | | | | | Windows This prefers ./ on Windows if-and-only-if the file being searched for already exists there. (If the mpv directory is non-writable, the result is still intended behavior.) This change is transparent to most users because the user has to move the config files there intentionally, and if anything, not being detected would be the surprising behavior.
* vo: remove unused callbackGravatar wm42013-05-23
|
* mplayer: don't cut status line if --no-consolecontrols is usedGravatar wm42013-05-21
|
* demux_lavf: workaround minor ffmpeg memory leakGravatar wm42013-05-21
| | | | | | | | | | | | The sequence of avcodec_alloc_context3() / avcodec_copy_context() / avcodec_close() / av_free() leaks some memory. So don't copy the context and use it directly. Originally avcodec_copy_context() was used to guarantee that libavformat can't update the fields of the context during demuxing in order to make things a little more robust, but it's not strictly needed, and ffmpeg/ffplay don't do this anyway. Still might make the situation worse should we move demuxing into a separate thread, though.
* demux: workaround for -demuxer mpegts -correct-ptsGravatar wm42013-05-21
| | | | | | | | | | | | | | | | | | | | | | Using -demuxer mpegts -correct-pts triggered the assertion in ds_get_packet2(). This is not surprising, because the correct-pts code was changed to accept _complete_ packets, while all the old demuxers (including the mpegts demuxer) require you to use "partial" packet reads, together with the video_read_frame(). (That function actually parses video frames, so fragments of the original "packets" can be fed to the decoder.) However, it returns out demux_ts packet's are mostly useable. demux_ts still adds an offset (i.e. ds->buffer_pos != 0) to the packets when calling internal parser functions, such as in parse_es.c. While this is unclean design due to mplayer's old video demuxing/decoding path, it can be easily be made work by modifying the packet as returned by ds_get_packet2(). We also have to change the packet freeing code, as demux_packet->buffer doesn't have to point to the start of the memory allocation anymore. MPlayer handles this "correctly" because it doesn't have a function that reads a complete packet.
* demux_mkv: support dirac in mkvGravatar wm42013-05-21
| | | | | | | | | | | | | | Nobody uses this, and this is an absolute waste of time. Even the user who reported this turned out to have produced a sample manually. Sample produced with: wget http://diracvideo.org/download/test-streams/raw/vts/vts.LD-8Mb.drc mkvmerge -o dirac.mkv vts.LD-8Mb.drc mkvmerge writes a sort of broken aspect ratio. libavformat interprets it as 1:1 PAR, while demux_mkv thinks this is a 1:1 DAR. Maybe libavformat is more correct here.
* options: remove dead -dr1 optionGravatar wm42013-05-21
|
* dec_video: get rid of two global variablesGravatar wm42013-05-21
|
* dec_video: remove emms usageGravatar wm42013-05-21
| | | | | | | libavcodec generally shouldn't have this problem anymore (if libavcodec ever had it). All other video decoders are gone. In any case, if this commit actually causes regressions, these are libavcodec bugs and should be fixed there instead.
* mplayer: re-add some legacy slave mode output for issue #92Gravatar wm42013-05-21
| | | | | | In the long run this should be done differently. ID_... output sucks. This commit will be reverted as soon as I have a good idea how this should be done properly.
* configure: map --enable-sdl2 to autodetectionGravatar Stephen Hutchinson2013-05-21
| | | | | | | | | | | | | Commit 02bbd87b disabled SDL linking by default. This commit followed the ancient mplayer convention of disabling detection of compiler flags with --enable-* switches. Unfortunately, this makes compiling with SDL enabled a pain. Make --enable-sdl/sdl2 use autodetection, even if it's inconsistent with most other --enable-* switches. The same is already done for --enable-openal, though. Based on a pull request by qyot27.
* vf_lavfi: remove redundant statementsGravatar wm42013-05-21
|
* m_option: fix parameter comparison for vf-toggleGravatar wm42013-05-21
| | | | | | The vf-toggle option parsing (normally used for runtime video filter switching only) was missing comparing the parameter values. Fix this, and also make the code a bit more robust.
* m_option: fix -vf-del in profilesGravatar wm42013-05-21
| | | | | We don't bother with option verification (as it happens in profiles), because it's barely possible.
* Silence some compiler warningsGravatar wm42013-05-21
| | | | None of these were actual issues.
* travis: fix typoGravatar Stefano Pigozzi2013-05-20
| | | | [ci skip]
* travis: DRY up the yaml fileGravatar Stefano Pigozzi2013-05-20
| | | | | Use YAML's anchor/reference syntax to DRY up the YAML file. Also fix a bug that caused the IRC notification to always take place (even on success).
* vf_dlopen framestep: step width of 0Gravatar Rudolf Polzer2013-05-20
| | | | | This is now defined to mean to never output any frame again (except for the first).
* vf_dlopen framestep filter: add a parameter for the phaseGravatar Rudolf Polzer2013-05-20
| | | | | also, default to 0-indexed frame counts (so by default, the 1st frame is output). Old behaviour can be done by -vf dlopen=./framestep.so:42:41.
* add Travis-CI integrationGravatar Stefano Pigozzi2013-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Travis-CI [1] is a continous integration cloud service. It is free for open-source projects and tigthly integrated tiwh GitHub so there is really no reason for us not use it. :) For now we are going to do a total of 4 builds, mainly to test ffmpeg/libav API breakage: * ffmpeg-stable, libass-stable * ffmpeg-git, libass-stable * libav-stable, libass-stable * libav-git, libass-stable The compiler that is currently used is clang for two reasons: * running 8 build targets would be quite wasteful and take a long time * clang is less tested and used during development than gcc (especially on linux) Currently Travis doesn't support OS X environments alongside Linux ones [2]. When it will, we will add a fifth build target to test OS X compilation breakage. README was moved to markdown to add the little build status image. I ran some tests with my GitHub fork and couldn't get images to show up using ReStructured Text. [1]: https://github.com/travis-ci/travis-ci [2]: travis-ci/travis-ci#216
* configure: reject older libswresampleGravatar wm42013-05-19
| | | | | | | | | | | mpv still builds with ffmpeg 1.0.x, however libswresample keeps cuasing trouble. In older releases, libswresample simply crashed when downmixing. In somewhat newer versions, it produces distorted output and downmixing isn't even close to correct. With ffmpeg release 1.1 (ffmpeg git tag n1.1), everything seems to work fine. The release uses 0.17.102 as libswresample version, so bump the required minimum version to that.
* Fix commit d1b37afGravatar wm42013-05-18
| | | | Yeah, it doesn't work this way... Please look away.
* vo_image: start image file numbers at 1Gravatar wm42013-05-18
| | | | Requested by a user.
* input: allow quotes around any input commandGravatar wm42013-05-18
|