summaryrefslogtreecommitdiffstats
path: root/player
Commit message (Collapse)AuthorAgeFilesLines
...
* audio: add some change notificationswm42015-06-091-0/+4
| | | | | We must be sure that every change comes with a notification. Otherwise, some property changes could possibly be missed.
* command: fix audio-out-detected-device propertywm42015-06-091-2/+3
| | | | | | | Used a wrong condition, and I suppose it could crash in some situations. Change it to lazily initialize the hotplug stuff, like the audio-device-list property does.
* command: remove unnecessary event IDswm42015-06-092-4/+0
| | | | | These were actually not needed for correct function, since individual property change notifications via mp_notify_property() are used.
* command: make property event mask matching more restrictivewm42015-06-091-1/+2
| | | | | | This was matching e.g. both "foo/bar" and "foobar" against "foo", when only the former should match. This could cause more property notifications than necessary.
* ytdl_hook: Support 'multi_video' resultsJaime Marquínez Ferrándiz2015-06-071-1/+1
| | | | | They can be handled by the same codes used for playlists, most of them will use an EDL. Fixes #2027.
* audio: add --audio-spdif as new method for enabling passthroughwm42015-06-052-1/+18
| | | | | | | | | | | | | This provides a new method for enabling spdif passthrough. The old method via --ad (--ad=spdif:ac3 etc.) is deprecated. The deprecated method will probably stop working at some point. This also supports PCM fallback. One caveat is that it will lose at least 1 audio packet in doing so. (I don't care enough to prevent this.) (This is named after the old S/PDIF connector, because it uses the same underlying technology as far as the higher level protoco is concerned. Also, the user should be renamed that passthrough is backwards.)
* audio: do not allow AO to change passthrough formatswm42015-06-051-7/+17
| | | | | | | This makes no sense, because the format can't be converted anyway. It just sets up the filter chain init code, which will vomit a bunch of useless and confusing messages. So uninit and fail explicitly when this happens.
* video: remove worthless log messagewm42015-06-051-6/+0
| | | | | All this information is already output otherwise. Except the FourCC, which lost most of its importance in mpv.
* vf_sub: minor simplificationwm42015-06-051-2/+1
|
* audio: do not exit when loading small files in paused modewm42015-06-041-1/+1
| | | | | | | | When starting in paused mode, no audio is written to the device at all, because writing audio implicitly unpauses the AO. If the file is very small, and all audio fits within the AO buffer, this accidentally triggered the EOF condition. (In unpaused mode, it would write all audio, end playback, and then wait until the AO has everything played.)
* player: print track list when switching trackswm42015-06-031-0/+4
|
* player: print a message along with track listwm42015-06-033-7/+9
| | | | Slightly less strange.
* player: don't print stream list when adding external tracks during loadwm42015-06-031-5/+7
| | | | | | | | | There's a short time during loading where external commands can add external streams even before the main file is loaded (like during ytdl hook execution). The track list is printed every time an external track is added via commands. This was quite awkward when ytdl was adding multiple streams, so don't print it in this stage. They are printed anyway at the end of the loading process.
* audio: remove an old hackwm42015-05-301-10/+1
| | | | | | | This was a cosmetic issue. It's handled differently now (clamping the display time to known duration range). This reverts commit 33b57f55573e658b3af6c6e8ff3188c8f959e82e.
* player: restore video-aspect on playback resumewm42015-05-291-0/+1
|
* lua: fix options submodulewm42015-05-292-2/+7
| | | | | | | | | It polluted the global namespace, instead of exporting the function properly. For now, keep it compatible by explicitly keeping the bogus export. Also fix a mistake in the manpage example.
* command: remove deprecated get_property commandwm42015-05-271-34/+0
| | | | | | This command has been deprecated in the 0.8.x and 0.9.x releases - get rid of it. Its only point ever was MPlayer compatibility, which broke years ago anyway.
* options: remove --slave-brokenwm42015-05-271-6/+0
| | | | It has been deprecated for ages.
* player: set cocoa input context at an earlier pointwm42015-05-271-4/+4
| | | | | There is not much of a reason to do this later. (Since some time ago, the input_ctx is created right at the start, so this can be done now.)
* player: load scripts at an earlier pointwm42015-05-271-4/+4
| | | | This is about as early as possible.
* command: better choice when to allow playback-related commandswm42015-05-261-16/+16
| | | | | | | | For certain reasons, we allow adding external tracks even before the main file is loaded. This somewhat breaks in old assumption, which uses mpctx->num_sources to determine whether a command can be applied in the current state. Use the newer playback_initialized instead, which is a much better choice for this purpose.
* command: fix track property when no file is loadedwm42015-05-261-2/+8
| | | | | | | | | | | The previous commit removed this. Although mp_switch_track() can now be called in all situations, we still don't want it to be called here. Setting a track property while no file is loaded would simply deselect the track instead of setting the underlying option to the requested value. Likewise, if the "cycle" command (M_PROPERTY_SWITCH) is used, don't just deselect the track.
* player: fix crashes when adding external tracks before loading main filewm42015-05-264-40/+30
| | | | | | | | | | | | | | | | Adding an external audio track before loading the main file didn't work right. For one, mp_switch_track() assumes it is called after the main file is loaded. (The difference is that decoders are only initialized once the main file is loaded, and we avoid doing this before that for whatever reason.) To avoid further messiness, just allow mp_switch_track() to be called at any time. Also make it do what mp_mark_user_track_selection() did, since the latter requires current_track to be set. (One could probably simply allow current_track to be set at this point, but it'd interfere with default track selection anyway and thus would be pointless.) Fixes #1984.
* input: allow - as separator between commands, instead of _wm42015-05-251-5/+5
| | | | | | | | | | Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion.
* command: change the hwdec propertieswm42015-05-251-30/+43
| | | | | | Another very minor step towards property/option unification. Not bothering with interface compatibility here.
* video: do not use MP_NOPTS_VALUE for A/V differencewm42015-05-243-7/+3
| | | | | | There's no need for this, it just creates more corner cases. Also always reset it on seeks etc..
* player: add function to compute past frame durationswm42015-05-243-17/+28
| | | | | And use it for the estimated-vf-fps property (it should be doing the same as before).
* command: add protocol-list propertywm42015-05-231-0/+16
| | | | Fixes #1972.
* ytdl: do not use deprecated optionwm42015-05-231-1/+1
| | | | This was missed in commit 450af053.
* command: allow changing track properties while no file is loadedwm42015-05-221-16/+20
| | | | | | | | | | Now it simply changes the options, i.e. what will be requested, instead of returning M_PROPERTY_UNAVAILABLE. This is another minor step towards unifying options and properties. Still a bit weird: it will always return "no" if no file is loaded, and disregards the option value.
* player: use an array for stream ID options and suchwm42015-05-223-37/+25
| | | | This makes the code slightly more generic.
* command: deprecate audio-sampleratewm42015-05-221-43/+2
| | | | | | | Also replace their implementation with the recently introduced properties. One significant difference is that audio-channels using OSD formatting does not print the channel layout. The user can just use the replacement property instead.
* command: add audio-params and audio-out-params propertieswm42015-05-221-1/+40
|
* command: rename audio-format propertywm42015-05-221-4/+6
| | | | Clashes with the option.
* options: rename --media-title optionwm42015-05-221-1/+1
| | | | Conflicts with the property.
* command: deprecate the "length" propertywm42015-05-222-9/+9
| | | | It collides with the --length option.
* command: add a new property deprecation mechanismwm42015-05-221-0/+29
| | | | Looks like this will be needed a lot...
* audio: change range of volume option/propertywm42015-05-221-2/+2
| | | | | | | | | Now --volume takes an absolute volume, meaning it doesn't depend on --softvol-max. 0 is still silence, and 100 now always means unchanged volume. The OSD and the "volume" property are changed accordingly. Also raise the minimum value of --softvol-max. A value below 100 makes no sense and breaks the OSD.
* command: explicitly show mouse cursor when unfullscreeningwm42015-05-211-2/+6
|
* command: refactor if/else statements to switchRobin2015-05-201-11/+19
| | | | | | The code checking for the type of seeking contained some if else statements. To improve readability, I decided to refactor those statements to a switch statement.
* video: force audio resync after video discontinuitywm42015-05-201-0/+1
|
* video: better heuristic for timestamp resetswm42015-05-201-2/+13
| | | | | | | | | | | | | | | Reduce the default tolerance for timestamp jumps from 60 to 15 seconds. For .ts files, where ts_resets_possible coming from AVFMT_TS_DISCONT is set, apply a more sophisticated heuristic. It's clear that such a file wouldn't have a framerate below, say, 23hz. If the demuxer reports a lower fps, we allow longer PTS jumps. This should replace long pauses on discontinuities with .ts files with at most a short stutter. Of course, all kinds of things could go wrong anyway if the source is VFR, or FFmpeg's frame rate detection fails in some other way. I haven't found such a file yet, though.
* audio: fix resync issue differentwm42015-05-191-1/+3
| | | | | | | | | | | Commit 10915000 attempted to fix wasting CPU when resyncing and no new data was actually coming from the demuxer. The fix assumed that at this point it would have reached the sync point, but since the code attempts weird incremental decoding, this wasn't actually true. So it broke seeking in addition to removing the CPU waste. Try something else. This time, we essentially only wakeup again if data was read (i.e. audio_decode() returned successfully).
* command: change OSD symbol for absolute perc. seekrrooij2015-05-191-2/+4
| | | | | | | | | | The OSD symbol for seeking to an absolute percentage was always OSD_FFW, even when it should be OSD_REW. It uses the correct OSD symbols now, by checking the current position ratio. Note: The symbol is still incorrectly given when the absolute percentage is very close to the current position ratio. Fortunately, that's a rare use case.
* audio: avoid wasting CPU due to continuous wakeupwm42015-05-191-1/+2
| | | | | | | | | Thsi code path happens during seeking. If video is still being decoded to get to the first video frame, audio has nothing to do, as it is synchronized against the first video frame. We only want to wake up if there's an actual state change. Fixes #1958.
* command: use consistent comment stylerrooij2015-05-191-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* input: add relative percentage seekrrooij2015-05-191-0/+5
| | | | | | | | | | | Only absolute percentage seeking was permitted first. It is now also possible to seek by relative percentage. MPSEEK_FACTOR is used as seek_type. Fixes #1950. Signed-off-by: wm4 <wm4@nowhere>
* command: add playlist_shuffle commandwm42015-05-171-0/+5
| | | | Fixes #965.
* threads: use utility+POSIX functions instead of weird wrapperswm42015-05-111-2/+4
| | | | | | | There is not much of a reason to have these wrappers around. Use POSIX standard functions directly, and use a separate utility function to take care of the timespec calculations. (Course POSIX for using this weird format for time values.)
* Always block SIGPIPE globallywm42015-05-111-0/+7
| | | | | | | | | | | | | | | OpenSSL and GnuTLS are still causing this problem (although FFmpeg could be blamed as well - but not really). In particular, it was happening to libmpv users and in cases the pseudo-gui profile is used. This was because all signal handling is in the terminal code, so if terminal is disabled, it won't be set. This was obviously a questionable shortcut. Avoid further problems by always blocking the signal. This is done even for libmpv, despite our policy of not messing with global state. Explicitly document this in the libmpv docs. It turns out that a version bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so document that change as part of 1.16.
* ytdl_hook: remove tabswm42015-05-091-5/+5
| | | | We don't allow tabs in normal source code.
* player: reuse a functionwm42015-05-091-5/+1
| | | | | This has the side-effect that now all encoding-profiles.conf files are loaded. It's not clear if not doing this was intended or not.
* player: make resuming playlists less noisy in verbose modewm42015-05-093-15/+16
| | | | | | | | | | | | | | | | | | | mp_find_config_file() will print the filename lookup and its result in verbose mode. This is wanted, but gets inconvenient when it is done for every playlist entry (for resuming). Lookup the watch_later subdir only once and cache the result instead. This drops the logic for loading the resume file from other locations, which should generally be unnecessary, though might lead to confusion if the user has mixed old and new config paths (which the user shouldn't). Also add a mp_find_user_config_file() function for a more straightforward and reliable way to get actual local configpaths, instead of possibly global and unwritable locations. Also, for symmetry, check the resume option in mp_load_playback_resume() just like mp_check_playlist_resume() does.
* player: avoid undefined behavior when resumign DVD/BD playbackwm42015-05-091-3/+3
| | | | These device options can be NULL, and NULL can't be passed for %s.
* path: make mp_path_join accept normal C stringswm42015-05-094-6/+6
| | | | | Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
* lua: remove deprecated "lua" sub directorieswm42015-05-092-29/+9
| | | | | The compatibility code and the deprecation warning were at least in releases 0.8 and 0.9 - time to get rid of them.
* player: add --force-window=immediate modewm42015-05-081-0/+2
| | | | | | | This creates the window before the first file is loaded. This was requested a bunch of times, but on the other hand a change to make this behavior the default was reverted some time ago, because other users hated it.
* player: use profiles for libmpv and encoding defaultswm42015-05-072-24/+32
| | | | | | | | The client API (libmpv) and encoding (--o) have slightly different defaults from the command line player. Instead of doing a bunch of calls to set the options explicitly, use profiles. This is simpler and has the advantage that they can be listed on command line (instead of possibly forcing the user to find and read the code to know all the details).
* m_config: make m_config_set_profile() use a namewm42015-05-071-2/+2
| | | | Is simpler and avoids exposing profile structs to a degree.
* ytdl_hook: Escape EDL URLsChrisK22015-05-071-1/+3
| | | | | Should prevent the EDL parser from tripping over = and , in the URL.
* path: start special espansion with ~~name instead of ~namewm42015-05-031-1/+1
| | | | | | | Since commit 7381db60, strings like "~desktop/" were expanded as platform-specific paths by mpv. Apparently this similarity to standard Unix shell expansion caused confusion, so change it to "~~desktop/". The shell doesn't expand this, so it should be better.
* options: fix typo in variable namewm42015-05-031-1/+1
|
* options: remove --leak-reportwm42015-05-021-11/+3
| | | | Use the environment variable instead.
* win32: move platform specifics to osdepwm42015-05-021-25/+0
| | | | | This will probably disable this code for Cygwin. I don't know if this matters, since Cygwin should strictly behave like a Unix anyway.
* build: move main-fn files to osdepwm42015-05-024-71/+1
| | | | | | And split the Cocoa and Unix cases. Simplify the Cocoa case slightly by calling mpv_main directly, instead of passing a function pointer. Also add a comment explaining why Cocoa needs a special case at all.
* cocoa: always compile OSX application code with cocoawm42015-05-021-2/+2
| | | | | | | | | | | | | | This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case.
* player: handle hotplug events in idle mode toowm42015-05-021-0/+1
|
* screenshots: create screenshot dirwm42015-05-021-0/+2
| | | | Minor user convenience.
* screenshots: change default directory in pseudo-gui mode to desktopwm42015-05-011-1/+2
| | | | | | | | This should take care of the endless complaints about the default location for screenshots (and will of course create new ones). If the screenshot-template is set to an absolute path, the directory won't be used. So this should be reasonably compatible.
* screenshots: add --screenshot-directory optionwm42015-05-011-0/+8
| | | | | The plan is to use this to change the screenshot default location in pseudo-gui mode.
* player: properly destroy client context if thread can't be created