aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/command.c
Commit message (Collapse)AuthorAge
* client API: remove mpv_event_pause_reasonGravatar wm42014-04-14
| | | | | | | | | And slightly adjust the semantics of MPV_EVENT_PAUSE/MPV_EVENT_UNPAUSE. The real pause state can now be queried with the "core-idle" property, the user pause state with the "pause" property, whether the player is paused due to cache with "paused-for-cache", and the keep open event can be guessed with the "eof-reached" property.
* command: add property to indicate when pausing due to --keep-openGravatar wm42014-04-14
| | | | | | | This property is set to "yes" if playback was paused due to --keep-open. The change notification might not always be perfect; maybe that should be improved.
* command: add a property to indicate core pause stateGravatar wm42014-04-14
| | | | | | | | | Currently this is (probably) equivalent to "paused-for-cache", but the latter is a bit special, while this new property is a bit more general. One case where they might actually be different is dvdnav menus, but I haven't checked. Also add property change notifications for these two properties.
* command: vf-metadata: minor fixup of return statusGravatar Kevin Mitchell2014-04-14
| | | | Signed-off-by: wm4 <wm4@nowhere>
* command: add vf-metadata propertyGravatar Kevin Mitchell2014-04-13
| | | | | | | This is a read-only property that uses VFCTRL_GET_METADATA to retrieve mp_tags metadata from a filter specified by label Signed-off-by: wm4 <wm4@nowhere>
* player: remove ASX, SMIL and NSC playlist parsersGravatar wm42014-04-13
| | | | | | | | | | | | | | | | | | | These playlist parsers are all what's left from the old mplayer playlist parsing code. All of it is old code that does little error checking; the type of C string parsing code that gives you nightmare. Some playlist parsers have been rewritten and are located in demux_playlist.c. The removed formats were not reimplemented. ASX and SMIL use XML, and since we don't want to depend on a full blown XML parser, this is not so easy. Possibly these formats could be supported by writing a very primitive XML-like lexer, which would lead to success with most real world files, but I haven't attempted that. As for NSC, I couldn't find any URL that worked with MPlayer, and in general this formats seems to be more than dead. Move playlist_parse_file() to playlist.c. It's pretty small now, and basically just opens a stream and a demuxer. No use keeping playlist_parser.c just for this.
* command: add paused-for-cache, total-avsync-change, drop-frame-count propertiesGravatar David Weber2014-04-13
| | | | | | | | | This is needed if you want to reimplement the status line in lua I could only test drop-frame-count because I didn't find an easy way to trigger paused-for-cache and total-avsync-change Signed-off-by: wm4 <wm4@nowhere>
* cache: allow resizing at runtimeGravatar wm42014-04-09
| | | | | | | | | | | The only tricky part is keeping the cache contents, which is made simple by allocating the new cache while still keeping the old cache around, and then copying the old data. To explain the "Don't use this when playing DVD or Bluray." comment: the cache also associates timestamps to blocks of bytes, but throws away the timestamps on seek. Thus you will experience strange behavior after resizing the cache until the old cached region is exhausted.
* command: property set commands should send property change notificationsGravatar wm42014-04-08
| | | | | | | | | Some of these property implementations already send notifications on their own, but most don't. This takes care of them. Of course this still doesn't handle all propertry changes - this is impossible without special-casing each property that can change on its own.
* client API: add a way to notify clients of property changesGravatar wm42014-04-06
| | | | | | | | | | | | | | | | | | | | | | | | This turned out ridiculously complex. I think it will have to be simplified some day. Main reason for the complexity are: - filtering properties by forcing clients to observe individual properties explicitly (to avoid spamming clients with changes they don't want) - optional retrieval of property value with the notification (the basic idea was that this is more user friendly) - allowing to the client to specify a format in which the value should be retrieved (because if a property changes its type, the client API couldn't convert it properly, and compatibility would break) I don't know yet which of these are important, and everything could change. In particular, the interface and semantics should be adjusted to reduce the implementation complexity. While I consider the API complete, there could (and probably will) be bugs left. Also while the implementation is complete, it's inefficient. The complexity of the property matching is O(a*b*c) with a clients, b observed properties, and c properties changing at once. I threw away an earlier implementation using bitmasks, because it was too unwieldy.
* command: change what the metadata property returnsGravatar wm42014-03-30
| | | | | | | Change the type of the property from a string list (alternating key/value entries) to a map. Using the client API, this will return MPV_FORMAT_NODE_MAP, while Lua mp.get_property_native returns a dictionary-like table.
* command: minor simplificationGravatar wm42014-03-30
|
* command: add helper function to split property pathsGravatar wm42014-03-30
| | | | | | We've just checked whether a sub-path started with "name/", but that changes behavior whether the property name has a trailing '/' or not. Using a helper function to split of path components avoids this problem.
* Merge remote-tracking branch 'mpv/pr/676'Gravatar wm42014-03-30
|\
| * player: rename dvdnav to discnavGravatar xylosper2014-03-30
| | | | | | | | | | Now, navigation works both of DVD and non-BD-J Blu-ray. Therefore, rename all 'dvdnav' strings which are not DVD specific to 'discnav'
* | video/out: remove legacy colorspace stuffGravatar wm42014-03-29
|/ | | | | | | | | Reduce most dependencies on struct mp_csp_details, which was a bad first attempt at dealing with colorspace stuff. Instead, consistently use mp_image_params. Code which retrieves colorspace matrices from csputils.c still uses this type, though.
* player: fix unchecked access for chapter metadataGravatar wm42014-03-26
| | | | | | | | | | It's possible that MPContext has a chapter list, but the demuxer doesn't. In this case, accesing the chapter-metadata property would lead to invalid accesses. (This fixes the out of bound access, but in theory, the returned data can still be incorrect, since MPContext chapters don't need to map directly to demuxer chapters.)
* player: let chapter_start_time() return MP_NOPTS_VALUE for unknown timesGravatar wm42014-03-25
|
* command: make 'disc-title' property writableGravatar xylosper2014-03-18
| | | | | | | | This commit makes 'disc-title' property writable using STREAM_CTRL_SET_CURRENT_TITLE. This commit also contains implementation of STREAM_CTRL_SET_CURRENT_TITLE for stream_bluray. Currently, 'disc-title' is writable only for stream_dvdnav and stream_bluray and stream_dvd is not supported.
* command, lua: change script_message semanticsGravatar wm42014-03-17
| | | | | | | | Change script_message to broadcast the message to all clients. Add a new script_message_to command, which does what the old script_message command did. This is intended as simplification, although it might lead to chaos too.
* command: rename dvd- properties to disc-Gravatar wm42014-03-15
| | | | Since these are not DVD-only, but can also be used with BDs.
* command: prefix DVD title properties with "dvd-"Gravatar wm42014-03-15
| | | | | | | | | | They're strictly DVD-only, so it's better to mark them as such. This also documentes the "title" (now renamed to "dvd-title") property. This also avoids collision with the --title option. (Technically, there was no problem. But it might be confusing for users, since we have a policy of naming properties and options the same if they refer to the same underlying functionality.)
* command: add new property 'title'Gravatar xylosper2014-03-15
| | | | | | This commit adds new property 'title' which indicates current playing title of disc. This property is useful when using a stream whose title can be changed during playback, e.g., dvdnav.
* command: fix wrong condition & remove redundant stream type checkingGravatar xylosper2014-03-13
|
* command: set 'media-title' property for bluray disc with meta-dataGravatar xylosper2014-03-13
|
* command: fix osd-height propertyGravatar wm42014-03-09
|
* player: make separation between user/automatic track selection strongerGravatar wm42014-03-03
| | | | | | | | | | For example, consider the case when audio initialization fails. Then the audio track is deselected. Before this commit, this would have been equivalent to the user disabling audio. This is bad when multiple files are played at once (the next file would have audio disabled, even if it works), or if playback resume is used (if e.g. audio output failed to initialize, then audio would be disabled when resuming, even if the system's audio driver was fixed).
* command: fix null pointer dereference in idle modeGravatar wm42014-03-02
| | | | Pressing 'h' in idle mode -> crash.
* client API: add two properties, 'time-start' and 'seekable'Gravatar xylosper2014-02-28
|
* command: use the step size for "add volume" commandsGravatar wm42014-02-27
| | | | | | | | | | | | The step argument for "add volume <step>" was ignored until now. Fix it. There is one problem: by defualt, "add volume" should use the value set with --volstep. This value is 3 by default. Since the default volue for the step argument is always 1 (and we don't really want to make the generic code more complicated by introducing custom step sizes), we simply multiply the step argument with --volstep to keep it compatible. The --volstep option should probably be just removed in the future.
* command: format volume property as integer for OSDGravatar wm42014-02-27
| | | | | | | The value range is 0-100, so fractional values don't make much sense. But the underlying data type is probably float to avoid getting "stuck" when doing small volume increments. So step this around and pretend it's an integer just on display.
* options: allow changing options at runtimeGravatar wm42014-02-25
| | | | | Allow changing all options at runtime, except some cherry-picked options, which are disabled with M_OPT_FIXED.
* client API: report pause/unpause reasonGravatar wm42014-02-24
| | | | | | | | | Not sure about this... might redo. At least this provides a case of a broadcasted event, which requires per-event data allocation. See github issue #576.
* command: make options property return the list of all optionsGravatar wm42014-02-24
|
* command: use DVD volume ID for media-title propertyGravatar xylosper2014-02-23
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Closes #582.
* command: provide per-file-options for loadfile commandGravatar xylosper2014-02-23
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Closes #575. Minor changes over original pull request.
* command: remove special casing for strings in input commandsGravatar wm42014-02-23
| | | | | | Until now, strings were the only allowed dynamically allocated argument type in input commands. Extend it so that it works for any type. (The string expansion in command.c is of course still string specific.)
* command: don't use option name in propertiesGravatar wm42014-02-23
| | | | | | | | | | | | | Some code accessed m_option.name to get the property name. (Maybe only show_property_osd() had a significant use of it.) Remove that, and remove setting names and dummy names as well. The old code usually assumed that the name was set, and show_property_osd() used it to get the proper name of deprecated aliases. The "vf" property was listed as "vf*". Not sure why that was done, but it works without anyway.
* options: handle escape sequences in e.g. --playing-msg differentlyGravatar wm42014-02-20
| | | | | | | | | | M_OPT_PARSE_ESCAPES was pretty stupid, and broke the (useful) assumption that string variables contain exactly the same value as set by the option. Simplify it, and move escape handling to the place where it's used. Escape handling itself is not terribly useful, but still allows useful things like multiline custom OSD with "\n".
* command: allow accessing metadata entries as listGravatar wm42014-02-19
| | | | | | Not sure about these deep path-names. Maybe "metadata/0" should work instead of "metadata/list/0". I'm so unsure about it, that I'm leaving it open.
* command: move metadata entry access to metadata/by-key/Gravatar wm42014-02-19
| | | | | | The old way still works, and is fine to use. Still discourage it, because it might conflict with other ways to access this property, such as the one added in the next commit.
* command: export list of editions as propertiesGravatar wm42014-02-19
|
* command: export codec for each trackGravatar wm42014-02-19
|
* client API: add a client message eventGravatar wm42014-02-17
| | | | | This comes with a "script_message" input command, which sends these messages. Used by the following commits.
* command: export chapter list as propertiesGravatar wm42014-02-16
|
* command: export playlist as propertiesGravatar wm42014-02-16
|
* command: expose track list as propertiesGravatar wm42014-02-16
|
* command: export more video params as propertiesGravatar wm42014-02-16
| | | | | This uses the previously added sub-property mechanism to export a bunch of stuff. For example, "video-params/w" now contains the video width.
* player: select subtitles added with sub_addGravatar wm42014-02-13
| | | | | | | | | | In particular, this affects drag & drop of subtitles, which uses sub_add internally. This will make the subtitles show up immediately, instead of requiring manual selection of the added subtitle. Might be not so ideal when adding multiple subtitles at once, because that leads to multiple sub_add commands, and will end up with the last subtitle instead of the first selected. But this is a minor detail.
* command: fix metadata propertyGravatar wm42014-02-12
| | | | This crashed when retrieving the raw property value. Oops.