aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* ao_lavc: remove audio offset hack to ease supporting planar audio.Gravatar Rudolf Polzer2013-11-11
| | | | | | | | Now to shift audio pts when outputting to e.g. avi, you need an explicit facility to insert/remove initial samples, to avoid initial regions of the video to be sped up/slowed down. One such facility is the delay filter in libavfilter.
* vo_lavc: fix -ovoffset.Gravatar Rudolf Polzer2013-11-11
| | | | Previously, using it led to no single frame being output, ever.
* ao: add ao_play_silence, use for ao_alsa and ao_ossGravatar wm42013-11-10
| | | | | Also add a corresponding function to audio/format.c, which fills an audio block with silence.
* af: don't skip filtering if there's no more audioGravatar wm42013-11-10
| | | | | | | | | | | | | | My main problem with this is that the output format will be incorrect. (This doesn't matter right, because there are no samples output.) This assumes all audio filters can deal with len==0 passed in for filtering (though I wouldn't see why not). A filter can still signal an error by returning NULL. af_lavrresample has to be fixed, since resampling 0 samples makes libavresample fail and return a negative error code. (Even though it's not documented to return an error code!)
* vo_opengl: fix alpha values written to the framebufferGravatar wm42013-11-10
| | | | | | | | | | | | | | | | | | | | | | | When blending OSD and subtitles onto the video, we write bogus alpha values. This doesn't normally matter, because these values are normally unused and discarded. But at least on Wayland, the alpha values are used by the compositor and leads to transparent windows even with opaque video on places where the OSD happens to use transparency. (Also see github issue #338.) Until now, the alpha basically contained garbage. The source factor GL_SRC_ALPHA meant that alpha was multiplied with itself. Use GL_ONE instead (which is why we have to use glBlendFuncSeparate()). This should give correct results, even with video that has alpha. (Or at least it's something close to correct, I haven't thought too hard how the compositor will blend it, and in fact I couldn't manage to test it.) If glBlendFuncSeparate() is not available, fall back to glBlendFunc(), which does the same as the code did before this commit. Technically, we support GL 1.1, but glBlendFuncSeparate is 1.4, and I guess we should try not to crash if vo_opengl_old runs on a system with GL 1.1 drivers only.
* ad_spdif: change API usage so that it works on LibavGravatar wm42013-11-10
| | | | | | | | | | | Apparently we were using FFmpeg-specific APIs. I have no idea whether this code is correct on both FFmpeg and Libav (no examples, bad doxygen... why do they even complaint aht people are using their APIs incorrectly?), but it appears to work on FFmpeg. That was also the case before commit ebc4ccb though, where it used internal libavformat symbols. Untested on Libav, Travis will tell us.
* player: set PulseAudio stream title to window titleGravatar wm42013-11-10
| | | | | | | Set the PulseAudio stream title, just like the VO window title is set. Refactor update_vo_window_title() so that we can use it for AOs too. The ao_pulse.c bit is stolen from MPlayer.
* gl_hwdec_vdpau: silence warning caused by buggy GL_NV_vdpau_interop specGravatar wm42013-11-09
| | | | | VDPAU handles are integers, but for some reasons the VDPAU GL extension expects them as void*.
* af_volume: use only one volume setting for all channelsGravatar wm42013-11-09
| | | | | | | | In theory, af_volume could use separate volume levels for each channel. But this was never used anywhere. MPlayer implemented something similar before (svn r36498), but kept the old path for some reason.
* ao_alsa: use correct magic spdif flagsGravatar wm42013-11-09
| | | | | I accidentally copied the AES4/ORIGFS constants from the ALSA headers, instead of the AES3/FS ones. The difference is probably important.
* Remove sh_audio->samplesizeGravatar wm42013-11-09
| | | | | | | | | This member was redundant. sh_audio->sample_format indicates the sample size already. The TV code is a bit strange: the redundant sample size was part of the internal TV interface. Assume it's really redundant and not something else. The PCM decoder ignores the sample size anyway.
* af_scaletempo: uncrustifyGravatar wm42013-11-09
| | | | | | | | | Also do some cosmetic changes, like merging definition and initialization of local variables. Remove an annoying debug mp_msg() from af_open(). It just printed the command line parameters; if this is really needed, it could be added to af.c instead (similar as to what vf.c does).
* af_lavrresample: reconfigure libavresample only on successful initGravatar wm42013-11-09
| | | | | If filter initialization fails anyway, we don't need to reconfigure libavresample.
* af_lavrresample: move libavresample setup to separate functionGravatar wm42013-11-09
| | | | | | | Helps with readability. Also remove the ctx_opt_set_* helper macros and use av_opt_set_* directly (I think these macros were used because the lines ended up too long, but this commit removes two indentation levels, giving more space).
* af_convert24: fix complicated and incorrect format negotiationGravatar wm42013-11-09
| | | | | The conversion works for native endian only. The correct check lists supported format combination explicitly, but is also much simpler.
* af_surround: fix format negotiationGravatar wm42013-11-09
| | | | This did strange things; perhaps caused by the channel layout changes.
* af: allow filters to return AF_OK, even if format doesn't matchGravatar wm42013-11-09
| | | | | | | This should allow to make format negotiation much simpler, since it takes the responsibility to compare actual input and accepted input formats from the filters. It's also backwards compatible. Filters which have expensive initialization still can use the old method.
* ao: print requested audio format on initGravatar wm42013-11-09
| | | | Also remove the rather bad/incomplete log calls from ao_alsa and ao_oss.
* ao_alsa: add magic spdif parametersGravatar wm42013-11-09
| | | | | | | | | | | | | | I have no idea what these do, but apparently they are needed to inform ALSA about spdif configuration. First, replace the literal constant "6" for the AES0 parameter with the symbolic constants from the ALSA headers (the final value is the same). Second, copy paste some funky looking parameter setup from VLC's alsa output for setting the AES1, AES2, AES3 parameters. (The code is actually not literally copy-pasted, but does exactly the same.) My small but non-zero hope is that this could make DTS-HD work, or at least work into that direction. I can't test spdif stuff though, and for DTS-HD not even opening the ALSA device succeeds on my system.
* ao_alsa: redo the way parameters are added in the spdif caseGravatar wm42013-11-09
| | | | | | | | | | | Using spdif with alsa requires adding magic parameters to the device name, and the existing code tried to deal with the situation when the user wanted to add parameters too. Rewrite this code, in particular remove the duplicated parameter string as preparation for the next commit. The new code is a bit stricter, e.g. it doesn't skip spaces before and after '{' and '}'. (Just don't add spaces.)
* ad_spdif: fix libavformat API usageGravatar wm42013-11-09
| | | | | | | This accessed tons of private libavformat symbols all over the place. Don't do this and convert all code to proper public APIs. As a consequence, the code becomes shorter and cleaner (many things the code tried are done by libavformat APIs).
* af: always remove auto-inserted filters, improve error messageGravatar wm42013-11-09
| | | | | | | | | | It's probably better if all auto-inserted filters are removed when doing an af_add operation. If they're really needed, they will be automatically re-added. Fix the error message. It used to be for an actual internal error, but now it happens when format negotiation fails, e.g. when trying to use spdif and real audio filters.
* vdpau: unbreakGravatar wm42013-11-09
| | | | Obviously I didn't test commit 1b8cd01, and it just crashed. Oops.
* travis: remove e-mail notificationsGravatar Stefano Pigozzi2013-11-08
| | | | | Lately Travis sends out many notifications that are false positives caused by timeout. We are annoyed.
* player: factor audio buffer clearing codeGravatar wm42013-11-08
| | | | | | | Note that the change in seek_reset is not entirely equivalent: we even drop the remainder of buffered audio when seeking. This should be more correct, because the whole point of the reset_ao parameter is to control whether audio queued for output should be dropped or not.
* audio: don't let ao_lavc access frontend internals, change gapless audioGravatar wm42013-11-08
| | | | | | | | | | | | | | | | | | | | | | | ao_lavc.c accesses ao->buffer, which I consider internal. The access was done in ao_lavc.c/uninit(), which tried to get the left-over audio in order to write the last (possibly partial) audio frame. The play() function didn't accept partial frames, because the AOPLAY_FINAL_CHUNK flag was not correctly set, and handling it otherwise would require an internal FIFO. Fix this by making sure that with gapless audio (used with encoding), the AOPLAY_FINAL_CHUNK is set only once, instead when each file ends. Basically, move the hack in ao_lavc's uninit to uninit_player. One thing can not be entirely correctly handled: if gapless audio is active, we don't know really whether the AO is closed because the file ended playing (i.e. we want to send the buffered remainder of the audio to the AO), or whether the user is quitting the player. (The stop_play flag is overwritten, fixing that is perhaps not worth it.) Handle this by adding additional code to drain the AO and the buffers when playback is quit (see play_current_file() change). Test case: mpv avdevice://lavfi:sine=441 avdevice://lavfi:sine=441 -length 0.2267 -gapless-audio
* audio: stop "unsupported sample format" spamGravatar wm42013-11-07
| | | | | | | It spams these in verbose mode. It's caused by format negotiation code in af.c. It's for the mpv format to ffmpeg-format case, and that one is very uninteresting. (The ffmpeg supported audio formats are practically never extended.)
* audio: fix bogus audio format comparisonGravatar wm42013-11-07
|
* vdpau: drop dummy render functionGravatar wm42013-11-07
| | | | | | | | | This was supposed to handle preemption better. I still think the current state isn't very nice, since the decoder can "accidentally" call the previous render function after preemption (instead of calling the reloaded function), so there might be issues. But all in all, this dummy_render function is a bit confusing, and still not entirely correct, so it's not worth it.
* af: remove a pointless macroGravatar wm42013-11-07
| | | | | The code should be equivalent; a compatibility macro definition is left. (It should be mass-replaced later.)
* audio/format: convert format macros to enum, drop NE suffixGravatar wm42013-11-07
| | | | | | | | | | Turn the sample format definitions into an enum. (The format bits are still macros.) The native endian versions of the new definitions don't have a NE suffix anymore, although there are still compatibility defines since too much code uses the NE variants. Rename the format bits for special formats to help to distinguish them from the actual definitions, e.g. AF_FORMAT_AC3 to AF_FORMAT_S_AC3.
* audio: replace af_fmt2str_short -> af_fmt_to_strGravatar wm42013-11-07
| | | | Also, remove all af_fmt2str usages.
* audio/format: reformatGravatar wm42013-11-07
|
* encoding-example-profiles: support setsar in FFmpeg-gitGravatar Rudolf Polzer2013-11-07
|
* sd_lavc, sd_spu: make dvdsub stretching conditional on --stretch-dvd-subs.Gravatar Rudolf Polzer2013-11-07
| | | | | | | | | | | | We found that the stretching - although it usually improves the looks of the fonts - is incorrect. On DVD, subtitles can cover the full area of the picture, and they have the same pixel aspect as the movie itself. Too bad many commercially released DVDs use bitmap fonts made with the wrong pixel aspect (i.e. assuming 1:1) - --stretch-dvd-subs will make these more pretty then.
* sd_ass, sd_lavc: use the input video's pixel aspect for scaling subtitles.Gravatar Rudolf Polzer2013-11-07
| | | | | | | The previous code used the output video's pixel aspect for stretching purposes, breaking rendering with e.g. -vf scale in the chain. Now subtitles are stretched using the input video's pixel aspect only, matching the intentions of the original subtitle author.
* ao_oss: fix previous ao_oss commitGravatar wm42013-11-06
| | | | | Basically I introduced an inverted condition, and the line removed was inactive before commit ce72aaa.
* travis: use clang for ffmpeg/libav compilationGravatar Stefano Pigozzi2013-11-06
| | | | | | | | I overlooked the fact that the ffmpeg/libav build system only supports `--cc` and completly ignores $CC. Hopefully this makes the build times a little faster. Fixes #332
* ao_oss: hide warningGravatar wm42013-11-06
|
* ao_oss: don't enable -softvol by default on OSSv4Gravatar bugmen0t2013-11-06
|
* ao_oss: make no_persistent_volume volume work when seekingGravatar bugmen0t2013-11-06
|
* osdep: handle SIGTERMGravatar wm42013-11-06
| | | | | | There's no reason why we should e.g. handle SIGQUIT, but not SIGTERM. Note that sending SIGTERM twice still kills the player.
* input.conf: clarify the magic how default key bindings are addedGravatar wm42013-11-06
| | | | This is a confusing mechanism, so the explanation should bit more clear.
* memcpy_pic: reformatGravatar wm42013-11-06
| | | | | Besides cosmetic changes, also change memcpy_pic return type and remove config.h include.
* vd_lavc: remove explicit crystalhd supportGravatar wm42013-11-06
| | | | | | | | | | | | | | | | This removes "--hwdec=crystalhd". I doubt anyone even tried to use this. But even if someone wants to use it, the decoders can still be explicitly invoked with e.g.: --vd=lavc:h264_crystalhd The only advantage our special code provided was fallback to software decoding. (But I'm not sure how the ffmpeg crystalhd pseudo-decoder actually behaves.) Removing this will allow some simplifications as soon as we don't need vdpau_old.c anymore.
* input: remove unused key_down_event commandGravatar wm42013-11-06
| | | | | There's no real use-case for this, and is wasn't documented (didn't even appear on the "undocumented commands" list).
* input: disallow autorepeat by default for most commandsGravatar wm42013-11-06
| | | | | | | | | | This drops autorepeated key events for a number of commands. This should help with slow situations accidentally triggering too many repeats. (I'm not sure if this actually happened to users - maybe.) It's not clear whether MP_CMD_COMMAND_LIST (multiple commands on one binding separated by ';') should be repeated, or whether it should try to do something clever. For now, disallow autorepeat with it.
* gl_header_fixes: fix inverted conditionGravatar wm42013-11-05
| | | | | Could possibly leading to failing compilation on systems with headers that miss the vdpau extension.
* vo_opengl: support for vdpau hardware decodingGravatar wm42013-11-05
| | | | | | | | | | | | This uses vdpau OpenGL interop to convert a vdpau surface to a texture. Note that this is a bit weak and primitive. Deinterlacing (or any other form of vdpau postprocessing) is not supported. vo_opengl chroma scaling and chroma sample position are not supported. Internally, the vdpau video surfaces are converted to a RGBA surface first, because using the video surfaces directly is too complicated. (These surfaces are always split into separate fields, and the vo_opengl core expects progressive frames or frames with weaved fields.)
* vdpau: move device and video surface management from vo_vdpau.c to vdpau.cGravatar wm42013-11-05
| | | | | The goal is being able to use vdpau decoding independently from vo_vdpau.c.