summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* audio/out: remove ao->outburst/buffersize fieldswm42013-06-1616-82/+64
| | | | | | | | | | | | | | | The core didn't use these fields, and use of them was inconsistent accross AOs. Some didn't use them at all. Some only set them; the values were completely unused by the core. Some made full use of them. Remove these fields. In places where they are still needed, make them private AO state. Remove the --abs option. It set the buffer size for ao_oss and ao_dsound (being ignored by all other AOs), and was already marked as obsolete. If it turns out that it's still needed for ao_oss or ao_dsound, their default buffer sizes could be adjusted, and if even that doesn't help, AO suboptions could be added in these cases.
* audio/out: don't require AOs to set ao->bpswm42013-06-169-40/+28
| | | | | | | Some still do, because they use the value in other places of the init function. ao_portaudio is tricky and reads ao->bps in the stream thread, which might be started on initialization (not sure about that, but better safe than sorry).
* audio: fix af_fmt_seconds_to_bytesStefano Pigozzi2013-06-164-8/+13
| | | | Was missing samplerate
* audio/out: remove wrapper for old AOswm42013-06-163-130/+0
| | | | It's unused now.
* ao_jack: use mp_ringStefano Pigozzi2013-06-161-31/+12
|
* ao_portaudio: use mp_ringStefano Pigozzi2013-06-162-57/+15
|
* core: add a spsc ringbuffer implementationStefano Pigozzi2013-06-169-166/+338
| | | | | | | | | | | | | | | | | Currently every single AO was implementing it's own ringbuffer, many times with slightly different semantics. This is an attempt to fix the problem. I stole some good ideas from ao_portaudio's ringbuffer and went from there. The main difference is this one stores wpos and rpos which are absolute positions in an "infinite" buffer. To find the actual position for writing / reading just apply modulo size. The producer only modifies wpos while the consumer only modifies rpos. This makes it pretty easy to reason about and make the operations thread safe by using barriers (thread safety is guaranteed only in the Single-Producer/Single- Consumer case). Also adapted ao_coreaudio to use this ringbuffer.
* ao_coreaudio: fix output with spdifStefano Pigozzi2013-06-161-5/+4
| | | | The mute condition was inverted...
* ao_coreaudio: split ringbuffer in it's own fileStefano Pigozzi2013-06-164-74/+161
| | | | | | | | | This is hopefully the start of something good. ca_ringbuffer_read and ca_ringbuffer_write can probably cleaned up from all the NULL checks once ao_coreaudio.c gets simplyfied. Conflicts: audio/out/ao_coreaudio.c
* ao_coreaudio: move to new libao APIStefano Pigozzi2013-06-161-310/+339
| | | | | This is just a first pass and the bare minimum to make it compile and work. SPDIF is untested for lack of hardware.
* ao_coreaudio: uncrustifyStefano Pigozzi2013-06-161-491/+553
| | | | | uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace \ audio/out/ao_coreaudio.c
* fix compile, sorryRudolf Polzer2013-06-161-0/+1
|
* vf_dlopen ildetect: fix numdecidedadjacentframes counterRudolf Polzer2013-06-161-1/+5
|
* vf_dlopen ildetect: make the wrapper shell script more robustRudolf Polzer2013-06-161-7/+2
|
* encode_lavc strings: use new option syntaxRudolf Polzer2013-06-163-22/+22
|
* vf_dlopen filters: add an "ildetect" filter that detects interlacingRudolf Polzer2013-06-164-5/+357
| | | | | The filter analyzes each frame for combing, and decides at the end whether the content is likely interlaced, telecined or progressive.
* cocoa_common: implement VOCTRL_UPDATE_WINDOW_TITLEStefano Pigozzi2013-06-161-2/+11
| | | | | Unfortunately this backend creates the window lazily and a call to `cocoa_set_window_title` is needed inside config.
* wayland: use VOCTRL_UPDATE_WINDOW_TTILEAlexander Preisinger2013-06-161-1/+3
|
* mplayer: update window title if its properties changeJohn Hawthorn2013-06-162-10/+21
| | | | | | This allows having properties like time-pos in the window title update properly. There is a danger of this causing significant CPU usage, depending on the properties used and the window manager.
* vo: fix build on Libavwm42013-06-151-0/+2
|
* video/out: introduce VOCTRL_UPDATE_WINDOW_TITLEwm42013-06-155-5/+22
| | | | | | | | | | | Instead of implicitly changing the window title on config(), do it as part of the new VOCTRL. At first I wanted to make all VOs use the VOCTRL argument directly, but on a second thought it appears vo_get_window_title() is much more useful for some (namely, if the window is created lazily on first config()). Not all VOs are changed. Wayland and OSX have to follow.
* vo: define VO_TRUE/FALSE to C99 constantswm42013-06-151-2/+2
| | | | | | | | | This make the intention more apparent, and some VOs are actually using true instead of VO_TRUE in some places. Hopefully this changes makes it less confusing (instead of more). The C99 constants true/false are defined to 1/0 as well, so this commit doesn't actually change anything.
* w32_common: remove some unneeded codewm42013-06-151-5/+3
| | | | vo_w32_init() can be called only once on a VO.
* w32_common: fix non-sensewm42013-06-151-2/+3
| | | | Seriously...
* demux_lavf: show metadata for OGG audio fileswm42013-06-151-5/+18
| | | | Whether this is a hack or not, I don't even know anymore.
* vo_xv: always request redraw on resizewm42013-06-151-3/+3
| | | | Fixes using panscan controls with OSD off and video paused.
* vo: redo video display rectangle calculationswm42013-06-151-24/+49
| | | | | | | | | | | | | | | | | This code calculates the source/display video rectangle for scaling with most VOs. It's responsible for clipping the display rectangle against the screen and adjusting the source rectangle accordingly. Until now, it assumed that the video was centered on the screen. Change this so that any rectangle is possible. Basically, the clipping is extended to two sides (e.g. left and right), instead of handling both at the same time. The rounding behavior slightly changes. It seems to be slightly better than before. On the other hand, the video is not strictly centered anymore (due to different rounding on either side). When using panscan controls, the video can "jitter" by 1 or 2 pixels around the center as the panscan value is changed.
* gl_video: rearrange some codewm42013-06-151-23/+20
| | | | I think this is slightly nicer. Shouldn't change anything functionally.
* gl_video: fix scaling when image is cropped, or with no-npotwm42013-06-151-22/+39
| | | | | | | | | | | | | | | | | | | | | | | When the displayed image is cropped in Y direction (like using panscan controls when playing 4:3 video on a 16:9 monitor), and separated scaling is used, the texture size for the FBO holding the intermediate result was calculated incorrectly. This could lead to artifacts, which were quite apparent with extreme scale factors. Actually, the size of that texture is OK, but the texture shouldn't be used to hold the complete scaled image. Instead, it should be used for the visible part of the image only. Because separate scaling works by scaling in Y direction first, it's still fine to scale the image on the full image width on the first pass. This helps avoiding artifacts on the left/right border of the image when scaling in X direction, as the scaler will try to fetch pixels from beyond the border. (The left border is still kind of fine, but the right border will fetch garbage, unless the texture is strictly sized, or explicit clamping is added to the shader. Too much trouble, so using the full image width is simpler.) Also fix some issues with no-npot mode, which enables use of power-of-2 textures. Maybe this mode isn't really useful anymore (modern hardware is faster with smaller non-power-of-2 textures), but keep it for now.
* gl_video: typo in commentwm42013-06-151-1/+1
|
* image_writer: Add PNG filter option (default "mixed")Martin Herkt2013-06-154-1/+15
| | | | | | The use of filters prior to PNG compression can greatly improve compression ratio, with "mixed" (ImageMagick calls it "adaptive") typically achieving the best results.
* cocoa_common: remove play/pause VOCTRL functionsStefano Pigozzi2013-06-142-14/+2
| | | | | Make VOCTRL_RESTORE_SCREENSAVER / VOCTRL_KILL_SCREENSAVER use the power management functions directly.
* command: use more standard time format for clock propertywm42013-06-141-1/+1
| | | | | | | | | | | | | %k is not very standard. The manpage notes them as conforming to "Olson's timezone package", and it's not standard C89, C99 or POSIX. mingw doesn't provide it, and even some of the smaller Linux libcs don't have support. Use %H instead. This gives slightly different results, but I think this is ok. Difference in behavior between these summarized: %k: "single digits are preceded by a blank" %H: "range 00 to 23"
* w32: enable screensaver when pausedwm42013-06-142-2/+13
| | | | | | | This is quite similar to the previous commit. Untested. I'm not sure if this is how it's supposed to work. At least --no-stop-screensaver should work in any case.
* x11: enable screensaver when paused, rename/change --stop-xscreensaverwm42013-06-146-14/+22
| | | | | | | | | | | Use the recently introduced screensaver VOCTRLs to control the screensaver in the X11 backend. This means the behavior when paused changes: the old code always kept the screensaver disabled, but now the screensaver is reenabled on pausing. Rename the --stop-xscreensaver option to --stop-screensaver and make it more generic. Now it affects all backends that respond to the screensaver VOCTRLs.
* core: introduce separate VOCTRLs for screensaver stop/resumewm42013-06-143-11/+19
| | | | | | | | | | | | | | | | | | | | | | This is slightly better because VOCTRL_RESUME/VOCTRL_PAUSE are usually needed by VOs to know whether video is actually being played (for whatever reason), and they wouldn't be passed to the backend's VOCTRL handler, like vo_x11_control(). Also try to make sure that these flags (both pause state and screensaver state) are set consistently in some corner cases. For example, it seems enabling video in the middle of playing a file while the player is paused would not set the paused flag. If codec initialization fails, destroy the VO instead of keeping it around to make sure the state is consistent. Framestepping is implemented by unpausing the player for the duration of a frame. Remove the special handling of VOCTRL_PAUSE/RESUME in these cases. It was most likely needed because these VOCTRLs used to be important for screen redrawing (blatant guess), which is now handled completely differently. The only potentially bad side-effect is that the screensaver will be disabled/reenabled for the duration of one frame.
* support "-" as file name when encodingRudolf Polzer2013-06-131-7/+15
| | | | | | | This workaround sucks. avio just does not support "-" - and ffmpeg's command line binaries work around it. FOUR TIMES. DIFFERENTLY. WHY DOESN'T AVIO DO THIS RIGHT TO BEGIN WITH?
* options: remove --stereowm42013-06-134-27/+1
| | | | | | | Whatever this was supposed to be originally, it doesn't have much value anymore. It just forced ad_mpg123 to upmix mono to stereo by default (the audio chain can do that). As an option, it was mostly useless and misleading, so get rid of it.
* gl_video: remove redundant conditionwm42013-06-131-6/+1
|
* mplayer: save sub-visibility propertywm42013-06-131-1/+1
|
* vo_lavc: silence warning when writing y4mwm42013-06-131-1/+1
| | | | | Apparently a ffmpeg issue. Hide the warning because it's annoying. Workaround suggested by divVerent.
* mplayer: try to handle PTS forward jumpswm42013-06-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Raw MPEG streams can contain PTS discontinuities. While the playback core has obvious code for handling PTS going backward, PTS going forward was as far as I can see not handled. This can be an issue with DVD playback. This wasn't caught earlier, because DVD playback was just recently switched to demux_lavf, which implies -no-correct-pts mode. This mode doesn't use PTS in the same way as the normal playback mode, and as such was too primitive to be affected by this issue. Use the following heuristic to handle PTS forward jumps: if the PTS difference between two frames is higher than 10 seconds, consider it a reset. (Also, use MSGL_WARN for the PTS discontinuity warnings.) In this particular case, the MPEG stream was going from pts=304510857 to pts=8589959849 according to ffprobe (raw timestamps), which seems a bit strange. Note that this heuristic breaks if the source video has unusually high frame times. For example Rooster_Teeth_Podcast_191.m4a, an audio file with a slide show encoded as MJPEG video track.
* manpage: adjust y4m output examplewm42013-06-131-1/+1
| | | | | | The additional flags are needed to get the muxer to write the source video frame rate (instead of a fallback) for 100% equivalence to the replaced MPlayer/mplayer2 y4m writer.
* cocoa_common: fix ontop switching when fullscreenStefano Pigozzi2013-06-111-2/+2
| | | | | | | `enterFullScreenMode:withOptions:` creates another window so set the level on both the windowed window and current window. Also remove NSFullScreenModeWindowLevel as it seems to be superfluous.
* ao_oss: fix compilation on BSDwm42013-06-111-2/+3
| | | | | | This was overlooked with commit 32a898f, because OSS4 volume control is typically not available on Linux. BSD does have this feature, so the broken code broke compilation there.
* options: fix compilation on Windowswm42013-06-111-0/+1
| | | | Closes github issue #107. (Hopefully.)
* command: fix empty metadata casewm42013-06-111-2/+2
| | | | show_text "${metadata}" crashed if no metadata was set.
* cocoa_common: fix window level when going fullscreenStefano Pigozzi2013-06-101-1/+1
| | | | | | | | | This is a regression introduced by 0057aa4769. Fix it so that the fullscreen window uses the correct window level. [ci skip] Fixes #106
* encoding: fix -oneverdrop logic when -omaxfps is usedRudolf Polzer2013-06-091-5/+8
| | | | Not that anyone should ever do this...
* encoding -omaxfps: rewrite logicRudolf Polzer2013-06-091-29/+32
| | | | | | Now it properly hits the "0 times displayed" case when frames get skipped; this means the candidate frame for the case the next frame is "long" is set properly.
* encoding -omaxfps: do not shift pts when pts are repeated entirelyRudolf Polzer2013-06-091-1/+1
| | | | | This is just to make sure. I have no test case for this, but the logic seems saner that way.
* Option -omaxfps: limit fps when encodingRudolf Polzer2013-06-095-0/+29
| | | | | Lower-fps content is left alone (NOT aligned to this fps); higher fps content is decimated to this frame rate.
* manpage: improve documentation of property expansionwm42013-06-082-45/+90
|
* core: make options.c compile standalonewm42013-06-086-59/+58
| | | | | This also removes the split between "mplayer" and "common" opts (common opts used to be shared between mencoder and mplayer).
* core: rename cfg-mplayer.h to options.cwm42013-06-082-2/+2
|
* core: merge defaultopts.c into cfg-mplayer.hwm42013-06-085-125/+110
| | | | | There isn't really any reason why this should be in a separate source file.
* command: replace some show_ commands with propertieswm42013-06-075-131/+135
| | | | | | | | | | | show_chapters, show_tracks, and show_playlist are killed and replaced with the properties chapter-list, track-list, and playlist. The code and the output of these stays the same, this is just moving a lot of code around and reducing the number of properties. The "old" commands will still be supported for a while (to avoid making everyone angry), so handle them with the legacy layer. Add something to suppress printing the legacy warnings for these commands.
* command: human readable output for metadata propertywm42013-06-071-0/+10
| | | | | | | Slightly better output when printing ${metadata}. Print each metadata item as "name: value", instead of the raw list. It's still not very great, though. The old format is still available through ${=metadata} for things which dare to use the broken slave mode.
* core: reset pause state by default when going to next filewm42013-06-072-0/+5
| | | | Apparently this behavior is more intuitive/better to users.
* m_option: allow setting empty listswm42013-06-071-2/+5
| | | | There's no reason why this should be forbidden.
* ao_jack: remove global variableswm42013-06-071-71/+79
|
* ao_jack: align data sizes on audio frame sizewm42013-06-071-5/+5
| | | | | | | | | | Fixes crashes when playing with certain numbers of channels. The core assumes AOs accept data aligned on channels * samplesize, and ao_jack's play() function broke that assumption: mpv: core/mplayer.c:2348: fill_audio_out_buffers: Assertion `played % unitsize == 0' failed. Fix by aligning the buffer and chunk sizes as needed.
* ao_jack: switch to new AO APIwm42013-06-071-62/+62
|
* ao_jack: uncrustifywm42013-06-071-211/+236
|
* ao_oss: remove duplicated format infowm42013-06-071-50/+27
| | | | | Instead of having two big switch statements to convert between two audio formats, use a single table.
* ao_oss: remove global variableswm42013-06-071-80/+104
|
* ao_oss: switch to new AO APIwm42013-06-071-128/+117
|
* ao_oss: uncrustifywm42013-06-071-298/+334
|
* macosx_events: handle key modifiers with media keysStefano Pigozzi2013-06-062-27/+56
| | | | | | This was overlooked in the previous inplementation. Adding it required some refactoring of the `handleKeyDown:` method in order to extract common parts with `handleMediaKey:`.
* macosx_events: DRY up key lookup over dictionaryStefano Pigozzi2013-06-051-10/+12
| | | | | Two methods duplicated very similar behaviour. Extract method with the common behaviour.
* docs: update tech-overview.txtwm42013-06-051-9/+19
|
* keycodes: fix copy paste errorStefano Pigozzi2013-06-051-3/+3
| | | | Makes 213ad5d behave has intended.
* macosx_events: make remote property an instance variableStefano Pigozzi2013-06-052-7/+8
| | | | There was no reason for it to be public.
* command: add the current local time as a propertyJan-Marek Glogowski2013-06-041-0/+16
| | | | | | |