Commit Graph

14 Commits

Author SHA1 Message Date
wm4 51e198c2a1 Merge remote-tracking branch 'origin/master'
Conflicts:
	.gitignore
	bstr.c
	cfg-mplayer.h
	defaultopts.c
	libvo/video_out.c

The conflict in bstr.c is due to uau adding a bstr_getline function in
commit 2ba8b91a97. This function already existed in this branch.
While uau's function is obviously derived from mine, it's incompatible.
His function preserves line breaks, while mine strips them. Add a
bstr_strip_linebreaks function, fix all other uses of bstr_getline, and
pick uau's implementation.

In .gitignore, change vo_gl3_shaders.h to use an absolute path
additional to resolving the merge conflict.
2012-07-28 17:24:05 +02:00
Uoti Urpala 2ba8b91a97 build, codec-cfg.c: simplify builtin codecs.conf handling
The player can read codec mapping (codecs.conf) from an external file
or use embedded defaults. Before, the defaults were stored in the
player binary in the form of final already-parsed data structures.
Simplify things by storing the text of the codecs.conf file instead,
and parse that at runtime the same way an external file would be
parsed.

To create the previous parsed form, the build system first compiled a
separate binary named "codec-cfg", which parsed etc/codecs.conf and
then wrote the results as a C data structure that could be compiled
into the program. The new simple conversion of codecs.conf into a C
string is handled by the new script TOOLS/file2string.py.

After removing the codec-cfg binary, HOST_CC is no longer used for
anything. Remove the --host-cc configure option and associated logic.

Also remove the codec2html and codec-cfg-test functionality. Building
those was already broken and nobody cared.

There was a broken 3-character-long "fourcc" entry in etc/codecs.conf.
This happened to be accepted before but triggered a parse error after
the changes. Remove the broken entry and make the parsing functions
explicitly test for this error.
2012-07-16 21:08:42 +03:00
wm4 f0ce95607f subassconvert: handle unquoted attributes in subrip font tags
Previously, mplayer didn't convert tags like <font color=#00FF00>. But
such subtitles exist in the wild, and should be handled.
2012-04-17 01:27:22 +03:00
wm4 166a7de4cf input: allow unicode keys and reassign internal key codes
This moves all key codes above the highest valid unicode code point
(which is 0x10FFFF). All key codes below MP_KEY_BASE now directly map
to unicode (KEY_ENTER is 13, carriage return). Configuration files
(input.conf) can contain unicode characters in UTF-8 to map non-ASCII
characters/keys.

This shouldn't change anything user visible, except that "direct key
codes" (as used in input.conf) will change their meaning.

Parts of the bstr functions taken from libavutil's GET_UTF8 and
slightly modified.
2012-03-25 22:30:37 +03:00
wm4 70bf672096 bstr: add bstr_eatstart() 2012-02-09 12:44:19 +01:00
wm4 f88674509e bstr: add some utility functions
bstr_strip_ext and bstr_get_ext were taken from find_subfiles.c.

bstr_cut is extended to work like bstr_splice: passing a negative
argument will start counting from the end of the string, e.g.
  bstr_cut("abc", -2) == "bc"
2012-01-18 04:24:38 +01:00
wm4 7700e6effc bstr: add function for UTF-8 parsing (taken from libav)
Parts taken from libavutil's GET_UTF8 and slightly modified.
2012-01-14 14:35:39 +01: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 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 d6890a7b53 input: fix input.conf parse errors
Commit df899f59be removing a write outside a buffer triggered another
problem, as for some reason the code did not 0-terminate its read
buffer in the specific case that it had encountered an EOF, and as a
result could parse contents left in the buffer for a second time.
Usually this resulted in parsing error messages. Fix the problem by
rewriting the offending code in a less hacky form.
2011-07-20 04:41:51 +03:00
Uoti Urpala a2d28010cc cleanup: find_subfiles.c: simplify (mainly using bstr) 2011-04-20 04:22:53 +03:00
Uoti Urpala bdfdece245 subs: move vobsub loading logic down to find_subfiles.c
Analogously to the previous commit, move path handling logic for
loading external vobsub files from mplayer.c to find_subfiles.c.

Based on a commit from Clément Bœsch but fixed and simplified.
2011-04-20 04:22:52 +03:00
Uoti Urpala 962eec0440 bstr.[ch], path.[ch]: add string and path handling functions
Add some new string and path handling functions to be used in
following commits.

Use new path handling functions to simplify find_files().
2011-02-26 16:40:31 +02:00
Uoti Urpala d72541b75c bstr.[ch]: add new files for struct bstr related functionality
Move "struct bstr" definition from ebml.h to its own header and add
some utility functions/macros. Change length field type from int to
size_t and adjust using code accordingly.

Partially based on a patch from Anton Khirnov.
2010-05-20 23:50:18 +03:00