summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* packet: cosmetics: reorder fieldswm42016-02-151-4/+8
|
* audio/video: expose codec info as separate fieldwm42016-02-158-14/+16
| | | | | Preparation for the timeline rewrite. The codec will be able to change, the stream header not.
* video: remove pointless parameter indirectionwm42016-02-153-4/+6
| | | | This is always the same value.
* sub: move sub decoder init to a functionwm42016-02-151-30/+44
| | | | Preparation for timeline rewrite.
* cocoa: fix charcode retrieving for accented charactersAlexis Nootens2016-02-151-1/+2
| | | | | The handler was retrieving an invalid charcode for accented characters, thus ignoring them.
* player: add on_preloaded hookwm42016-02-152-0/+27
| | | | (Limited usefulness.)
* player: restore old/correct --force-window behaviorwm42016-02-151-0/+3
| | | | | | | | | When playback of a video ends, and the next file has no video at all (no cover art or anything), then the window must be cleared. This also resizes the window forcibly, which is by design. Fixes #2825.
* vo_opengl_cb: unbreak destroying+recreating GL contextwm42016-02-151-2/+2
| | | | | | A client API user is allowed to call mpv_opengl_cb_uninit_gl() followed by mpv_opengl_cb_init_gl(). This crashed; fix it by fixing the lifetime of ctx->gl.
* dxva2: support HEVC Main 10wm42016-02-151-8/+35
|
* dxva2: use mp_image pool for d3d surfacesKevin Mitchell2016-02-144-131/+222
| | | | | | | | | | | | | This is required so that the individual surfaces can pass beyond the dxva2 decoder and be passed to the vo. This also adds additional data to mp_image->planes[0] for IMGFMT_DXVA2, which is required for maintaining and releasing the surface even if the decoder code is uninited. The IDirectXVideoDecoder itself is encapsulated together with its surface pool and configuration in a dxva2_decoder structure whose creation and destruction is managed by talloc.
* dxva2: remove unused structure membersKevin Mitchell2016-02-141-5/+1
|
* dxva2: streamline number of surface calculationKevin Mitchell2016-02-141-9/+2
| | | | | use hwdec_get_max_refs and put the "4 base work surfaces" into ADDITIONAL_SURFACES macro.
* client API: explain when mpv_create() can return NULLwm42016-02-141-1/+4
|
* demux_mkv: support channel layout in VfW muxed PCMwm42016-02-141-1/+7
| | | | Fixes #2820.
* mpv.conf: add some more optionswm42016-02-131-0/+8
| | | | | Seems like questions related to functionality covered by them are quite often asked.
* client API: handle double->int64 conversion correctlywm42016-02-131-1/+3
| | | | It signalled failure instead.
* manpage: normal filters are still active with complex filterswm42016-02-121-0/+3
| | | | It's not exactly obvious how they interact.
* lavfi: dump the filter graphwm42016-02-121-0/+13
| | | | | | | | Especially useful to see what video formats are involved on the various filter links. I suspect this function is not available on Libav, so add necessary ifdeffery preemptively.
* ipc: fix uninitialized fieldwm42016-02-121-1/+1
| | | | | | | The sockaddr_un.sun_len field was not initialized. It seems our API use is correct by simply making sure it's 0. Fixes CID 1350075.
* player: remove dead codewm42016-02-122-2/+2
| | | | Fixes CID 1350055 and CID 1350054.
* mp_image: force display size to at least 1x1wm42016-02-121-2/+2
| | | | | | | | Don't allow rounding to let it underflow to 0. 0 width or height is simply not allowed and could cause problems otherwhere. Indirectly fixes CID 1350057, which complains about not checking the resulting output size values before using it in divisions.
* player: remove double assignment in declarationwm42016-02-121-1/+1
| | | | | | Fixes CID 1350058. (Still looks like this might be valid C, in some fucked up way.)
* sub: remove always-true checkwm42016-02-121-1/+1
| | | | | | | Confuses Coverity with FORWARD_NULL on the mp_err() at the end of the function. These pointers are never NULL. Fixes CID 1350059.
* vo_opengl: unconfuse Coveritywm42016-02-121-1/+1
| | | | | | | | | It thinks that integer_conv_fbo[index] is implied to be accessed with up to index=5. Although that is theoretical only, it has a point that this makes no sense. Use the same constant for the array allocation, to make it more uniform and robust. Fixes CID 1350060.
* stream_dvb: fix minor resource leakswm42016-02-121-0/+3
| | | | | | Fixes CID 1350062 and 1350061. Just for the sake of shutting up Coverity.
* stream_dvb: remove dead codewm42016-02-121-5/+0
| | | | Fixes CID 1350063.
* ad_lavc: fix --ad-lavc-threads rangewm42016-02-111-1/+1
| | | | | | | The code is shared with the --vd-lavc-threads option, so using 0 for auto-detection just works. But no, this is not useful. Just change it for orthogonality.
* build: enable vaapi under drm-onlywm42016-02-111-1/+1
| | | | Fixes #2808.
* demux: reduce verbositywm42016-02-111-2/+3
| | | | Tired of seeing all these useless pseudo-demuxers in the log.
* video: approximate AVI timestamps via DTS handlingwm42016-02-114-54/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now (and in mplayer traditionally), avi timestamps were handled with a timestamp FIFO. AVI timestamps are essentially just strictly increasing frame numbers and are not reordered like normal timestamps. Limiting the FIFO is required because frames can be dropped. To make it worse, frame dropping can't be distinguished from the decoder not returning output due to increasing the buffering required for B-frames. ("Measuring" the buffering at playback start seems like an interesting idea, but won't work as the buffering could be increased mid-playback.) Another problem are skipped frames (packets with data, but which do not contain a video frame). Besides dropped and skipped frames, there is the problem that we can't always know the delay. External decoders like MMAL are not going to tell us. (And later perhaps others, like direct VideoToolbox usage.) In general, this works not-well enough that I prefer the solution of passing through AVI timestamps as DTS. This is slightly incorrect, because most decoders treat DTS as mpeg-style timestamps, which already include a b-frame delay, and thus will be shifted by a few frames. This means there will be a problem with A/V sync in some situations. Note that the FFmpeg AVI demuxer shifts timestamps by an additional amount (which increases after the first seek!?!?), which makes the situation worse. It works well with VfW-muxed Matroska files, though. On RPI, the first X timestamps are broken until the MMAL decoder "locks on".
* manpage: fix indenting issue in vf_formatNiklas Haas2016-02-111-21/+21
|
* player: abort loading if there is a problem with complex filterswm42016-02-101-5/+11
|
* lavfi: stop playback on some unrecoverable situationswm42016-02-101-1/+3
| | | | Also improve the error message for the missing label case.
* wscript_build: disable SONAME generation when building for AndroidJan Ekström2016-02-101-11/+18
| | | | | Android is well-known for not supporting SONAME'd libraries. All libraries imported into an APK have to end with '.so'.
* Enable building the opengl-cb video renderer on AndroidJan Ekström2016-02-103-3/+44
| | | | | | * Add Android-specific OpenGL ES feature and checks * Add missing GL_* symbols for Android (list gathered by Ilya Zhuravlev <whatever@xyz.is>)
* Initial Android supportJan Ekström2016-02-108-0/+110
| | | | | * Adds an 'android' feature, which is automatically detected. * Android has a broken strnlen, so a wrapper is added from FreeBSD.
* demux_mf: only use glob() if it is availableJan Ekström2016-02-101-0/+2
| | | | | The only other place where glob() is used is windows-specific and for windows mpv includes its own glob wrapper.
* player: assume setlocale() returns NULL if locales are not supportedwm42016-02-101-1/+1
| | | | | | | | It would make somewhat sense for libcs which don't implement locales at all, such as Bionic. Beyond that, setlocale() is specified that it can return NULL, and we shouldn't crash if that happens.
* player: fix crash if no video decoder can be initializedwm42016-02-102-0/+3
| | | | Caused by the recent refactoring for complex filters.
* player: force refresh seek when changing audio filterswm42016-02-093-4/+18
| | | | | | | | | | | | | Unfortunately I see no better solution. The refresh seek is skipped if the amount of buffered audio is not overly huge. Unfortunately softvol af_volume insertion still can cause this issue, because it's outside of the normal dynamic filter chain changing code. Move the video refresh call to reinit_video_filters() to make it more uniform along with the audio code.
* vo_opengl_cb: do also not block when drawing nothingwm42016-02-091-1/+1
| | | | | | | The ctx->redrawing field signals whether flip_page() should block. Do not block if a black frame (i.e. nothing) is to be rendered. Also, frame==NULL can never happen.
* image_writer: take care of prediction_method deprecationwm42016-02-091-1/+3
| | | | | | | The field was recently deprecated, and you're supposed to set the private codec option instead. Not sure if this really works as intended.
* manpage: add example for playing 2 audio tracks at the same timewm42016-02-081-0/+2
|
* player: add --external-file optionwm42016-02-084-14/+19
| | | | Mostly intended for use with --lavfi-complex.
* build: enable vo_opengl_cb if GL headers are presentwm42016-02-081-1/+10
| | | | | | | | | | | | To be more specific, enable vo_opengl and vo_opengl_cb, if libmpv is compiled, and the GL headers happen to be in the default search paths. Although platform specific code can be useful for libmpv (for window embedding, and even with vo_opengl_cb for certain forms of hardware decoding), it's not a requirement to use the opengl_cb API. Enabling vo_opengl is not useful here, but the rest of the build system doesn't distinguish vo_opengl and vo_opengl_cb, and I see no reason to.
* build: make posix_spawn optionalwm42016-02-082-1/+12
| | | | OK, Android doesn't support it.
* mpv.conf: adjustmentswm42016-02-081-23/+32
| | | | | In particular, get rid of the "vdpau" example profile, as it's pretty useless and misleading.
* vo_opengl: vdpau: call glVDPAUFiniNV only if initializedwm42016-02-081-6/+8
| | | | This is "more correct". See #2798.
* wscript: mark subprocess as requiredwm42016-02-071-0/+1
| | | | | | | We either need to be on Windows, or have posix_spawn available. If someone can come up with a system that is POSIX, but does not provide posix_spawn, we could make it optional.
* wayland: set fs mode on every configureAlexander Preisinger2016-02-071-5/+6
| | | | | Check and set the fullscreen mode on every surface configure event. This prevents gnome from resizing mpvs fullscreen window to a smaller size.
* video/decode/dxva2.c: GUID_NULL conflictskwkam2016-02-061-1/+1
| | | | | | | GUID_NULL is defined in <ks.h> gcc 6.0 refuses to link the executable because of that Signed-off-by: wm4 <wm4@nowhere>
* common/common.c: handle utf16 in mp_parse_escapekwkam2016-02-061-1/+12
| | | | Signed-off-by: wm4 <wm4@nowhere>
* lavfi: fix EOF casewm42016-02-061-3/+4
| | | | | | | | | | | | This was dumb. Could make it burn 100% CPU and not exit at the end. (Because it would retry as instructed, instead of terminating playback.) It also needs to consider EOF as waiting for input. lavfi_process() will decide if it's really EOF, or if further input might come in the future. Without this, it'd would think that it does not need to wait for input, i.e. that new input will be available immediately. (Not so fond of the duplication of subtle logic.)
* audio: fix EOF handling if nothing could be decoded at allwm42016-02-061-0/+4
| | | | The code for decoding the initial frame has to handle this explicitly.
* vd_lavc: fix use after free in some hwdecsKevin Mitchell2016-02-061-8/+3
| | | | | | | | | | | | | | fd339e3f53996efd2dae9525990da433d1e1bf89 introduced a regression that caused segfault while uniniting dxva2 decoder (and possibly vdpau too). The problem was that it freed the avctx earlier, before calling the backend-specific uninit which referenced it. Revert some of the changes of that commit, and avoid calling flush by checking whether the codec is open instead. (Based on a PR by Kevin Mitchell.) Signed-off-by: wm4 <wm4@nowhere>
* audio: minor simplificationwm42016-02-051-3/+0
| | | | | These fields are already deallocated by uninit_decoder(). Also remove the wrong/useless log message.
* player: remove some further current_track dependencieswm42016-02-052-9/+7
| | | | Now it's used for initialization only for audio and video.
* lavfi: fix build on Libavwm42016-02-051-0/+2
| | | | | | It doesn't provide this function. The code is not really designed to work without it, so it will probably mess up big time, but at least make it compile again.
* player: add complex filter graph supportwm42016-02-0511-53/+1121
| | | | | | | | | | | | | | | | See --lavfi-complex option. This is still quite rough. There's no support for dynamic configuration of any kind. There are probably corner cases where playback might freeze or burn 100% CPU (due to dataflow problems when interaction with libavfilter). Future possible plans might include: - freely switch tracks by providing some sort of default track graph label - automatically enabling audio visualization - automatically mix audio or stack video when multiple tracks are selected at once (similar to how multiple sub tracks can be selected)
* build: make libavfilter mandatorywm42016-02-055-22/+12
| | | | | | The complex filter support that will be added makes much more complex use of libavfilter, and I'm not going to bother with adding hacks to keep libavfilter optional.
* player: move audio and video decoder init to separate functionswm42016-02-053-33/+74
| | | | Preparation.
* player: simplify error_on_track()wm42016-02-051-15/+13
| | | | | | track can't be NLUL at this point, so the if is redundant. Remove it and unindent the block. Also, make the function check whether the track is selected at all, which makes it safer and idempotent.
* options: set fs=yes by default on RPI, and change RPI defaults handlingwm42016-02-052-4/+5
| | | | | The main reason for changing the fullscreen default is that not doing it would change the vo_rpi default behavior with the previous commit.
* vo_rpi: add geometry handlingUros Vampl2016-02-051-10/+59
| | | | | | This makes it possible to set video size and position using the --geometry and/or --autofit options. It's also possible to switch between fullscreen/non-fullscreen playback during runtime.
* vd_lavc: avoid calling flush on an unopened AVCodecContextwm42016-02-051-6/+9
| | | | | | | It can be "dangerous". In particular, the decoder might have failed to initialize, and is now in a broken state. avcodec_flush_buffers() is not expected to be called in this state, and could trigger undefined behavior.
* input: ignore --input-cursor for events injected by input commandswm42016-02-044-13/+35
| | | | | | Apparently useful for window embedding. Fixes #2750.
* sub: implement "sub-seek 0"wm42016-02-042-6/+13
| | | | | | | For bitmap subs, implement it properly. For libass, you need newest git master. Fixes #2791.
* video: remove AVI timestamps for dropped frameswm42016-02-041-1/+5
| | | | | Might possible improve A/V sync, although this is at best approximate. (AVI is just fucked.)
* ao_coreaudio: fix 7.1(rear) channel mappingwm42016-02-041-0/+27
| | | | | | | | | | | | | | I can't explain this, but it seems to be a similar case to the ALSA HDMI one. I find it hard to tell because of the slightly different names and conventions in use in libavcodec, WAVEEXT channel masks, decoders, codec specifications, HDMI, and platform audio APIs. The fix is the same as the one for ao_alsa (see commit be49da72). This should fix at least playing 7.1 sources on OSX with 7.1(rear) selected in Audio MIDI Setup. The ao_alsa commit mentions XBMC, but I couldn't find out where it does that or if it also does that for CoreAudio. It's woth noting that PHT (essentially an old XBMC fork) also exhibited the incorrect behavior (i.e. side and back speakers were swapped).
* af_lavrresample: change fudged channelswm42016-02-041-2/+2
| | | | | | | | | | | | | Remove flc-frc <-> sl<->sr. This was just plain wrong, and a mistaken change to make 7.1 work properly on CoreAudio with 7.1(rear) layout. Also see the following commit. Add br-br <-> sl<->sr, because we decided that it makes sense. Note that this "fudging" is applied only if the channel pairs are replaced, i.e. they would get dropped and be replaced with silence. This is done to compensate for libswresample's default rematrixing (which takes care of some more common cases).
* vd_lavc: remove redundant best_csp fieldwm42016-02-032-15/+3
| | | | And some other simplifications.
* vd_lavc: force microsecond timestamps on RPIwm42016-02-032-3/+9
| | | | | | | | | | Avoids "problems". In particular, it makes MMAL output a NOPTS timestamp if the input timestamp was NOPTS. Don't do it for other decoders. Ideally, we will at some point in the future switch to integer fractions for timestamps at least up until the filter layer. But this would be a larger change, and for now I'd prefer keeping the not-rounded demuxer timestamps (if we have them).
* command: fix track cycling logicwm42016-02-031-9/+4
| | | | | | Also remove the