libmpv.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * https://github.com/mpv-player/mpv/blob/master/libmpv/client.h
  3. * int mpv_set_property(mpv_handle *ctx, const char *name, mpv_format format,
  4. * void *data);
  5. * Set a property to a given value. Properties are essentially variables which
  6. * can be queried or set at runtime. For example, writing to the pause property
  7. * will actually pause or unpause playback.
  8. */
  9. /**
  10. * TODO reload config (?)
  11. * Disconnect and destroy the mpv_handle. ctx will be deallocated with this
  12. * API call. This leaves the player running. If you want to be sure that the
  13. * player is terminated, send a "quit" command, and wait until the
  14. * MPV_EVENT_SHUTDOWN event is received, or use mpv_terminate_destroy().
  15. */
  16. /* void mpv_detach_destroy(mpv_handle *ctx);
  17. */
  18. /**
  19. * TODO perhaps use this instead of … I'm too lazy to type.
  20. * Load a config file. This loads and parses the file, and sets every entry in
  21. * the config file's default section as if mpv_set_option_string() is called.
  22. *
  23. * The filename should be an absolute path. If it isn't, the actual path used
  24. * is unspecified. (Note: an absolute path starts with '/' on UNIX.) If the
  25. * file wasn't found, MPV_ERROR_INVALID_PARAMETER is returned.
  26. *
  27. * If a fatal error happens when parsing a config file, MPV_ERROR_OPTION_ERROR
  28. * is returned. Errors when setting options as well as other types or errors
  29. * are ignored (even if options do not exist). You can still try to capture
  30. * the resulting error messages with mpv_request_log_messages(). Note that it's
  31. * possible that some options were successfully set even if any of these errors
  32. * happen.
  33. *
  34. * @param filename absolute path to the config file on the local filesystem
  35. * @return error code
  36. */
  37. /* int mpv_load_config_file(mpv_handle *ctx, const char *filename);
  38. */
  39. extern mpv_handle *ctx;
  40. int libmpv_init(void);
  41. int libmpv_play(char *file);
  42. int libmpv_queue(char *file);
  43. int libmpv_next(void);
  44. int libmpv_prev(void);
  45. int libmpv_stop(void);
  46. int libmpv_keypress(char *);
  47. int libmpv_event_file_loaded(void);