aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* options: add --audio-file-pathsGravatar wm42015-12-25
| | | | | | | | Requested. It works like --sub-paths. This will also load audio files from a "audio" sub directory in the config file (because the same code as for subtitles is used, and it also had such a feature). Fixes #2632.
* sub: clear subtitle list when crossing timeline boundaryGravatar wm42015-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When crossing timeline boundaries (such as switching to a new segment or chapter with ordered chapters), clear the internal text subtitle list. This breaks the sub-seek command, but is otherwise not too harmful. Fixes Sub-OC-test-final7.mkv. (The internal text subtitle list is basically a cache to make subtitles show up at the right time when seeking back.) I suspect this was caused by 76fcef61. The sample file times subtitles slightly before the video frame when it should show up. This is to avoid problems with subtitles showing up a frame later than intended. It also means that a subtitle which is supposed to show up on the start of a timeline part boundary actually might first be shown in a different part. Since we now manipulate the packet timestamps, instead of manipulating timestamps after the subtitle decoder, this means this subtitle event would have 2 timestamps, which our code of course does not handle. If the two parts come one after another, this would actually work (since the subtitle would have the same timestamps in the old and new part), but it breaks if the new part (which follows the old part in the physical file) is has a completely different start time in the timeline. Essentially, the trick used to time subtitles correctly is incompatible with the way we cache subtitles (to make them survive seeks). The simple solution is just clearing the cached subtitles when crossing chapter boundaries.
* command: fix eof-reached property change notification in corner casesGravatar wm42015-12-24
| | | | | | | | | See #2609: "When eof is reached it would be shown on the OSD and in the console. Next try seeking to the middle. Seeking to the middle of the file will only result in the OSD message being updated. Lua seems to fail to observe the change in the property until the video is unpaused."
* sub: use macros to remove code duplicationGravatar wm42015-12-24
| | | | Meh.
* sub: merge bitmap render functions into one for each kindGravatar wm42015-12-24
| | | | | | | | | | Merge blend_src8_alpha and blend_src16_alpha into blend_src_alpha, and the same for blend_const_alpha. One thing that changes is that the vertical loop is now shared for both code paths. I think this is slightly easier to read, and it's a bit shorter as well.
* sub: remove "inaccurate" code pathGravatar wm42015-12-24
| | | | | | The "accurate" one always has been enabled, and I can't find much evidence that the "inaccurate" one is much faster on my particular machine anyway.
* sub: find GBRP format automatically when rendering to RGBGravatar wm42015-12-24
| | | | | | | | | | | | | | | | This removes the need to define IMGFMT_GBRAP, which fixes compilation with the current Libav release. This also makes it automatically pick up a GBRP format with the same bit width. (Unfortunately, it seems libswscale does not support conversion to AV_PIX_FMT_GBRAP16, so our code falls back to 8 bit, removing precision for video covered by subtitles in cases this code is used.) Also, when the source video is e.g. 10 bit YUV, upsample to 16 bit. Whether this is good or bad, it fixes behavior with alpha. Although I'm not sure if the alpha range is really correct ([0,2^16-1] vs. [0,255*256]). Keep in mind that libswscale doesn't even agree with the way we do it.
* vo_opengl: fix operation on GLSL versions earlier than 1.30Gravatar wm42015-12-24
| | | | | GLSL below version 1.30 does not support mix() with a boolean interpolation value. Use ?: instead. Untested, but probably works.
* sub: better alpha blending when rendering to alpha surfacesGravatar wm42015-12-24
| | | | | | | | | | | This actually treats destination alpha correctly, and gives much better results than before. I don't know if this is perfectly correct yet, though. Slight difference with vo_opengl behavior suggests it might not be. Note that this does not affect VOs with true alpha support. vo_opengl does not use this code at all, and does the alpha calculations in OpenGL instead.
* vo_opengl: fall back to gcc thread local storage (2)Gravatar wm42015-12-23
| | | | | | | | | | | | Commit 1a6f3c56 added a fallback for the case when C11 TLS was not available, but GCC TLS was. But it forget to enable VAAPI EGL interop in the build system in this case. Just remove the build system check. Should someone find a compiler that works on Linux and does not support GCC extensions or C11, it will still compile and just fail to init at runtime. Actually fixes #2631 (hopefully).
* demux_mf: fix previous commitGravatar wm42015-12-23
| | | | It was total crap.
* demux: remove weird tripple-buffering for the sh_stream listGravatar wm42015-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The demuxer infrastructure was originally single-threaded. To make it suitable for multithreading (specifically, demuxing and decoding on separate threads), some sort of tripple-buffering was introduced. There are separate "struct demuxer" allocations. The demuxer thread sets the state on d_thread. If anything changes, the state is copied to d_buffer (the copy is protected by a lock), and the decoder thread is notified. Then the decoder thread copies the state from d_buffer to d_user (again while holding a lock). This avoids the need for locking in the demuxer/decoder code itself (only demux.c needs an internal, "invisible" lock.) Remove the streams/num_streams fields from this tripple-buffering schema. Move them to the internal struct, and protect them with the internal lock. Use accessors for read access outside of demux.c. Other than replacing all field accesses with accessors, this separates allocating and adding sh_streams. This is needed to avoid race conditions. Before this change, this was awkwardly handled by first initializing the sh_stream, and then sending a stream change event. Now the stream is allocated, then initialized, and then declared as immutable and added (at which point it becomes visible to the decoder thread immediately). This change is useful for PR #2626. And eventually, we should probably get entirely of the tripple buffering, and this makes a nice first step.
* input: add a catch-all "unmapped" commandGravatar wm42015-12-23
| | | | | | This can be used to grab all unmapped keys. Fixes #2612.
* input: add key name to script-binding command responseGravatar wm42015-12-23
| | | | | | | | | | | | | | | | The "script-binding" command is used by the Lua scripting wrapper to register key bindings on the fly. It's also the only way to get fine- grained information about key events (such as separate key up/down events). This information is sent via a "key-binding" message when the state of a key changes. Extend it to send name of the mapped key itself. Previously, it was assumed that the user just uses an unique identifier for the binding's name, so it wasn't needed. With this change, a user can map exactly the same command to multiple keys, which is useful especially with the next commit. Part of #2612.
* old-configure: add a missing defineGravatar wm42015-12-23
| | | | (Why am I maintaining 2 build systems?)
* vo_opengl: fall back to gcc thread local storageGravatar wm42015-12-23
| | | | | | | | | | | | gcc 4.8 does not support C11 thread local storage. This is a bit annoying, so add a hack to use the gcc specific __thread extension if C11 TLS is not available. (This is used for the extremely silly mpv-internal way hwdec modules access some platform specific handles. Disabling it simply made hwdec_vaegl.c always fail initialization.) Fixes #2631.
* CONTRIBUTING.md: add some more hintsGravatar wm42015-12-23
|
* player: minor simplificationGravatar wm42015-12-23
| | | | This tmp thing had not much of a purpose anymore.
* CONTRIBUTING.md: add missing wordsGravatar wm42015-12-22
|
* stream_lavf: remove tabsGravatar wm42015-12-22
| | | | Death to tabs.
* vo_opengl: blend transparent video against tiles by defaultGravatar wm42015-12-22
| | | | | | | | | | | Add a "blend-tiles" choice to the "alpha" sub-option. This is pretty simplistic and uses the GL raster position to derive the tiles. A weird consequence is that using --vo=opengl and --vo=opengl-hq gives different scaling behavior (screenspace pixel size vs. source video pixel size 16x16 tiles), but it seems we don't have easy access to the original texture coordinates. Using the rasterpos is probably simpler. Make this option the default.
* Add a CONTRIBUTING.md fileGravatar wm42015-12-22
| | | | | | | | | Github will display a link to it when a user wants to create an issue or pull request. Also make some minor adjustments to DOCS/contribute.md, which is developer oriented, and for which I see no reason to merge it with the new file.
* tests: fix #includeGravatar Ilya Tumaykin2015-12-22
|
* input.conf: remove a redundant and a broken exampleGravatar wm42015-12-22
| | | | | | | window-scale is now mapped to Alt+0 etc. by default (although these bindings just use "set", not "cycle-values"). colormatrix can't be cycled anymore (would require using vf_format).
* input.conf: erase `audio-delay` from `Not assigned by default`Gravatar openingnow2015-12-22
| | | | | | | `ctrl+ +`is assigned as `add audio-delay` by default. Tested by running `mpv --input-test --force-window --idle` Signed-off-by: wm4 <wm4@nowhere>
* dec_sub: avoid segfault on sub_init_decoder failureGravatar Aman Gupta2015-12-22
| | | | | | Broken by commit 687b552d. Signed-off-by: wm4 <wm4@nowhere>
* demux_lavf: rename to handle_new_stream to clarify intentGravatar Aman Gupta2015-12-22
|
* ao_wasapi: fix delay calculationGravatar Kevin Mitchell2015-12-21
| | | | | | | | | | | | | | | | | | | Make sure that subtraction of performance counters is done correctly. Follow the *exact* instructions for converting performance counter to something comparable to the QPCposition returned by IAudioClient::GetPosition https://msdn.microsoft.com/en-us/library/windows/desktop/dd370889%28v=vs.85%29.aspx Also make sure that subtraction of unsigned integers is stored into a signed integer to avoid nastiness. Also be more careful about overflow in the conversion of the device position into number of samples. Avoid casting mp_time_us() to a double, and use llrint to convert the double precision delay_us back to integer for ao_read_data. Finally, actually check the return value of ao_read_data and add a verbose message if it is not the expected value. Unfortunately, there is no way to tell WASAPI when this happens since the frame_count in ReleaseBuffer must match GetBuffer.
* demux_lavf: make trace output for mp_seek easier to digestGravatar Aman Gupta2015-12-21
| | | | Signed-off-by: wm4 <wm4@nowhere>
* Fix some typos in code commentsGravatar Aman Gupta2015-12-21
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vf_yadif: change defaultsGravatar wm42015-12-21
| | | | | | | | | | | | | | | | This is for the sake of command.c and the "deinterlace" option/property. Instead of forcing certain "better" defaults when inserting yadif, change the actual "yadif" defaults. I pondered not changing vf_yadif, and instead adding a trivial "yadif- auto" wrapper filter, which would merely have different defaults. But thinking about it, it doesn't make any sense for "deinterlace" to have different defaults from vf_yadif, with vf_yadif having the "worse" defaults. If someone wants the old behavior, the old behavior can be forced in a backward and forward compatible way by setting the suboptions. Fixes #2539 (kind of).
* ao_wasapi: move volume control init to it's own functionGravatar Kevin Mitchell2015-12-21
| | | | also make failure non-fatal
* ao_wasapi: correctly handle audio session display failureGravatar Kevin Mitchell2015-12-21
| | | | | In particular, try and release/null the interface so that it won't be marshalled.
* ao_wasapi: non-fatal error handling for COM marshallingGravatar Kevin Mitchell2015-12-21
| | | | | Also make sure that CoReleaseMarshalData is called if errors occur before unmarshalling.
* ao_wasapi: wrap long lines and use only c99 comment styleGravatar Kevin Mitchell2015-12-21
| | | | | also remove a log message in AOCONTROL_UPDATE_STREAM_TITLE since none of the other controls have one.
* ao_wasapi: reorganize private structureGravatar Kevin Mitchell2015-12-21
|
* ao_wasapi: remove useless buffer_block_sizeGravatar Kevin Mitchell2015-12-21
| | | | this was only ever used for a verbose message
* ao_wasapi: move exclusive and shared-specific controls to functionsGravatar Kevin Mitchell2015-12-21
|
* charset_conv: check for UTF-8 if uchardet returns unknownGravatar wm42015-12-20
| | | | | | | | When libuchardet returns an empty string, it can be either ASCII, UTF-8, or an unknown encoding. Try to distinguish it from the unknown case by checking for UTF-8. This avoids an annoying message, and avoids unnecessary processing (we convert invalid UTF-8 sequences to latin1 to workaround libavcodec's braindead UTF-8 check).
* demux_disc: fix aspect ratio retrieval (again)Gravatar wm42015-12-20
| | | | | | Commit 127da161 was not properly tested either - it did nothing, and just made it use the video bitstream aspect ratio determined by libavformat (which isn't always the correct one).
* vo_opengl: x11: fix alpha windowsGravatar wm42015-12-20
| | | | | | | long is 64 bits on x86_64 on Linux, which means the check for the corner case of computing the depth mask is wrong. Also, X11 compositors seem to expect premultiplied alpha.
* ao_wasapi: call the class-specific release functionsGravatar Kevin Mitchell2015-12-20
| | | | | IUnknown_Release() might be alright, but stay on the safe side.
* ao_wasapi: check for proxy availability in controlGravatar Kevin Mitchell2015-12-20
| | | | | Make sure that the proxy has been created before using it. This will be used when a future commit makes proxy setup optional.
* ao_wasapi: actually use hw volume support information for exclusive modeGravatar Kevin Mitchell2015-12-20
| | | | | | | | | Do not try and set/get master volume in exclusive if there is no hardware support. This would just uselessly change the master slider, but have no effect on the actual volume. Furthermore if getting hardware volume support information fails, then assume it has none.
* ao_wasapi: don't cast control arg to something it isn'tGravatar Kevin Mitchell2015-12-20
| | | | | the ao_control_vol_t cast was happening outside AOCONTROL_GET/SET_VOLUME which is the only place that would be valid
* ao_wasapi: remove volume "restore" on exitGravatar Kevin Mitchell2015-12-20
| | | | | | It was complicated and not even very intuitive to the user. If you are controlling the master volume, you just have to be prepared to deal with the consequences.
* ao_wasapi: split exclusive/shared specific ao controlsGravatar Kevin Mitchell2015-12-20
| | | | | this avoids having to check if we're exclusive or shared for every control
* ao_wasapi: add E_NOINTERFACE to error listGravatar Kevin Mitchell2015-12-20
| | | | this is encountered trying to set up COM proxies in wine
* path-win: include initguid.hGravatar Kevin Mitchell2015-12-20
| | | | cygwin was giving undefined reference to `FOLDERID_Desktop' at link time
* DOCS/compile-windows: pthreads is not needed anymoreGravatar wm42015-12-20
| | | | | | Both mpv and ffmpeg have their own internal pthreads wrappers. The mpv one has been recently enabled by default as well. (It didn't work on XP, but we dropped XP support.)