Commit Graph

127 Commits

Author SHA1 Message Date
Uoti Urpala ef81031350 options: make "choice" option type parsing ignore case 2011-09-11 16:35:44 +03:00
Uoti Urpala 1f3ad32960 options: commandline: don't print video filter list twice
Video filter help output was printed twice since it used a MSGT type
that was not suppressed during preparsing. Fix. This removes a
"ID_VIDEO_FILTERS" line that was printed --identify, but I'm not aware of
anything using that and other things like audio filters have no such
ID_ output either. Also change some printf() calls to mp_msg() in code
printing filter-specific help.
2011-07-31 20:45:15 +03:00
Uoti Urpala ce112e0789 options: fix failure to parse trailing ',' in string list
A trailing separator in string list options was ignored after recent
commit e873d703e9 ("options: change option parsing to use bstr"),
which broke uses such as "-vo vdpau,". Fix.
2011-07-31 20:25:22 +03:00
Uoti Urpala ad48f8038c options: commandline: print error type for parse failures
If parsing an option fails, print a string corresponding to the parse
function return value (M_OPT_MISSING_PARAM etc). The primary
motivation is that the parsing code already outputs messages
explaining most problems, but does not itself print anything in the
missing parameter case. Before double-dash --options such errors were
rare (or rather they resulted in the next commandline argument being
silently misinterpreted as an argument to the previous option
instead); but now an argument like "--ss" should give a better
indication about the problem than just "Error parsing option".
2011-07-29 07:58:56 +03:00
Uoti Urpala e873d703e9 options: change option parsing to use bstr
Using bstr allows simpler parsing code, especially because it avoids
the need to modify or copy strings just to terminate extracted
substrings.
2011-07-29 05:50:38 +03:00
Uoti Urpala 507fa7e2c2 options: indicate ambiguous option parameters explicitly
Command line options like "-foo xyz" are ambiguous: "xyz" may be a
parameter to the option "foo" or an unrelated argument. Instead of
relying on the struct m_config mode field (commandline/file) pass
parameters to specify ambiguous mode explicitly. Meant for "--foo"
options which are never ambiguous on command line either.
2011-07-29 05:02:05 +03:00
Uoti Urpala 2670ceeb81 Merge branch 'mplayer1_changes' 2011-07-06 13:07:37 +03:00
reimar cedee1dc72 options: allow colorspace options to recognize "yvyu"
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33693 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 13:01:07 +03:00
Uoti Urpala 39e373aa8d options: allocate dynamic options with talloc
Allocate data structures for dynamic option values with talloc.
Hopefully there's no code left that tries to modify those dynamic
option values outside the option parser and relies on them being
malloc-allocated. Currently talloc functionality isn't used much and
the allocations are not hierarchical, so the main practical use for
now is just to allow very easy checking for memory leaks.
2011-07-06 06:47:26 +03:00
Uoti Urpala c5364305be commands: change property mechanism to use talloc strings 2011-07-03 20:04:21 +03:00
Uoti Urpala 774bb252aa cosmetics: reformat demux_lavf.c, m_option.[ch] and m_property.c 2011-07-03 18:39:26 +03:00
Uoti Urpala aba8a1838a video/colorspaces: add new 9/10-bit formats from libavcodec
Add new internal 9/10-bit IMGFMT values and mappings to the
corresponding libav* PIX_FMT_* values.

Partially based on a patch from Arne Bochem <arneb.mp@ccan.de>.
2011-06-26 06:27:50 +03:00
Uoti Urpala daafc5a368 options: fix -profile parsing after 2db33ab48c
Commit 2db33ab48c ("options: support string list separators other
than ','") started using the "priv" field in options of string list
type to store the separator character. However, the "profile" option
has a custom type which uses the same parsing function but uses the
"priv" field for another purpose. As a result "-profile" parsing used
a "random" character as the separator instead of ','; at least uses
which depended on ',' working were likely to fail, and if the
separator used happened to be a character occurring in the profile
name then any use of -profile could break. Fix by adding a check in
the parsing function to only read the priv field if the option type is
normal string list.
2011-05-07 19:44:58 +03:00
Clément Bœsch b68f9fef32 cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
Uoti Urpala 2db33ab48c options: support string list separators other than ','
Allow specifying a custom separator character for options of string
list type, and use that to define OPT_PATHLIST which takes a list of
strings separated by ':' (or ';' on Windows).
2011-04-20 04:22:52 +03:00
Uoti Urpala f923fd720c options: remove unused "func_full" option type
vo_zr was the last user of the "func_full" option type. I think it's
better if future features are implemented using more straightforward
option functionality. Delete the func_full implementation.
2011-01-31 16:03:11 +02:00
Uoti Urpala 8636eb77c5 options: add special -leak-report option
Add a special option "-leak-report" that enables talloc leak
reporting.  It only works if it's given as the first argument.

The code abuses the CONF_TYPE_PRINT option type to make main option
parsing ignore the option. The parser incorrectly consumed the
following commandline argument as a "parameter" for options of this
type when they had the flag to not exit after printing the message.
Fix this. It makes no difference for any previously existing option I
think.
2011-01-15 22:36:27 +02:00
Uoti Urpala 0afb326035 Merge branch 'hr-seek'
* hr-seek:
  input: add default keybindings Shift+[arrow] for small exact seeks
  input: support bindings with modifier keys for X input
  core: audio: make ogg missing audio timing workaround more complex
  core: add support for precise non-keyframe-limited seeks
  core: add struct for queued seek info
  commands: add generic option -> property wrapper
  options: add "choice" option type, use for -pts-association-mode
  core: remove looping in update_video(), modify command handling a bit
  core: seek: use accurate seek mode with audio-only files
  core: avoid using sh_video->pts as "current pts"
  libvo: register X11 connection fd in input event system
  core: timing: add special handling of long frame intervals
  core: move central play loop to a separate function

Conflicts:
	DOCS/tech/slave.txt
2010-12-20 19:17:43 +02:00
Uoti Urpala 4a26b4c024 cosmetics: remove unused code, small formatting tweaks 2010-12-20 06:42:04 +02:00
Uoti Urpala 7e366113f7 options: add "choice" option type, use for -pts-association-mode
Add a "choice" option type. Options of this type take a string as
input and set an int option variable to the value corresponding to the
string. The string->int mapping is option-specific and is given in the
option definition. Strings not found in the mapping are rejected as
invalid option values.

Change the option -pts-association-mode to use this new option type
and accept values "auto, decoder, sort" instead of "0, 1, 2". The
change in accepted values shouldn't cause problems as this option is
not appropriate to use in normal user config files.
2010-12-18 10:14:25 +02:00
diego 12d3e0df99 cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:12 +02:00
cigaes bc347d88cc options: modify parse_timestring(), make public
Make the parse_timestring public, with a slightly extended API.
As a consequence, "2 hours" is no longer recognized as a valid timestamp
meaning "2 seconds".

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32514 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:38 +02:00
diego 69e3e06a1a Move code to avoid forward declarations in top-level .c files
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32421 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
siretart 2e6ff523dd spelling fixes
Found by the Debian QA tool 'lintian'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31913 b3059339-0415-0410-9bf9-f77b7e298cf2

reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:03 +02:00
reimar f145bebcae m_option.c: fix list termination with -*-pre options
Ensure that e.g. -af-pre will not cause the filter list to be
unterminated when the list was empty before.
Should fix bug #1687.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31559 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:43 +02:00
Uoti Urpala e1cd86076f Merge svn changes up to r31141 2010-05-07 22:13:35 +03:00
cehoyos 02641f54ee Add support for 12-bit color mode on framebuffer devices.
Patch Janusz Krzysztofik, jkrzyszt A tis icnet pl 


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31139 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-06 10:18:25 +00:00
Uoti Urpala a2133d7684 options: move -chapter values to option struct
-chapter can optionally take a range with a start and an end. Add a
new option type which supports such values and use that instead of a
custom per-option function.

This commit also fixes a build configuration bug: before the
availability of the -chapter option depended on DVD functionality
being enabled in the binary, even though the option works with other
sources too.
2010-04-25 22:48:10 +03:00
Uoti Urpala e74708f619 Merge svn changes up to r30748 2010-03-10 01:50:55 +02:00
Uoti Urpala 12d3caebc7 Merge svn changes up to r30475 2010-03-09 19:18:43 +02:00
Uoti Urpala 2569c2e2bc Make help text translatable
Translate help_text and also make all CONF_TYPE_PRINT option output
translatable (though no translations exist yet for anything other than
the main help text).
2010-03-07 21:34:40 +02:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-26 15:01:37 +00:00
reimar 42096a34d5 Make more option-parsing related function arguments const.
Prerequisite for making stream_open filename const in a proper way.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30737 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:32:28 +00:00
diego 99c1bbca2a Add license header to all top-level files missing them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 23:24:23 +00:00
Uoti Urpala 69fe2522f8 Merge svn changes up to r30301 2010-01-25 15:07:30 +02:00
reimar 33bc71f10d Add support for distinguishing between little- and big-endian SPDIF AC3
and converting between both.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 20:27:52 +00:00
Uoti Urpala 231b33a02f Merge svn changes up to r30165 2010-01-08 01:05:30 +02:00
reimar 8afc25d710 Add support for YUV format with alpha and fix the codecs.conf entry for vp6a
to use it.
Fixes playback of samples in http://samples.mplayerhq.hu/FLV/flash_with_alpha/


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30157 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-12-31 23:45:07 +00:00
reimar a326622304 Add support for 16-bit per component YUV formats.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30152 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-12-31 22:53:25 +00:00
reimar cc46a64a26 Add support for 440p colorspace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30140 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-12-30 12:03:17 +00:00
Uoti Urpala 5995bc175a Merge svn changes up to r29962 2009-11-23 01:56:21 +02:00
reimar 1f93734fd8 Support 16-bit-per-component RGB formats (rgb48[bln]e) in option parser.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29942 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 18:47:47 +00:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
Uoti Urpala e0172b96e3 Merge svn changes up to r28862 2009-03-07 01:04:41 +02:00
reimar 2e1f8e3670 100l, remove a pointless opt = NULL assignment that made print_int crash since r28794
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28803 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-03 18:12:03 +00:00
reimar 39bb720ef8 Add a 64 bit integer type to the suboption parser.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28794 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-02 11:17:50 +00:00
reimar b9102d0b06 Use strtoll in parse_int to avoid discrepancies between 32 and 64 bit systems.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28793 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-02 11:10:11 +00:00
reimar 3dbe44fc07 Minor cosmetics: fix indentation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28792 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-02 11:06:05 +00:00
Uoti Urpala e46ce9c0ac Merge svn changes up to r27899 2008-11-06 20:41:40 +02:00