aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
| | * configure: OSX: check for X11 header conflict with corevideoGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check that headers from ApplicationServices and X11 do not conflict before enabling X11 support on OSX. Both headers would be included in vo_corevideo.m (through QuartzCore/QuartzCore.h and gl_common.h). The conflict exists on versions of Mac OSX prior to 10.7, where ApplicationServices includes the deprecated QuickDraw framework, resulting in a clash on the Cursor type definition.
| | * Makefile: fix OSX compilation with --disable-corevideoGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | cocoa_common.m (enabled under COCOA) depends on osx_common.c, but the latter was erroneously only enabled under COREVIDEO.
| | * cocoa_common, gl_common: add OSX specific getProcAddressGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | Run dlopen on the OpenGL dynamic library instead of on the binary. This should prevent crashes due to function conflicts when X11/lGL is linked. Remove mutual exclusion of the X11 and Cocoa backends.
| | * OSX, input: implement wakeup in response to Cocoa eventsGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add code to wake up the select() call in input.c when an OSX event is available and a Cocoa OpenGL backend is initialized. Fixes the slow response to input or other events in Cocoa-based VOs during long select() sleeps (e.g., when mplayer2 is paused) introduced by commit 7040968.
| | * vo_sharedbuffer: add this video outputGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This OSX video output is replaces the previous shared_buffer mode of vo_corevideo. It manages a shared buffer and a Cocoa distributed object to communicate with GUIs. Splitting this code into a separate VO allows to get rid of harmful code coupling, performance inefficiencies (useless image memory copies) and ugly code (big if-else conditionals).
| | * vo_corevideo: restructure this video outputGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure this video output to be similar to vo_gl, even if simpler and less feature complete (for example it's still missing EOSD support). Ideally, it should act as a decent fallback in the case where something breaks in the OSX support of vo_gl. Here's a summary of what changed: * Remove the shared buffer code since it wasn't using any function from the CoreVideo API. Moreover, its presence in vo_corevideo was forcing the non-GUI related code to perform more image copies than necessary. Equivalent shared-buffer functionality will be added in a separate new VO in the next commit (this means OSX GUIs will need to specify a different VO). * Clean up the code to conform a bit more to the mplayer2 conventions. Enforce 80 column wrapping, use a private struct for file variables, use the new libvo api. * Add OSD rendering using OpenGL instead of writing directly on the video image data. * Simplify the logic for the rendering function when dealing with panscan. * Add VOCTRL_REDRAW_FRAME support. * Add colormatrix support by using the built-in API provided by CoreVideo.
| | * vo_corevideo: use cocoa_common to display the windowGravatar Stefano Pigozzi2012-04-26
| | | | | | | | | | | | | | | | | | | | | Change vo_corevideo to use cocoa_common to create and manage the window. This doesn't affect external OSX GUIs, since they don't use vo_corevideo window management, but only read the image data from the shared buffer.
| | * vo_corevideo: use soft tabs (4 spaces)Gravatar Stefano Pigozzi2012-04-26
| | |
| | * win32: core: wake up more often to poll for inputGravatar Uoti Urpala2012-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | MSWindows does not have properly working support for detecting events on file descriptors. As a result the current mplayer2 code does not support waking up when new input events occur. Make the central playloop wake up more often to poll for events; otherwise response would be a lot laggier than on better operating systems during pause or other cases where the process would not otherwise wake up.
* | | ao_openal: fix crash when no device parameter is passedGravatar wm42012-04-25
| | |
* | | vo_directx: clear panscan borders in windowed modeGravatar wm42012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | The window size is normally clipped against desktop size due to the usage of WM_SIZING in w32_common.c. This is a useful (if accidental) feature, but vo_directx didn't handle it well: the areas not covered by video were filled with the colorkey, which looked ugly. Explicitly clear these borders with black.
* | | vo_gl: reject MS Windows native OpenGL as software rasterizerGravatar wm42012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | If the graphics driver doesn't provide its own OpenGL implementation, applications get Microsoft's OpenGL emulation. Even if it should be the case that it's not strictly a software renderer, it provides OpenGL 1.1 only, no shaders in any form, and has other limitations that make it almost completely useless for mplayer.
* | | vo_gl: refuse to use software renderer, unless explicitly requestedGravatar wm42012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_gl will now fail at initialization if a software renderer is detected. This is the same behavior as vo_gl_nosw. Making this the default behavior is preferable, because it will simplify positioning vo_gl in the VO autoprobe list (video_out_drivers[]). Also, vo_gl_nosw exists only if X11 support is configured. Move gl in place of gl_nosw. Add the "sw" suboption to vo_gl to allow using vo_gl even if a software renderer is detected. vo_gl_nosw is now completely equivalent to vo_gl. It is kept in order not to break too many user configurations, but should be considered deprecated.
* | | win32: don't crash if vo_w32_uninit() is called without vo_w32_init()Gravatar wm42012-04-24
| | | | | | | | | | | | | | | This is a recent regression. At least vo_direct3d uses vo_w32_uninit() in this way, and crashed if initialization failed at an early point.
| | * core: change initial sync with --delay, video stream switchGravatar Uoti Urpala2012-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make A/V sync at the start of playback with nonzero --delay behave the same way as it does when seeking to the beginning later, meaning video plays from the start and audio is truncated or padded with silence to match timing. This was already the default behavior in case the streams in the file started at different times, but not if the mismatch was due to --delay. Trigger similar audio synchronization when switching to a new video stream. Previously, switching a video stream on after playing for some time in audio-only mode was buggy and caused initial desync equal to the duration of prior audio-only playback.
| | * core: uninitialize VO and AO when no track playsGravatar Uoti Urpala2012-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninitialize video and audio outputs when switching to a file without a corresponding track (audio-only file / file with no sound), or when entering --idle mode. Switching track choice to "off" during playback already did this. It could be useful to have a mode where the video window stays open even when no video plays, but implementing that properly would require more than just leaving the window on screen like the code did before this commit.
| | * configure: --enable-debug: don't change other compiler flagsGravatar Uoti Urpala2012-04-19
| | | | | | | | | | | | | | | | | | | | | | | | The --enable-debug and --enable-profile options set their own compiler flags, completely different from normal flag selection. These flags sucked; especially '-W' (an obsolete alias for '-Wextra') generated a huge number of irrelevant warnings. Change configure to only add "-g" or similar to the flags that would be used otherwise.
| | * ad_ffmpeg: switch to avcodec_decode_audio4()Gravatar Uoti Urpala2012-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch libavcodec audio decoding from avcodec_decode_audio3() to avcodec_decode_audio4(). Instead of decoding directly to the output buffer, the data is now copied from the libavcodec output packet, adding an extra memory copy (optimizing this would require some interface changes). After libavcodec added avcodec_decode_audio4() earlier, it dropped support for splitting large audio packets into output chunks of size AVCODEC_MAX_AUDIO_FRAME_SIZE or less. This caused a regression with the previous API: audio files with huge packets could fail to decode, as libavcodec refused to write into the AVCODEC_MAX_AUDIO_FRAME_SIZE buffer provided by mplayer2. This occurrend mainly with some lossless audio formats. This commit restores support for those files; there are now no fixed limits on packet size.
| | * stream_ffmpeg: fix broken line from 30afc64532ff61Gravatar Uoti Urpala2012-04-18
| | | | | | | | | | | | | | | | | | | | | Commit 30afc64532ff61 ("stream_ffmpeg: switch to libavformat avio API") somehow contained a nonsense line which broke the control() function. Fix. Also add avformat_network_init() to central libav initialization code to avoid warnings.
| | * subassconvert: make subrip attribute parsing more robustGravatar Uoti Urpala2012-04-17
| | | | | | | | | | | | | | | | | | | | | Add general code to separate the HTML-like attribute=value syntax used in srt font tags into attribute and value parts. This simplifies some of the parsing code, makes detection of malformed input more robust, and allows warning about unrecognized attributes.
| | * subassconvert: handle unquoted attributes in subrip font tagsGravatar wm42012-04-17
| | | | | | | | | | | | | | | Previously, mplayer didn't convert tags like <font color=#00FF00>. But such subtitles exist in the wild, and should be handled.
* | | subassconvert: handle unquoted attributes in subrip font tagsGravatar wm42012-04-16
| | | | | | | | | | | | | | | Previously, mplayer didn't convert tags like <font color=#00FF00>. But such subtitles exist in the wild, and should be handled.
* | | gl_common: do not call glXGetClientString() and glXGetServerString()Gravatar wm42012-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only call glXGetClientString(), which contains all supported GLX extensions. Extensions only returned by glXGetClientString() or glXGetServerString() are not necessarily actually supported. This essentially reverts svn commit 29721 (git fe3b9a88ce62ab). It is not known whether this commit actually fixed anything, such as working around a broken OpenGL driver.
| | * screenshot: fix dependency on sizeof(AVFrame)Gravatar Uoti Urpala2012-04-15
| |/ | | | | | | | | | | | | | | | | The AVFrame data structure may be extended at the end in new binary-compatible libavcodec versions. Therefore applications should not depend on the size of the structure. But screenshot.c declared an "AVFrame pic;" on stack. Change the code to allocate an AVFrame with avcodec_alloc_frame() instead. The frame is now stored in struct screenshot_ctx (rather than reallocated each time).
* | win32: fix handling of AltGrGravatar wm42012-04-14
| | | | | | | | | | | | | | Windows implicitly enables Ctrl+Alt on AltGr. These modifiers are unwanted for keys that have special mappings on AltGr. Add warning about different behavior on wine.
* | win32: simplify icon loadingGravatar wm42012-04-14
| | | | | | | | | | I have no idea why the code used this roundabout method. Also detab mplayer.rc.
* | win32: move global variables into a struct & some refactoringGravatar wm42012-04-14
| | | | | | | | | | | | | | | | | | | | This reflects the changes done to x11_common in mplayer2 some years ago. It makes it possible to open multiple VOs at once. The removed defines are probably for ancient versions of MinGW with incomplete headers. Remove some minor code duplication.
* | win32: use GetKeyState() instead of maintaining the state manuallyGravatar wm42012-04-14
| |
| * subs: only use "subfont.ttf" as libass fallback if it existsGravatar Uoti Urpala2012-04-14
| | | | | | | | | | | | | | | | | | | | Libass was set to use the file "subfont.ttf" in the user configuration directory as a default/fallback font. This triggered "Error opening font" errors from libass if it tried to use the fallback font for some glyph and the user had not copied/linked any font there (and there is generally little reason to do that nowadays when using fontconfig). Check whether the path exists and only set it in ass_set_fonts() if it does.
| * demux_lavf: try harder to make up a frame rateGravatar Uoti Urpala2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | Frame rate information is mostly irrelevant for playback, but it's needed at least to convert frame numbers used in some subtitle formats (like MicroDVD) into timestamps. Libavformat stopped making up a frame rate if no "reliable" information is available (commit 7929e22bd "lavf: don't guess r_frame_rate from either stream or codec timebase", 1.5 months ago). This caused a regression with AVI files and MicroDVD subtitles. Add a heuristic similar to what libavformat used to have, to make up FPS values which should work at least for the AVI+MicroDVD use case.
* | Merge remote-tracking branch 'origin/master'Gravatar wm42012-04-13
|\ \ | | | | | | | | | | | | Conflicts: libvo/vo_kva.c
* | | win32: prevent modifier keys from getting stuckGravatar wm42012-04-13
| | | | | | | | | | | | | | | | | | Especially Alt would get stuck when using Alt+Tab to change focus. Apparently Windows doesn't send an appropriate key up message. Solve this by resetting the modifier state on focus change.
| | * stream_pvr: fix field size / snprintf size mismatchGravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | struct station_elem_s had a field "name[8]", but the rest of the code used PVR_STATION_NAME_SIZE as field size in snprintf and some other calls accessing the field. Change the field size to PVR_STATION_NAME_SIZE so it matches the accesses.
| | * ao_coreaudio: fix partial volume controlGravatar wm42012-04-11
| | | | | | | | | | | | | | | | | | | | | If digital pass-through is used, this supported setting the volume (just mute, actually), but not getting the volume. This will probably lead to a stuck mute state in the mplayer frontend. Make the code respond to volume queries even if digital pass-through is used.
| | * ao_pulse: support native mute controlGravatar wm42012-04-11
| | |
| | * ao_alsa: support native mute controlGravatar wm42012-04-11
| | |
| | * mixer: support native audio driver muteGravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make mixer support setting the mute attribute at audio driver level, if one exists separately from volume. As of this commit, no libao2 driver exposes such an attribute yet; that will be added in later commits. Since the mute status can now be set externally, it's no longer completely obvious when the player should automatically disable mute when uninitializing an audio output. The implemented behavior is to turn mute off at uninitialization if we turned it on and haven't noticed it turn off (by external means) since.
| | * audio: fix unmute-at-end logicGravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The player tried to disable mute before exiting, so that if mute is emulated by setting volume to 0 and the volume setting is a system-global one, we don't leave it at 0. However, the logic doing this at process exit was flawed, as volume settings are handled by audio output instances and the audio output that set the mute state may have been closed earlier. Trying to write reliably working logic that restores volume at exit only would be tricky, so change the code to always unmute an audio driver before closing it and restore mute status if one is opened again later.
| | * audio: restore balance setting after reinitGravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | Restore the audio balance setting when the audio chain is reinitialized (also after switching to another file). Also add a note about the balance code being seriously buggy.
| | * audio: restore volume setting after AO reinit if neededGravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPlayer volume control was originally implemented with the assumption that it controls a system-wide volume setting which keeps its value even if a process closes and reopens the audio device. However, this is not actually true for --softvol mode or some audio output APIs that only consider volume as a per-client setting for software mixing. This could have annoying results, as the volume would be reset to a default value if the AO was closed and reopened, for example whem moving to a new file or crossing ordered chapter boundaries. Add code to set the previous volume again after audio reinitialization if the current audio chain is known to behave this way (softvol active or the AO driver is known to not keep persistent volume externally). This also avoids an inconsistency with the mute flag. The frontend assumed the mute status is persistent across file changes, but it could be similarly lost. The audio drivers that are assumed to not keep persistent volume are: coreaudio, dsound, esd, nas, openal, sdl. None of these changes have been tested. I'm guessing that ESD and NAS do per-connection non-persistent volume settings. Partially based on code by wm4.
| | * audio: mixer: change logic for AOs with no volume controlGravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The volume filter was automatically inserted if setting AO volume failed. Remove that logic, and instead enable softvol mode fully if querying current volume (which will happen before any set attempts) fails. Fully switching to softvol mode is more robust, and any case where the behavior would differ (the behavior is neither that both querying/setting always work nor that both always fail) would have been buggy.
| | * audio: keep volume level internally (not only in AO)Gravatar Uoti Urpala2012-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current volume was always queried from the the audio output driver (or filter in case of --softvol). The only case where it was stored on mixer level was that when turning off mute, volume was set to the value it had before mute was activated. Change the mixer code to always store the current target volume internally. It still checks for significant changes from external sources and resets the internal value in that case. The main functionality changes are: Volume will now be kept separately from mute status. Increasing or decreasing volume will now change it relative to the original value before mute, even if mute is implemented by setting AO level volume to 0. Volume changes no longer automatically disable mute. The exception is relative changes up (like the volume increase key in default keybindings); that's the only case which still disables mute. Keeping the value internally avoids problems with granularity of possible volume values supported by AO. Increase/decrease keys could work unsymmetrically, or when specifying a smaller than default --volstep, even fail completely. In one case occurring in practice, if the AO only supports changing volume in steps of about 2 and rounds down the requested volume, then volume down key would decrease by 4 but volume up would increase by 2 (previous volume plus or minus the default change of 3, rounded down to a multiple of 2). Now, the internal value will keep full precision.
| | * libao2: change control() types to enum, remove unused onesGravatar Uoti Urpala2012-04-08
| |/ | | | | | | | | | | | | | | | | Change the audio driver control() command argument from "int" to "enum aocontrol". Remove unused control types (SET_DEVICE, GET_DEVICE, QUERY_FORMAT, SET_PLUGIN_DRIVER, SET_PLUGIN_LIST). The QUERY_FORMAT one looks like there's a possibility such functionality could be useful in the future, but as ao_oss was the only driver to have an actual implementation of it, the current code wasn't worth keeping.
| * ao_alsa: use "Master" mixer channel instead of "PCM" by defaultGravatar wm42012-04-08
| | | | | | | | | | | | | | Do this, because the "Master" channel normally provides proper mute control. The old default can be forced with: --mixer-channel=PCM
* | win32: make F10 key not enter the window menuGravatar wm42012-04-07
| | | | | | | | | | | | | | | | | | | | Normally, F10 enters the window menu (it's invisible at first, and the blocking/recursive message handling by Windows makes it look like mplayer was paused, without much visual indication). Stop this almost completely useless behavior by signalling Windows that the F10 key was handled. This makes the F10 key usable as normal mplayer shortcut. This is probably still somewhat questionable.
* | win32: fix behavior of enter keyGravatar wm42012-04-07
| | | | | | | | | | | | | | | | | | | | | | Windows sends the same character code on CTRL+Enter and CTRL+J. I'm not sure what's the proper way to deal with this, but the hack added with this commit seems to work fine. Just to be sure, don't forward the modified wParam to DefWindowProc. Add the missing "break;" in the switch statement, which sometimes produced bogus mouse button events. Fix the F12 key, which wasn't mapped correctly due to a typo.
* | vo_directx: do not do aspect scaling in windowed mode.Gravatar reimar2012-04-06
| | | | | | | | | | | | This matches behaviour of other vos. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34840 b3059339-0415-0410-9bf9-f77b7e298cf2
* | win32: use more unicode functionsGravatar wm42012-04-06
| | | | | | | | | | | | | | | | Use the *W variants instead of the implicit *A functions. (One could define the UNICODE macro to switch the functions without suffix from A to W, but I'm too lazy to figure out how portable that is, etc.) Also make sure io.h defines a unicode aware printf().
* | win32: support key modifiers (shift, ctrl, alt)Gravatar wm42012-04-06
| | | | | | | | | | | | | | | | | | | | Support for this is rather simple, and some combinations of modifiers and keys don't work. For example, Ctrl+Alt+character is not supported, because Windows doesn't emit a WM_CHAR in this case. Also add support for the pause and print screen keys. Remove the pointless KEY_CTRL translation. Remove KEY_CTRL altogether, because it was not clear what it was actually supposed to mean.
| * build: remove OS/2 supportGravatar Uoti Urpala2012-04-06
| |