Mercurial > mplayer.hg
annotate subopt-helper.h @ 23510:a6c619ee9d30
Teletext support for tv:// (v4l and v4l2 only)
modified patch from Otvos Attila oattila at chello dot hu
Module uses zvbi library for all low-level VBI operations (like I/O with vbi
device, converting vbi pages into usefull vbi_page stuctures, rendering them
into RGB32 images).
All teletext related stuff (except properties, slave commands and rendering
osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented
in tvi_vbi.c
New properties:
teletext_page - switching between pages
teletext_mode - switch between on/off/opaque/transparent modes
teletext_format - (currently read-only) allows to get format info
(black/white,gray,text)
teletext_half_page - trivial zooming (displaying top/bottom half of teletext
page)
New slave commands:
teletext_add_dec - user interface for jumping to any page by editing page number
interactively
teletext_go_link - goes though links, specified on current page
author | voroshil |
---|---|
date | Sun, 10 Jun 2007 00:06:12 +0000 |
parents | 5949a654e2d4 |
children | 3baf6a2283da |
rev | line source |
---|---|
14281 | 1 #ifndef SUBOPT_HELPER_H |
2 #define SUBOPT_HELPER_H | |
3 | |
4 /** | |
5 * \file subopt-helper.h | |
6 * | |
7 * \brief Datatype and functions declarations for usage | |
8 * of the suboption parser. | |
9 * | |
10 */ | |
11 | |
12 #define OPT_ARG_BOOL 0 | |
13 #define OPT_ARG_INT 1 | |
14 #define OPT_ARG_STR 2 | |
14538
00c3c4111017
New suboption type: malloc'ed, zero terminated string
reimar
parents:
14285
diff
changeset
|
15 #define OPT_ARG_MSTRZ 3 ///< A malloced, zero terminated string, use free()! |
16720 | 16 #define OPT_ARG_FLOAT 4 |
14281 | 17 |
14285 | 18 typedef int (*opt_test_f)(void *); |
19 | |
14281 | 20 /** simple structure for defining the option name, type and storage location */ |
21 typedef struct opt_s | |
22 { | |
19194
5949a654e2d4
marks some read-only char* inside structs as const, patch by Stefan Huehner, stefan At huehner-org
reynaldo
parents:
19104
diff
changeset
|
23 const char * name; ///< string that identifies the option |
14281 | 24 int type; ///< option type as defined in subopt-helper.h |
25 void * valp; ///< pointer to the mem where the value should be stored | |
14285 | 26 opt_test_f test; ///< argument test func ( optional ) |
14281 | 27 int set; ///< Is set internally by the parser if the option was found. |
28 ///< Don't use it at initialization of your opts, it will be | |
29 ///< overriden anyway! | |
30 } opt_t; | |
31 | |
32 /** parses the string for the options specified in opt */ | |
33 int subopt_parse( char const * const str, opt_t * opts ); | |
34 | |
35 | |
36 /*------------------ arg specific types and declaration -------------------*/ | |
37 typedef struct strarg_s | |
38 { | |
14538
00c3c4111017
New suboption type: malloc'ed, zero terminated string
reimar
parents:
14285
diff
changeset
|
39 int len; ///< length of the string determined by the parser |
14281 | 40 char const * str; ///< pointer to position inside the parse string |
41 } strarg_t; | |
42 | |
14736 | 43 |
44 int int_non_neg( int * i ); | |
45 int int_pos( int * i ); | |
46 | |
19104
2ec2301183cd
marks several read-only string parameters which aren't modified inside the called function as const. Patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents:
16720
diff
changeset
|
47 int strargcmp(strarg_t *arg, const char *str); |
15734
7e4fa8fc255c
helper functions for comparing strarg_t "strings".
reimar
parents:
14736
diff
changeset
|
48 int strargcasecmp(strarg_t *arg, char *str); |
7e4fa8fc255c
helper functions for comparing strarg_t "strings".
reimar
parents:
14736
diff
changeset
|
49 |
14281 | 50 #endif |