annotate m_property.h @ 32877:a095a4ed8ad3

Change message levels to 'error'. Because all these messages indicate that an error has occurred and additionally the processing stops, 'error' is the right message level. The GUI user will now be informed about these errors. Furthermore, the message names and texts have been revised.
author ib
date Thu, 24 Feb 2011 17:47:40 +0000
parents c1a3f1bbba26
children 87a1b3a11b33
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30429
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
1 /*
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
2 * This file is part of MPlayer.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
3 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
5 * it under the terms of the GNU General Public License as published by
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
7 * (at your option) any later version.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
8 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
12 * GNU General Public License for more details.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
13 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
14 * You should have received a copy of the GNU General Public License along
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
17 */
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 29263
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25716
diff changeset
19 #ifndef MPLAYER_M_PROPERTY_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25716
diff changeset
20 #define MPLAYER_M_PROPERTY_H
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
21
26131
83c95bd31aab Add necessary #includes to pass 'make checkheaders'.
diego
parents: 26029
diff changeset
22 #include "m_option.h"
83c95bd31aab Add necessary #includes to pass 'make checkheaders'.
diego
parents: 26029
diff changeset
23
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
24 /// \defgroup Properties
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
25 ///
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
26 /// Properties provide an interface to query and set the state of various
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
27 /// things in MPlayer. The API is based on the \ref Options API like the
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
28 /// \ref Config, but instead of using variables, properties use an ioctl like
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
29 /// function. The function is used to perform various actions like get and set
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
30 /// (see \ref PropertyActions).
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
31 ///@{
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
32
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
33 /// \file
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
34
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
35 /// \defgroup PropertyActions Property actions
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
36 /// \ingroup Properties
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
37 ///@{
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
38
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
39 /// Get the current value.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
40 /** \param arg Pointer to a variable of the right type.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
41 */
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
42 #define M_PROPERTY_GET 0
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
43
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
44 /// Get a string representing the current value.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
45 /** Set the variable to a newly allocated string or NULL.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
46 * \param arg Pointer to a char* variable.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
47 */
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
48 #define M_PROPERTY_PRINT 1
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
49
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
50 /// Set a new value.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
51 /** The variable is updated to the value actually set.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
52 * \param arg Pointer to a variable of the right type.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
53 */
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
54 #define M_PROPERTY_SET 2
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
55
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
56 /// Set a new value from a string.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
57 /** \param arg String containing the value.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
58 */
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
59 #define M_PROPERTY_PARSE 3
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
60
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
61 /// Increment the current value.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
62 /** The sign of the argument is also taken into account if applicable.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
63 * \param arg Pointer to a variable of the right type or NULL.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
64 */
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
65 #define M_PROPERTY_STEP_UP 4
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
66
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
67 /// Decrement the current value.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
68 /** The sign of the argument is also taken into account if applicable.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
69 * \param arg Pointer to a variable of the right type or NULL.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
70 */
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
71 #define M_PROPERTY_STEP_DOWN 5
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
72
23393
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
73 /// Get a string containg a parsable representation.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
74 /** Set the variable to a newly allocated string or NULL.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
75 * \param arg Pointer to a char* variable.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
76 */
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
77 #define M_PROPERTY_TO_STRING 6
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
78
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
79 /// Pass down an action to a sub-property.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
80 #define M_PROPERTY_KEY_ACTION 7
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
81
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
82 /// Get a m_option describing the property.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
83 #define M_PROPERTY_GET_TYPE 8
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
84
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
85 ///@}
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
86
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
87 /// \defgroup PropertyActionsArg Property actions argument type
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
88 /// \ingroup Properties
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
89 /// \brief Types used as action argument.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
90 ///@{
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
91
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
92 /// Argument for \ref M_PROPERTY_KEY_ACTION
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
93 typedef struct {
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
94 const char* key;
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
95 int action;
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
96 void* arg;
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
97 } m_property_action_t;
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
98
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
99 ///@}
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
100
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
101 /// \defgroup PropertyActionsReturn Property actions return code
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
102 /// \ingroup Properties
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
103 /// \brief Return values for the control function.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
104 ///@{
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
105
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
106 /// Returned on success.
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
107 #define M_PROPERTY_OK 1
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
108
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
109 /// Returned on error.
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
110 #define M_PROPERTY_ERROR 0
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
111
18283
67d35fe89c8d Fix most of the mistakes pointed out by Diego.
albeu
parents: 18258
diff changeset
112 /// \brief Returned when the property can't be used, for example something about
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
113 /// the subs while playing audio only
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
114 #define M_PROPERTY_UNAVAILABLE -1
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
115
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
116 /// Returned if the requested action is not implemented.
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
117 #define M_PROPERTY_NOT_IMPLEMENTED -2
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
118
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
119 /// Returned when asking for a property that doesn't exist.
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
120 #define M_PROPERTY_UNKNOWN -3
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
121
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
122 /// Returned when the action can't be done (like setting the volume when edl mute).
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
123 #define M_PROPERTY_DISABLED -4
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
124
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
125 ///@}
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
126
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
127 /// \ingroup Properties
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
128 /// \brief Property action callback.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
129 typedef int(*m_property_ctrl_f)(const m_option_t* prop,int action,void* arg,void *ctx);
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
130
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
131 /// Do an action on a property.
23393
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
132 /** \param prop_list The list of properties.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
133 * \param prop The path of the property.
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
134 * \param action See \ref PropertyActions.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
135 * \param arg Argument, usually a pointer to the data type used by the property.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
136 * \return See \ref PropertyActionsReturn.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
137 */
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
138 int m_property_do(const m_option_t* prop_list, const char* prop,
23393
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
139 int action, void* arg, void *ctx);
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
140
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
141 /// Print a list of properties.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
142 void m_properties_print_help_list(const m_option_t* list);
17914
f9cb6fc1608a Add an option to list the properties: -list-properties
albeu
parents: 17911
diff changeset
143
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
144 /// Expand a property string.
18283
67d35fe89c8d Fix most of the mistakes pointed out by Diego.
albeu
parents: 18258
diff changeset
145 /** This function allows to print strings containing property values.
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
146 * ${NAME} is expanded to the value of property NAME or an empty
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
147 * string in case of error. $(NAME:STR) expand STR only if the property
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
148 * NAME is available.
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 27647
diff changeset
149 *
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
150 * \param prop_list An array of \ref m_option describing the available
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
151 * properties.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
152 * \param str The string to expand.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
153 * \return The newly allocated expanded string.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
154 */
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
155 char* m_properties_expand_string(const m_option_t* prop_list,char* str, void *ctx);
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
156
18189
faa148210f2b Add the declarations for mp_property_find/do.
albeu
parents: 17914
diff changeset
157 // Helpers to use MPlayer's properties
faa148210f2b Add the declarations for mp_property_find/do.
albeu
parents: 17914
diff changeset
158
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
159 /// Do an action with an MPlayer property.
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents: 19104
diff changeset
160 int mp_property_do(const char* name,int action, void* val, void *ctx);
18189
faa148210f2b Add the declarations for mp_property_find/do.
albeu
parents: 17914
diff changeset
161
23393
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
162 /// Get the value of a property as a string suitable for display in an UI.
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
163 char* mp_property_print(const char *name, void* ctx);
a5e55cb59bbc Rework the property API to allow sub properties such as
albeu
parents: 22280
diff changeset
164
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
165 /// \defgroup PropertyImplHelper Property implementation helpers
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
166 /// \ingroup Properties
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
167 /// \brief Helper functions for common property types.
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
168 ///@{
18189
faa148210f2b Add the declarations for mp_property_find/do.
albeu
parents: 17914
diff changeset
169
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
170 /// Clamp a value according to \ref m_option::min and \ref m_option::max.
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
171 #define M_PROPERTY_CLAMP(prop,val) do { \
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
172 if(((prop)->flags & M_OPT_MIN) && (val) < (prop)->min) \
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
173 (val) = (prop)->min; \
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
174 else if(((prop)->flags & M_OPT_MAX) && (val) > (prop)->max) \
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
175 (val) = (prop)->max; \
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
176 } while(0)
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
177
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
178 /// Implement get.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
179 int m_property_int_ro(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
180 void* arg,int var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
181
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
182 /// Implement set, get and step up/down.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
183 int m_property_int_range(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
184 void* arg,int* var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
185
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
186 /// Same as m_property_int_range but cycle.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
187 int m_property_choice(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
188 void* arg,int* var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
189
27647
98478619a22c Add a m_property_flag_ro function for the default behaviour of a
reimar
parents: 26131
diff changeset
190 int m_property_flag_ro(const m_option_t* prop,int action,
98478619a22c Add a m_property_flag_ro function for the default behaviour of a
reimar
parents: 26131
diff changeset
191 void* arg,int var);
98478619a22c Add a m_property_flag_ro function for the default behaviour of a
reimar
parents: 26131
diff changeset
192
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
193 /// Switch betwen min and max.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
194 int m_property_flag(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
195 void* arg,int* var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
196
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
197 /// Implement get, print.
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
198 int m_property_float_ro(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
199 void* arg,float var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
200
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
201 /// Implement set, get and step up/down
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
202 int m_property_float_range(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
203 void* arg,float* var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
204
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
205 /// float with a print function which print the time in ms
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
206 int m_property_delay(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
207 void* arg,float* var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
208
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
209 /// Implement get, print
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
210 int m_property_double_ro(const m_option_t* prop,int action,
17911
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
211 void* arg,double var);
52f95509cd05 Add the new property API and implement a couple properties.
albeu
parents:
diff changeset
212
23416
ae4237717601 Move the time printing code out of the length property.
albeu
parents: 23394
diff changeset
213 /// Implement print
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
214 int m_property_time_ro(const m_option_t* prop,int action,
23416
ae4237717601 Move the time printing code out of the length property.
albeu
parents: 23394
diff changeset
215 void* arg,double var);
ae4237717601 Move the time printing code out of the length property.
albeu
parents: 23394
diff changeset
216
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
217 /// get/print the string
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
218 int m_property_string_ro(const m_option_t* prop,int action,void* arg, char* str);
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
219
23394
d4e8613ddc95 Make all the info available via the metadata API available via properties.
albeu
parents: 23393
diff changeset
220 /// get/print a bitrate
25716
fc8d4bd1689a All the m_property stuff works fine with constant m_option_t
reimar
parents: 25553
diff changeset
221 int m_property_bitrate(const m_option_t* prop,int action,void* arg,int rate);
23394
d4e8613ddc95 Make all the info available via the metadata API available via properties.
albeu
parents: 23393
diff changeset
222
18258
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
223 ///@}
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
224
96568be4bfdc Doxygen attack!
albeu
parents: 18189
diff changeset
225 ///@}
25553
6ac1ece1f9fe Add multiple inclusion guards to all header files that lack them.
diego
parents: 23416
diff changeset
226
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25716
diff changeset
227 #endif /* MPLAYER_M_PROPERTY_H */