summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* vo_opengl: output slightly more debugging info on backend probingwm42015-05-301-0/+2
|
* vo: move up vo_wayland in autoprobe listwm42015-05-301-3/+3
| | | | | When running on Wayland, and vo_opengl is not available or rejected for some reason, it's better to use vo_wayland instead of e.g. vo_x11.
* vf_vavpp: fix bob deinterlacing for bottom field first videosFilip Milivojevic2015-05-301-0/+2
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vf_vavpp: do not pretend to support referenceswm42015-05-291-3/+5
| | | | | | | | | | | | | | | We do not fill them, so we would pass random IDs to the driver. The code was originally written to handle bob deinterlacing only, so I guess it originally passed always 0 anyway, despite having code for reference surface list allocation. Also, move down the vaUnmapBuffer() call. This call actually "unmaps" the param pointer, so accessing it after the unmap call would be undefined behavior. The "example" in <va/vavpp.h> does this too, but it's most likely an error. (Additionally, not even bob deinterlacing worked correctly in my test, sigh.)
* vf_vavpp: simplify surface list allocationwm42015-05-291-14/+2
|
* player: restore video-aspect on playback resumewm42015-05-291-0/+1
|
* cache: limit readahead size to half the cache size at the beginningwm42015-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | Normally, the cache keeps 50% of the buffer for seeking backwards. Until now, the cache just used the full buffer size at the beginning of a file, because the 50% normally reserved for the backbuffer are unused. This caused a problem: when streaming from http, the player would first read about 150MB (default cache size), then stop until 75MB of the cache has been played. (Until the 75MB position, the cache is fully used, so nothing new can be read. After that, part of the backbuffer starts getting unreserved, and can be used for readahead.) This long read pause can cause the server to terminate the connection. Reconnecting may be possible, but if youtube-dl is used, the media URL may have become invalid. Fix this by limiting readahead to 50% even if unnecessary. The only exception is when the whole file would fit in the cache. In this case, it won't matter if we can't reconnect, because the cache covers everything anyway, and hopefully the cache will stay valid. Likely fixes #2000.
* vo_drm: fix not using BUF_COUNTMarcin Kurczewski2015-05-291-5/+4
|
* vo_drm: fix centering with regard to strideMarcin Kurczewski2015-05-291-13/+16
|
* vaapi: remove direct mapping non-sensewm42015-05-291-42/+6
| | | | | | | | | | | | | | | | | | | | This must have been some non-sense in the original vaapi mplayer patch. While I still have no good idea what this "direct mapping" business is about, it appears to be pretty much pointless. Nothing can hold additional "real" surface references (due to how the API and mpv/lavc refcounting work), so removing the additional surfaces won't break anything. It still could be that this was for achieving additional buffering (not reusing surfaces as soon), but we buffer some additional data anyway. Plus, the original intention of the vaapi mplayer code was probably increasing surface count just by 1 or 2, not actually doubling it, and/or it was a "trick" to get to the maximum count of 21 when h264 is in use. gstreamer-vaapi uses "ref_frames + SCRATCH_SURFACES_COUNT" here, with SCRATCH_SURFACES_COUNT defined to 4. It doesn't appear to check the overlay attributes at all in the decoder. In any case, remove this non-sense.
* lua: fix options submodulewm42015-05-293-3/+8
| | | | | | | | | It polluted the global namespace, instead of exporting the function properly. For now, keep it compatible by explicitly keeping the bogus export. Also fix a mistake in the manpage example.
* vd_lavc: fix a hw decoding fallback casewm42015-05-291-1/+6
| | | | | | | On hw decoder reinit failure we did not actually always return a sw format, because the first format (fmt[0]) is not always a sw format. This broke some cases of fallback. We must go through the trouble to determine the first actual sw format.
* vdpau: do not attempt to allocate surfaces while preemptedwm42015-05-291-10/+17
| | | | | | | | This reduces spam while preempted a bit. The remaining message, "hardware accelerator failed to decode picture" on every frame, can not be prevented because it's hardcoded in libavcodec.
* vo_opengl: avoid broken shader if hwdec fails to provide textureswm42015-05-281-1/+4
| | | | | | | | | | If gl_hwdec_driver.map_image fails, all textures will be set to 0. This in turn makes pass_prepare_src_tex() skip generation of the texture uniforms, which leads to a shader compilation error, as e.g. texture0 is not defined but expected to exist and accessed. Set the textures to an invalid non-0 ID instead. OpenGL can deal with it.
* vdpau: add support for the "new" libavcodec vdpau APIwm42015-05-286-3/+131
| | | | | | | | | Yet another of these dozens of hwaccel changes. This time, libavcodec provides utility functions, which initialize the vdpau decoder and map codec profiles. So a lot of work the API user had to do falls away. This also will give us support for high bit depth profiles, and possibly HEVC once libavcodec supports it.
* video: rename vdpau.c to vdpau_old.cwm42015-05-283-2/+2
| | | | vdpau.c will be used for new code.
* vd_lavc: allocate hw surfaces using the coded sizewm42015-05-281-10/+9
| | | | | | ...instead of relying on the hw decoding API to align it for us. The old method could in theory have gone wrong if the video is cropped by an amount large enough to step over several blocks.
* vdpau: retrieve mixer parameters directly from the hw surfacewm42015-05-283-12/+23
| | | | | | | | | | | | Always configure the vdpau mixer based on the current surface sent to it. Before this, we just hardcoded the chroma type, and the surface size was essentially a guess. Calling VdpVideoSurfaceGetParameters() on every surface is a bit suspicious, but it appears it's a cheap function (just requiring some locks and a table lookup). This way we avoid creating another complicated mechanism to carry around the actual surface parameters with a mp_image/AVFrame.
* vd_lavc: merge two functionswm42015-05-281-27/+15
| | | | | | | There's not much of a reason to keep get_surface_hwdec() and get_buffer2_hwdec() separate. Actually, the way the mpi->AVFrame referencing is done makes this confusing. The separation is probably an artifact of the pre-libavcodec-refcounting compatibility glue.
* vd_lavc: make hardware decoding fallback less violentwm42015-05-282-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of hardware decoding is initialized lazily. When the first packet is parsed, libavcodec will call get_format() to check whether hw or sw decoding is wanted. Until now, we've returned AV_PIX_FMT_NONE from get_format() if hw decoder initialization failed. This caused the avcodec_decode_video2() call to fail, which in turn let us trigger the fallback. We didn't return a sw format from get_format(), because we didn't want to continue decoding at all. (The reason being that full reinitialization is more robust when continuing sw decoding.) This has some disadvantages. libavcodec vomited some unwanted error messages. Sometimes the failures are more severe, like it happened with HEVC. In this case, the error code path simply acted up in a way that was extremely inconvenient (and had to be fixed by myself). In general, libavcodec is not designed to fallback this way. Make it a bit less violent from the API usage point of view. Return a sw format if hw decoder initialization fails. In this case, we let get_buffer2() call avcodec_default_get_buffer2() as well. libavcodec is allowed to perform its own sw fallback. But once the decode function returns, we do the full reinitialization we wanted to do. The result is that the fallback is more robust, and doesn't trigger any decoder error codepaths or messages either. Change our own fallback message to a warning, since there are no other messages with error severity anymore.
* demux_lavf: do a better job at guessing the vobsub .sub filenamewm42015-05-281-0/+40
| | | | | | | | | | | Vobsubs come as .idx/.sub pair of files. The .idx file is the one that should be opened, but the name of the .sub file is unknown. We can now make our own guess what the name of that file is. In particular, improve support with URLs (as these can have the file extension in the middle of the filename string if there are HTTP parameters). Note that this works only with newer ffmpeg versions, because the recently added sub_name demuxer option is used for this.
* vo_drm: Expose mode ID option to usersMarcin Kurczewski2015-05-282-10/+23
|
* vo_drm: Fix resolution not restored after exitingMarcin Kurczewski2015-05-281-1/+1
|
* vo_drm: Fix stride problem for certain devicesMarcin Kurczewski2015-05-281-1/+1
|
* command: remove deprecated get_property commandwm42015-05-275-37/+2
| | | | | | This command has been deprecated in the 0.8.x and 0.9.x releases - get rid of it. Its only point ever was MPlayer compatibility, which broke years ago anyway.
* options: remove --slave-brokenwm42015-05-276-32/+4
| | | | It has been deprecated for ages.
* player: set cocoa input context at an earlier pointwm42015-05-271-4/+4
| | | | | There is not much of a reason to do this later. (Since some time ago, the input_ctx is created right at the start, so this can be done now.)
* player: load scripts at an earlier pointwm42015-05-271-4/+4
| | | | This is about as early as possible.
* vo_opengl: rename use_full_range to use_normalized_rangewm42015-05-271-8/+8
| | | | | As suggested by haasn. The term "full range" makes it sound like it has to do with TV vs. PC range, which is not the case at all.
* DOCS: fix wrong libmpv's cocoa example commentStefano Pigozzi2015-05-271-4/+2
| | | | | libmpv can be embedded in a cocoa view (without the mpv window). This has been the case for serveral months, and the comment is just wrong now.
* vo_opengl: fix source-shader + XYZ inputNiklas Haas2015-05-271-2/+5
|
* DOCS: interface-changes: mention recent vo_opengl additionswm42015-05-271-0/+2
|
* vo_opengl: CMS no longer implies linear scalingNiklas Haas2015-05-272-14/+7
| | | | | | | | | | | They're completely orthogonal concepts, merged in the past due to convenience and ease of implementing it in the old #ifdef hell renderer. Especially after the CMS stuff was generalized by 634b4a, this was a trivial change to implement and also means color management will be much higher quality when enabled with vo=opengl (which had quantization issues in the past due to the 8 bit FBO format and upscaling), since it can be done in a single pass now.
* vo_opengl: icc-profile overrides icc-profile-autoNiklas Haas2015-05-272-3/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: add support for custom shadersNiklas Haas2015-05-2710-55/+350
|
* osx: synchronize access to the input_ctxwm42015-05-261-18/+30
| | | | | | | | | | While all functions of input_ctx are inherently thread-safe, access to the _inputContext field itself is not. It could be unset any time by cocoa_set_input_context(). So even trivial input_ctx calls must be under a lock, so that the input_ctx can not be destroyed while the function call is "starting". (Even a function call in progress wouldn't be fine, because mp_input_uninit() requires the caller to "own" the object, i.e. no other threads can access it at this point.)
* osx: never expose input_ctx from EventsResponderwm42015-05-263-20/+33
| | | | Keep it internal, so we can synchronize access to it properly.
* input: remove some unneeded thingswm42015-05-262-34/+5
| | | | | Wakeup FDs are not needed anymore (this code exists only for libwaio usage by now), and 2 other functions can be made private.
* command: better choice when to allow playback-related commandswm42015-05-261-16/+16
| | | | | | | | For certain reasons, we allow adding external tracks even before the main file is loaded. This somewhat breaks in old assumption, which uses mpctx->num_sources to determine whether a command can be applied in the current state. Use the newer playback_initialized instead, which is a much better choice for this purpose.
* command: fix track property when no file is loadedwm42015-05-261-2/+8
| | | | | | | | | | | The previous commit removed this. Although mp_switch_track() can now be called in all situations, we still don't want it to be called here. Setting a track property while no file is loaded would simply deselect the track instead of setting the underlying option to the requested value. Likewise, if the "cycle" command (M_PROPERTY_SWITCH) is used, don't just deselect the track.
* player: fix crashes when adding external tracks before loading main filewm42015-05-264-40/+30
| | | | | | | | | | | | | | | | Adding an external audio track before loading the main file didn't work right. For one, mp_switch_track() assumes it is called after the main file is loaded. (The difference is that decoders are only initialized once the main file is loaded, and we avoid doing this before that for whatever reason.) To avoid further messiness, just allow mp_switch_track() to be called at any time. Also make it do what mp_mark_user_track_selection() did, since the latter requires current_track to be set. (One could probably simply allow current_track to be set at this point, but it'd interfere with default track selection anyway and thus would be pointless.) Fixes #1984.
* demux: don't get stuck on some cases of timestamp resetswm42015-05-261-1/+2
| | | | | In this case, streaming ogg via mpd over icecast made it buffer infinitely on new tracks.
* ao_alsa: hack back mono outputwm42015-05-251-1/+6
| | | | | The ALSA API is inconsistent and doesn't report support. Just requesting 1 channel actually works. Whatever.
* TOOLS/lua/status-bar: update use of a deprecated propertywm42015-05-251-1/+3
| | | | | Also mention that this code does not reflect the status line of current mpv.
* input: allow - as separator between commands, instead of _wm42015-05-256-119/+127
| | | | | | | | | | Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion.
* command: change the hwdec propertieswm42015-05-253-49/+71
| | | | | | Another very minor step towards property/option unification. Not bothering with interface compatibility here.
* vd_lavc: report actually used hwdec APIwm42015-05-252-4/+1
| | | | | Instead of the requested one, which can be just "auto", and which is rather useless.
* vf_dlopen: declare as deprecatedwm42015-05-252-0/+6
| | | | | Mostly to see whether someone uses it, and if a better solution can be worked out. (It's simple enough to be supported forever.)
* cocoa: don't load hardcoded icon if running from bundleStefano Pigozzi2015-05-251-0/+3
| | | Makes ricers happy.
* demux_edl: fix includeswm42015-05-241-2/+2
| | | | It doesn't need access to the playback core state anymore.
* video: do not use MP_NOPTS_VALUE for A/V differencewm42015-05-243-7/+3
| | | | | | There's no need for this, it just creates more corner cases. Also always reset it on seeks etc..
* player: add function to compute past frame durationswm42015-05-243-17/+28
| | | | | And use it for the estimated-vf-fps property (it should be doing the same as before).
* vo_null: add framerate emulationwm42015-05-242-4/+40
|
* manpage: --media-title -> --force-media-titlePhilip Sequeira2015-05-241-1/+1
| | | Missed in 450af053.
* DOCS/client_api_examples/cocoa-openglcb: do initial flush correctly.torque2015-05-231-11/+5
|
* command: add protocol-list propertywm42015-05-235-6/+45
| | | | Fixes #1972.
* ytdl: do not use deprecated optionwm42015-05-231-1/+1
| | | | This was missed in commit 450af053.
* vo_opengl: switch to new OpenGL backend API for icc-profile-autoNiklas Haas2015-05-221-1/+1
| | | | The current code just segfaults.
* command: allow changing track properties while no file is loadedwm42015-05-221-16/+20
| | | | | | | | | | Now it simply changes the options, i.e. what will be requested, instead of returning M_PROPERTY_UNAVAILABLE. This is another minor step towards unifying options and properties. Still a bit weird: it will always return "no" if no file is loaded, and disregards the option value.
* player: use an array for stream ID options and suchwm42015-05-226-67/+52
| | | | This makes the code slightly more generic.
* command: deprecate audio-sampleratewm42015-05-223-50/+4
| | | | | | | Also replace their implementation with the recently introduced properties. One significant difference is that audio-channels using OSD formatting does not print the channel layout. The user can just use the replacement property instead.
* command: add audio-params and audio-out-params propertieswm42015-05-223-1/+77
|
* command: remove old property deprecation warning mechanismwm42015-05-221-48/+1
| | | | | | | We don't need two. This mechanism was basically for MPlayer, and it has expired its usefulness by now.
* command: rename audio-format propertywm42015-05-223-7/+10
| | | | Clashes with the option.
* options: rename --media-title optionwm42015-05-223-2/+4
| | | | Conflicts with the property.
* command: deprecate the "length" propertywm42015-05-224-11/+15
| | | | It collides with the --length option.
* command: add a new property deprecation mechanismwm42015-05-221-0/+29
| | | | Looks like this will be needed a lot...
* DOCS: add a changelog for option/command/property changeswm42015-05-222-3/+47
| | | | | All these make up both user interface and API. It's a good idea to actually keep track of changes to it.
* audio: make softvol scale cubicwm42015-05-223-10/+13
| | | | | | | | This brings the volume control closer to what is percepted as linear volume change. Adjust the --softvol-max default to roughly the old maximum (roughly doubles the gain).
* audio: change range of volume option/propertywm42015-05-226-35/+31
| | | | | | | | | Now --volume takes an absolute volume, meaning it doesn't depend on --softvol-max. 0 is still silence, and 100 now always means unchanged volume. The OSD and the "volume" property are changed accordingly. Also raise the minimum value of --softvol-max. A value below 100 makes no sense and breaks the OSD.
* options: --loop without argument means looping forever