2010-01-30 23:24:23 +00:00
|
|
|
/*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_COMMAND_H
|
|
|
|
#define MPLAYER_COMMAND_H
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2008-03-31 04:10:54 +00:00
|
|
|
struct MPContext;
|
|
|
|
struct mp_cmd;
|
2013-12-21 18:36:33 +00:00
|
|
|
struct mp_log;
|
2008-03-04 23:35:24 +00:00
|
|
|
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
void command_init(struct MPContext *mpctx);
|
2013-09-30 20:27:37 +00:00
|
|
|
void command_uninit(struct MPContext *mpctx);
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
|
2014-06-01 01:41:46 +00:00
|
|
|
int run_command(struct MPContext *mpctx, struct mp_cmd *cmd);
|
2013-09-20 21:33:38 +00:00
|
|
|
char *mp_property_expand_string(struct MPContext *mpctx, const char *str);
|
2014-02-20 13:46:23 +00:00
|
|
|
char *mp_property_expand_escaped_string(struct MPContext *mpctx, const char *str);
|
2013-12-21 18:36:33 +00:00
|
|
|
void property_print_help(struct mp_log *log);
|
2012-09-21 10:19:59 +00:00
|
|
|
int mp_property_do(const char* name, int action, void* val,
|
|
|
|
struct MPContext *mpctx);
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2014-02-10 20:01:35 +00:00
|
|
|
void mp_notify(struct MPContext *mpctx, int event, void *arg);
|
2014-06-01 01:41:36 +00:00
|
|
|
void mp_notify_property(struct MPContext *mpctx, const char *property);
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
|
2014-08-01 23:39:28 +00:00
|
|
|
int mp_get_property_id(const char *name);
|
|
|
|
uint64_t mp_get_property_event_mask(const char *name);
|
|
|
|
|
|
|
|
// Must start with the first unused positive value in enum mpv_event_id
|
2014-07-31 02:19:41 +00:00
|
|
|
#define INTERNAL_EVENT_BASE 24
|
|
|
|
#define MP_EVENT_CACHE_UPDATE (INTERNAL_EVENT_BASE + 0)
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_COMMAND_H */
|