summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* client API: trigger MPV_EVENT_VIDEO_RECONFIG on vf recreationwm42014-08-061-0/+2
| | | | | Until now, it was done only on VO reconfig, but this easily can miss some events, in case the VO output format doesn't change.
* audio: fix inverted conditionwm42014-08-061-6/+4
| | | | | Recent regression. Could perhaps make gapless audio fail to work correctly.
* wayland: remove redundant lineAlexander Preisinger2014-08-061-1/+0
|
* wayland: changes for nested compositorsAlexander Preisinger2014-08-061-20/+50
| | | | | Adds necessary checks for nested compositors which only have limited interfaces. Might also be useful for other minimal compositors.
* build: allow to disable building the cplayerStefano Pigozzi2014-08-062-10/+16
|
* build: expose waf variants to the userStefano Pigozzi2014-08-062-0/+35
| | | | | This allows the user to execute multiple configuration and build steps. It can be used for several scenarios where you need different compiler flags.
* cocoa: fix build by using the correct HAVE_* macroStefano Pigozzi2014-08-062-6/+6
| | | | | | | | | | This builds but both the libmpv example and the cplayer block infinitely when building libmpv. That's because we wait inifinitely in `dispatch_sync` as there's no event loop in the main thread that allows for libdispatch to work.. Whiel we are at it, we should probably investigate how to use mp_dispatch instead since it is a little lower level and could give us higher control in building and event loop.
* cocoa: macosx_application needs cocoa-applicationFRAU KOUJIRO2014-08-063-4/+8
|
* build: cocoa-application config targetFRAU KOUJIRO2014-08-061-11/+23
| | | | | I had to put it after video options because it depends on cocoa; is there anywhere better to put it rather than making a new group?
* cocoa: move handleFilesArray: to macosx_eventsFRAU KOUJIRO2014-08-065-19/+20
|
* cocoa: move set_input_context to macosx_eventsFRAU KOUJIRO2014-08-065-9/+10
|
* cocoa: sync inputContext inside EventsResponderFRAU KOUJIRO2014-08-063-12/+28
|
* cocoa: decouple events from application somewhatFRAU KOUJIRO2014-08-064-64/+118
|
* win32: fix buildwm42014-08-051-1/+0
|
* build: move def file to libmpv/wm42014-08-052-1/+1
| | | | This is more consistent with mpv.pc, which is also in libmpv/.
* win32: create OpenGL context on the GUI threadwm42014-08-053-12/+40
| | | | | | | | | | | | | | | | This fixes the fullscreen issues on Intel for me. I'm baffled by it and don't understand why this suddenly works. Intel drivers being shit? Windows being shit? HWND or HDC being only 97% thread-safe instead of 98%? Me missing something subtle that is not documented anywhere? Who knows. Now instead of creating the HDC and OpenGL context on the renderer thread, they're created on the GUI thread. The renderer thread will then only call wglMakeCurrent, SwapBuffers, and OpenGL standard functions. Probably fixes github issue #968.
* win32: cleanup OpenGL context creationwm42014-08-051-37/+33
| | | | | Might handle some corner cases better. In particular, always call wglMakeCurrent() with non-NULL HDC argument.
* build: syms: reindentStefano Pigozzi2014-08-051-29/+28
| | | | | | | We avoided reindenting this in the past to allow merging upstream changes. In hindsight these are very unlikely and we are actually doing changes on the code, so it's better to have the correct indentation and formatting in our source file.
* build: syms: fix *.def file for mach-o binary formatStefano Pigozzi2014-08-051-1/+1
| | | | | There was a missing trailing newline which caused some warnings when calling `ld`.
* options: fix key-value-list optionswm42014-08-051-6/+11
| | | | | | | | The parser can be called with dst (the target) set to NULL if the option should be verified only. The code didn't respect this, and could result in crashes when used in config profiles or filter sub-options. Fixes #981.
* client API: add and use the MPV_MAKE_VERSION macrowm42014-08-053-10/+9
| | | | | | | This is probably nicer. The actual version number doesn't change (other than the minor being incremented). The "| 0UL" is to make the type unsigned long int, like it was before.
* build: list exported symbols explicitlywm42014-08-054-44/+44
| | | | | | | | | | | Instead of using a regex to match names to be exported from the libmpv dynamic shared library, use a libmpv.def file, which lists all exported functions explicitly. This reduces the platform specifics in syms.py. I'm not sure if the separate compile_sym task is still needed (it could probably be collapsed, which would concentrate the platform specifics into one place).
* build: fix export of libmpv symbols on mingwwm42014-08-051-1/+1
| | | | The _ usually prefixed to functions on Windows was unexpectedly missing.
* build: fix cross-compilation of libmpvwm42014-08-051-1/+3
| | | | | | | libmpv requires nm for creating the list of exported symbols (this is done in syms.py). We should probably just make this list static instead, but since this involves platform-specific code, for now this quick-fix will do.
* vdpau: don't crash on flipped imageswm42014-08-051-5/+12
| | | | | | | | | | It seems the vdpau API does not support these. Do a semi-expensive emulation of it. On the other hand, it's not like this is a commonly-used feature. (It might be better to make --vf=flip always copy instead of flipping it via pointer tricks - but everything allows flipped images, and even decoders or libavfilter filters could output them.)
* sub: fix subtitle timing for TSwm42014-08-041-2/+6
| | | | | | | | The subtitle timing logic always used the demuxer's start time as video offset. This made external subtitle files "just work" with file formats like TS, which usually have a non-0 start time. But it was wrong for subtitles muxed with the TS, so adjust the time offset explicitly with external files only.
* sub: don't read packets if video and audio are disabledwm42014-08-041-1/+1
| | | | | | | | | Although disabling both video and audio is surely an obscure corner case, it's allowed, and we don't want the demuxer to skip arbitrary packets. Basically, make the heuristic for checking interleaved files affect external files only.
* gl_wayland: Don't try to resize the egl_window before it existsMichael Forney2014-08-041-0/+3
| | | | | | | If the compositor sends a configure event immediately after a window is created (for example, if it implements tiling window management), mpv will attempt to call wl_egl_window_resize before it has actually created the egl_window, causing a crash.
* input.conf: remap 2 keyswm42014-08-031-3/+4
| | | | | | | | | | Nobody uses 'c' (except accidentally) - remove. Everyone agrees that OSD level cycling on 'o' is dumb, so map it to show_progress instead. Cycling the OSD level is now available on 'O'. No reason to ummap 'P' yet. Also see issue #973.
* player: some further playloop cleanupswm42014-08-035-53/+58
| | | | | | | | | | | | | Handle --term-playing-msg at a better place. Move MPV_EVENT_TICK hack into a separate function. Also add some words to the client API that you shouldn't use it. (But better leave breaking it for later.) Handle --frames and frame_step differently. Remove the mess from the playloop, and do it after frame display. Give up on the weird semantics for audio-only mode (they didn't make sense anyway), and adjust the manpage accordingly.
* player: make quit exit immediatelywm42014-08-031-3/+3
| | | | | Stopping playback canceled waiting, but executed the remainder of the playloop, including things like executing pointless seeks.
* player: allow redrawing screen during seekswm42014-08-031-6/+12
| | | | | | | | If seeks take very long, it's better not to freeze up the display. (This doesn't handle the case when decoding video frames is extremely slow; just if hr-seek is used, or the demuxer is threaded and blocks on network I/O.)
* manpage: be more explicit where input.conf is locatedwm42014-08-022-1/+6
|
* Improve setting AVOptionswm42014-08-0213-149/+66
| | | | | | | | Use OPT_KEYVALUELIST() for all places where AVOptions are directly set from mpv command line options. This allows escaping values, better diagnostics (also no more "pal"), and somehow reduces code size. Remove the old crappy option parser (av_opts.c).
* manpage: explain how to replace --slave-brokenwm42014-08-021-0/+10
|
* player: don't show the path part for external subtitle fileswm42014-08-021-1/+1
| | | | Show the filename only. Feature request on IRC.
* client API: minor optimizations for property notificationwm42014-08-024-38/+91
| | | | | | | | | | | | | | | | | | | | | Internally, there are two mechanisms which can trigger property notification as used with "observed" properties in the client API. The first mechanism associates events with a group of properties that are potentially changed by a certain event. mp_event_property_change[] declares these associations, and maps each event to a set of strings. When an event happens, the set of strings is matched against the list of observed properties of each client. Make this more efficient by comparing bitsets of events instead. This way, only a bit-wise "and" is needed for each observed property. Even better, we can completely skip clients which have no observed properties that match. The second mechanism just updates individual properties explicitly by name. Optimize this by using the property index instead. It would be nice if we could reuse the first mechanism for the second one, but there are too many properties to fit into a 64 bit mask. (Though the limit on 64 events might get us into trouble later...)
* TOOLS: add test script for property change notificationswm42014-08-021-0/+16
|
* command: add a property that returns a list of all propertieswm42014-08-024-21/+27
| | | | Also remove the undocumented Lua mp.property_list() function.
* manpage: remove duplicated misplaced description of a commandwm42014-08-021-2/+0
|
* win32: fix assertion failurewm42014-08-011-12/+10
| | | | | | | | If OpenGL 3.x doesn't work, the fallback to legacy GL will call the function to create the DC again, and it will assert. Just make it not to, and also simplify the code a bit. Fixes #974.
* Remove the last remains of slave modewm42014-08-019-76/+15
| | | | | | | | | | | Almost nothing was left of it. The only thing this commit actually removes is support for reading input commands from stdin. But you can emulate this via: --input-file=/dev/stdin --input-terminal=no However, this won't work on Windows. Just use a named pipe.
* vda: only support the new hwaccel 1.2 API (remove old code)Stefano Pigozzi2014-08-013-167/+19
| | | | | | | | | Since the new hwaccel API is now merged in ffmpeg's stable release, we can finally remove support for the old API. I pretty much kept lu_zero's new code unchanged and just added some error printing (that we had with the old glue code) to make the life of our users less miserable.
* travis: use homebrew to build ffmpeg on OS XStefano Pigozzi2014-08-011-18/+58
| | | | | This allows us to use a newer version of ffmpeg and to test the build of our VDA code.
* player: don't ignore first chapterwm42014-07-311-1/+1
| | | | | It's a mystery why this was done this way. If the first chapter starts later than the current position, we do have to return -1.
* video: fix attached picture modewm42014-07-311-1/+3
| | | | | | | | | Playing audio files with embedded cover art broke due to some of the recent changes. Treat video EOF properly, and don't burn the CPU. Disable hrseek for video in attached picture mode, since the decoder will always produce a new image, which makes hrseek never terminate. Fixes #970.
* audio: simplify conditionwm42014-07-311-1/+1
| | | | | The expression added with the previous commit (0cce8fe6) looked slightly more complicated than it has to be. The code is equivalent.
* audio: fix A/V sync in encoding modewm42014-07-311-0/+5
| | | | | | | | | | | | | | | | | | | | | In encoding mode, the AO pretends to be infinitely fast (it will take whatever we write, without ever rejecting input). Commit 261506e3 broke this somehow. It turns out an old hack dealing with this was accidentally dropped. This is the hunk of code whose semantics were (partially) dropped: if (mpctx->d_audio && (mpctx->restart_playback ? !video_left : ao_untimed(mpctx->ao) && (mpctx->delay <= 0 || !video_left))) { int status = fill_audio_out_buffers(mpctx, endpts); // Not at audio stream EOF yet audio_left = status > -2; } This if condition is pretty wild, and it looked like it was pretty much for audio-only mode, rather than subtle handling for encoding mode.
* client API: don't send internal events to the clientswm42014-07-311-1/+2
| | | | | | | "Internal" events were added in the previous commits to leverage the client API property mechanism, without making weird properties public. But they were sent to clients too (and returned by mpv_wait_event()).
* command: add cache-idle propertywm42014-07-312-3/+20
|
* client API: make "cache" property and similar observablewm42014-07-315-0/+18
| | | | | | Achieve this by polling. Will be used by the OSC. Basically a bad hack - but the point is that the mpv core itself is in the best position to improve this later.
* client API: fix deadlock when calling mpv_terminate_destroy before initwm42014-07-311-1/+1
| | | | | | | | | | This is perfectly allowed, but was ignored, because it's a corner case. It doesn't actually wait for other clients to be destroyed, but on the other hand I think there's no way to have other clients before initialization. CC: @mpv-player/stable
* player: rename a variablewm42014-07-301-3/+3
| | | | | Make it clear that this condition happens when switching to a new timeline segment. It doesn't even need to coincide with a chapter.
* player: move video display code out of the playloopwm42014-07-304-332/+336
| | | | | | | | | | Basically move the code from playloop.c to video.c. The new function write_video() now contains the code that was part of run_playloop(). There are no functional changes, except handling "new_frame_shown" slightly differently. This is done so that we don't need new a new MPContext field or a return value for write_video() to signal this condition. Instead, it's handled indirectly.
* player: split seek_reset()wm42014-07-306-56/+59
| | | | | | | | This also reduces some code duplication with other parts of the code. The changfe is mostly cosmetic, although there are also some subtle changes in behavior. At least one change is that the big desync message is now printed after every seek.
* video: actually flush filter chainwm42014-07-301-1/+4
| | | | | | | Frames buffered in filters weren't flushed, so on EOF, the last frames were dropped, depending on how much filters buffered. Oops. Test case: "mpv something.jpg --vf=buffer"
* video/filter: add vf_bufferwm42014-07-305-0/+103
| | | | Mostly useful for debugging.
* audio: better sync behavior on bogus EOFwm42014-07-301-1/+3
| | | | | | | In situations when the demuxer reports EOF, but immediately "recovers" after that and returns new data, it could happen that audio sync was skipped. Deal with this by actually entering the EOF state, instead of assuming this will happen later.
* ao_alsa: disable use of non-interleaved formats by defaultwm42014-07-302-0/+10
| | | | | | | | Some ALSA plugins take non-interleaved audio, but treat it as interleaved, which results in various funny bugs. Users keep hitting this issue, and it just doesn't seem worth the trouble. CC: @mpv-player/stable
* cocoa: fix key equivalent dispatchingStefano Pigozzi2014-07-302-22/+7
| | | | | | | | | | Prior to this commit we had a list of key modifiers and checked against that. Actually, the Cocoa framework has a built in way to do it and it involves calling performKeyEquivalent: on the menu instance. Fixes #946 cc @mpv-player/stable: this should apply with no conflicts
* client API: fix typos in documentationwm42014-07-301-2/+2
|
* demux_lavf: don't consider EAGAIN as EOF conditionwm42014-07-301-2/+3
| | | | | | | | | | This happens apparently randomly with rtmp:// and after seeks. This eventually leads to audio decoding returning an EOF status, which basically disables audio sync. This will lead to audio desync, even if audio decoding later "recovers" when the demuxer actually returns audio packets. Hack-fix this by special-casing EAGAIN.
* stream: hack-fix rtmp-level seekingwm42014-07-304-11/+22
| | | | | | | | | | | | | This didn't work, because the timebase was wrong. According to the ffmpeg doxygen, if the stream index is -1 (which is what we used), the timebase is AV_TIME_BASE. But this didn't work, and it really expected the stream's timebase. Quite "surprising", since this feature (avio_seek_time) is used by rtmp only. Fixing this properly is too hard, so hack-fix our way around it. STREAM_CTRL_SEEK_TO_TIME is also used by DVD/BD, so a new STREAM_CTRL_AVSEEK is added. We simply pass-through the request verbatim.
* stream_lavf: allow setting AVOptions with --stream-lavf-owm42014-07-306-0/+38
| | | | | This commit also creates a private option struct for stream_lavf.c, but since I'm lazy, I'm not moving any existing options to it.
* audio: better initial sync for files where audio starts laterwm42014-07-301-5/+15
| | | | | | | Some files have the first audio much later into the video (for whatever reasons). Instead of appending large amounts of silence to the audio buffer (and refusing to sync if the audio to append is "too large"), just wait until enough video has played.
* audio: cosmetics: remove unused return valuewm42014-07-302-11/+9
|
* demux_mf: allow seeking past the endwm42014-07-301-1/+1
| | | | How's this for a corner case.
* player: fix time display wheen seeking past EOF with --keep-openwm42014-07-304-20/+19
| | | | | | | | | | | | | | Regression since commit 261506e3. Internally speaking, playback was often not properly terminated, and the main part of handle_keep_open() was just executed once, instead of any time the user tries to seek. This means playback_pts was not set, and the "current time" was determined by the seek target PTS. So fix this aspect of video EOF handling, and also remove the now unnecessary eof_reached field. The pause check before calling pause_player() is a lazy workaround for a strange event feedback loop that happens on EOF with --keep-open.
* player: let explicitly imprecise seeks cancel precise seekswm42014-07-291-0/+3
| | | | | | | | | | | If an imprecise seek is issues while a precise seek is ongoing, don't wait up to 300ms (herustistic which usually improves user experience), but inst