Created
June 26, 2013 16:33
-
-
Save lu-zero/5868996 to your computer and use it in GitHub Desktop.
High level api, missing player reconfiguration on the fly. It is _really_ simple and easy to use, Ideally you create a playlist or load a playlist, with the default playlist being NULL. The items abstraction let you put in the playlist items and possibly add offsets within the file (later) the player abstraction let you seek and play within the …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct MPVPlayer; | |
MPVPlayer *mpv_alloc(); | |
int mpv_parse(MPVPlayer *m, int argc, char *argv, char *envp); | |
int mpv_play(MPVPlayer *m); | |
int mpv_pause(MPVPlayer *m); | |
int mpv_seek(MPVPlayer *m, pos); | |
int mpv_next(MPVPlayer *m, int index); | |
void mpv_free(MPVPlayer *m); | |
typedef struct MPVPlaylist; | |
int mpv_playlist_load(MPVPlayer *m, MPVPlaylist *p); | |
int mpv_playlist_from_url(MPVPlaylist **p, char *url); | |
int mpv_playlist_store(MPVPlaylist *p); | |
int mpv_playlist_to_file(MPVPlaylist *p, char *url); | |
int mpv_get_current_playlist(MPVPlayer *m, MPVPlaylist **p); | |
void mpv_playlist_free(MPVPlaylist *p); | |
typedef struct MPVItem; | |
int mpv_item_load(MPVItem **i, char *url); | |
int mpv_playlist_add(MPVPlaylist *p, MPVItem *i, int pos); | |
int mpv_playlist_pop(MPVPlaylist *p, int pos); | |
int mpv_playlist_iter(MPVPlaylist *p, callback); | |
int mpv_get_current_item(MPVPlayer *m, MPVItem **i); | |
void mpv_item_free(MPVItem *i); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment