summaryrefslogtreecommitdiffstats
path: root/playtreeparser.h
Commit message (Collapse)AuthorAgeFilesLines
* mplayer: turn playtree into a list, and change per-file option handlingwm42012-07-311-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - There is no playtree anymore. It's reduced to a simple list. - Options are now always global. You can still have per-file options, but these are optional and require special syntax. - The slave command pt_step has been removed, and playlist_next and playlist_prev added. (See etc/input.conf changes.) This is a user visible incompatible change, and will break slave-mode applications. - The pt_clear slave command is renamed to playlist_clear. - Playtree entries could have multiple files. This is not the case anymore, and playlist entries have always exactly one entry. Whenever something adds more than one file (like ASX playlists or dvd:// or dvdnav:// on the command line), all files are added as separate playlist entries. Note that some of the changes are quite deep and violent. Expect regressions. The playlist parsing code in particular is of low quality. I didn't try to improve it, and merely spent to least effort necessary to keep it somehow working. (Especially ASX playlist handling.) The playtree code was complicated and bloated. It was also barely used. Most users don't even know that mplayer manages the playlist as tree, or how to use it. The most obscure features was probably specifying a tree on command line (with '{' and '}' to create/close tree nodes). It filled the player code with complexity and confused users with weird slave commands like pt_up. Replace the playtree with a simple flat playlist. Playlist parsers that actually return trees are changed to append all files to the playlist pre-order. It used to be the responsibility of the playtree code to change per-file config options. Now this is done by the player core, and the playlist code is free of such details. Options are not per-file by default anymore. This was a very obscure and complicated feature that confused even experienced users. Consider the following command line: mplayer file1.mkv file2.mkv --no-audio file3.mkv This will disable the audio for file2.mkv only, because options are per-file by default. To make the option affect all files, you're supposed to put it before the first file. This is bad, because normally you don't need per-file options. They are very rarely needed, and the only reasonable use cases I can imagine are use of the encode backend (mplayer encode branch), or for debugging. The normal use case is made harder, and the feature is perceived as bug. Even worse, correct usage is hard to explain for users. Make all options global by default. The position of an option isn't significant anymore (except for options that compensate each other, consider --shuffle --no-shuffle). One other important change is that no options are reset anymore if a new file is started. If you change settings with slave mode commands, they will not be changed by playing a new file. (Exceptions include settings that are too file specific, like audio/subtitle stream selection.) There is still some need for per-file options. Debugging and encoding are use cases that profit from per-file options. Per-file profiles (as well as per-protocol and per-VO/AO options) need the implementation related mechanisms to backup and restore options when the playback file changes. Simplify the save-slot stuff, which is possible because there is no hierarchical play tree anymore. Now there's a simple backup field. Add a way to specify per-file options on command line. Example: mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3 will have the following options per file set: f1.mkv, f4.mkv: -o0 -o3 f2.mkv, f3.mkv: -o0 -o3 -o1 -o2 The options --{ and --} start and end per-file options. All files inside the { } will be affected by the options equally (similar to how global options and multiple files are handled). When playback of a file starts, the per-file options are set according to the command line. When playback ends, the per-file options are restored to the values when playback started.
* options: commandline: accept --foo=xyz style optionsUoti Urpala2011-07-291-1/+2
| | | | | | | | | | | | Allow writing commandline options with two leading dashes. In this mode a parameter for the option, if any, follows after a '='; following separate commandline arguments are never consumed as a parameter to a previous double-dash option. Flag options may omit parameter and behave like old single-dash syntax. "--fs=yes", "--fs=no" and "--fs" are all valid; the first two behave like configuration file "fs=yes" and "fs=no", and last is the same as old "-fs" (same effect as "--fs=yes").
* cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-1/+1
| | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* Merge svn changes up to r30475Uoti Urpala2010-03-091-0/+18
|\
| * Add license header to all top-level files missing them.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Move global mconfig to mpctxUoti Urpala2008-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | The global was used in the function cfg_include which handles the -include option. Make the address available in that function by creating a new dynamically allocated option in m_config_new that has the address in the option's private data. asxparser.c also used the global. Making it available through all ways the code could get called required a number of relatively straightforward changes to playtree and menu code.
* | Remove _s/_st suffix from some struct namesUoti Urpala2008-04-251-3/+3
|/ | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* Add necessary #includes to pass 'make checkheaders'.diego2008-03-041-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26163 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-221-5/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use leading underscores in multiple inclusion guards, they are reserved.diego2007-07-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2
* spelling/grammar/wording fixes in doxygen and non-doxygen commentsdiego2006-04-271-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18317 b3059339-0415-0410-9bf9-f77b7e298cf2
* Doxygen Attack! - Chapter 3albeu2006-04-251-1/+26
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18266 b3059339-0415-0410-9bf9-f77b7e298cf2
* warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>alex2003-05-301-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10212 b3059339-0415-0410-9bf9-f77b7e298cf2
* this patch adds an fallback to playlist (any but the plaintext-list format)arpi2003-01-121-1/+1
| | | | | | | | after all demuxers failed. so -playlist is not needed any more! patch by Fabian Franz <FabianFranz@gmx.de>, with some small modifications git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8926 b3059339-0415-0410-9bf9-f77b7e298cf2
* New config system + cleanup of header inter dependencyalbeu2002-11-121-4/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8165 b3059339-0415-0410-9bf9-f77b7e298cf2
* Playtree parser switch to a by line mode.albeu2002-02-211-2/+2
| | | | | | | Winamp (pls) playlist support. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4783 b3059339-0415-0410-9bf9-f77b7e298cf2
* Objectization of the play_tree_parser for more flexiblityalbeu2002-01-221-0/+25
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4309 b3059339-0415-0410-9bf9-f77b7e298cf2