summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* audio: remove float processing optionwm42013-04-136-31/+9
| | | | | | | | | | | | | | The only thing this option did was changing the behavior of af_volume. The option decided what sample format af_volume would use, but only if the sample format was not already float. If the option was set, it would default to float, otherwise to S16. Remove use of the option and all associated code, and make af_volume always use float (unless a af_volume specific sub-option is set). Silence maximum value tracking. This message is printed when the filter is destroyed, and it's slightly annoying. Was enabled due to enabling float by default.
* audio: switch to libavcodec channel order, use libavresample for mixingwm42013-04-136-44/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the internal channel order to libavcodec's. If the channel number mismatches at some point, use libavresample for up- or downmixing. Remove the old af_pan automatic downmixing. The libavcodec channel order should be equivalent to WAVEFORMATEX order, at least nowadays. reorder_ch.h assumes that WAVEFORMATEX and libavcodec might be different, but all defined channels have the same mappings. Remove the downmixing with af_pan as well as the channel conversion with af_channels from af.c, and prefer af_lavrresample for this. The automatic downmixing behavior should be the same as before (if the --channels option is set to 2, which is the default, the audio output is forced to 2 channels, and libavresample does all downmixing). Note that mpv still can't do channel layouts. It will pick the default channel layout according to the channel count. This will be fixed later by passing down the channel layout as well. af_hrtf depends on the order of the input channels, so reorder to ALSA (for which this code was written). This is better than changing the filter code, which is more risky. ao_pulse can accept waveext order directly, so set that as channel mapping.
* ao_alsa: reorder channels from internal to alsa orderwm42013-04-131-0/+6
| | | | | Currently, internal and alsa order are exactly the same, so this will do absolutely nothing.
* af: simplificationwm42013-04-131-35/+20
| | | | | | | | | If format negotiation fails, and additional filters are inserted to fix this, don't try to reinitialize the filter immediately. Instead, correct the audio format, and let the caller retry. Add a retry counter to af_reinit() to ensure that misbehaving filters can't put the format negotiation into an endless loop.
* af: factor channel filter insertionwm42013-04-131-30/+45
| | | | Do this just like it has been done for the format filter.
* af: use af_lavrresample for format conversions, if possiblewm42013-04-134-45/+111
| | | | | | | | | | | | | Refactor to remove the duplicated format filter insertion code. Allow other format converting filters to be inserted on format mismatches. af_info.test_conversion checks whether conversion between two formats would work with the given filter; do this to avoid having to insert multiple conversion filters at once and such things. (Although this isn't ideal: what if we want to avoid af_format for some conversions? What if we want to split af_format in endian-swapping filters etc.?) Prefer af_lavrresample for conversions that it supports natively, otherwise let af_format handle the full conversion.
* af: remove automatically inserted filters on full reinitwm42013-04-133-32/+45
| | | | | | | | | | | | | | | | | | | | | | Make sure automatically inserted filters are removed on full reinit (they are re-added later if they are really needed). Automatically inserted filters were never explicitly removed, instead, it was expected that redundant conversion filters detach themselves. This didn't work if there were several chained format conversion filters, e.g. s16le->floatle->s16le, which could result from repeated filter insertion and removal. (format filters detach only if input format and output format are the same.) Further, the dummy filter (which exists only because af.c can't handle an empty filter chain for some reason) could introduce bad conversions due to how the format negotiation works. Change the code so that the dummy filter never takes part on format negotiation. (It would be better to fix format negotiation, but that would be much more complicated and would involving fixing all filters.) Simplify af_reinit() and remove the start audio filter parameter. This means format negotiation and filter initialization is run more often, but should be harmless.
* af_lavrresample: allow other ffmpeg sample formats for input/outputwm42013-04-131-17/+48
| | | | | | | The format was locked to s16. Extend it to accept all other ffmpeg sample formats, and even allow different in- and output formats. The generic filter code will still insert af_format on format mismatches, though.
* audio/filter: replace pointless memcpys with assignmentswm42013-04-134-17/+10
| | | | | | The change in af_scaletempo actually fixes a memory leak. af->data contained a pointer to an allocated buffer, which was overwritten during format negotiation. Set the format explicitly instead.
* af: uncrustifywm42013-04-132-466/+496
|
* ad_lavc: use fmt-conversion to map sample formatsStefano Pigozzi2013-04-134-18/+96
|
* demux: simplify chapter appending codewm42013-04-121-14/+8
| | | | | This pre-allocation looked tricky and awkward. Use MP_TARRAY_APPEND(), which makes the code simpler. This even keeps the pre-allocation.
* demux: always sort chapterswm42013-04-122-8/+7
| | | | | | | | | | | The condition that checked whether the chapters are out of order and should be sorted was inverted. This likely wasn't noticed in testing, because even if the chapters are unsorted, if the last two chapters were sorted, the rest got sorted too. Instead of doing this silly check, always sort the chapters after demuxer initialization. Also make sure the sort order is stable in case chapter start times are the same (original_index check).
* core: remove dead --vsync leftoverswm42013-04-123-12/+1
|
* command: fix deref before NULL checkwm42013-04-121-1/+1
| | | | Was accidentally broken in the last global variable removal round.
* ao_jack: fix deprecation warningStefano Pigozzi2013-04-121-2/+5
| | | | | jack_port_get_total_latency is deprecated: use the "new" API based on jack_port_get_latency_range instead.
* mplayer: remove unnecessary variablewm42013-04-102-8/+4
|
* core: add --reset-on-next-file optionwm42013-04-106-0/+56
| | | | | | | This option can be used to selectively reset settings when playing the next file in the playlist (i.e. restore mplayer and mplayer2 behavior). Might remove this option again should it turn out that nobody uses it.
* mplayer: keep volume persistent, even when using --volumewm42013-04-103-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider: mpv --volume 10 file1.mkv file2.mkv Before this commit, the volume was reset to 10 when playing file2.mkv. This was inconsistent to most other options. E.g. --brightness is a rather similar case. In general, settings should never be reset when playing the next file, unless the option was explicitly marked file-local. This commit corrects the behavior of the --volume and --mute options. File local --volume still works as expected: mpv --{ --volume 10 file1.mkv file2.mkv --} This sets the volume always to 10 on playback start. Move the m_config_leave_file_local() call down so that the mixer code in uninit_player() can set the option volume and mute variables without overwriting the global option values. Another subtle issue is that we don't want to set volume if there's no need to, which is why the user_set_volume/mute fields are introduced. This is important because setting the volume might change the system volume depending on other options.
* mplayer: move DVB channel skip codewm42013-04-101-23/+21
| | | | Try not to cause unnecessary special cases.
* mplayer: don't disable term-osd with -vwm42013-04-101-4/+0
| | | | I don't see any reason for doing this.
* command: fix loadlist commandwm42013-04-101-3/+5
| | | | | | | A simple inverted condition prevented it from working properly. Also, make sure that playlist is played from beginning when the playlist is replaced.
* configure: add -mconsole on MinGWwm42013-04-101-1/+6
| | | | | | | | | At least libsdl adds -mwindows to the cflags, which marks the .exe binary as GUI application. This means the program detaches from the console when started in cmd.exe, instead of showing the playback status, receiving console input, and so on. Append -mconsole to the linker command line to disable -mwindows.
* mplayer: don't print bogus status when cachingwm42013-04-101-1/+1
| | | | | When streaming from http, this could print a status line indicating paused playback instead of "buffering" sometimes.
* vf_divtc, vf_phase: Fix handling of subsampled formatsMartin Herkt2013-04-102-3/+4
| | | | | | These filters incorrectly calculated the amount of bytes per line in each plane for chroma subsampled formats, causing undefined behavior.
* demux: fix a specific gcc 4.8 warning that may hint to mis-optimized codeRudolf Polzer2013-04-091-0/+3
| | | | | | | | CC demux/demux.o demux/demux.c: In function 'demuxer_switch_track': demux/demux.c:1241:29: warning: array subscript is above array bounds [-Warray-bounds] int new_id = demuxer->ds[type]->id; ^
* core: remove volstep global variablewm42013-04-094-5/+4
|
* core: restore --mc default value (fixes A/V sync)wm42013-04-091-0/+1
| | | | | | | | | | | Commit bc20f2c moved the variable default_max_pts_correction (which backs the --mc option) to the MPOpts struct. The initializer was forgotten when doing this, so it was left at 0. This disabled part of the A/V sync mechanism. This was apparent when using ad_spdif (this decoder has other A/V sync related problems, and thus triggers this issue easily). Closes #59.
* make: add osxbundle-skip-depsStefano Pigozzi2013-04-082-21/+53
| | | | | | | This adds a way to generate a Mac OS X application bundle without the bundled dependencies. fixes #57
* vf_dlopen examples: add copyright headers (LGPL 2.1+)Rudolf Polzer2013-04-087-0/+147
|
* stream_cddb: fix compilation on MinGW-w64Stephen Hutchinson2013-04-061-1/+1
| | | | | Like the VCD case, stream_cddb.c relies on ntddcdrm.h, which is no longer under the ddk directory.
* vcd_read_win32.h: fix compilation on MinGW-w64Stephen Hutchinson2013-04-062-2/+2
| | | | | | | ntddcdrm.h is no longer under the 'ddk' directory in MinGW-w64, and since MPV focuses on it instead of the old MinGW32, there's no reason to keep that dir prefix, as it stops VCD support from being built at all for Windows.
* Remove some apple remote leftoverswm42013-04-055-45/+0
| | | | The options and key names don't do anything anymore.
* input: remove ar.h includeStefano Pigozzi2013-04-051-2/+0
| | | | This is a left over from c8fd9e50e47.
* demux_mkv: move preroll subtitle check to the right placewm42013-04-041-2/+2
| | | | | | | | No subtitle selected was supposed to disable the preroll logic completely. However, the packet skipping logic was not properly enabled, so the demuxer would still return subtitle packets from before the seek target timecode. This shouldn't matter at all in practice, but fixing this makes the code clearer.
* demux_mkv: try to show current subtitle when seekingwm42013-04-046-9/+59
| | | | | | | | | | | | | | | | | Makes sure that seeking to a given time position shows the subtitle at that position. This can fail if the subtitle packet is not close enough to the seek target. Always enabled for hr-seeks, and can be manually enabled for normal seeks with --mkv-subtitle-preroll. This helps displaying subtitles correctly with ordered chapters. When switching ordered chapter segments, a seek is performed. If the subtitle is timed slightly before the start of the segment, it normally won't be demuxed. This is a problem with all seeks, but in this case normal playback is affected. Since switching segments always uses hr-seeks, the code added by this commit is always active in this situation. If no subtitles are selected or the subtitles come from an external file, the demuxer should behave exactly as before this commit.
* options: fix --no-colorkeywm42013-04-041-1/+1
| | | | | | | In the last cleanup round, this was accidentally changed from a store option to int, and the option value was passed as flag value. (Not that anyone needs/uses/cares about this option...)
* core: add --heartbeat-interval optionwm42013-04-046-4/+13
| | | | | | This closely follows MPlayer commit 36099, with some changes. Move a mutable static variable into MPContext.
* av_common: minor simplificationwm42013-04-041-8/+2
|
* http: handle broken QuickTime Streaming Server headersreimar2013-04-041-3/+9
| | | | | | | | | | | | | Handle the severely broken headers QuickTime Streaming Server sends. Instead of ending the header with \r\n\r\n it ends with \r\n<4 byte MP3 header>\r\n. And programs like wget just silently accept this without even printing a warning!! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35988 b3059339-0415-0410-9bf9-f77b7e298cf2 Note: see previous commit.
* http: fix for broken SHOUTcast streamsreimar2013-04-041-0/+6
| | | | | | | | | | | | | Support broken icy-metaint response from QuickTime Streaming Server. The full version string is "QuickTime Streaming Server 6.1.0/532". It sends a HTTP response header that contains an MP3 header! Fixes bug #2133. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35987 b3059339-0415-0410-9bf9-f77b7e298cf2 Note that in mpv, "http://" is mapped to ffmpeg currently, and this code is unused by default.
* vcd_read: cleanup ifdefsreimar2013-04-041-14/+7
| | | | | | | | | Clean up ifdefs so they make sense even if none or multiple are defined. Also choose Linux as fallback case instead of failing, this allows the code to compile e.g. on Android. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35971 b3059339-0415-0410-9bf9-f77b7e298cf2
* encoding-example-profiles: block non-4:0:0 for baseline h264Rudolf Polzer2013-04-041-0/+4
| | | | | libx264 rejects the other pixel formats when doing baseline H.264, although libavcodec accepts them, leading to an encoding abort.
* demux_mkv: fix handling of 0 DisplayWidth/Heightwm42013-04-041-2/+5
| | | | | | | | | Commit 546ae23 fixed aspect ratio if the DisplayWidth or DisplayHeight elements were missing. However, some bogus files [1] can have these elements present in the file, but set to 0. Use 1:1 pixel aspect for such files. [1] https://ffmpeg.org/trac/ffmpeg/ticket/2424
* command: silence "Audio: no audio" line for playback speedwm42013-04-041-1/+2
| | | | | If no audio stream is selected, this line will be printed by reinit_audio_chain() when changing playback speed.
* mplayer: switch back to video PTS for reporting playback timewm42013-04-042-10/+8
| | | | | | | | | | | | | | | The main problem with video PTS was that it wasn't very useful when playing audio files with cover art. Using the audio time instead was an obvious solution. Unfortunately, this leads to "inexact" reporting of the playback time in paused mode, and audio is always ahead by small, essentially random amounts of time ahead. This is possibly because the times reported by AOs are not entirely accurate when paused (see commit 9b3bf76). Switch back to video PTS, and use a simpler way to deal with the cover art case: if the video has ended, use the audio PTS. Also see commit f9a259e (and the commits referenced from there).
* mplayer: fix framestepping on ordered chapter segment boundarieswm42013-04-041-28/+34
| | | | | | | | | | | | | | | | | | | Trying to step over a segment boundary didn't work, and the video was stuck at the end of the current chapter. At this point, both video and audio of the segment has ended, and the segment switching code is going to call seek() to go to the next segment (the part of the code in run_playloop that uses end_is_chapter). However, this seek() is not called if playback is paused, and the framestepping code always paused before this code is run. Move the framestepping code below the chapter switching code. The added restart_playback condition makes sure the code is called only after at least one video frame has been shown. Also don't reset the framestep counter after seek. It's not needed, and removing it prevents full unpausing when stepping over a segment boundary. This also terminates playback when frame stepping at the end of the file. The --keep-open option can be used to get the old behavior.
* mplayer: fix --step EOF handlingwm42013-04-041-1/+3
|
* wayland: use vo flags for enabling alpha supportAlexander Preisinger2013-04-021-3/+5
| | | | I missed the VOFLAG for enabling alpha support
* wayland: enable alpha supportAlexander Preisinger2013-04-021-1/+1
| | | | | | It is now possible to show images and videos with alpha information correctly. This was disalbed before, because there was a bug that made black parts of videos also transparent.
* osd: fix OSD bar position markerwm42013-04-021-0/+10
|
* manpage: fix a typowm42013-03-311-1/+1
|
* osd: disable border for inner part of the OSD barwm42013-03-311-1/+1
|
* encoding-example-profiles and manpage: prefer libvorbis over vorbisRudolf Polzer2013-03-312-2/+2
| | | | | vorbis is the builtin bad vorbis encoder; whenever possible, one should rather use the "libvorbis" codec name.
* configure: fix compilation on Linuxwm42013-03-311-0/+1
| | | | This line was accidentally removed by the previous commit.
* remove Apple Remote related codeStefano Pigozzi2013-03-319-747/+0
| | | | | | | | | | | | | | | | The OSX part of the Apple Remote was unmaintained for a long time and was not working anymore. I tried to update the cookies to what the current versions of OS X expect without much luck. I decided to remove it since Apple is not including the IR receiver anymore in new hardware and it's clear that wifi based remotes are the way to go. A third party iOS app should be used in it's place. In the future we could look into having a dedicated iOS Remote Control app like VLC and XBMC do. The Linux side (`appleir.c`) was relatively tidy but it looks like LIRC can be configured to work with any version of Apple Remote [1] and is more maintained. [1] LIRC Apple Remote configs: http://lirc.sourceforge.net/remotes/apple/
* demux_mkv: don't print non-sense warning on normal EOFwm42013-03-301-1/+1
| | | | | | | | | | | | | | | Commit ac1c5e6 (demux_mkv: improve robustness against broken files) added code to skip to the next cluster on error conditions. However, reaching normal EOF triggers this code as well, so explicitly check for EOF before this happens. Note that the EOF flag is only set _after_ reading the last byte, so EOF needs to be checked after the fact. (Or in other words, we must check for EOF after the ebml_read_id() call.) (To answer the question why reading packets actually reaches EOF, even if there's the seek index between the last packet and the end of the file: the cluster reading code skips the seeking related EBML elements as normal part of operation, so it hits EOF gracefully when trying to find the next cluster.)
* gl_video: remove double const qualifierStefano Pigozzi2013-03-301-1/+1
| | | | This fixes a warning when compiling with clang.
* changes.rst: mention -afm hwac3 replacementwm42013-03-301-0/+1
|
* osd: draw the OSD bar with ASS vector drawingswm42013-03-307-71/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | Drawing the bar with vector drawings (instead with characters from the OSD font) offers more flexibility and looks better. This also adds chapter marks to the OSD bar, which are visible as small triangles on the top and bottom inner border of the bar. Change the default position of the OSD bar below the center of the screen. This is less annoying than putting the bar directly into the center of the view, where it obscures the video. The new position is not quite on the bottom of the screen to avoid collisions with subtitles. The old centered position can be forced with ``--osd-bar-align-y=0``. Also make it possible to change the OSD bar width/height with the new --osd-bar-w and --osd-bar-h options. It's possible that the new OSD bar renders much slower than the old one. There are two reasons for this: 1. the character based bar allowed libass to cache each character, while the vector drawing forces it to redraw every time the bar position changes. 2., the bar position is updated at a much higher granularity (the bar position is passed along as float instead of as integer in the range 0-100, so the bar will be updated on every single video frame).
* gl_video: add some missing includeswm42013-03-301-0/+8
| | | | On most platforms, they are recursively included, but not all.
* gl_lcms: fix compilation when lc