summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Replace strsep() useswm42013-01-139-115/+37
| | | | | | This function sucks and apparently is not very portable (at least on mingw, the configure check fails). Also remove the emulation of that function from osdep/strsep*, and remove the configure check.
* windows support: fix _wstat misusagewm42013-01-132-2/+2
| | | | | | | I have no idea when or how this broke, but _wstati64() is the function we want anyway (64 bit filesize). Possibly this was a mingw-w64 bug. It's unknown why "wstat()" just doesn't work in this case, as it's not defined by MSDN and could be defined by mingw as it needs.
* osdep: remove gettimeofday() emulationwm42013-01-132-44/+0
| | | | Guaranteed by POSIX, and mingw provides it as well.
* osdep: remove setenv() emulationwm42013-01-132-44/+0
| | | | | mpv doesn't use setenv() anymore. The configure check was actually removed earlier; maybe it was forgotten to remove this completely.
* osdep: remove broken vsscanf() emulationwm42013-01-133-58/+0
| | | | | | vsscanf() is in POSIX, C99, mingw, etc. Further, the implementation in osdep/vsscanf.c was completely broken, and if it worked, it worked only by chance.
* configure: remove check for .align semanticswm42013-01-135-23/+8
| | | | | | | | | | | | | | | | | | | | | The check determined whether the argument for .align is in bytes, or log2(bytes). Apparently it's always in bytes for ELF i386 systems, and this check is used for x86 inline assembler only. Even if this assumption should be wrong, it likely won't cause much damage: the existing code uses it only in the form ".align 4", which means in the worst case it will try to align to 16 bytes, which doesn't cause any problems (unless the object file format does not support such a high alignment). Update the filters that used this. Quoting the GNU as manual: For other systems, including ppc, i386 using a.out format, arm and strongarm, it is the number of low-order zero bits the location counter must have after advancement. For example `.align 3' advances the location counter until it a multiple of 8. If the location counter is already a multiple of 8, no change is needed.
* configure: remove __builtin_expect checkwm42013-01-132-21/+1
| | | | | | Change the only usage of HAVE_BUILTIN_EXPECT, demux.h, to use an #ifdef instead. In theory, a configure check is better, but nobody does it this way anyway, and we seek to reduce the configure script.
* configure: cleanup: remove unused --datadir switchwm42013-01-131-7/+0
| | | | | Unused. mplayer-svn used it as fallback directory to locate the OSD font, and for the GUI.
* configure: cleanup: remove unused xshape switcheswm42013-01-131-4/+0
| | | | They didn't do anything since the internal GUI was removed years ago.
* mixer: keep fractional part of volume settingUoti Urpala2013-01-131-2/+2
| | | | | | | | mixer_setvolume() accepts float values for volume, but used the integer function av_clip() to limit range, losing the fractional part as a side effect. Change the code to use av_clipf() instead. For most uses this shouldn't make any real difference; actual AO volume settings may not have that much precision anyway.
* af_volnorm: fix output range with float inputUoti Urpala2013-01-131-3/+3
| | | | | | | | | af_volnorm can process either int16_t or float audio data. The float version used 0 to INT_MAX as full value range, when it should be 0 to 1. This effectively disabled the filter (due to all input being considered to fall in the silence range). Fix. Reported by Tobias Jacobi <liquid.acid@gmx.net>.
* demux_mkv: work around bad OutputSamplingFrequency valuesUoti Urpala2013-01-131-0/+8
| | | | | | | | | Something produces corrupt Matroska files with audio tracks that have SamplingFrequency set to 44100 and OutputSamplingFrequency to 96000, when the correct playback rate is 44100. Add a special case for this 44100/96000 combination and override it to 44100/44100; it's unlikely that anyone would ever want to use this 44100/96000 combination for real in valid files.
* core: timeline: prevent inaccurate seeks outside timelineUoti Urpala2013-01-131-2/+3
| | | | | | | | | Ensure that even if a seek is inaccurate it will not show video from outside the defined timeline. Previously, seeking to the beginning of a segment could show frames from before the start of the segment if the seek was done in inaccurate mode and the demuxer seeked to an earlier position. Now hr-seek machinery is used to skip at least the frames that should not be part of playback timeline at all.
* vo_sdl: fix for rename of a function in SDL2's interfaceRudolf Polzer2013-01-121-2/+4
|
* sub: do not apply timeline offset to external subtitleswm42013-01-121-3/+8
| | | | | | | | | | | | Now external subtitles essentially use the playback time, instead of the segment time. This is more useful when using external subtitles with mkv ordered chapters. The previous behavior is not necessarily incorrect, and e.g. makes it easier to use subtitles directly extracted from ordered chapters segments. But we consider the new behavior more useful. Also see commit 06e3dc8.
* Fix lots of bugs in mp_http URL handlingRudolf Polzer2013-01-103-9/+22
| | | | | Many instances of "http" were not changed to "mp_http", which made many aspects of the mp_http protocol handler broken.
* demux_lavf: avio_flush in DEMUXER_CTRL_RESYNCRudolf Polzer2013-01-101-0/+2
| | | | This rules out possible avio buffering issues.
* vo_sdl: add a "sw" flag like in openglRudolf Polzer2013-01-102-36/+78
| | | | | | Also, rework the renderer creation for the flag being generally effective even if the "SW renderer" is detected only after creating a context.
* encoding-example-profiles: restructure iPhone profilesRudolf Polzer2013-01-101-11/+11
| | | | The names are left as is, but they are hierarchic internally now.
* mplayer: make --loop loop the playlist instead of each playlist entrywm42013-01-093-33/+11
| | | | | | | | | | This is simpler and more useful. We could add a new switch for the old functionality, but that would probably be more confusing than helpful. When passing only a single file to the command line, this commit shouldn't change behavior. (Classic mplayer provided both features by duplicating the loop functionality in the "playtree".)
* mplayer: keep pause state when frame stepping in last framewm42013-01-091-0/+3
| | | | | | | When the last frame is displayed, and a frame step command is issued, playback ands and advances to the next file. But before this commit, the next file was played unpause. Fix this, and make sure pause is kept.
* DOCS: add some basic MinGW cross compilation instructionswm42013-01-081-0/+59
|
* osxbundle: fix unicode support in fonts.confkax42013-01-071-5/+116
| | | | | | | | | Looks like unicode support was broken with this simple `fonts.conf`. Copy more (all) of fontconfig's default `fonts.conf`. Fixes #13 Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* README: add a new one using ReSTStefano Pigozzi2013-01-072-27/+69
| | | | | Hopefully this is a little more useful for people opening the GitHub project page and can serve the role of a poor man's project website.
* demux_lavf: implement DEMUXER_CTRL_RESYNCRudolf Polzer2013-01-071-0/+15
| | | | | This makes -chapter work with stream_dvd by telling ffmpeg to flush its internal buffers after a stream_dvd seek.
* vo_xv: fix compilation when shared memory header files are not availablewm42013-01-061-5/+2
| | | | | This is an extremely obscure situation, but can actually happen on OpenBSD.
* ao_alsa: do not call snd_pcm_delay() when pausedwm42013-01-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | This causes trouble when a hw device is used: pcm_hw.c:514:(snd_pcm_hw_delay) SNDRV_PCM_IOCTL_DELAY failed (-77): File descriptor in bad state when running mpv test.mkv --ao=alsa:device=iec958,alsa and pausing during playback. Historically, mplayer usually did not call snd_pcm_delay() (which is called by get_delay()) while paused, so this problem never showed up. But at least mpv has changes that cause get_delay() to be called when updating the status line (see commit 3f949cf). It's possible that calling snd_pcm_delay() is not always legal when the audio is paused, and at least fails with the error message mentioned above is the device is a hardware device. Change get_delay() to return the last delay before the audio was paused. The intention is to get a continuous playback status display, even when pausing or frame stepping, otherwise we could just return the audio buffer fill status in get_delay() or even just 0 when paused.
* cleanup: ass_mp.h: remove dummy declarationswm42013-01-061-15/+1
|
* sub: use correct fallback font for subtitleswm42013-01-061-1/+2
| | | | Accidentally still used the OSD font.
* ao_sdl: fix compilation with Libavwm42013-01-061-0/+1
| | | | | On Libav, <libavutil/fifo.h> doesn't recursively include common.h, but the code in ao_sdl.c uses some macros defined by this header.
* manpage: document the dangers of some subtitle optionswm42013-01-051-7/+20
| | | | | | | | | | | | | Setting some subtitle options may lead to incorrect rendering of complex ASS subtitle scripts, such as displaced signs or visual artifacts. The user should be made aware that this can happen. In theory, libass could make using some of these options relatively safe, but it doesn't. Note that there are potentially much more options that could in theory break subtitle rendering, but add a warning only to the most fragile ones.
* sub: add --sub-text-* options to unstyled text subtitles fontwm42013-01-056-33/+40
| | | | | | | Before this commit, the --osd-* options (like --osd-font-size etc.) configured both the OSD and subtitle font. Make them separate, and add --sub-text-* options (like --sub-text-size etc.). Now --osd-* affects the OSD font only, and --sub-text-* unstyled text subtitles only.
* manpage: sort --osd-* optionswm42013-01-041-36/+36
| | | | | | They were more or less grouped by usefulness, but since everything else in the manpage is sorted alphabetically, it's better to be consistent and sort these options as well.
* Update copyright yearwm42013-01-042-2/+2
|
* cocoa_common: add support for `--no-border`Stefano Pigozzi2012-12-311-0/+1
| | | | Draw a window with style NSBorderlessWindow when the user uses `--no-border`.
* vo_sdl: support -geometry properlyRudolf Polzer2012-12-311-2/+7
| | | | Now the x and y origin options (-geometry WxH+X+Y) are supported too.
* vo_sdl: some OSD optimizationsRudolf Polzer2012-12-281-23/+41
| | | | | | | | | | | | | | | | The premultiplied-alpha hack is changed: - The first stage now uses a colormod of black with an unmodified texture. This saves on applying the AND mask of 0xFF000000 to keep alpha only. - The second stage no longer uses an AND mask, but only an OR mask of 0xFF000000 to cancel out alpha. - The texture uploads are no longer done using SDL_LockTexture, SDL_ConvertPixels, SDL_UnlockTexture when the mpv pixel format matches the OSD's pixel format. Instead, SDL_UploadTexture is used, which saves a copy when using the "opengl" renderer.
* stream_lavf: warn if protocol not foundwm42012-12-281-1/+6
| | | | | | | | If ffmpeg returns AVERROR_PROTOCOL_NOT_FOUND, print a warning that ffmpeg should be compiled with network support. Note that stream_lavf.c itself includes a whitelist of directly supported ffmpeg protocols, so it can't happen that a completely unknown/madeup protocol triggers this message. (Unless the ffmpeg:// or lavf:// prefixes are used.)
* vf_scale: prefer 420P10 -> YV12 instead of 444Pwm42012-12-281-0/+1
| | | | | | Strictly speaking, 444P is higher quality than YV12, but doing this is not very useful when playing 10 bit video with -vo opengl-old on a GPU that doesn't support 16 bit textures.
* vo_opengl_old: reject 9-15 bit formats if textures have less than 16 bitwm42012-12-283-1/+22
| | | | | | | | | | | | | | | | | | | For 9-15 bit material, cutting off the lower bits leads to significant quality reduction, because these formats leave the most significant bits unused (e.g. 10 bit padded to 16 bit, transferred as 8 bit -> only 2 bits left). 16 bit formats still can be played like this, as cutting the lower bits merely reduces quality in this case. This problem was encountered with the following GPU/driver combination: OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) 915GM x86/MMX/SSE2 OpenGL version string: 1.4 Mesa 9.0.1 It appears 16 bit support is rather common on GPUs, so testing the actual texture depth wasn't needed until now. (There are some other Mesa GPU/driver combinations which support 16 bit only when using RG textures instead of LUMINANCE_ALPHA. This is due to OpenGL driver bugs.)
* gl_common: properly reject old OpenGL versionswm42012-12-281-11/+20
| | | | | | | | | | | | | | | | | | | The extension checking logic was broken, which reported OpenGL 3 if the OpenGL .so exported OpenGL 3-only symbols, even if the reported OpenGL version is below 3.0. Fix it and simplify the code a bit. Also never fail hard if required functions are not found. The caller should check the capability flags instead. Give up on the idea that we should print a warning if essential functions are not found (makes loading of ancient legacy-only extensions easier). This was experienced with the following version strings: OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) 915GM x86/MMX/SSE2 OpenGL version string: 1.4 Mesa 9.0.1 (Possibly reports a very old version because it has no GLSL support, and thus isn't even GL 2.0 compliant.)
* core: fix crash if VO init failswm42012-12-281-1/+1
|
* manpage: minor improvementswm42012-12-281-9/+14
|
* DOCS: document EDL formatwm42012-12-281-0/+139
| | | | | This is taken from the commit message of 968154ba77f8, with some fixes to make it valid RST.
* audio: make de-planarization fasterwm42012-12-283-16/+44
| | | | | | Uses the same trick as the planarization code to turn per-sample memcpy calls into mov instructions. Makes decoding a ~25min 48000Hz 2ch floatle audio file faster from 3.8s to 2.7s.
* vo_opengl: use more precise gamma for BT.709 with color managementnand2012-12-283-7/+7
| | | | | | | | | | Change from gamma 2.2 to the slightly more precise 1/0.45 as per BT.709. https://www.itu.int/rec/R-REC-BT.709-5-200204-I/en mentions a value of γ=0.45 for the conceptual non-linear precorrection of video signals. This is approximately the inverse of 2.22, and not 2.20 as the code had been using until now.
* sdl, encode_lavc: fix copyright headersRudolf Polzer2012-12-286-14/+15
| | | | | | Some of them had changes in 2012; extend their header. Fix project name.
* encoding-example-profiles: fix "oac" typoRudolf Polzer2012-12-281-2/+2
| | | | Fixes issue #10.
* vdpau: silence a clang warningRudolf Polzer2012-12-281-1/+2
| | | | It's just some braces...
* demux_mpg, ass_mp: fix warningsRudolf Polzer2012-12-282-2/+6
| | | | | | | | The warnings in demux_mpg were silenced by additional no-operation casts. A variable in ass_mp was used only for some versions of libass; now the declaration is in that version #ifdef too to avoid a compiler warning.
* vo/ao: SDL 1.2+ audio driver, SDL 2.0+ accelerated video driverRudolf Polzer2012-12-288-0/+1458
| | | | | | | | | | | This mainly serves as a fallback for platforms where nothing better is available; also as a debugging help. Both the audio and video driver are not first class - the audio driver lacks delay detection, and the video driver only supports a single YUV color space. Configure options: --disable-sdl2 to disable SDL 2.0+ detection, --disable-sdl to disable SDL 1.2+ detection. Both options need to be specified to turn off SDL support entirely.
* vf_scale: support more pixel formatsRudolf Polzer2012-12-281-0/+4
| | | | | The RGBA, ARGB, BGRA, ABGR were previously not always supported, depending on system endianness.
* sub: add ASS to RGBA conversionwm42012-12-284-2/+83
| | | | | This makes implementing new VOs easier, because they don't have to support the ASS format.
* stream_dvd: fix angle mathRudolf Polzer2012-12-221-8/+7
| | | | | Stop changing the dvd_angle variable while opening a DVD. Fixes issues with multiple dvd:// URLs on one command line.
* configure: clean up use of extra_ldflags and libs_mplayerRudolf Polzer2012-12-191-16/+17
| | | | | | | | | | | Now, extra_ldflags ought to only consider LDFLAGS, and all libraries shall go into libs_mplayer. In the end, the command line first contains extra_ldflags, and then libs_mplayer. So altogether this change has the effect that libraries get added to the linker command line in the order the configure script checks them. Previously there was some reordering due to some checks adding libraries to libs_mplayer and some to extra_ldflags.
* core: make WAKEUP_PERIOD overridable by the voRudolf Polzer2012-12-193-12/+30
| | | | | | | | | | | | This is better than having just the operating system type decide the wakeup period, as e.g. when compiling for Win32/cygwin, a wakeup period of 0.5 would work perfectly fine. Instead, the default wakeup period is now only decided by availability of a working select() system call (which is the case on cygwin but not mingw and MSVC) AND a vo that can provide an event file descriptor or a similar hack (vo_corevideo). vos that cannot do either need polling for event handling and now can set the wakeup period to 0.02 in the vo code.
* osxbundle: print meaningful error when a dylib is missingStefano Pigozzi2012-12-161-1/+7
| | | | | | If one of the bundled libraries is pointing to a missing dylib stop the bundling and exit with an error. This can happen if the user uninstalled a dependency after he built the binary/libraries.
* osxbundle: add fonts.conf to distributed bundleStefano Pigozzi2012-12-151-0/+9
| | | | | | | | | | | | | | | The osxbundle target creates a bundle that is supposed to be distributable to third parties. As they may not have fontconfig installed they miss a fonts.conf pointing to the usual fonts directories in OSX. For people installing from source and using from the terminal this commit changes nothing. You just have to make sure that your fontconfig is installed with a sane configuration (XQuartz does). If you are installing fontconfig from source you can force a sane OSX default using `--with-add-fonts`. For example: `./configure --with-add-fonts=/Library/Fonts,~/Library/Fonts` Homebrew already addressed this with mxcl/homebrew@b242883
* path: add mp_find_config_file and reorganize some of the codeStefano Pigozzi2012-12-1513-137/+190
| | | | | | | | | | | | | | Add `mp_find_config_file` to search different known paths and use that in ass_mp to look for the fontconfig configuration file. Some incidental changes spawned by this feature where: * Buffer allocation for the strings containing the paths is now performed with talloc. All of the allocations are done on a NULL context, but it still improves readability of the code. * Move the OSX function for lookup inside of a bundle: this code path was currently not used by the bundle generated with `make osxbundle`. The plan is to use it again in a future commit to get a fontconfig config file.
* core: path: run uncrustifyStefano Pigozzi2012-12-151-80/+86
| | | | | | | | | | Even if this is not so bad as other files, I need to add some stuff so... why not!? `uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace core/path.h` `uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace core/path.c` The header was unchanged by the tool.
* ass_mp: allow to use a custom fontconfig configuration fileStefano Pigozzi2012-12-151-9/+14
| | | | | | This allows to use a fontconfig fonts.conf that is customized for mpv. The configuration file is assumed to be located at `~/.mpv/fonts.conf`. If not found the default fcontconfig config file is used.
* video: silence warnings for missing libavutils pixel formatswm42012-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Using vf_screenshot on Libav printed useless/misleading error messages when playing 10 bit h264 with a VO that supports 8 bit yuv420p only: Unsupported format 444p14le Unsupported format 444p14be ... The cause of this is that vf_scale is inserted to handle the format conversion, and tries to find a pixel format with best quality. This includes the 14 bit and 12 bit formats, which don't exist on Libav. vf_scree