diff options
author | wm4 <wm4@nowhere> | 2014-02-10 21:30:55 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-10 21:30:55 +0100 |
commit | a6da2a66080a53d5885446ea9d788470c7b259d2 (patch) | |
tree | 683a97850192a6a106a4e4a325f76ba626f05fa4 /DOCS/client_api_examples/shared.h | |
parent | 3dd12104d9c021a10ba92680896edb777ae852d3 (diff) | |
download | mpv-a6da2a66080a53d5885446ea9d788470c7b259d2.tar.bz2 mpv-a6da2a66080a53d5885446ea9d788470c7b259d2.tar.xz |
Add a client API example
Diffstat (limited to 'DOCS/client_api_examples/shared.h')
-rw-r--r-- | DOCS/client_api_examples/shared.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/shared.h b/DOCS/client_api_examples/shared.h new file mode 100644 index 0000000000..027c03f1e9 --- /dev/null +++ b/DOCS/client_api_examples/shared.h @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <stdlib.h> + +static inline void check_error(int status) +{ + if (status < 0) { + printf("mpv API error: %s\n", mpv_error_string(status)); + exit(1); + } +} |