summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* stream: more consistent checks for whether stream is seekablewm42013-11-031-6/+10
| | | | | | | | | Never check s->seek (except in init), because it'd have to check s->flags anyway. Also, for fast skippable streams (like pipes), don't set the bit that indicates support for seek forward. Make sure s->end_pos is always 0 for unseekable streams. Lots of code outside of stream.c uses this to check seeking support.
* stream: reconnecting doesn't make sense if stream is not seekablewm42013-11-031-0/+2
| | | | | | | This stops mpv from being stuck in reconnecting at the end of the file with some unseekable streams. Test URL: http://playerservices.streamtheworld.com/pls/CBC_R1_VCR_H.pls
* w32: implement functionality required for window-scalewm42013-11-021-0/+23
| | | | Same semantics with respect to fullscreen as x11.
* x11: make window-scale use windowed size in fullscreen modewm42013-11-021-2/+2
| | | | | | This is a bit more intuitive, since before, the window size was just set to something random when setting the window-scale property during fullscreen.
* ta: re-add MinGW cargo cultingwm42013-11-021-0/+6
| | | | | | | | Not really cargo cult, but an unexplainable, needless difference that just exists to annoy us. Fixes that gcc on MinGW treats format specifiers in MSVC mode. Just why? Why?
* demux: rename Windows symbolswm42013-11-026-134/+110
| | | | | | | | | | | | | | | | | | | | There are some Microsoft Windows symbols which are traditionally used by the mplayer core, because it used to be convenient (avi was the big format, using binary windows decoders made sense...). So these symbols have the exact same definition as the Windows one, and if mplayer is compiled on Windows, the symbols from windows.h are used. This broke recently just because some files were shuffled around, and the symbols defined in ms_hdr.h collided with windows.h ones. Since we don't have windows binary decoders anymore, there's not the slightest reason our symbols should have the same names. Rename them to reduce the risk for collision, and to fix the recent regression. Drop WAVEFORMATEXTENSIBLE, because it's mostly unused. ao_dsound defines its own version if the windows headers don't define it, and ao_wasapi is not available on systems where this symbol is missing. Also reindent ms_hdr.h.
* demux_mkv: fix warningwm42013-11-021-1/+1
| | | | | | | | Now that matroska.pl generates struct fields in deterministic order, this should be the last time I change this. (gcc and clang shouldn't warn about this line of code, but since they do, we want to workaround and silence the warning anyway.)
* matroska.pl: Sort the generated struct field listDiogo Franco (Kovensky)2013-11-021-2/+2
| | | | | | | Newer versions of perl randomize the hash used for hashes every time it's run; this makes the order of the fields be non-deterministic. Tack a sort there to make it deterministic. Needed to fix (or allow fixing) a buggy gcc warning.
* Fix some more -Wshadow warningswm42013-11-0110-36/+36
| | | | | | These aren't printed with newer gcc or clang versions for some reason. All of them seem to be about local variables shadowing global functions.
* tl_matroska: initialize segment related arrays with 0wm42013-11-011-4/+6
| | | | | | | | | | | | | mpv crashed when linked files were not found. The reason was that the chapters array contained some uninitialized data. I have no idea how this code works (after the merge). The old code actually seems to remove missing chapters, while the new code just leaves them unintiialized. Work around the crash by initializing the chapters array (and a bunch of other things) with 0, which means the missing chapter will be located at 00:00:00 and have no name. There is a regression since commit af0306d.
* video: check profiles with hardware decodingwm42013-11-018-72/+142
| | | | | | | | | | | | | | | We had some code for checking profiles earlier, which was removed in commits 2508f38 and adfb71b. These commits mentioned that (working) hw decoding was sometimes prevented due to profile checking, but I can't find the samples anymore that showed this behavior. Also, I changed my opinion, and I think checking the profiles is something that should be done for better fallback to software decoding behavior. The checks roughly follow VLC's vdpau profile checks, although we do not check codec levels. (VLC's profile checks aren't necessarily completely correct, but they're a welcome help anyway.) Add a --vd-lavc-check-hw-profile option, which skips the profile check.
* demux_mkv: use a more universal zero initializerwm42013-11-011-1/+1
| | | | | | | | | | | | Unfortunately, we can't avoid this warning 100%, because ebml_info is written by a Perl script. I think the script writes the struct fields in random order (thanks Perl), so there's no way to know whether the first struct field is a scalar or a struct. At least {0} is always valid here, even if it shows a warning. (The compilers are wrong, see e.g. [1].) [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
* Enable -Wshadowwm42013-11-017-17/+16
| | | | | | | | | This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning.
* options: fix positional suboption asrgumentswm42013-11-011-2/+2
| | | | | | | | | E.g. "-vf scale=848:480" set the w argument twice, instead of setting w and then h. This was caused by accidental shadowing of a local variable. Regression since probably 4cd143e.
* input: show deprecation warnings for some recently replaced commandswm42013-11-011-4/+4
| | | | Let's see if I get annoyed reactions...
* command: replace speed_mult with multiply commandwm42013-10-315-17/+5
| | | | The compatibility layer still takes care of the old speed_mult command.
* command: add generic "multiply" commandwm42013-10-316-0/+85
| | | | Essentially works like "add".
* command: add property to scale window sizewm42013-10-314-0/+51
|
* x11: factor out normal window resize codewm42013-10-311-23/+31
| | | | | | | | As preparation for resizing the window with input commands in the following commit. Since there are already so many functions which somehow resize the window, add the word "highlevel" to the name of this new function.
* sd_lavc: display DVD subs with unknown durationwm42013-10-311-0/+6
| | | | | | | | | | | | | | | | | | DVD subs (rarely) have subtitle events without end timestamp. The duration is unknown, and they should be displayed until they're replaced by the next event. FFmpeg fails hard to make us aware whether duration is unknown or actually 0, so we can't distinguish between these two cases. It fails at this twice: AVPacket.duration is set to 0 if duration is unknown, and AVSubtitle.end_display_time has the same issue. Add a hack that considers all bitmap subtitles with duration==0 as events with uknown length. I'd rather accidentally display a hidden subtitle (if they exist at all), instead of not displaying random subtitles at all. See github issue #325.
* ao_pulse: fix channel layoutswm42013-10-311-1/+4
| | | | | | | | The code was selecting PA_CHANNEL_POSITION_MONO for MP_SPEAKER_ID_FC, which is correct only with the "mono" channel layout, but not anything else. Remove the mono entry, and handle mono separately. See github issue #326.
* vd_lavc: add more ifdeffery and ffmpeg cargo culting for correctnesswm42013-10-311-7/+13
| | | | | | | | | | | | | We mixed the "old" AVFrame management functions (avcodec_alloc_frame, avcodec_free_frame) with reference counting. This doesn't work correctly; you must use av_frame_alloc and av_frame_free. Of course ffmpeg doesn't warn us about the bad usage, but will just mess up things silently. (Thanks a lot...) While the alloc function seems to be 100% compatible, the free function will do bad things, such as freeing memory that might still be referenced by another frame. I didn't experience any actual bugs, but maybe that was pure luck.
* dec_video: remove unused declaration of a former global variablewm42013-10-311-2/+0
|
* encoding-example-configs: add more comments regarding the scaling methodRudolf Polzer2013-10-311-2/+16
|
* gl_common: osx: fix compilation with latest XQuartz RCStefano Pigozzi2013-10-301-1/+1
| | | | Looks the gl.h header in XQuartz is incompatible with the one in OS X 10.9.
* tech-overview.txt: reflect recent updateswm42013-10-301-21/+32
| | | | mplayer.c split, and some other things.
* ta: track location debug info in 2 more caseswm42013-10-301-0/+2
| | | | Was overlooked.
* x11: restore support for --wid=0wm42013-10-301-2/+4
| | | | | | | | | | This stopped working when the code was changed to create a window even if --wid is used. It appears we can't create our own window in this case, because in X11 there is no difference between a window with the root window as parent, and a window that is managed by the WM. So make this (kind of worthless) special case use the root window itself.
* x11: remove ancient metacity hackwm42013-10-301-14/+1
| | | | | Tested with recent metacity; this code is not triggered anymore. The code was added in 2003 and probably has been unused for years.
* x11: minor cosmeticswm42013-10-301-16/+11
|
* main: improve a terminal messagewm42013-10-301-1/+1
| | | | Better prefer real English...
* player: merge mp_osd.h into mp_core.hwm42013-10-307-59/+33
| | | | | | | | Just doing this because mp_osd.h and osd.c is not consistent. There are some other header files (command.h and screenshot.h), but since I don't feel too good about inflating mp_core.h, I'm not merging them, at least not yet.
* mp_core: sort function prototypes by source filewm42013-10-301-58/+68
| | | | | | | I considered making a header file for each .c file, but decided against it. Asking around, not making separate headers was deemed acceptable. In the end, all of these depend on MPContext and store state inside of it, so separate headers aren't all that useful anyway.
* ao_alsa: return negative value on error in play()wm42013-10-301-3/+3
| | | | | No functional change, because the only user of ao_play() ignores return values below 1.
* Fix style of the HP Slate 7 vf-add line.Rudolf Polzer2013-10-301-1/+1
|
* encoding-example-profiles: support HP Slate 7's weird aspect.Rudolf Polzer2013-10-301-5/+37
| | | | Also, replace broken noup= by lavfi expressions.
* Split mplayer.cwm42013-10-3017-5084/+5400
| | | | | | | | | | | | | | | | | | | | mplayer.c was a bit too big. Split it into multiple files. I hope the way it's split makes sense. Maybe some things don't make too much sense, or go against intuition. These will fixed as soon as I notice them. Some files are a bit questionable (misc.c, osd.c, configfiles.c), and suggestions how to organize this better are welcome. Regressions are possible due to reorganized include statements. Obviously I didn't just copy mplayer.c's orgy of include statements, but recreated them for each file. It's easily possible that there are oversights and mistakes, which will show up on other platforms. There is one actual change: the public avutil.h include is removed from encode.h, and I tried to replace most FFMIN/FFMAX/av_clip uses. I consider using libavutil too much as dangerous, because the set of include files they recursively pull in is rather arbitrary and is different between FFmpeg and Libav.
* Move files part of the playback core to player sub-directorywm42013-10-3018-50/+48
| | | | | | | | All these files access mp_core.h and MPContext, and form the actual player application. They should be all in one place, and separate from the other sources that are mere utility helpers. Preparation for splitting mplayer.c into multiple smaller parts.
* gl_x11: change error message when GL3 context creation failswm42013-10-281-1/+1
| | | | | | | | | | | | | | On systems that provide legacy OpenGL (up to 2.1), but not GL3 and later, creating a GL3 context will fail. We then revert to legacy GL. Apparently the error message printed when the GL3 context creation fails is confusing. We could just silence it, but there's still a X error ("X11 error: GLXBadFBConfig"), which would be quite hard to filter out. For one, it would require messing with the X11 error handler, which doesn't even carry a context pointer (for application private data), so we don't even want to touch it. Instead, change the error message to inform the user what's actually happening: a fallback to an older version of OpenGL.
* getch2: assume EOF when input file descriptor is invalidwm42013-10-281-2/+5
| | | | | | | | | | | | | When starting mpv with nohup, file descriptor 0 seems to be invalid for some reason. (I'm not quite sure why it should be... /proc/pid/fd/0 seems to indicate it's just /dev/null, and using /dev/null explicitly shows that it works just fine.) select() will always immediately return, and this causes mpv to burn CPU without reason. Fix this by treating it as EOF when read() returns EBADF. Also add EINVAL to this condition, because it seems like a good idea.
* getch2: move global state to file scope variableswm42013-10-281-6/+5
| | | | | Using static variables for mutable state inside functions is a bad idea, because it's not immediately obvious that it is what it is.
* mplayer: handle subtitle renderer cleanup via uninit_playerwm42013-10-282-10/+24
| | | | | | | | | This might actually fix an issue with DVB channel switching, because that uses some sort of hack to reinitialize the demuxer, which causes the subtitle renderer to initialize twice. As consequence, the assert in add_subtitle_fonts_from_sources() would trigger. I didn't actually test the DVB case, because I don't have the hardware.
* x11_common: refactor of fstype codewm42013-10-281-102/+73
| | | | This is completely pointless, but it still somehow bugged me.
* cocoa: apply the more invasive constraining only with cmd+1/2/3Stefano Pigozzi2013-10-281-2/+10
| | | | | Regression from bc49957 Fixes #321
* command: disable autorepeat for some commands (actually properties)wm42013-10-283-5/+29
| | | | | | | | | | | | Disable autorepeat for the "add"/"cycle" commands when changing properties that are choices (such as fullscreen, pause, and more). In these cases, autorepeat is not very useful, and can rather harmful effects (like triggering too many repeated commands if command execution is slow). (Actually, the commands are just dropped _after_ being repeated, since input.c itself does not know enough about the commands to decide whether or not they should be repeated.)
* x11: fix border togglingwm42013-10-272-2/+5
| | | | | | | | | | | | | Trying to toggle the border during fullscreen (with "cycle border") would leave the window stuck without border, and it couldn't be restored. This was because vo_x11_decoration() always excepted to be called when toggling the state, and thus confusing the contents of the olddecor variable. Add got_motif_hints to hopefully prevent this. Also, when changing the border, don't take fs in account. May break on older/broken WMs, but all in all is in fact more robust and simpler, because you do not need to update the border state manually when returning from fullscreen.
* vo_xv: check whether image allocation succeedswm42013-10-271-6/+24
|
* command: don't include stream_dvd.hwm42013-10-271-3/+0
|
* af: replace macros with too generic nameswm42013-10-2613-44/+35
| | | | | | | | Defining names like min, max etc. in an often used header is not really a good idea. Somewhat similar to MPlayer svn commit 36491, but don't use libavutil, because that typically causes us sorrow.
* gl_common: suggest --vo=opengl-old if OpenGL 2.1 missingwm42013-10-261-1/+6
| | | | | | | If the caller requests at least OpenGL 2.1 (which --vo=opengl does), but we get OpenGL 1.x, suggest using opengl-old. Based on a patch by pfor on IRC.
* af_volume: some more cosmeticswm42013-10-261-27/+15
|
* af_volume: switch to new option parsingwm42013-10-262-38/+25
|
* af_volume: uncrustifywm42013-10-261-94/+85
| | | | Also, use more C99 and remove "register" keywords.
* af_volume: don't change volume if nothing is to be changedwm42013-10-261-0/+2
| | | | | On the float path. Note that this skips clipping, but we expect that everything on the audio-path is pre-clipped anyway.
* af_volume: remove unused featureswm42013-10-264-60/+1
| | | | | | Roughly follows MPlayer svn commits 36492 and 36493. We also remove the volume peak reporting. (There are much better libavfilter filters for this, I think.)
* mpvcore: add a note about desync on track switchesBen Boeckel2013-10-261-0/+1
|
* docs: osc: update cache display percentage.ChrisK22013-10-261-1/+1
|
* osc: display cache status only below 45%ChrisK22013-10-261-1/+1
| | | | | Turnes out, when playing stuff over WiFi, the cache may go below 48% quite frequently.
* osc: fix bug for no-duration casesChrisK22013-10-261-1/+1
|
* osc: add experimental seekbar tooltipChrisK22013-10-261-6/+46
| | | | | | Not up to my quality standards (need ASS boundingboxes), so disabled by default and undocumented for now. Can be enabled with seektooltip=yes in plugin_osc.conf
* osc: make sure the OSC actually fits into the videoChrisK22013-10-261-1/+7
|
* options: don't let watch_later etc. overwite command line optionswm42013-10-254-24/+46
| | | | | | | | | | | | | | | There are certain cases where mpv will automatically set options, such as per-file configs, per protocol/VO/AO/extension profiles, and watch_later resume configs. All these were overwriting the user's options, even when they were specified on command line. Add something that explicitly preserves command line options. This means you can now actually use the command line to override any options that the playback resume functionality backups and restores. It still happily overrides options set at runtime (e.g. changed via properties while playing a file; then playing the next file might override them again), but maybe that's not a problem with typical use.
* ao_alsa: don't include alloca.hwm42013-10-252-2/+0
| | | | | | | | It's true that ALSA uses alloca() in some of its API functions, but since this is hidden behind macros in the ALSA headers, we have no reason to include alloca.h ourselves. Might help with portability (FreeBSD).
* README: add a link to the wiki about the FFmpeg vs. Libav issuewm42013-10-251-0/+8
|
* manpage: clarify --heartbeat-interval operationwm42013-10-251-0/+5
|
* x11_common: reduce screensaver heartbeat from 30 to 10 secondswm42013-10-251-1/+1
| | | | | Apparently this fixes issues with Gnome, which has a smaller timeout. See github issue #315.
* cocoa: constraint the window position a little moreStefano Pigozzi2013-10-251-1/+6
| | | | | The intention of this is to not make the window go outside the screen when changing dimensions from 2x to .5x.
* mplayer: make --length relative to actual start of file, instead of 0wm42013-10-251-1/+2
| | | | | We always use the file's timestamps, so the start time can be easily something different from 0. Make the --length option respect this.
* m_config: slightly improve name handlingwm42013-10-252-16/+10
|
* m_config: remove unused fieldswm42013-10-252-9/+1