diff options
author | wm4 <wm4@nowhere> | 2014-06-13 02:11:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-13 02:11:39 +0200 |
commit | e00aad18cb76d39cc520526cece1505c63a8afe0 (patch) | |
tree | 2c75ce913dd360f860713fc1937a8e6380b9a091 /player/command.h | |
parent | 6a4a5595d8d2a17188cdea64dfdfceed88d1905a (diff) | |
download | mpv-e00aad18cb76d39cc520526cece1505c63a8afe0.tar.bz2 mpv-e00aad18cb76d39cc520526cece1505c63a8afe0.tar.xz |
command: redo the property type
Instead of absuing m_option to store the property list, introduce a
separate type for properties. m_option is still used to handle data
types. The property declaration itself now never contains the option
type, and instead it's always queried with M_PROPERTY_GET_TYPE. (This
was already done with some properties, now all properties use it.)
This also fixes that the function signatures did not match the function
type with which these functions were called. They were called as:
int (*)(const m_option_t*, int, void*, void*)
but the actual function signatures were:
int (*)(m_option_t*, int, void*, MPContext *)
Two arguments were mismatched.
This adds one line per property implementation. With additional the
reordering of the parameters, this makes most of the changes in this
commit.
Diffstat (limited to 'player/command.h')
-rw-r--r-- | player/command.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.h b/player/command.h index 7ceeda22ff..846067b3bf 100644 --- a/player/command.h +++ b/player/command.h @@ -33,7 +33,7 @@ void property_print_help(struct mp_log *log); int mp_property_do(const char* name, int action, void* val, struct MPContext *mpctx); -const struct m_option *mp_get_property_list(void); +const struct m_property *mp_get_property_list(void); int mp_find_property_index(const char *property); void mp_notify(struct MPContext *mpctx, int event, void *arg); |