summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ao_dsound: add missing includeKovensky2013-03-231-0/+1
| | | | libavutil/common.h is needed for FF_ARRAY_ELEMS.
* wayland: fully support cursor autohide optionsAlexander Preisinger2013-03-231-15/+15
| | | | I missed the special cases in the previous commits.
* sub: print messages before and after font setupwm42013-03-201-0/+2
| | | | | | | Helps on Windows, where fontconfig may take some time to finish. Print it with -v only, because that message would be annoying anywhere else.
* encoding-examples-profiles: fix N900 profileRudolf Polzer2013-03-201-1/+1
| | | | | | | In some cases (when using tune=animation as an additional option), the N900 profile caused use of 6 reference frames, where Level 3.0 only allows 5 reference frames. This prevented playback on the Nokia N900. This has been fixed by always specifying refs=5.
* w32_common: reset internal display size to the window sizewm42013-03-191-0/+5
| | | | | vo->dwidth/dheight are overwritten by vo.c at this point (which is not nice, but it's how things are currently).
* video: deal with 0x0 window sizewm42013-03-191-2/+4
| | | | If this happens, don't set a NaN aspect ratio.
* input: fix crash due to dangling pointerwm42013-03-191-1/+1
| | | | | Wrong API usage, has been in the code since 2011. Rarely triggered (if at all in the current setup).
* demux: fix regressions by restricting cover art hack furtherwm42013-03-191-3/+3
| | | | | | | | | | | | | | | | | | | | The code modified by this commit is supposed to prevent demuxing the whole file when cover art is present. (The problem with cover art is that the ffmpeg libavformat API doesn't signal video EOF correctly - so we try to read more packets to find the next video frame, which results in demuxing and queuing the whole audio stream.) This caused regressions for files with extremely high audio offset (see github issue #46). MY conclusion is that this cover art crap doesn't work, and this is just another case of completely insane ffmpeg/libav API. Disable the hack in all cases, unless a cover art video track is selected. Maybe I'll handle cover art directly in the frontend later, so that we don't have to rely on whatever libavformat does. Unfortunately, this also makes behavior with equally insane mp4 files with sparse video tracks worse, but this issue takes priority.
* demux_mf: fix crashes when '*' matches directorieswm42013-03-192-7/+10
| | | | | | | Doing 'mpv mf://*' in a file with directories would crash, because even though directories are skipped, the corresponding file entry is just left at NULL, leading to a segfault on access. So explicitly skip NULL entries.
* stream: silence clang empty statement warningswm42013-03-191-12/+8
| | | | | | | | | | clang printed warnings like: stream/stream.c:692:65: warning: if statement has empty body [-Wempty-body] GET_UTF16(c, src < end - 1 ? get_le16_inc(&src) : 0,; This macro expands to "if(cond) ;". Replace it with an empty statement that doesn't lead to a clang warning.
* input/ar: remove unused variablewm42013-03-191-1/+0
|
* mp_msg: print MSGL_STATUS to stderr if stderr is redirectedRudolf Polzer2013-03-181-2/+2
| | | | | Of course, status output is still hidden when stderr is a tty which is not the foreground tty.
* mp_msg: fix status output disappearing when redirecting INPUT.Rudolf Polzer2013-03-182-4/+4
| | | | | Instead, we now check stderr's destination against the foreground tty for deciding whether we want status output or not.
* encoding-example-profiles: for Nokia N900, avoid upscalingRudolf Polzer2013-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This yields generally smaller files, by avoiding upscaling at all times. This method may or may not be useful for iOS, needs testing there. Note: this uses three instances of vf_scale: 1. Scale to target dimensions, ONLY if both are <= original video dimensions. 2. Failing that, scale to width*<calculated height by display aspect>, ONLY if <calculated height by display aspect> <= original video height. 3. Failing that, scale to <calculated width by display aspect>*height. When the test before failed, we KNOW that <calculated width by display aspect> <= original video width. So basically, only one of the three scalers should ever be active, as the last two scalers only can ever have an effect if the aspect ratio mismatches the video. As for danger of roundoff errors: If scaler 1 succeeded, we have won. Scalers 2 and 3 will never do anything, because display resolution == video resolution. Here it is crucial that no rounding of video size to display size takes place; in other words, the target display size already MUST be even, which it is because we pass 2 to the rounding parameter of the dsize filter. Scaler 2 and 3 are obviously mutually exclusive, as they depend on opposite aspect ratio conditions. We later should put this functionality directly into vf_scale...
* options: fix --widwm42013-03-181-1/+1
| | | | | | A recent change accidentally set the flags options to -1 (probably confusing it with the defasult value?), which mistakenly set all flags and rejected all option values (except 0).
* x11_common: remove assumption that video is always centeredwm42013-03-174-33/+28
| | | | | | | | | | The vo_x11_clearwindow_part() function assumed that the video is always centered. Replace it with a new vo_x11_clear_background() function instead, which essentially does the same as the old function. It takes the video rectangle instead of just the video size, and doesn't have to make the assumption that the video rectangle is centered. Also make vo_x11 use it (seems advantageous).
* video: enable panscan calculations even in windowed modewm42013-03-171-3/+2
| | | | | | | | This was probably enabled to guarantee that panscan is always reset in windowed mode. However, the window size should be exactly the video size in windowed mode, unless in cases where the user forcibly changed the window size (e.g. --geometry). In the former case, panscan will have no influence at all, and in the latter case we want it to have influence.
* video: apply --no-keepaspect even on fullscreenwm42013-03-171-1/+1
| | | | | | | | | If that's what the user asked for, there's no reason to introduce special cases to ignore it on fullscreen. The old behavior is perhaps accidentally due to the fact that aspect calculations used to be disabled in windowed mode, rather than a deliberate decision.
* video: remove rounding of display size to multiples of 2wm42013-03-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code that is changed is responsible for scaling the video size to display size, so that the resulting video rectangle is letter-boxed inside the display window. This is before panscan calculations, which can actually enlarge the video and make it larger than the display size again. (src_dst_split_scaling() in vo.c takes cares of clipping the video size to window size.) I'm not sure why this rounding is done, as using panscan controls can introduce odd sizes again. The rounding has been part of the code since the initial commit. On the other hand, this rounding can slightly influence the aspect ratio of the displayed image to the worse. It forces the image to be scaled by an additional pixel, without actually correcting the display size into the other direction. Although video sizes are usually at least aligned on 2 (and often more), odd sizes can still happen when playing e.g. anamorphic DVDs. Remove the additional rounding. (Note that we still round the _source_ image position and size when the displayed image is larger than the screen, e.g. when panscan is used. This is needed by some VOs so that the image source rectangle starts on full chroma pixels. Maybe this rounding should be moved to the respective VOs, which includes at least vo_direct3d.)
* video: remove aspect.h includes from files which don't need itwm42013-03-178-8/+0
|
* video: simplify aspect calculation stuffwm42013-03-174-93/+38
| | | | | | | Remove lots of weird logic and dead code. The only difference is that when specifying a monitor aspect ratio, it will always upscale and never downscale.
* vo_xv: minor simplificationswm42013-03-171-17/+4
| | | | | | The draw_osd change is a bit tricky: I guess originally, there was some intention not to second-guess the generic aspect code, but the result is the same and the code is more confusing.
* vo_x11: accept all swscale formatswm42013-03-171-6/+6
| | | | There's no reason why there should be a separate vf_scale stage.
* vo_corevideo: use generic aspect ratio codewm42013-03-171-62/+38
| | | | | | | | | The rescaling is rather silly. vo_get_src_dst_rects() doesn't return an uncropped image, so the texture coordinates have to be recalculated, which looks more complicated, but is actually what the other OpenGL VOs also do. Tested and fixed by Stefano Pigozzi.
* vo_opengl_old: use generic aspect ratio codewm42013-03-171-45/+42
| | | | | Make sure scaled_osd still works. Although this is a completely worthless feature for a deprecated VO.
* vo_x11: use generic aspect ratio code, refactorwm42013-03-171-149/+77
| | | | | | | | | | | | | | Instead of manually calculating aspect ratio etc., use vo_get_src_dst_rects(). This has the advantage that we can drop some special cases in aspect.c later. Simplify the code, and move resizing the X images from draw_image() to a new resize() function. Do some other simplifications. The gXErrorFlag check was actually dead code, even in mplayer-svn. Special-casing on WinID is not needed anymore (we created an embedded window, and its size is updated by x11_common.c).
* cocoa_common: fix regression when changing videos in fullscreenStefano Pigozzi2013-03-151-3/+4
| | | | | | | | I introuced this regression in 8fc0b618d5. The backend would go into incosistent state caused by calling `vo_cocoa_fullscreen` where it wasn't needed. Fixes #44
* video: use new method to get QP tablewm42013-03-152-5/+21
| | | | | | | | | | | | | | | | | | | | This only matters for those who want to use vf_pp. The old API is marked as deprecated, and doesn't work on Libav. It was broken on FFmpeg, but has recently started working again - the fields in question were not un- deprecated though. Instead you're supposed to use a new API, which does exactly the same thing (what...?). Also don't pass the QP table with mp_image_copy_attributes() - it probably does more harm than it's useful. By the way, with -vf=dlopen=TOOLS/vf_dlopen/showqscale.so, it appears the table as output by recent FFmpeg is offset by 1 macroblock in X direction and 2 macroblocks in Y direction, which most likely will interfere with normal vf_pp operation. However, this is not my problem. The only real reason for this commit is that we can finally get rid of all libav* related deprecation warnings. (Though they are constantly deprecating APIs, so this will not last long.)
* demux_mkv: support ALACwm42013-03-153-0/+13
| | | | | Test sample was produced with ffmpeg. Extradata handling closely follows libavformat/matroskadec.c.
* input: ignore normal mouse click by defaultwm42013-03-141-0/+1
| | | | Apparently this annoyed some users.
* demux_mkv: Support playing Opus streams in MatroskaStephen Hutchinson2013-03-143-0/+8
| | | | | | | | | | | | FFmpeg recently changed how it writes Opus-in-Matroska to match the A_OPUS/EXPERIMENTAL name that mkvmerge uses, with the caveat that things will change and compatibility with old files can get worked out when the spec is finalized. This adds both A_OPUS and A_OPUS/EXPERIMENTAL so that *hopefully* it can play both the newer files that use A_OPUS/EXPERIMENTAL, and older ones muxed by FFmpeg that were simply A_OPUS, since this is also what FFmpeg seems to be doing to handle the situation.
* configure: bump minimum FFmpeg/Libav versions, remove compat hackswm42013-03-133-123/+1
| | | | | | | | | | | | | | | | | We consider FFmpeg 1.x and Libav 0.9.x releases compatible. Support for FFmpeg 0.9.x and Libav 0.8.x is considered infeasible and has been dropped in the previous commits. The bits that break compatibility are mainly the CodecID renaming (trivial, but would require nasty hacks everywhere), the avcodec_encode_video2() function (missing in older releases, mandatory in newer ones), and the resampler changes (older releases miss lib{av,sw}resample, newer versions removed the libavcodec resampler). Remove some other compatibility bits that were needed to for releases for which we drop support. The comment about Libav 0.9 in compat/libav.h is incorrect and should have been 0.8 (the symbol is present in Libav 0.9).
* af_lavrresample: add new resampling filter to replace the old onesStefano Pigozzi2013-03-138-839/+327
| | | | | | | | | | Remove `af_resample` and `af_lavcresample`. The former is a mess while the latter uses an API that was long deprecated in libavcodec and is now removed. `af_lavrresample` rougly has the same features and structure of `af_lavcresample`. libswresample fallback by wm4.
* video: make use of libavcodec refcountingwm42013-03-136-11/+122
| | | | Now lavc_dr1.c is not used anymore if libavcodec is recent enough.
* video: prepare for libavcodec refcountingwm42013-03-133-62/+84
| | | | | Some minor refactoring and moving code around. There should be no functional changes.
* demux_lavf: use avg_frame_rate instead of r_frame_ratewm42013-03-131-2/+2
| | | | | | | | | | | r_frame_rate was deprecated and was finally removed from Libav and FFmpeg git. Not sure what's the correct replacement. avg_frame_rate may or may not be worse than the fallback of using the time_base as guess. The framerate is mostly unused, but needed for frame-based subtitles and for encoding. (It appears encoding guesses a timebase based on the FPS, and I'm not sure why we don't just use the source timebase.)
* Prefix CODEC_ID_ with AV_wm42013-03-139-76/+76
| | | | | | | | | The old names have been deprecated a while ago, but were needed for supporting older ffmpeg/libav versions. The deprecated identifiers have been removed from recent Libav and FFmpeg git. This change breaks compatibility with Libav 0.8.x and equivalent FFmpeg releases.
* image_writer: switch to avcodec_encode_video2()wm42013-03-131-14/+11
| | | | | | | | avcodec_encode_video() was deprecated, and was finally removed from Libav and FFmpeg git. This change breaks compatibility with Libav 0.8.x. Thank the Libav developers, not me.
* af_lavcac3enc: switch to avcodec_encode_audio2()wm42013-03-131-45/+71
| | | | | | | | avcodec_encode_audio() was deprecated, and was finally removed from Libav and FFmpeg git. This appears to work. I get heavy A/V desync with -ao alsa and -ao pcm, but this was already so before this change.
* wayland: remove asserts from egl_create_contextAlexander Preisinger2013-03-131-17/+7
| | | | | Instead of assert return false on most check. Removes the redundant second inclusion of the assert header.
* wayland: simplify egl_create_windowAlexander Preisinger2013-03-131-13/+4
| | | | | | Removes the local ret because it was only in an assert statement and also removes the window size assignments, because they are already done in config_wnidow_wayland.
* wayland: use the cursor_autohide_delay optionAlexander Preisinger2013-03-111-6/+9
| | | | | In the previous implemention the backend always assumed 1 second instead of honoring the cursor_autohide_delay option
* wayland: move window by grabing itAlexander Preisinger2013-03-111-0/+8
| | | | | Because the are no server-side-decorations in the available wayland compositors use grabbing the surface to move it.
* configure: add _GNU_SOURCE to CFLAGS by defaultwm42013-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In theory, projects have to define feature test macros to enable various system functionality in system headers. (This is done so to ensure new identifiers can be added to system headers, without breaking old programs by causing name conflicts.) This includes macros like _GNU_SOURCE, _BSD_SOURCE, _POSIX_C_SOURCE etc. Traditionally, gcc as well as glibc headers implicitly assumed _GNU_SOURCE if no feature test macros were defined by the user. clang did this too to ensure compatibility with gcc centric programs (which in practice includes most Linux programs). However, it appears recent clang versions started to prefer BSD traditional function over the POSIX, which switches the definition of a function used by mp_msg.c: pid_t getpgrp(void); /* POSIX.1 version */ pid_t getpgrp(pid_t pid); /* BSD version */ mp_msg.c expects the POSIX version, while clang gives us the BSD version, resulting in a compilation failure. Solve this by defining _GNU_SOURCE. This requests most features from system headers, and explicitly prefers POSIX definitions over BSD, which should fix the compilation issue.
* configure: remove -fomit-frame-pointer and -ffast-math from CFLAGSwm42013-03-111-3/+3
| | | | | | | | | | -fomit-frame-pointer is enabled by default with recent gcc and clang compilers if -O2 is used. It also breaks debugging when optimization is disabled, so it makes absolutely no sense to have -fomit-frame-pointer explicitly in the CFLAGS. Get rid of -ffast-math too. It's little more than cargo-culting, and might actually break NaN handling and such things.
* vo_opengl: insert a magical glFlush callwm42013-03-111-0/+6
| | | | | Helps a little bit with stuttering with pans and "heavy" subtitles covering the screen.
* cocoa_common: fix window position when bigger than displayStefano Pigozzi2013-03-101-4/+4
| | | | | | | | | | Fix a regression introduced in commit 979ce46c64 causing a window to take up more space than what the display allows. Add keepCentered:YES, so that the video area is always clipped to the current visible frame (even when using scale). Fixes #38.
* core: remove a number of global variableswm42013-03-089-112/+103
| | | | | | | | | | | Move them into per-instance structs. This should get rid of all global variables in mplayer.c (not counting those referenced by cfg-mplayer.h). In core/input/ar.c, just remove checking the slave_mode variable. I'm not sure what this code was supposed to achieve, but slave mode is broken, slave mode is actually infeasible on OSX (ar.c is completely OSX specific), and the correct way of doing this would be to disable this input device per command line switch.
* core: make more robust against missing libavcodec AVCodecDescriptor entrieswm42013-03-071-3/+18
| | | | | | | | | | | Missing entries cause avcodec_descriptor_get() to return NULL, and in turn mp_codec_from_av_codec_id() will return NULL. This shouldn't happen, and avcodec_descriptor_get() returning NULL for a valid codec is clearly a bug. But make it more robust anyway, and use the decoder's name if this happens, because I doubt maintainance of the AVCodecDescriptor table in ffmpeg/Libav will always be perfect and reliable.
* vo_sdl: we don't want to minize the window when losing focusRudolf Polzer2013-03-061-0/+2
| | | | | Because: this makes multi-monitor use entirely useless (as soon as pointer leaves left screen, mpv gets auto minimized).
* options: fix panscan controlswm42013-03-061-1/+1
| | | | | | | The value range was set to 1-99 instead of 0-1. This broke panscan control with the 'w' and 'e' keybindings. Broken by commit 1198c03.
* options: remove --no-vsyncwm42013-03-067-16/+8
| | | | | | Latest nvidia drivers ignore the application setting, so this switch makes even less sense than before. It's still possible to control this with VO specific suboptions.
* w32_common: fix compilationwm42013-03-051-10/+10
| | | | Broken by commit 1198c03.
* vo: Separate vo options from MPOptsAlexander Preisinger2013-03-0419-250/+253
| | | | | | | Separate the video output options from the big MPOpts structure and also only pass the new mp_vo_opts structure to the vo backend. Move video_driver_list into mp_vo_opts
* Fix missing ctype.h includeswm42013-03-042-0/+2
| | | | | libavutil/common.h stopped including ctype.h, and some source files were relying on recursive inclusion of this header.
* cocoa_common: fix crashStefano Pigozzi2013-03-041-1/+5
|
* cocoa_common: fix compilationStefano Pigozzi2013-03-041-7/+7
| | | | 7686cd7f broke some stuff
* Remove vo_fps global variablewm42013-03-046-9/+22
| | | | | This is needed by the encode stuff for some reason, so we have to explicitly pass it. Functionality shouldn't change.
* manpage: fix --no-dts typowm42013-03-041-1/+1
|
* Add a --dtshd optionWessel Dankers2013-03-044-13/+31
| | | | | | | | | | The spdif decoder was hardcoded to assume that the spdif output is capable of accepting high (>1.5Mbps) bitrates. While this is true for modern HDMI spdif